This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ff byte is $EC altogether $EA E9 EC (10) Question 6. What value is pushed address of next instruction is $F126 (10) Question 7. Simplified memory cycles R/W Addr Data changes (memory, RegY not changed) 1 $F129 $EA IR=$EA, PC=$F12A 1 $F12A $4A EAR=$098A, PC=$F12B 1 $098A $8A RegB=$8A (40) Question 8. Write the assembly language program that implements a thermostat. org $f000 main movb #$FF,DDRB output is heater movb #0,DDRA input is temperature sensor loop ldaa PORTA check temperature cmpa #2*68 too cold? bhs notCold movb #$FF,PORTB turn on heater notCold cmpa #2*72 too hot? bls notHot movb #$00,PORTB turn off heater notHot bra loop org $fffe fdb main...
View Full Document
- Spring '08