x86 assembly: How does the ‘subl’ command work in AT&T syntax

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.

Leave a Comment