Introduction to Computing Systems (4th Exam)
1.[10] Please convert each machine language instruction to its assembly language counterpart. – – – – – AND R1,R1,#0 ADD R5,R5,#-1 NOT R7,R7 ADD R4,R1,R4 HALT
2.[10] Please convert each machine language instruction to its assembly language counterpart. –ADD R1, R1, R0 –AND R3, R3, #5 –NOT R1, R4 –ADD R5, R5, #-3 –.FILL xFF
3.[20] Consider the following program: x x x x x x300A x300B x300C x300D (a) Explain what the program does. (b) What will the value be contained in R0 when the program is executed? (a) Perform (b) 21
4.[20] Consider the following program: x x x x x x x x x x x400A (a) Explain what the program does. (b) What will the value be contained in the address x400A when the program is executed? (a) Shift x0003 left 5 times (b) 96 or x0060
5.[20] Consider the following program:.ORIG 5000 AND R2, R2, #0 LD R0, DATA1 NOT R0, R0 ADD R0, R0, #1 LD R1, DATA2 AGAIN ADD R2, R2, #1 ADD R1, R0, R1 BRzp AGAIN FINISH ADD R2, R2, #-1 HALT.BLKW x0021 DATA1.FILL x0003 DATA2.FILL x000E.END Explain what the program does. What will the value be contained in R2 when the program is executed? Perform 4
6.[20] Please assemble the program of Problem 5. x x x x x x x x x x x502B x502C