Question: Hello I'm having some trouble with this programming question in assembly. The question asks to change values from bigEndian to littleEndian reversing the order of

Hello I'm having some trouble with this programming question in assembly. The question asks to change values from bigEndian to littleEndian reversing the order of bytes. I have the program answer written below. But when I run it it doesn't do anything. Can someone help?

Question:

Write an ASM program that uses the variables below and MOV instructions to copy the value from bigEndian to littleEndian, reversing the order of the bytes. The numbers 32-bit value is understood to be 12345678h. .data bigEndian BYTE 12h, 34h, 56h, 78h littleEndian DWORD ?

/////////////////////////////////////////////////Code Below////////////////////////////////////////////////

INCLUDE Irvine32.inc INCLUDELIB Irvine32.lib

ExitProcess proto

.data bigEndian BYTE 12h, 34h, 56h, 78h littleEndian DWORD ?

.code main PROC

mov ah, byte ptr bigEndian mov al, byte ptr [bigEndian + 1] mov word ptr [littleEndian + 2], ax mov ah, byte ptr [bigEndian + 2] mov al, byte ptr [bigEndian + 3] mov word ptr [littleEndian], ax invoke ExitProcess,0 main ENDP END Main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!