Question
Convert the following ARM assembly program (everything) into X86 program and then describe the differences between data movement instructions. @ This is my program .section
Convert the following ARM assembly program (everything) into X86 program and then describe the differences between data movement instructions.
@ This is my program
.section .data
a: .word 2 @ 32-bit variable a in memory
b: .word 5 @ 32-bit variable b in memory
c: .word 0 @ 32-bit variable c in memory
.section .text
.globl _start
_start:
ldr r1, =a @ load the memory address of a into r1
ldr r1, [r1] @ load the value a into r1
ldr r2, =b @ load the memory address of b into r2
ldr r2, [r2] @ load the value b into r2
add r1, r1, r2 @ add r1 to r2 and store into r1
ldr r2, =c @ load the memory address of c into r2
str r1, [r2] @ store r1 into memory c
mov r7, #1 @ Program Termination: exit syscall
svc #0 @ Program Termination: wake kernel
.end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started