1 SUB VISIN1 (WAIT%) 2 ! will read a character from the visual 500 with IORTT directive 3 ! WAIT% is number of 10-second units to wait for a character before 4 ! timing out. WAIT%=0% means never time out: just keep waiting. 5 ! If timeout occurs, ERR$[1]=2% else ERR$[1]=1% & ERR$[2]=character input 6 ! warning: ERR$[2] is all 8 bits- no parity etc checked or changed! 7 ! ERR$ is a 4-byte IO status block. 8 ! inspect ERR$ in COMMON (VIS500) to find if input from visual 500 worked. 9 COMMON (VIS500) VIS5LUN%, QIOW$=2%, ERR$=4%, VIS5EFN%, ERRADR%, CHARMASK$=32%, CMADR% 11 .DEFINE .IORTT%=2713% ! IO.RTT QIOW$ code 100 CALL DIR BY REF (QIOW$,.IORTT%,VIS5LUN%,VIS5EFN%,ERRADR%,0%,CMADR%,1%,WAIT%,CMADR%,0%,0%) 110 ! we use CHARMSK$ as a buffer because the buffer is never input to! 140 ! ERR$ contains on return: 150 ! byte#1: directive status (should be 1% for sucess) 160 ! 2: if OK, character input 170 ! 3: \ 185 ! | integer count of characters actually read from visual 500 186 ! | (this is always zero) 180 ! 4: / 190 SUBEND