User program examples
PCD7.D250
Page 8-16
SAIA-Burgess Electronics Ltd.
(D25-08-E.DOC)
26/770 E1
;--------------------------------
; Main program
;--------------------------------
COB
0
0
STH
O
RBSY
; Receiver busy
ANL
O
XBSY
; Text busy
JR
L
END
; If RBSY = low then do nothing
SRXD
1
; Interface 1
R
RBUF_R
; Receive buffer register
;
.
; Compare received character
CMP
R
RBUF_R
K
65
; F1
ACC
Z
JR
L
F2
STXT
1
; Interface 1
1
; Text 1
JR
END
;
.
F2:
CMP
R
RBUF_R
K
66
; F2
ACC
Z
JR
L
F3
STXT
1
; Interface 1
2
; Text 2
JR
END
;
.
F3:
CMP
R
RBUF_R
K
67
; F3
ACC
Z
JR
L
F4
STXT
1
; Interface 1
3
; Text 3
JR
END
;
.
F4:
CMP
R
RBUF_R
K
68
; F4
ACC
Z
JR
L
END
STXT
1
; Interface 1
4
; Text 4
JR
END
;
.
; Read BCD-Switch
END:
DIGI
2
I
0
R
10
;
.
ECOB