# LAB 8 - PAUL GONZALES BME 303 LAB SESSION 14345 Program...

This preview shows pages 1–3. Sign up to view the full content.

PAUL GONZALES BME 303 LAB SESSION 14345 ; Program: Problem 1 ; Authors: Jignesh Shah, Mickey Moore ; Last modified: 03/21/2005 ; ; Understand what the code is doing and explain it to the TA .ORIG x3000; (starting point at x3000) ; Initialization AND R2, R2, x0; (clearing R2) LD R4, Number1; A LD R5, Number2; B ; Iteration Test (R5 = 0?) Again BRz Done (if the value in R5 is zero, then it will not continue to next line, if it is zero, then you're done) ADD R2, R2, R4; (add R2 and R4, and place in R2) ADD R5, R5, #-1 ; Decrement loop counter (add negative one to R5, store in R5) BR Again (loops back to the beginning BRz, checking if the value is zero) Done HALT (end of the program) ; Data storage Number1 .FILL x0005 (fill the value A with the value x0005) Number2 .FILL x0003 (fill the value B with the value x0003)

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

View Full Document
PAUL GONZALES BME 303 LAB SESSION 14345 Problem 2 Write an LC-3 machine language program that performs a bitwise Larger/Smaller-Of- Two of R1=A and R2=B, with the selector R0=S, storing the results in R3=Z, following
This is the end of the preview. Sign up to access the rest of the document.
• Fall '09
• ORLYALTER
• SEPTA Regional Rail, Jaguar Racing, Highways in Slovakia, Roads in Slovakia, Paul Gonzales, Paul Gonzales BME

{[ snackBarMessage ]}

### Page1 / 3

LAB 8 - PAUL GONZALES BME 303 LAB SESSION 14345 Program...

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

View Full Document
Ask a homework question - tutors are online