File: EX.TK of Disk: Disks/MyPDP/m8-blue-rka1-rkb1
(Source file text) 

/EX.TK 12-MAY-80

/EXIT TASK FOR GOING BACK TO OS/8
/THIS TASK ALSO TURNS THE LAMPS OFF (VT100)
/IF NOT VT100, AN APPROPRIATE END MESSAGE APPEARS

	*200
	"E^100+"X&3777	/NAME IS EX.TK
	400		/TWO PAGE TASK
XOS8,	EXOS8
XBASE,	0

KL=4000			/KEYBOARD LOCKED
ES=233			/ESCAPE
EX,	DCA XBASE	/CALLED FROM CB
IFNDEF SINGL8 <
	TAD XBASE
	TAD (-BGDATA
	SZA CLA		/REQUEST FROM TERMINAL 1 ?
	 JMP NOEXIT	/WRONG TERMINAL
	TAD ("K^100+"1&3777
	JMS MONITOR	/CALL PA ON TERMINAL 1
	   CALL
	   "P^100+"A&3777
	 JMP NOEXIT	/BUSY, EXIT
	SNL CLA		/IF LINK = 0 PASSWORD OK
	 JMP EXLMP	/OK, FINAL MESSAGE
NOEXIT,	AC0001		/BACK TO ^B
	JMS MONITOR	/WRONG PERSON
	   EXIT SWPOUT	/ >
EXLMP,	CDTOIF
TERMLP,	ISZ LMPCNT	/ANY MORE LAMPS TO TURN OFF?
	JMP NXTLMP	/YES
	JMP I XOS8	/NEXT PAGE

NXTLMP,	TAD LMPCNT	/MAKE T# NAME
	TAD ("T^100+"1+TTYMAX&3777
	DCA LAMPID
	AC4000		/
	JMS EXSEND	/CONVERT NAME
	ACM1
	TAD LAMPID	/POINT TO BLOCK # = TTLIST
	CDF 0
	JMS DEFER	/GET LIST ADDRESS
	CDF 10
	TAD (TTFCHR	/OFFSET
	JMS DEFER
	SZA CLA		/VT100 ?
O=TAD LAMPEX
OO=TAD OS8MES
	TAD (OO-O	/NO GIVE OS8 MESSAGE
	TAD (O		/YES, VT100 EXTINGUISH LAMPS
	DCA EXLOOP	/RESET TO BEGINNING OF MESSAGE
EXLOOP,	TAD LAMPEX	/EXTINGUISH KB LAMPS ON VT100
	SNA		/END OF STRING ?
	 JMP TERMLP	/YES, GO CHECK IF MORE TERMINALS
	JMS EXSEND
	ISZ EXLOOP
	JMP EXLOOP
EXSEND,	0
	JMS MONITOR
	   CALL
LAMPID,	   "T^100+"1&3777
	 JMP .-3
	CLA CLL
	JMP I EXSEND

LMPCNT,	-TTYMAX-1
LAMPEX,	KL 215;KL ES;KL "<;KL ES;KL "[;KL "q;KL ES;KL "[;KL "?;KL "2;"l;0
OS8MES,	KL 215;KL 212;KL 276;KL 240;KL "O;KL "S;KL "/;KL "8;KL 240
	KL "S;KL "y;KL "s;KL "t;KL "e;KL "m;KL 215;212;0
	PAGE
/PAGE HEADER
YETV,	ETV
	0

EXOS8,	JMS MONITOR	/
	   REQBLK
	   -2		/REQUEST 2 PAGES
	 JMP .-3	/NO ROOM
	DCA REQBUF	/THAT'S WHERE IT STARTS
	RDF
	TAD ETV
	DCA ETV		/AND FIELD IN CW
	CDTOIF
	TAD YETV	/POINTER TO TRANSFER VECTOR
	JMS MONITOR
	   CALL		/READ IN BOOT BLOCK 66
	   "S^100+"Y&3777
	 JMP .-3	/WAIT A WHILE
	DCA WEVNT
	JMS MONITOR
	   WAIT
WEVNT,	   0
	CLA
EXWAIT,	IOF		/IT IS THE END
	ISZ	ZERO
	JMP	.-1
	ISZ	OUTER
	JMP	EXWAIT	/WAIT 1 SECOND
	CAF		/AND RESET ALL (SET FLOPPY)
	TAD REQBUF
	TAD C177
	DCA AUTO10	/SET FOR SECOND PAGE OF BLK 66
	TAD (7577
	DCA AUTO11	/SECOND CORE SYSTEM PAGE
	TAD ETV
	AND C70		/GET BUFFER FIELD
	TAD C6201
	DCA CORDF	/CDF BUFFER
CORDF,	HLT
	TAD I AUTO10
	CDF 20		/FIELD OF SECOND SYS-PAGE
	DCA I AUTO11
	ISZ SECSIZ	/ONCE ONLY
	JMP CORDF
	TAD I C7600	/IS THIS AN RX02 SYSTEM HANDLER ?
	TAD (-3334	/MAGIC NUMBER
	SZA CLA		/
	 JMP L1		/NO
	TAD C7600	/YES, SET SECTOR COUNT
	DCA I (7737	/UGH, ONCE ONLY IN SECON PAGE
L1,	CDF 0
	TAD I C7777
	AND (774	/TURN OFF BATCH AND RTS/8 BITS
	DCA I C7777
	CIF 0
	JMP I C7600	/BACK TO OLD OS8
ETV,	200		/READ 2 PAGES (WILL GET FIELD)
REQBUF,	0		/ALLOCATED BUFFER
	66		/BLOCK 66

ZERO,	0
OUTER,	-100
SECSIZ,	-200
	PAGE
	$-$-$