Write an ASM program that evaluates the following expression, using variables:
EDX = (A + B) (C + D)
Declare and initialize the memory variables A, B, C, and D to 32-bit signed integer values -10, +210, -3456, +43210, respectively. Register EDX contains the result.
- Display the string EDX = (A + B) (C + D) alone in a single line.
- Display the values of all the variables together in the next line; each separated by 3 spaces and a dash and 3 spaces again.
- Display an empty line
- Display the result EDX, in binary, then in decimal, and then in hexadecimal; each in a separate line.
Question #2 (10 points)
Write an ASM program that uses the variable below and MOV instructions to copy the value from bigEndian to littleEndian, reversing the order of the bytes. The numbers 32bit value is understood to be 12345678h.
.data bigEndian BYTE 12h, 34h, 56h, 78h littleEndian DWORD ?
Display the values of bigEndian and littleEndian.
Reviews
There are no reviews yet.