Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the follow code to print out the result in ARMv8 assembly language run on rasbian (not C or else) Giving information: @1. Print the

Modify the follow code to print out the result in ARMv8 assembly language run on rasbian (not C or else)

Giving information:

@1. Print the result of 1 +2 +3 +4 +5 +6 +7 = 28

@2. Use this format string "Total of %d + %d + %d + %d + %d + %d + %d = %d"

@modify the code below to get the result

.data

string1: .asciz " Total of %d + %d + %d + %d + %d + %d + %d = %d "

a: .word 1

b: .word 2

c:. word 3

.text

.global main

.extern printf

.func main

main:

push {ip, lr}

ldr r1, =a

ldr r1, [r1]

ldr r2, =b

ldr r2, [r2]

add r1, r1, r2

ldr r2, =c

str r1, [r2]

ldr r0, =string1

ldr r1, [r2]

bl printf

pop {ip, pc}

complie in terminal :

as -o file.o file.s

gcc -o file file.o

./file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

Where did the faculty member get his/her education? What field?

Answered: 1 week ago

Question

How was their resistance overcome?

Answered: 1 week ago