HW _5 - LDR R3 R0-5 LDR R4 R1#0 ADD R1 R1#3 ST R2#4 STR R1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EE306 – Homework #5 Completion date: Wednesday December 5th, in class Remember 1: Make sure your name, eid, TA session are clearly marked on your submission Remember 2: FOR ALL FUTURE HOMEWORK, TEST AND EXAM SUBMISSIONS YOUR NAME, EID, AND FINAL ANSWER MUST BE IN INK – FAILURE TO DO SO WILL RESULT IN YOUR WORK NOT BEING GRADED. Question 1. Excercise 6.17 Question 2. Excercise 7.15 Question 3. Excercise 8.9 Question 4. Excercise 9.5 Question 5. The following program does not do anything useful. However, being an “electronic idiot,” the LC-3 will still execute it. .ORIG x3000 LD R0, Addr1 LEA R1, Addr1 LDI R2, Addr1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LDR R3, R0, #-5 LDR R4, R1, #0 ADD R1, R1, #3 ST R2, #4 STR R1, R0, #3 STI R4, Addr4 Addr1 .FILL x300A Addr2 .FILL x000A Addr3 .BLKW 1 Addr4 .FILL x300C Addr5 .FILL x300B .END Without using the simulator, answer the following questions: 1. What will the values of registers R0 through R4 be after the LC-3 finishes executing the ADD instruction? 2. What will the values of memory locations Addr1 through Addr5 be after the LC-3 finishes executing the STI instruction? Question 6. Someone decided to write the following subroutine. HUH ADD R7, R7, #-1 RET What does this subroutine do when called? (You can describe this in 3 words)...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

HW _5 - LDR R3 R0-5 LDR R4 R1#0 ADD R1 R1#3 ST R2#4 STR R1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online