很明显有Sign-flag。但是当我有如下代码块时:
;starts with parry,zero set
mov eax,100 ; mov does not affect the flags
neg eax ; sets carry,adjust and sign,unsets zero
mov ebx,4000000000; mov does not affect the flags
mov ecx,eax ; mov does not affect the flags
mov edx,50 ; mov does not affect the flags
add ebx,edx ; unsets all set flags,value of ebx is 4000000050
我很难理解程序如何知道add ebx,edx
是4000000050
。
请记住,符号标志仍设置为否定eax
。
并且由于程序集没有像C这样的类型来区分signed
和unsigned
,并且ebx
的最高位被设置,因此存储在ebx
中的值可能是其实际值也可以是2的补码。我们不知道。
至少这是我的理解。因此,程序如何知道ebx
是+4000000000
,而不是二进制的2的补码是4000000000
的负值。