Lab 5: Intro to ARM -- 2/11/2020

COSC 2200, Spring 2020

Marquette University, Department of Computer Science

Description

In our fifth lab, you and your partner will build a simple ARM program as outlined below. Once finished, you can use the remaining time to ask your TA questions about the current assignment.

Steps

Find your lab partner. Then:

Using the divide function

The divide function takes a dividend in r0 and a divisor in r1; upon return, the integer quotient is stored in r0 and any remainder in r1.

The Program: Even/Odd Checker

Write an assembler program that reads in integers from the user until a zero is entered. After each integer is entered, the program will output 1 if the integer is even, and 0 if the integer is odd.

Example:
? 1
0
? 2
1
? 4
1
? 8
1
? 9
0
? 45
0
? 101
0
? 102
1
? 0

All user process have completed.