This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ; ; Understand what the code is doing and explain it to the TA .ORIG x3000 ; Initialization AND R2, R2, x0 LD R4, Number1 LD R5, Number2 ; Iteration Test (R5 = 0?) Again BRz Done ADD R2, R2, R4 ADD R5, R5, #-1 ; Decrement loop counter BR Again Done HALT ; Data storage Number1 .FILL x0005 Number2 .FILL x0003 Problem 2 .ORIG x3000 LD R0, Number1 LD R1, Number2 LD R2, Number3 AND R5, R1, R2 NOT R4, R1 AND R6, R2, R4 NOT R2, R2 AND R2, R1, R2 NOT R2, R2 NOT R6, R6 AND R3, R2, R6 NOT R3, R3 AND R3, R0, R3 NOT R5, R5 NOT R3, R3 AND R3, R3, R5 NOT R3, R3 Number1 .FILL xFFFF Number2 .FILL x0001 Number3 .FILL x0011 .END Problem 3 .ORIG x3000 LD R0, Number1 LD R1, Number2 LD R2, Number3 NOT R1, R1 NOT R2, R2 NOT R3, R3 AND R2, R1, R2 AND R3, R2, R3 NOT R3, R3 Number1 .FILL x0001 Number2 .FILL x0011 Number3 .FILL x0111 .END...
View Full Document
This note was uploaded on 01/12/2010 for the course BME 14345 taught by Professor Orlyalter during the Fall '09 term at University of Texas at Austin.
- Fall '09