IBM 7220 Instruction Manual page 122

Dsp lock-in amplifier
Table of Contents

Advertisement

Appendix C, DEMONSTRATION PROGRAMS
290 V%=11: CALL IBTMO(DEV%,V%)
300 '....set status print flag........................
310 INPUT "Display status byte y/n "; R$
320 IF R$="Y" OR R$="y" THEN DS% = 1 ELSE DS% = 0
330 '....main loop....................................
340 WHILE 1
350
INPUT "command (00 to exit) ";A$
360
IF A$="00" THEN END
370
A$ = A$ + CHR$(13)
380
GOSUB 480
390
S% = 0
400
WHILE (S% AND 1)=0
410
GOSUB 530
420
IF DS% THEN PRINT "S%= ";S%
430
IF (S% AND 128) THEN GOSUB 500: PRINT B$
440
WEND
445
IF (S% AND 4) THEN PRINT "parameter error"
450
IF (S% AND 2) THEN PRINT "invalid command"
460 WEND
470 '....end of main loop.............................
480 '....write string to bus..........................
490 CALL IBWRT(DEV%,A$): RETURN
500 '....read string from bus.........................
510 B$ = SPACE$(32)
520 CALL IBRD(DEV%,B$): RETURN
530 '......serial poll................................
540 CALL IBRSP(DEV%,S%): RETURN
C-4
' infinite loop
' terminator is <CR>
' write A$ to bus
' initialize S%
' while command not complete
' serial poll, returns S%
' read bus into B$ and print
' B$ is buffer

Advertisement

Table of Contents
loading

Table of Contents