;Chapter 6 Example 6-13 ;Modified and Tested by David Munguia #include "C:\Reg9s12.H" ;Needed for Many Programs ORG $2000 ;_____PORT B OUTPUT (DRAGON 12 ONLY) LDAA #$FF STAA DDRB ;Turn PORTB into an Output ;_________________ STAA DDRJ ;Turn PORTJ into an Output LDAA #$0 STAA PTJ ;To access LED PTJ = #$0 ;BCLR DDRH,%00000111 ;BSET DDRB,%11111111 LDX #ASCI_TABLE LDAA #$00 STAA DDRH B6 LDAA PTH ANDA #$07 LDAA A,X STAA PORTB BRA B6 EXIT BRA EXIT ORG $1800 ASCI_TABLE FCC "01234567" END