The 3rd short assignment for my entry level Assembly class
The version of assembly used on this assignment is ARMv8.
This program was tested in ARMSim#.191
It should work in all test cases.
To start:
-
Download ARMSim
-
Download the file from this git repo through the zip button on this page or clone it with the command below
$ git clone https://github.com/spdrstar/CSCE2610Assignment3.git
This assembly program divides the data at the bottom of the file.
To change the data:
- edit the Y .word to your desired dividend
- edit the X .word to your desired divisor
- change the D .asciz with the new values
If you choose to use ARMSim, these are the instructions to test the program.
- Open ArmSim
- Click File in the topbar
- Click Load in the dropdown list
- Navigate to where you saved the file
- Click Run on the bar below the topbar (It is a square with a play symbol inside)
- In the OutputView below the code, click on "Stdin/Stdout/Stderr"
- You should see the desired output
Below are my sample test cases to demonstrate the program
Test Case 1: 18/3
Desired output: 18 DIV 3 = (Q = 6, R = 0)
Screenshot:
Test Case 2: 19/4
Desired output: 19 DIV 4 = (Q = 4, R = 3)
Screenshot:
Test Case 3: 8/12
Desired output: 8 DIV 12 = (Q = 0, R = 8)
Screenshot: