Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone give me some hints? create a .data section with two word values: a and b. Then implement the following four functions in ARM

Can someone give me some hints?

create a .data section with two word values: a and b. Then implement the following four functions in ARM assembly language:

void setAB(int a, int b); int getA(); int getB(); void swapAB(); 

setAB sets the values of a and b. getA and getB get the values of a and b respectively. swapAB swaps the values of a and b. For example

 setAB(12, 72); // a=12, b=72 printf("%d ", getA()); // Prints 12 printf("%d ", getB()); // Prints 72 swapAB(); printf("%d ", getA()); // Prints 72 printf("%d ", getB()); // Prints 12 

The program quiz system is persistent, meaning your program will remain in the window below until the assignment closes.

Use only registers r0-r3. Do not use any other registers.

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions