Quote:
|
Originally Posted by yongkimleng
Haha I'm an idiot at ASM.. yet to learn it :/ What do you mean by the hardware add function works the same way as... ???
|
the adds roll over to zero.....
let's for instance take an unsigned integer, 0xFFFF. when we add 0x0001, and perform the "ADD" instruction, the ALU takes the value of the first digit and starts bit shifting, starting the carry to the next digit. but... we don't have any more bits!
so what basically happens in hardware is:
0xFFFF & 0x0000 //clear already filled digits since we're moving up a place
0x0001 << 0x0005 //working register now 0x0000 with a 1 hanging off to the left
and in the end, we're left with 0x0000!
i think now you understand why you never have to stop+reset the timer.
-Q