BEGIN EQU 50H
C EQU 71H
D EQU 70H
ORG BEGIN
LD A,00000000
OUT (C),A
OUT (C),A
OUT (C),A
LD A,40H
OUT (C),A
LD A,0DAH
OUT (C),A
LD A,37H
OUT (C),A
SEND: IN A,(C)
RRCA
JR NC,SEND
LD A,(00010000)
OUT (D),A
RCV: IN A,(C)
RRCA
RRCA
JR NC,RCV
IN A,(D)
LD (00010000),A
END