Program For Converting From Big Endian To Little Endian in Assembly Language Using Visual Studio
Program For Converting From Big Endian To Little Endian in Assembly Language Using Visual Studio
Program for converting from Big Endian to Little Endian in Assembly Language using Visual Studio
Programming Tutorials
SUBSCRIBE
Chapter 4
Problem # 1:
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
Solution:
.386
.model flat,stdcall
.stack 4096
.data
bigEndian BYTE 12h,34h,56h,78h
littleEndian DWORD ?
http://csprogrammingtutorial.blogspot.com/2017/12/Converting-from-Big-Endian-to-Little-Endian.html 1/3
12/9/2018 1. Program for converting from Big Endian to Little Endian in Assembly Language using Visual Studio
.code
Programming Tutorials
main PROC
SUBSCRIBE
mov al,[bigEndian+3]
mov al,[bigEndian+2]
mov al,[bigEndian+1]
mov al,[bigEndian]
mov BYTE PTR [littleEndian+3],al
INVOKE ExitProcess,0
main ENDP
END main
Let me know in the comment sec on if you have any ques on.
Previous Post:
Next Post:
http://csprogrammingtutorial.blogspot.com/2017/12/Converting-from-Big-Endian-to-Little-Endian.html 2/3