acia-rl.asm
crsjones_68Retro/MP-02_MC6802Processor/Debug/acia-rl/acia-rl.asm
;
; ACIA REMOTE LOOPBACK
;
        ORG  $FFD0
;
; INITIALIZE THE ACIA
; 
START   LDAA #$03
        STAA $E000      ;MASTER RESET THE ACIA
        NOP
        NOP
; INITIALIZE THE ACIA FOR:
; RX INTERRUPT DISABLED
; RTS LOW TRANSMIT INTERRUPT DISABLED
; 8 BITS, ONE STOP BIT, /16 BAUD CLOCK
;
        LDAA #$15
        STAA $E000       ;WRITE THE CONTROL REGISTER
;
LOOP    LDAA $E000       ;READ THE STATUS REGISTER
        BITA #$01        ;RDR FULL?
        BEQ  LOOP
        BITA #$02        ;TDR EMPTY?
        BEQ  LOOP
        LDAA $E001       ;READ THE RECEIVE DATA REGISTER
        STAA $E001       ;WRITE THE TRANSMIT DATA REGISTER
        BRA  LOOP
;
;VECTORS
;
        ORG  $FFF8

IRQA    FDB  START
SWI     FDB  START
NMI     FDB  START
RESET   FDB  START
        END
