| | |
NEG flags question
![]() |
Hi! I have the following code:
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
asm Syntax (Toggle Plain Text)
mov al, 5d 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
![]() |
Other Threads in the Assembly Forum
- Previous Thread: Adding Decimal Numbers in Assembly
- Next Thread: need help with assembler program
| Thread Tools | Search this Thread |





