Users browsing this thread: 3 Guest(s)
Newbie Still Doesn't Understand Code

#12
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
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.
  Find
Quote  



Messages In This Thread
RE: Newbie Still Doesn't Understand Code - by dn - 09-21-2016, 12:06 PM
RE: Newbie Still Doesn't Understand Code - by madsiur - 10-06-2016, 01:44 PM

Forum Jump:

Users browsing this thread: 3 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite