in assembly langauge Write a program that uses indirect addr

in assembly langauge

Write a program that uses indirect addressing to switch the 1st and 2nd elements of the dword array. Then switch the 3rd and 4th elements, and so on. Then output the final contents of the array dwarray.

Use the template below as your starting point.

INCLUDE Irvine32.inc

.data

dwarray dword 0,2,5,9,10,12

.code

main proc

    call WaitMsg

    exit

main ENDP

END main

Solution

section .text global _start ;must be declared for linker (ld) _start: ;tells linker entry point mov edx,len ;message length mov ecx,msg ;message to write mov ebx,1 ;file descriptor (stdout) mov eax,4 ;system call number (sys_write) int 0x80 ;call kernel mov eax,1 ;system call number (sys_exit) int 0x80 ;call kernel END
in assembly langauge Write a program that uses indirect addressing to switch the 1st and 2nd elements of the dword array. Then switch the 3rd and 4th elements,

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site