PCD7.D250
User program examples
26/770 E1
(D25-08-E.DOC)
SAIA-Burgess Electronics Ltd.
Page 8-15
;--------------------------------
; Coldstart
;--------------------------------
XOB
16
SASI
1
; Assignation interface n°1
100
; Text 100
;
.
termpoll:
stxt
1
; START OF THE POLL COMMAND
10
sth
O 22
jr
h -1
acc
h
; (ld T is accu dependent)
ld
T 0
; start short receive timeout
4
; (must be min. 10 mS)
5
termwait:
sth
O 16
; character received?
jr
h termok
; yes
sth
T 0
jr
h termwait
; loop for timeout period
jr
termpoll
; Terminal not ready, repeat the poll
termok:
srxd
1
; read the character
R 1
cmp
R 1
; SOH character ?
1
jr
z termready
; yes, Terminal is ready
jr
termpoll
; no, repeat the poll
termready:
ld
R 1
; clear receive register
0
; END OF THE POLL COMMAND
;
.
STXT
1
; Display mode : 4 x 20
5
sth
O 22
jr
h -1
STXT
1
; Main menu
1
sth
O 22
jr
h -1
EXOB
;
.