Trailing-Edge
-
PDP-10 Archives
-
decuslib10-11
-
43,50537/gnosed.mac
There are no other files named gnosed.mac in the archive.
ENTRY TTOPEN,NOECHO,XECHO,NOCRLF,INCH,INP
SEARCH UUOSYM,MACTEN
TTOPEN: OPEN 0,ADDR ; open the channel
OUTSTR ERRMSG ; if can't open, output error message
POPJ 17,0
XWD -1,0 ; ONE ARG
ARGBLK: XWD 100,0 ; INTEGER INTO AC 0
ADDR: XWD 0,0
SIXBIT/TTY/
XWD 0,0
ERRMSG: ASCIZ /?Can't open TTY/
NOECHO: SETSTS 0,IO.SUP
SETSTS 0,IO.LEM
POPJ 17,0
XECHO: SETSTS 0,IO.SUP
SETSTS 0,IO.LEM
POPJ 17,0
;subroutine NOCRLF will do the same thing as the monitor
;command "SET TTY NO CRLF"
NOCRLF: MOVNI 1,1
TRMNO. 1, ; get terminal #
JRST NOOUT ;error exit
MOVEM 1,CRLARG+1 ; put # in second word of TRMARG
MOVEI 1,1
MOVEM 1,CRLARG+2
MOVE 2,[XWD 3,CRLARG]
TRMOP. 2, ; set tty no crlf
JRST OPOUT ;error exit
POPJ 17,
CRLARG: EXP .TOSET+.TONFC
BLOCK 2
INCH: SETSTS 0,.IOPIM ; enter Packed Image Mode
MOVNI 1,1
TRMNO. 1,0 ; get terminal #
JRST NOOUT ;error exit
MOVEM 1,TRMARG+1 ; put # in second word of TRMARG
MOVE 2,[XWD 3,TRMARG]
TRMOP. 2,0 ; set up breaks for PIM
JRST OPOUT ;error exit
INCHRW 0 ; input character
MOVEM 0,@0(16)
CAIE 0,33 ;if ESC, get next char
JRST EX ;otherwise, exit
INCHRW 0
MOVEM 0,@1(16)
CAIE 0,77 ;if ?, get next char (alternate keypad)
JRST EX ;otherwise exit
INCHRW 0
MOVEM 0,@2(16)
EX: SETSTS 0,.IOASC ; back to regular ASCII
POPJ 17,0
NOOUT: OUTSTR [ASCIZ /?TRMNO Didn't work/]
EXIT
OPOUT: OUTSTR [ASCIZ /?TRMOP Didn't work/]
EXIT
OUT: OUTSTR [ASCIZ/Control-C out/]
EXIT
TRMARG: EXP .TOSET+.TOPBS
BLOCK 1
EXP 0
INP: INCHRW 0
POPJ 17,0
END