Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


Subjectgot it (king of answering my own questions) Reply to this message
Posted bynewsdee
Posted on01/23/05 10:23 PM



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]

-
Entire Thread
Subject  Posted byPosted On
*emulating register overflow?  newsdee01/23/05 10:13 PM
.*thanks guys, very interesting insights  newsdee01/28/05 00:02 AM
..*Re: thanks guys, very interesting insights  Bart T.01/28/05 06:55 PM
.*Re: emulating register overflow?  Bart T.01/24/05 08:43 PM
..got it (king of answering my own questions)  newsdee01/23/05 10:23 PM
..*Re: got it (king of answering my own questions)  finaldave01/25/05 11:56 AM