;ASTKEY- UNSOLICITED CHARACTER AST SUBROUTINE ; ; ; ; ASTKEY ; ; ASTKEY- UNSOLICITED CHARACTER AST SUBROUTINE ; ;ROUTINE NAME: ASTKEY ; ;PURPOSE: ASTKEY performs three functions ; ; 1) attaches to terminal ; ; 2) remembers where to put incoming character. ; ; 3) requests subsequent character's typed at ; the user's terminal to be traped by the system (an ; internal service routine picks up this character ; and puts it where you tell it) ; ; ; It should be noted that the byte variable CHAR ; must be "polled" for changes in content and if it ; is to be re-used should be cleared. ; ;CALLABLE: from FORTRAN -- CALL ASTKEY(CHAR,LUN) ; ;PARAMETERS: ; ; CHAR-----A BYTE or LOGICAL*1 variable to receive the AST'd ; character ; ; LUN------The logical unit number of the terminal. ; ;EXAMPLE: ; C********************************************* ; C ; C LIST THE FILE ON HIS TERMINAL AND IF HE HITS ; C ANY CHARACTER THEN EXIT. ; C ; C*********************************************** ; CALL ASTKEY(CHAR,5) !LUN MUST BE INCLUDED. ; CHAR=0 !JUST TO BE SURE ; DO 10 I=1,10000 ; READ(IN,ERR=99)IOLIST ; WRITE(TTY,88)IOLIST ; 88 FORMAT(80A1) ; IF(CHAR.NE.0)CALL EXIT ; 10 CONTINUE ; ;AUTHOR: Jack Martinelli ; ;WRITTEN: DECEMBER 19, 1978 ; ;SOURCE LANGUAGE: MACRO-11 ; ;OBJECT MODULE NAME: ASTKEY ; ;LIBRARY: DP:[60,60]CETUS ; ;MAINTENANCE: see Jack Martinelli ; ; ; .TITLE ASTKEY .MCALL QIO$,DIR$,ASTX$S QIOAST: QIO$ IO.ATA,5,,,,,<$SERV> ; ASTKEY:: MOV #QIOAST,R0 MOV @4(R5),Q.IOLU(R0) DIR$ #QIOAST MOV 2(R5),$$CH RTS PC $$CH:: .WORD 0 $SERV:: MOVB (SP)+,@$$CH ASTX$S .END