Answered step by step
Verified Expert Solution
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
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