Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I don't know very much about .data section, and there is less simple description in the internet, so can someone help me by giving some

I don't know very much about .data section, and there is less simple description in the internet, so can someone help me by giving some hints so that I can learn from it? Thank you.

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 with AI-Powered 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

Students also viewed these Databases questions