![]() |
Substraction...
Hi how can i substract value1 from EAX.
value1 = 0FFFFh. |
MOV eax,value1
sub eax,value1 Is that correct? |
It appears to be correct
|
I would suggest that you could just set EAX to zero. However, if you want to subtract value1 from another value, then put the other value in EAX and subtract value1.
|
So is right:
mov eax,value1 sub eax,value1 I know what you are saying: mov eax,0. but this is what the Mr. want me to do. thanks DaWei. |
If you subtract a value from itself, you will get zero. At least, it used to be that way. I won't address possible glitches arising from twos-complement usage.
|
| All times are GMT -5. The time now is 8:00 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC