{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw8sol_s08

# hw8sol_s08 - University of Florida EEL 3701 Spring 2008 ECE...

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

University of Florida EEL 3701 Spring 2008 ECE Dept., Dr. Gugel HOMEWORK #8 Solution 1. (a) extended addressing mode LDAA \$1380 STAA \$1500 (b) indexed addressing mode LDX \$1380 LDAA 0,X LDX \$1500 STAA 0,X 2. (a) After Statement 3 is executed, the content of A = \$FC (b) In Statement 5, the effective address is \$ABC1 + \$1B = \$ABDC 3. LDAB #\$00 ; Initialized A to \$00. LDAA #\$80 ; Initialized counter to \$80. LDX #\$1900 ; X is initialized to point to \$1900, the beginning of the table. LOOP: STAB 0,X ; Store \$00 (from A) to memory location pointed to by X. INX ; Increment pointer in X to point to the next byte. DECA ; Decrement counter in A. BNE LOOP ; Continue to loop if counter not 0 yet. FIN: BRA FIN 4. LDAB #\$00 ; Initialized counter in B to \$00. LDX #\$1800 ; X is initialized to point to \$1800, the beginning of the table. AGAIN: LDAA 0,X ; Bring in the current byte in the table. BEQ DONE ; If the current = 0, we have found the end of the table. TBA ; Otherwise, it is not the end. Therefore, INA ; use these 3 instructions to TAB ; increment counter in B.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}