I tried to compile the following codes using an online compiler.
This is the code:
section .data
EAX:12131415h
EDX:12345678h
section .code
_start:
Rol EAX, 16
Rol EAH, 8
Rol EAL, 8
Rol EDX, 16
Rol EDH, 8
Rol EDL, 8
Int 21h
.end
Does anyone know how to fix this error?
This is the problem that I tried to answer:
We have an 8 bytes width number, so we save the lower bytes in EAX and higher bytes in EDX: for example number 1234567812131415h will be saved like EAX = 12131415h, EDX = 12345678h. Write a general-purpose program that is able to reverses any number 8 bytes width number that its least significant bytes are in EAX and its most significant bytes are saved in EDX . Note: Reverse means that our sample number becomes: EAX=78563412h and EDX = 15141312h.