- The goal of this lab is to read a series of numbers from a block of contineous memory, three numbers at a time. Upon obtaining the three numbers, the program will add the three numbers together and store the result back into a second contineous block of memory.
- The program flow will look like this:
- START (Label)
- Call a "function"(1) named "ReadThree" to Read the next three numbers into registers %r1, %r2, and %r3.
- The ReadThree function should use a memory label "INPUT", plus an offset that you store in %r10 to load the values. %r10 should be incremented appropriately.
- When you have loaded the values into the registers, return using the JMPL command with %r15 as the destination address.
- CODE that i HAVE SO FAR:
- .begin
- .org 2048
- ReadThree:
- INPUT: 10 (2)
- 10
- 10
- 20
- 20
- 20
- 30
- 30
- 30
- 40
- 40
- 40
- 0
- 0
- 0
- OUTPUT: 0
- 0
- 0
- 0
- 0
- .end
ASM
By: microhaxo | Date: Jun 26 2009 20:24 | Format: None | Expires: never | Size: 1.07 KB | Hits: 917
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago