[英]x86 assembly: How does the 'subl' command work in AT&T syntax
%edx
has a value of 0x3
, and %eax
has a value of 0x100
. %edx
的值为0x3
, %eax
的值为0x100
。 Then we have the instruction: subl %edx, %eax
What's the result value of %eax
? 然后我们有指令:
subl %edx, %eax
什么的结果值%eax
?
You have 你有
movl $3, %edx
movl $0x100, %eax
as input values. 作为输入值。 The instruction
指令
subl %edx, %eax
just subtracts 3(dec) in EDX from 100(hex) in EAX resulting in 100h-3h= 0FDh
. 只需从EAX的100(十六进制)中减去EDX的3(十进制)即可得出100h-3h =
0FDh
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.