Arithmetic Operations
Objective of this lab:
To investigate Arithmetic Operations and implement them in Keil uVision5
Preparation
Read lab lecture notes.
Lab Assignment
Assignment#1:
You can convert temperatures from Celsius to Fahrenheit or
from Fahrenheit to Celsius. Here are the two formulas for your reference.
C = 5 * (F - 32) / 9
F = (9 * C / 5) + 32
Write an ARM assembly language program convertF2CandC2F.s.
You will do the following:
- You can put the Fahrenheit temperature, say 70, in the register R0;
- and have the converted temperature in Celsius in the register R1.
- You can put a Celsius temperature, say 22 in register R2;
- and have the converted temperature in Fahrenheit in the register R3.
- Build the program if there are any bugs, fix them.
- Run the program step by step and see how values are changing in
the registers.
- Make a screenshot to capture the results in your designated registers.
You will hand in the following:
- The source code in the file convertF2CandC2F.s
- A pdf file convertF2CandC2F.pdf contains the following three:
- The source code in the file convertF2CandC2F.s
- The screenshot to show the program has been successfully built
- The screenshot showing the converted temperatures in the registers
Copyright: Department of Computer Science, University of Regina.