NEG flags question

Reply

Join Date: Sep 2008
Posts: 273
Reputation: Sci@phy will become famous soon enough Sci@phy will become famous soon enough 
Solved Threads: 42
Sci@phy's Avatar
Sci@phy Sci@phy is offline Offline
Posting Whiz in Training

NEG flags question

 
0
  #1
Nov 8th, 2008
Hi! I have the following code:
  1. mov al, 5d
  2. neg al

When it executes, CF = SF = AF = 1
Ok, I think I understand why
AF (number is bigger than 00001111b ?),
SF (most significant bit is now 1 not 0)

But what I don't understand is why CF?
I thought it happens only if you go out of boundaries, like if result exceedes FF (100h or above can't fit in bit)

Please, help poor begginer
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Assembly Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC