Users browsing this thread: 3 Guest(s)
Newbie Still Doesn't Understand Code
For any operation affection the Zero flag, number having the highest bit set (bit 7) can be considered negative.
It depends what you do with the number. Doing 255 + 1 will equal doing -1 + 1. It's $FF in both cases and the result is 0. The carry flag is set here. Doing 1 minus 2 will equal 1 but the carry will be cleared. It depends what you do with the carry (BSC, BCC).
Short story, $FF can equal minus 1.
It depends what you do with the number. Doing 255 + 1 will equal doing -1 + 1. It's $FF in both cases and the result is 0. The carry flag is set here. Doing 1 minus 2 will equal 1 but the carry will be cleared. It depends what you do with the carry (BSC, BCC).
Short story, $FF can equal minus 1.
« Next Oldest | Next Newest »
Users browsing this thread: 3 Guest(s)