Exercise_5_Questions-F09

Exercise_5_Questions-F09 - CE-320 Microcomputers I Fall B...

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

View Full Document Right Arrow Icon
CE-320 Microcomputers I Fall B 2009 Exercise 5 Page 1 Do NOT use a calculator on this assignment. You will not be allowed to use one on the test or quizzes. Exercise 5 Questions 1. For the following programs, generate a stack diagram as done in class (values in memory used for the stack and the SP register) for each line that affects the stack items. For example, a new diagram should be drawn for a PSHA operation, but not a LDAA #$AA operation. Also, list the final contents of the registers used once the programs have finished. Addresses are given in comments. a. ORG $2000 1: LDAA #$AA 2: LDAB #$BB 3: LDX #$CCDD 4: LDS #$3600 5: PSHA 6: PSHB 7: PSHX 8: PULB 9: PULX 10: PULA 11: SWI b. ORG $2000 1: LDS #$3600 ; 2000 2: LDAA #$AA ; 2003 3: LDAB #$BB ; 2005 4: JSR SUBRA ; 2007 5: SWI ; 200A 6: SUBRB PSHB ; 200B 7: PULB ; 200C 8: RTS ; 200D 9: SUBRA PSHA ; 200E 10: JSR SUBRB ; 200F 11: PULA ; 2012 12: RTS ; 2013
Background image of page 1

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

View Full DocumentRight Arrow Icon
CE-320 Microcomputers I Fall B 2009 Exercise 5 Page 2 c. ORG $2000 1: LDS #$3600
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

Exercise_5_Questions-F09 - CE-320 Microcomputers I Fall B...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online