
7
Example
2
-
Status
Registers
and
Queues
300
TABXY(4,6);"
:"
310
TABXY(4,7);"
+-------------------------------+"
320
TABXY(4,8);"
:
OR
:"
330
TABXY(4,9);"
+-------------------------------+"
340
TABXY(4,10);"
^
^
^
^
^
^
^
^"
350
TABXY(4,11);"
+---+---+---+---+---+---+---+---+"
360
TABXY(4,12);"
:
:
:
:
:
:
:
:
:"
370
TABXY(4,13);"
+---+---+---+---+---+---+---+---+"
380
TABXY(4,14);"
PON
URQ
CME
EXE
DDE
QYE
RQC
OPC"
390
TABXY(40,12);"Standard
Event
Status
Register"
400
TABXY(4,16);"Last
Command
:"
410
TABXY(4,17);"Last
Error
:"
420
TABXY(4,18);"Output
Queue
:"
430
!
440
!
Start
the
program
loop
and
enable
the
interrupt
for
the
errors
450
!
460
Ende=0
470
GOSUB
Pmm_srq
480
ENABLE
INTR
7;2
490
!
500
!
The
Central
Loop
510
!
520
REPEAT
530
INPUT
"Command
?
",Inp$
540
GOSUB
Pmm_srq
550
OUTPUT
Pol;Inp$
560
TABXY(21,16);"
"
570
TABXY(21,16);Inp$
580
WAIT
1.0
590
UNTIL
Ende=1
600
GOTO
1380
610
!
620
!-------------------------------------------------------- ------------
630
Pmm_srq:
!
Interrupt
Handling
Subroutine
to
display
the
status,
and
the
640
!
error
and
output
queues
650
!-------------------------------------------------------- ------------
660
!
670
!
Get
the
value
for
the
Status
Byte
680
!
690
Value=SPOLL(Pol)
700
!
710
!
Initialize
and
start
the
display
of
the
registers
720
!
730
TABXY(21,17);"
"
740
TABXY(21,18);"
"
750
Ypos=3
7-4
Programming
Examples