
 sttl Stand-alone System console Code - 8274
 pag

*
* These are non-interrupt output routines for the system
* console.
*

*
* systpc
*
* Output the character in A.  X points to the port.  All
* registers should be preserved.
*

systpc pshs a save a reg
2 lda #$10 do port setup
 sta 2,x
 lda 2,x
 bita #$04 xmit busy?
 beq 2b
 puls a get character
 sta 0,x output char
 rts return


*
* sysrtt
*
* Reset the console port.  X points to port.  Preserve all but A reg.
*

sysrtt rts
 lda #$18 reset channel A
 sta 2,x
 pshs d,x,y,u delay some here
 mul
 mul
 mul
 puls d,x,y,u
 pshs u save u reg
 ldu #syscnf point to configure string
2 lda 0,u+ get byte
 beq 4f end of list?
 sta 2,x send to port
 lda 0,u+ get byte
 sta 2,x
 bra 2b repeat
4 lda #$10 finish config
 sta 2,x
 puls u reset u reg
 rts return

syscnf fcb $01,$00,$02,$04,$04,$4c,$03,$c1,$05,$ee,$00
