Quiz1F03

# Quiz1F03 - EE319K Fall 2003 Quiz 1 Page 1 First Last This...

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

EE319K Fall 2003 Quiz 1 Page 1 Jonathan W. Valvano September 26, 2003 11:00am-11:50am First:_________________ Last:_____________________ This is a closed book exam. You must put your answers on this piece of paper only. You have 50 minutes, so allocate your time accordingly. Please read the entire quiz before starting. (5) Question 1. Answer A,B,C,D,E (5) Question 2. Answer \$00 to \$FF (4) Part 3a. Specify RegB (2) Part 3b. Specify 0 or 1 (2) Part 3c. Specify 0 or 1 (2) Part 3d. Specify 0 or 1 (2) Part 3e. Specify 0 or 1 (10) Question 4. Specify D (10) Question 5. Show the machine code (10) Question 6. What value is pushed (10) Question 7. Simplified memory cycles (you may or may not need all 5 entries) R/W Addr Data changes

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

View Full Document
EE319K Fall 2003 Quiz 1 Page 2 Jonathan W. Valvano September 26, 2003 11:00am-11:50am (40) Question 8. Write the assembly language program that implements a thermostat. PORTA equ \$0000 PORTB equ \$0001 DDRA equ \$0002 DDRB equ \$0003
EE319K Fall 2003 Quiz 1 Page 3 Jonathan W. Valvano September 26, 2003 11:00am-11:50am These two tables interpret indexed-mode machine codes rr register 00 X 01 Y 10 SP 11 PC postbyte,xb syntax mode explanations rr000000 ,r IDX 5-bit constant, n=0 rr00nnnn n,r IDX 5-bit constant, n=0 to +15 rr01nnnn -n,r IDX 5-bit constant, n=-16 to -1 rr100nnn n,+r IDX pre-increment, n=1 to 8 rr101nnn n,-r IDX pre-decrement, n=1 to 8 rr110nnn n,r+ IDX post-increment, n=1 to 8 rr111nnn n,r- IDX post-decrement, n=1 to 8 111rr100 A,r IDX Reg A accumulator offset 111rr101 B,r IDX Reg B accumulator offset 111rr110 D,r IDX Reg D accumulator offset 111rr000 ff n,r IDX1 9-bit cons, n 16 to 255 111rr001 ff -n,r IDX1 9-bit const, n -256 to -16 111rr010 eeff n,r IDX2 16-bit const, any 16-bit n 111rr111 [D,r] [D,IDX] Reg D offset, indirect 111rr011 eeff [n,r] [IDX2] 16-bit constant, indirect

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

View Full Document