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:
  1. You can put the Fahrenheit temperature, say 70, in the register R0;
  2. and have the converted temperature in Celsius in the register R1.
  3. You can put a Celsius temperature, say 22 in register R2;
  4. and have the converted temperature in Fahrenheit in the register R3.
  5. Build the program if there are any bugs, fix them.
  6. Run the program step by step and see how values are changing in the registers.
  7. Make a screenshot to capture the results in your designated registers.

You will hand in the following:

  1. The source code in the file convertF2CandC2F.s
  2. The screenshot to show the program has been successfully built
  3. The screenshot showing the converted temperatures in the registers


Copyright: Department of Computer Science, University of Regina.