|
This algorithm is used to decrease the counter by 1... I keep the rightmost values (the least significant bits), which, if I ignore the carry, results in the register decreasing by 1 at each iteration...
Amazing what a small piece of paper and the Windows calculator (in scientific mode) can do for you. :-)
Here's the breakdown:
1F = 0001 1111 = 1F FF = 1111 1111 ----------------- <- sum 11E = 1 0000 1110 1E = 0000 1110 <- keep 8 least significant bits FF = 1111 1111 ----------------- <- sum 11D = 1 0000 1101 1D = 0000 1101 ... etc ...
 [download a life]
|