Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions