ce12_w08_hw4_sol

ce12_w08_hw4_sol - #32 x2B = #-11, -xB, or xFFF5 c) OS and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPE 12 Winter 2008 Name: SOLUTIONS Homework 4: Due February 13 Email: .ORIG x3000 START: LD R1, OP LD R2, OS LD R0, FLAG BRp SKIP NOT R2, R2 ADD R2, R2, #1 SKIP: ADD R3, R2, R1 ST R3, RESULT HALT OP: .FILL #32 OS: .FILL x2B FLAG: .FILL #1 RESULT: .FILL x0000 .END 1) (30 pts) What is the data value in address x300C after: a) The program is executed #32 + x2B = #75 or x4B b) FLAG has been changed to #-1 and the program is executed
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #32 x2B = #-11, -xB, or xFFF5 c) OS and FLAG have been changed to #-12 and #0 respectively and the program is executed #32 (-12) = #32 + #12 = #44 or x2C 2) (10 pts) In a concise sentence, explain what this program does. If the flag is a positive nonzero number, this program adds OP and OS and stores the value in RESULT, otherwise the program subtracts OS from OP and stores the value in RESULT....
View Full Document

Ask a homework question - tutors are online