write an assemblyprogram that uses indirect addressing to sw

write an assemblyprogram 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 dwarraay. Use this template

INCLUDE Irvine32.inc

.data dwarray

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

.code

main proc

all waitMsg

exit

mainENDP

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 section .data
write an assemblyprogram 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. T

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site