assmbly language please.     Proof of your solutions and test results: To show the operation of your program and to verify results from execution, you should use procedures WriteString, WriteInt, DumpMem and DumpReg, whichever applicable for a particular exercise, to display the results.please Make sure the library file Irvine32.inc is included on top of your program; this .inc file includes all the procedures mentioned above, and more. And ntegrate the calls to these procedures to output the results onto the console.   Write a program that uses the variables below and MOV instructions to copy the value from bigEndian to littleEndian, reversing the order of the bytes. The number’s 32-bit value is understood to be 12345678 hexadecimal. .data bigEndian BYTE 12h,34h,56h,78h littleEndian DWORD?   Hint: Using DumpMem is the best way to show the effect - byte orders "before" and "after"  Sample output: DumpMem output showing Big Endian Byte Order Dump of offset 001E6000 ------------------------------- 12 34 56 78 DumpMem output showing Little Endian Byte Order Dump of offset 001E6004 ------------------------------- 78 56 34 12 IMPORTANT: for this exercise, NOT allowable to use any one of these directives: .IF, .ELSE, .ELSEIF, .WHILE, .REPEAT, etc

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

assmbly language please.     Proof of your solutions and test results: To show the operation of your program and to verify results from execution, you should use procedures WriteString, WriteInt, DumpMem and DumpReg, whichever applicable for a particular exerciseto display the results.please Make sure the library file Irvine32.inc is included on top of your program; this .inc file includes all the procedures mentioned above, and more. And ntegrate the calls to these procedures to output the results onto the console.

 

Write a program that uses the variables below and MOV instructions to copy the value from bigEndian to littleEndianreversing the order of the bytes. The number’s 32-bit value is understood to be 12345678 hexadecimal.

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

 

Hint: Using DumpMem is the best way to show the effect - byte orders "before" and "after" 

Sample output:

DumpMem output showing Big Endian Byte Order
Dump of offset 001E6000
-------------------------------
12 34 56 78

DumpMem output showing Little Endian Byte Order
Dump of offset 001E6004
-------------------------------
78 56 34 12

IMPORTANT: for this exercise, NOT allowable to use any one of these directives: .IF, .ELSE, .ELSEIF, .WHILE, .REPEAT, etc

Write a program that uses the variables below and MOV instructions to copy the value from bigEndian to little Endian, reversing the order of the bytes. The
number's 32-bit value is understood to be 12345678 hexadecimal.
.data
bigEndian BYTE 12h, 34h, 56h, 78h
littleEndian DWORD
Hint: Using DumpMem is the best way to show the effect - byte orders "before" and "after"
Sample output:
DumpMem output showing Big Endian Byte Order
Dump of offset 001E6000
12 34 56 78
DumpMem output showing Little Endian Byte Order
Dump of offset 001E6004
78 56 34 12
IMPORTANT: for this exercise, NOT allowable to use any one of these directives: .IF, .ELSE, .ELSEIF, .WHILE, .REPEAT, etc
Transcribed Image Text:Write a program that uses the variables below and MOV instructions to copy the value from bigEndian to little Endian, reversing the order of the bytes. The number's 32-bit value is understood to be 12345678 hexadecimal. .data bigEndian BYTE 12h, 34h, 56h, 78h littleEndian DWORD Hint: Using DumpMem is the best way to show the effect - byte orders "before" and "after" Sample output: DumpMem output showing Big Endian Byte Order Dump of offset 001E6000 12 34 56 78 DumpMem output showing Little Endian Byte Order Dump of offset 001E6004 78 56 34 12 IMPORTANT: for this exercise, NOT allowable to use any one of these directives: .IF, .ELSE, .ELSEIF, .WHILE, .REPEAT, etc
Expert Solution
Step 1

Assembly code :

INCLUDE Irvine32.inc

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

.code
main            PROC


    mov esi, OFFSET bigEndian
    xor eax,eax
    mov al, [esi+3]     ;Isolate 5678h
    mov ah, [esi+2]
    mov ebx, 0
    mov bl, [esi+1]     ;Isolate 1234h
    mov bh, [esi]
    
    mov esi, OFFSET littleEndian
    mov [esi], eax      ;Move 5678h into lower 16bits of littleEndian
    mov [esi+2], bx    ;Move 1234h into higher 16bits of littleEndian      
    invoke  ExitProcess, 0


main        ENDP
END main

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education