Write an assembly language program that does the following D

Write an assembly language program that does the following: Define the following value 10113AlCh using the appropriate identifier. Reorder its byte values little-endian order using the move instruction and the values\' offset. Store the values in four 8-bit registers, al, bl, cl, dl.

Solution

Look at the following simple program to understand the use of registers in assembly programming this program displays 9 star on the screen along with a simple message.

Section. Text

global_start ; must be declared for

_ start : ; tell linker entry point

Mov edx, len ; message length

Mov ecx, Mgs ; message to write

Mov ebx, 1 ; file description( std out)

Mov eac, 4 ; system call number ( sys_write)

Int ox80 ; call kernel

Mov edx, 9 ; message length

Mov ecx, s2 ; message to write

Mov ebx, 1. ; file descriptor (std out)

Mov eax, 4 ; system call numb ( sys_ write)

Int ox8. ; call kernel

Section. data

Mgs db \' Displaying 9 stars\' 0×a message len equ $_ Mgs ; length of message s2 times 9 db \'*\'

 Write an assembly language program that does the following: Define the following value 10113AlCh using the appropriate identifier. Reorder its byte values litt

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site