Unformatted text preview: The return address of $403C is pushed on the stack big endian, then the value of Register A is pushed $0A. SP points to the top SP -> $3FFD $0A $3FFE $40 $3FFF $3C (10) Question 6. The first three cycles fetch the entire instruction, the next two cycles fetch the 16-bi data at memory $0812. R/W Addr Data Changes to D,X,Y,S,PC,IR,EAR R $5000 $B3 IR=$B3, PC=$5001 R $5001 $08 PC=$5002 R $5002 $12 EAR=$0812, PC=$5003 R $0812 $00 R $0813 $00 (RegD is not changed) (10) Question 7. We use a 10k Ω pull-up resistor to implement a negative logic switch interface. PT1 9S12 +5 10 k Ω ;Solution to Question 8 ldd Sg ;needs 16-bit reg cpd #100 ;needs signed branch blt skip ;skip if Sg<100 bclr PTT,#$03 skip ReadPorts ;solution to Question 9 ldab PTT ; ? , ? , ? , ? ,PT3,PT2,PT1,PT0 lslb lslb lslb lslb ;PT3,PT2,PT1,PT0, 0 , 0 , 0 , 0 ldaa PTP ; ? , ? , ? , ? ,PP3,PP2,PP1,PP0 anda #$0F ; 0 , 0 , 0 , 0 ,PP3,PP2,PP1,PP0 aba ;PT3,PT2,PT1,PT0,PP3,PP2,PP1,PP0 rts...
View Full Document
This note was uploaded on 11/03/2010 for the course EE 319K taught by Professor Bard during the Spring '08 term at University of Texas.
- Spring '08