Subject: Re: [stella] time to stick me with a fork? From: "Ronald A. Laski, Jr." <rlaski@xxxxxxxxx> Date: Sun, 14 Mar 2004 14:31:18 -0600 |
In a nutshell - the carry bit is essentially the 9th bit of accumulator (possibly other math functions of the cpu as well - it's been a number of years since I've touched 6502 programming) so, when your addition results in a value greater than 255 decimal, the 9th bit (carry) catches the carryover. In a subtraction, it PREVENTS an underflow. (in other words, when you set the 9th bit of the accumulator to 1 it becomes impossible for your subtraction to go below zero, or to become negative.)Subpixel Joust Pong comes to mind. Everyone on the group said it was the right thing to do, and it made all the difference in the world, but 16 bit math still makes me go crosseyed sometimes. (I understand why you clear the carry before addition, but owe it to myself to spend some time w/ the 6502 emulator and figure out why you need to set the carry before subtraction.)
---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] time to stick me with , KirkIsrael | Thread | Re: [stella] time to stick me with , KirkIsrael |
Re: [stella] time to stick me with , KirkIsrael | Date | Re: [stella] time to stick me with , KirkIsrael |
Month |