I start to learn x86 64bit programming and I'm confused about a thing.
I know that numbers on 8 bits can have values in the range -128 to 127 for signed numbers and 0 to 255 for unsigned numbers, and numbers of 16 bits can have values in the range -32768 to 32767
Now my question: Let's say I have a register AX which is a 16bits register and AH which is 8 bits register. Now, what values should AX take such that the instruction neg AL to set the overflow flag to be 1 ?
a) 8000h b)255 c)7FFFh d)0 e)FFFF f) -127
I know that I can put in AX register numbers between -32768 and 32767 but how AL register is modifying when I put a numbers in AX? For example, I write mov ax,-127 which is fine, how AL is modifying?