I'm learning to program in assembly and I have a problem that is as follows:
I have a result of a subtraction in 32-bit number, and it has to return a 64-bit number.
Note: I am using a 32-bit linux vm
I'm learning to program in assembly and I have a problem that is as follows:
I have a result of a subtraction in 32-bit number, and it has to return a 64-bit number.
Note: I am using a 32-bit linux vm
.intel_syntax noprefix
.comm diff64, 8, 8 # Declara simbolo de 64 bits
MOV EBX, 87654321 # Minuendo em EBX
MOV EAX, 12345678 # Subtraendo em EAX
SUB EBX, EAX # Subtrai EAX de EBX, resultado em EAX
MOV DWORD PTR diff64, EAX # Preenche 32bits menos significativos do simbolo de 64bits
MOV DWORD PTR diff64 + 4, 0 # Preenche 32bits mais significativos do simbolo de 64bits