EasyManua.ls Logo

HP 8168E - Page 114

HP 8168E
262 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6
Example 2 - Status Registers and Queues
300 PRINT TABXY(4,6);" :"
310 PRINT TABXY(4,7);" +-------------------------------+"
320 PRINT TABXY(4,8);" : OR :"
330 PRINT TABXY(4,9);" +-------------------------------+"
340 PRINT TABXY(4,10);" ^ ^ ^ ^ ^ ^ ^ ^"
350 PRINT TABXY(4,11);" +---+---+---+---+---+---+---+---+"
360 PRINT TABXY(4,12);" : : : : : : : : :"
370 PRINT TABXY(4,13);" +---+---+---+---+---+---+---+---+"
380 PRINT TABXY(4,14);" PON URQ CME EXE DDE QYE RQC OPC"
390 PRINT TABXY(40,12);"Standard Event Status Register"
400 PRINT TABXY(4,16);"Last Command :"
410 PRINT TABXY(4,17);"Last Error :"
420 PRINT 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 Tls;Inp$
560 PRINT TABXY(21,16);" "
570 PRINT 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(Tls)
700 !
710 ! Initialize and start the display of the registers
720 !
730 PRINT TABXY(21,17);" "
740 PRINT TABXY(21,18);" "
750 Ypos=3
6-4 Programming Examples

Related product manuals