; by Irv Bromberg, Medic/OS Consultants, Toronto, CANADA
RADIX 10
IF EQ,1
Alternative to PSEUDO interface driver allows terminal driver other
than NULL to be used with pseudo terminals, so that SPY can monitor
pseudo terminal output. To monitor a pseudo terminal change its terminal
driver to be the same as your own driver. When finished restore the
terminal driver to NULL.
See DVRS.DOC for more info.
ENDC
SEARCH SYS
SEARCH SYSSYM
SEARCH TRM
JCB=A0
QBLK=A3
TCB=A5
Atemp=A6
Char=D1
Dtemp=D6
;; WORD [FAK]
;; WORD [E ]
BR CHROUT
RTN ; no init routine
CHROUT: QGET QBLK ; get a free system queue block
; *** handle out of queue blocks ***
ADD #4,QBLK ; skip link longword
MOV #10,(QBLK)+ ; delay between characters
LEA Atemp,Discard
MOV Atemp,(QBLK)+
MOV TCB,(QBLK) ; save TCB for Discard routine to use
TIMER -12(QBLK)
RTN
Discard: ; called by TIMER, can modify A0, A6, D0, D6, D7
; A0 points to word following routine address/flag word
SAVE A1-A5,D1-D5
MOV @A0,TCB ; get saved TCB
TRMOCP ; see if any data left to output
TST Char
BMI ClrOIP
TIMER -12(A0) ; reinsert the TIMER block
BR Return