Google
 

Trailing-Edge - PDP-10 Archives - ap-c796e-sb - please.mac
There are 31 other files named please.mac in the archive. Click here to see a list.
	TITLE PLEASE - CUSP TO COMMUNICATE WITH OPERATOR -- %14(110)
	SUBTTL	P.HURLEY/TH/RCC/RHR/PFC/SHP/JMF	22-JUN-76


CUSTVR==0		;DEC DEVELOPMENT
DECVER==14		;MAJOR VERSION
DECMVR==0		;MINOR VERSION
DECEVR==110		;EDIT NUMBER

%PLEAS== <BYTE (3) CUSTVR (9) DECVER (6) DECMVR (18) DECEVR >


;*** COPYRIGHT 1970, 1971, 1972, 1973, 1974, 1975, 1976 DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***

	SEARCH UUOSYM

	ENTRY	PLEASE
	INTERN	%PLEAS


	INTERN	.JBVER,.JBINT	;[107]
	.JBVER=137
	.JBINT=134		;[107]
	LOC	.JBINT		;[107]
	EXP	INTBLK		;[107]
	LOC	.JBVER
	EXP	%PLEAS
	RELOC

FTNET==-1

IFNDEF	TTYNUM,<TTYNUM==<SIXBIT /TTY0/>>  ;DEFAULT TTY NAME TO USE
IFNDEF	FTTIME,<FTTIME==1>	;1 FOR TIMES TO OPERATOR
IFNDEF	LN.PDL,<LN.PDL==10>	;LENGTH OF PUSH DOWN LIST
IFNDEF	LN.TXT,<LN.TXT==100>	;LENGTH OF TEXT BUFFER
IFDEF FTNET,<;; [110]
	OPDEF	GTXTN. [CALLI 166]
	IFNDEF PLSNOD,<PLSNOD==0,,0>>
	;REVISION HISTORY

;%11(37)  JUN 1971

;40	(10-11,022) AVOID LEAVING [2,5] JOBS AROUND
;41	ALLOW THE PLEASE TTY TO BE SLAVED
;42	PRINT CORRECT TTY NUMBER OF JOB INITIATING THE PLEASE
;43	CHANGE THE FTTIME CODE TO GIVE Time= AND Wait=
;	"Finished after" GIVES ELAPSED TIME.
;44	TEST FOR OPERATOR COVERAGE
;45	SEPARATE PLEASES WITH WHITE SPACE ON PLEASE TTY
;46	REFORMAT MESSAGES
;47	CAUSE ERROR MESSAGE TO BE PRINTED IF NO MESSAGE TYPED
;50	(10-12137) REMOVE BUG IN RUN UUO
;51	TURN ON FTTIME AS DEFAULT
;52	REMOVE OLD ALTMODES.
;53	DEFEND AGAINST ^C OR $ IN INITIAL LOOP

;%12(53) JUNE, 1974

;101	(10-13,875) FIX BUG TO HANDLE CTY: CORRECTLY
;102	(10-13,949) ONLY CHECK NO OPERATOR IF TO OPERATOR
;103	ALLOW DEVICE TO PREFIX "PLEASE", AND ALLOW R PLEASE (...)
;104	CANCEL 47
;105	OBSERVE MESSAGE STANDARD
;107	INSTALL ^C INTERCEPT
;110	ADD NETWORK CODE UNDER FTNET CONDITIONAL
;ACCUMULATOR DEFINITIONS

TIME=0
TIME1=1			;[43] USED FOR REMAINDER FROM DIV TIME,
CURTIM=2		;[43] TIME PLEASE WAS TYPED TO OPERATOR
STARTT=3		;[43] TIME THE PROGRAM STARTED
PNTR=5
Q=7
QM1=Q-1		;[41] FOR TRMOP. FUNCTION CODE
Q1=10
Q2=11
Q3=12
M=14
CH=15
PDP=17
;STUFF FROM C.MAC

DEFINE	GTMSG.	(AC),<
	.XCREF			;;SUPPRESS REDUNDANT CREF
	HRROI	AC,.GTWCH	;;IT'S IN THE WATCH TABLE
	.CREF
	GETTAB	AC,		;;GET FROM MONITOR
	.XCREF
	  MOVEI	AC,0		;;DEFAULT TO 0
	TLNN	AC,(JW.WMS)	;;IF 0,
	TLO	AC,(.JWWPO_^D24)  ;; DEFAULT TO PREFIX,FIRST
	TLNE	AC,(JW.WCN)	;;IF /MESSAGE:CONTINUATION
	TLO	AC,(JW.WFL)	;; DEFAULT TO /MESSAGE:FIRST
	.CREF
>


.GTWCH==35	;WATCH BITS
	JW.WMS==7B11	;/MESSAGE LEVEL
		.JWWPR==1	;PREFIX
		.JWWOL==2	;ONE LINE
		.JWWPO==3	;PRIFIX,FIRST
		.JWWLG==6	;LONG, NO PREFIX
		.JWWPL==7	;PREFIX AND LONG
	JW.WCN==1B9	;/MESSAGE:CONTINUATION
	JW.WFL==1B10	;/MESSAGE:FIRST
	JW.WPR==1B11	;/MESSAGE:PREFIX


.UXTRM=200000		;[41] OFFSET FOR TERMINAL INDICES

.GTCNF==11		;[43] CONFIG TABLE
	%CNSTS==17	;[43] CURRENT STATES WORD
		ST%NOP==1B27	;[43] NO OPERATOR COVERAGE
PLEASE:	JRST	REGLAR		;REGULAR CALL--GO TO RESCAN COMMAND

;HERE ON CCL ENTRY POINT, TO SEND TEXT FROM NNNPLS.TMP (OR TMPCOR)

	SETZM	TEXT		;CLEAR TEXT AREA
	MOVE	Q,[TEXT,,TEXT+1]
	BLT	Q,TEXT+LN.TXT

	PJOB	Q,		;GET JOB NUMBER
	MOVEI	Q3,3		;SET UP FOR LOOP
	IDIVI	Q,12		;CONVERT TO
	ADDI	Q1,20		;  'NNN'
	LSHC	Q1,-6		;  BY OLD
	SOJG	Q3,.-3		;  METHOD
	HRRI	Q2,'PLS'	;MAKE NAME 'NNNPLS'
	MOVEM	Q2,CCLFLG	;SAVE AND FLAG CCL CALL
	MOVSI	Q1,'PLS'	;TRY TMPCOR FIRST
	MOVE	Q2,[IOWD LN.TXT,TEXT]
	MOVE	Q,[2,,Q1]
	TMPCOR	Q,		;DESTRUCTIVE READ
	  JRST	.+2		;NOT THERE, TRY DISK
	JRST	FOOP		;OK--GO PROCESS IT
;HERE WHEN NOT IN TMPCOR -- TRY DISK

	INIT	2,17		;READ DSK:
	SIXBIT	/DSK/
	Z
	  JRST	FOOP		;FAIL  CONTINUE ANYWAY
	MOVE	Q,CCLFLG	;GET FILE NAME
	MOVSI	Q1,'TMP'	;EXTENSION IS 'TMP'
	SETZB	Q2,Q3
	LOOKUP	2,Q		;TRY TO GET FILE
	  JRST	.+4		;IF FAIL, DON'T READ
	INPUT	2,[IOWD LN.TXT,TEXT
			0]	;READ AS MUCH AS FITS
	SETZB	Q,Q1		;PREPARE TO DELETE IT
	RENAME	2,Q
	RELEAS	2,		;FREE CHANNEL
	JRST	FOOP		;AND CONTINUE

;HERE ON NON-CCL CALLS

REGLAR:	SETZM	TEXT		;CLEAR TEXT BUFFER
	MOVE	Q,[TEXT,,TEXT+1]
	BLT	Q,TEXT+LN.TXT

	SETZM	CCLFLG		;INDICATE A COMMAND CALL
	RESCAN			;RESCAN CMMD LINE
	MOVE PNTR,[POINT 7,TEXT]
RDCMMD:	INCHRS	CH
	  JRST FOOP
	PUSHJ	PDP,ALTQ	;SEE IF ESCAPE OR ^C		[53]
	  JRST	FOOP		;YES--STOP READING		[53]
	IDPB CH,PNTR
	CAME	PNTR,[POINT 7,TEXT+LN.TXT-1,34]
	JRST	RDCMMD		;LOOP FOR MORE CHARACTERS
;HERE AFTER GETTING INITIAL TEXT IF ANY

FOOP:	MOVEI	Q1,DONE2	;[107] ON ^C, JUST EXIT FOR NOW
	HRRM	Q1,INTBLK	;[107]
	SETZM	FLAG
	SETZM	PARENS		;CLEAR R PLEASE (...) INDICATOR	[103]

IFN FTTIME,<MSTIME STARTT,	;[43] GET THE TIME NOW>

;HERE TO SEE IF DEVICE AND/OR CUSP SPECIFIED

	MOVE	PDP,[IOWD LN.PDL,PDLST]	;INITIALIZE PDL
	SETZM	CCLNAM		;CLEAR RESULTS
	SETZM	DVNAM		; ..
	MOVE	PNTR,[POINT 7,TEXT]  ;START AT BEGINNING OF LINE
	MOVEM	PNTR,SAVPNT#	;INITIALIZE POINTER FOR LATER ALSO
FOOP1:	PUSHJ	PDP,GETNAM	;GET A SIXBIT WORD TO SKIP "PLEASE"
	 JRST	E$$NMF		;[47] <LF> FOUND - NO MESSAGE TYPED
	CAIN	CH,":"		;SEE IF DEVICE			[103..]
	JRST	FOOP1		;YES--TRY AGAIN
	TLNN	Q,(7B5)		;SEE IF "PLEASE" NOT ST OR RUN
	JRST	FOOP3		;YES--OK
	SETOM	PARENS		;NO--INDICATE PAREN MODE
FOOP2:	CAIN	CH,"("		;SKIP FOR PAREN
	JRST	FOOP3		;GOT IT
	ILDB	CH,PNTR		;TRY AGAIN
	JUMPN	CH,FOOP2	;LOOP TO EOL
	JRST	E$$NMF		;NONE--NO TEXT ON THIS LINE	[..103]
FOOP3:	TDZ	Q,Q		;[47] CLEAR NAME
	MOVEI	CH," "		;CLEAR SEPARATOR		[103]
	JRST	CCLOP2		;[47] DO LOWER CHECKS
CCLOOP:	PUSHJ	PDP,GETNAM	;GET NEXT WORD
	 JRST	TSTTXT		;[47] <LF> - SEE IF ANY TEXT WAS TYPED
CCLOP2:	CAIE	CH,":"		;SEE IF DEVICE
	CAIN	CH,"!"		;  OR CUSP NAME
	JRST	CCLOK		;YES--GO HANDLE IT
	CAIE	CH,40		;NO--SEE IF SPACE
	CAIN	CH,11		;  OR TAB
	JUMPE	Q,CCLOP1	;YES--IF NO NAME, LOOP BACK
	CAIN	CH,","		;NO--SEE IF COMMA
	JUMPE	Q,CCLOP1	;YES--IF NO NAME, LOOP BACK
	JRST	TSTTXT		;[47] OTHERWISE, WE MUST BE DONE

;HERE WHEN DEVICE OR CUSP SPECIFIED

CCLOK:	JUMPE	Q,CCLPNT	;IF NO NAME, MUST BE ALL OVER
	CAIN	CH,":"		;IF DEVICE,
	MOVEM	Q,DVNAM		;  STORE AWAY
	CAIN	CH,"!"		;IF CUSP
	MOVEM	Q,CCLNAM	;  STORE AWAY
CCLOP1:	MOVEM	PNTR,SAVPNT	;UPDATE POINTER FOR LATER
	JRST	CCLOOP		;AND GO BACK FOR MORE

;[47] HERE TO SEE IF A MESSAGE WAS TYPED
TSTTXT:	JUMPN	Q,CCLPNT	;[47] WAS A WORD ACTUALLY READ
				; IF SO ALL IS OK
E$$NMF:
REPEAT	0,<	;[104]
	MOVE	M,['NMF',,[ASCIZ /No message found/]]	;[47] GIVE ERROR MESSAGE
	JRST	ABORT		;FATAL
>
;HERE WHEN ALL DONE WITH DEVICE, CUSP SPECIFICATION

CCLPNT:	SKIPA	PNTR,SAVPNT	;RESTORE POINTER TO LAST GOOD PLACE
	IBP	PNTR		;ADVANCE TO NEXT CHARACTER
	LDB	CH,PNTR		;LOOK AT CHARACTER
	CAME	PNTR,[POINT 7,TEXT+LN.TXT-1,34]  ;SEE IF OVERFLOW
	JUMPN	CH,.-3		;LOOP UNTIL AT END OF BUFFER
	IFNDEF FTNET,<
	SKIPN	Q,DVNAM		;SEE IF DEVICE GIVEN
	MOVE	Q,[TTYNUM]	;NO--FILL IN DEFAULT
>
	IFDEF FTNET,<;; [110]
	SKIPE	Q,DVNAM
	JRST	.+4
	MOVE	Q,[PLSNOD]
	GTNTN.	Q,0
	MOVE	Q,[TTYNUM]
>
	MOVEM	Q,DVNAM		;STORE BACK IN
	DEVCHR	Q,		;SEE IF DEVICE IS OK
	TLNE	Q,10		;SEE IF TTY
	JRST	FOO		;YES--PROCEED
E$$DNT:	MOVE	M,['DNT',,[ASCIZ /Device not a tty/]]	;[46] INFORM USER
	JRST	ABORT		;FATAL

FOO:	MOVE	0,DVNAM		;[102]GET DEVICE NAME
	CAME	0,[TTYNUM]	;[102]SEE IF PLEASE TTY
	JRST	FOOA		;[102]NO--ALWAYS OK
	MOVE	0,[%CNSTS,,.GTCNF]	;[44] GET THE STATES WORD
	GETTAB	0,		;DO THE GETTAB
	  JRST	FOOA		;[44] FAILED - DON'T BOTHER
	TRNN	0,ST%NOP	;[44] OPERATOR COVERAGE
	JRST	FOOA		;[44] YES - ALL OK
E$$SUA:	MOVE	M,['SUA',,[ASCIZ /System is unattended.  Please try later or CONTinue./]]	;[44] NO OPERATOR
	PUSHJ	PDP,WARN	;ISSUE WARNING
	LOGOUT	1,		;[102]ALLOW FORCED PROCEED
FOOA:	INIT 1,1		;INIT THE PLEASE TTY
DVNAM:	Z
	XWD	OBUF,IBUF
	JRST	BUSY		;PLEASE TTY IS BUSY - INFORM USER
;HERE WHEN WE HAVE THE DEVICE

	MOVEI	Q1,DONE		;[107] SET UP DIFFERENT ^C HANDLING
	HRRM	Q1,INTBLK	;[107]
	MOVEI	Q1,1		;GET IT'S PHYSICAL NAME
	DEVNAM	Q1,		; ..
	  MOVE	Q1,DVNAM	;OLD MONITOR--WORK WITH LOGICAL
	HLRZ	Q,Q1		;GET LH OF NAME
	CAIE	Q,'TTY'		;SEE IF TTYNNN
	JRST	FOOCTY		;NO--MUST BE CTY
	HRLZ	Q1,Q1		;YES--GET NUMBER
	MOVEI	Q,0		;CLEAR ACCUMULATOR
GETNUM:	LSH	Q1,3		;THROW AWAY JUNK
	LSHC	Q,3		;GET NEXT DIGIT
	JUMPN	Q1,GETNUM	;LOOP UNTIL DONE
	JRST	FOONO		;GOT THE INDEX IN LINETAB

FOOCTY:	CAIE	Q,'CTY'		;SEE IF CTY
	JRST	E$$DNT		;NO--ERROR
	MOVE	Q,[22,,11]	;YES--FIND IT'S OFFSET
	GETTAB	Q,		; ..
	  JRST	E$$DNT		;UNKNOWN--GIVE UP
	HLRZS	Q		;POSITION CTY INDEX		[101]
	MOVEI	Q,-1(Q)		;CTY IS ONE BEFORE FIRST INVISIBLE TTY

FOONO:	MOVEM	Q,TTYNO		;SAVE AWAY FOR LATER
	TRO	Q,.UXTRM	;[41] CONVERT NUMBER TO UNIVERSAL I/O INDEX
	MOVEI	QM1,3		;[41] FUNCTION CODE TO CLEAR INPUT BUFFER
	MOVE	CH,[XWD 2,QM1]	;[41]
	TRMOP.	CH,		;[41] CLEAR THE INPUT BUFFER
	JFCL			;[41] IGNORE THE ERROR RETURN
;PRINT HEADER ON THE PLEASE TTY
OPRHED:	MOVEI M,[ASCIZ/

**PLEASE  Job /]		;[45] GET START OF MESSAGE
	PUSHJ PDP,MSG
	PJOB	0,
	PUSHJ PDP,TYPD
	MOVEI M,[ASCIZ / [/]
	PUSHJ PDP,MSG
	HRROI	2,2		;GET PPN THIS JOB
	GETTAB	2,
	  MOVEI	2,0
	MOVEM 2,SAVPP#
	HLRZ	0,2		;ISOLATE THE PROJECT NUMBER
	PUSHJ	PDP,TYPO	;TYPE IT
	MOVEI CH,","
	PUSHJ PDP,PUTCHR
	HRRZ	0,2		;ISOLATE THE PROGRAMMER NUMBER
	PUSHJ	PDP,TYPO	;TYPE IT
	SETO 0
	GETLCH	0
	HRRZS 0
	TRZ	0,.UXTRM	;[42] ZERO THE UNIVERSAL I/O INDEX
	MOVE	1,[XWD 22,11]	;GET PTY OFFSET
	GETTAB	1,
	  MOVSI	1,7777		;(HUGE)
	HLRZ	2,1		;COPY START OF PTYS		[106]
	ADDI	2,(1)		;ADD LENGTH TO GIVE START TTYS AGAIN	[106]
	HLRZS	1
	MOVEI	M,[ASCIZ /] PTY/]
	CAMGE	0,2		;				[106]
	CAMGE	0,1
	MOVEI M,[ASCIZ /] TTY/]
	PUSHJ PDP,MSG
	CAML	0,1
	SUB	0,1
	PUSHJ PDP,TYPO
IFN	FTTIME,<
	MSTIME	CURTIM,		;[43] GET THE CURRENT TIME
	MOVEI M,[ASCIZ / at /]
	PUSHJ PDP,MSG
	MOVE	TIME,CURTIM	;[43] GET TIME NOW
	PUSHJ	PDP,TIMOUT	;[43] TYPE IT
	MOVE	TIME,CURTIM	;[43] CURRENT TIME
	SUB	TIME,STARTT	;[43] SUBTRACT START TIME
	CAIGE	TIME,^D2000	;[43] DON'T TYPE IF LESS THAN 2 SECONDS
	JRST	TRYNAM		;[43] IT IS LESS THAN 2 SECS.
	MOVEI	M,[ASCIZ/ wait= /]	;[43] MESSAGE TO TYPE
	PUSHJ	PDP,MSG		;TYPE THE MESSAGE
	PUSHJ	PDP,TIMOUT	;TYPE THE WAIT TIME
TRYNAM:
>	;END TIME CONDITIONAL
	HRROI 1,31		;NAME TABLE
	GETTAB 1,		;IF THERE
	  JRST NONAME		;NOT THERE
	PUSH PDP,1		;SAVE NAME
	MOVEI M,[ASCIZ / User /]	;PREFACE USER NAME
	PUSHJ PDP,MSG
	POP PDP,1		;RESTORE NAME
	PUSHJ PDP,SIXFUL	;TYPE ALL SIX CHARS
	HRROI 1,32		;SECOND HALF OF NAME
	GETTAB 1,
	  JRST NONAME		;SHOULDNT FAIL HERE...
	PUSHJ PDP,SIXOUT	;AND LAST SIX CHARS, SUPPRESS BLANKS
NONAME:	MOVEI M,[ASCIZ /
/]
	PUSHJ PDP,MSG
	OUTSTR	[ASCIZ /[ Operator has been notified]
/]				;[46] TELL USER OPERATOR WAS INFORMED
	MOVE M,SAVPNT
	PUSHJ PDP,MSG1
	JRST OUTP
FOO1:	OUTSTR	[ASCIZ /
/]
FOO2:	MOVE	Q,TTYNO		;GET TTY TAB INDEX
	GETLCH	Q		;GET CHARACTERISTICS
	TLNE	Q,(1B11)	;SEE IF INPUT READY
	JRST TYPE
	INCHSL	CH		;GET CHARACTER INPUT
	  JRST SLEP
	PUSHJ PDP,ALTQ
	  JRST DONE
	PUSHJ PDP,PUTCHR
	INCHRS	CH		;GET NEXT CHARACTER
	  JRST OUTP
	JRST .-5
OUTP:	OUTPUT 1,
	JRST FOO2
SLEP:	MOVEI	Q,1		;SET SLEEP TIME
	SLEEP	Q,		;DO IT
	JRST FOO2
TYPE:	PUSHJ PDP,GETCHR
	  JRST FOO1
	OUTCHR	CH
	JRST TYPE
GETCHR:	SOSG IBUF+2
	JRST GETBUF
GETNXT:	ILDB CH,IBUF+1
	JUMPE CH,GETCHR
	CAIE	CH,14
	CAIN	CH,13
	POPJ	PDP,
	CAIN CH,12
	POPJ PDP,
	PUSHJ PDP,ALTQ
	  JRST DONE
	AOS (PDP)
	POPJ PDP,
GETBUF:	INPUT 1,
	JRST GETNXT
PUTCHR:	SOSG OBUF+2
	JRST PUTBUF
PUTNXT:	IDPB CH,OBUF+1
	POPJ PDP,
PUTBUF:	OUTPUT 1,
	JRST PUTNXT
BUSY:	SKIPN FLAG
	OUTSTR	[ASCIZ /[ Operator busy, hang on please]
/]				;[46] TELL USER OPER. IS BUSY
	MOVEI Q,3
	SETOM FLAG
	SLEEP	Q,
BUSY1:	INCHRS	CH
	  JRST FOO
	PUSHJ PDP,ALTQ
	  JRST DONE1
	DPB	CH,PNTR		;STORE AWAY FOR MESSAGE
	CAME	PNTR,[POINT 7,TEXT+LN.TXT-1,34]  ;DON'T OVERFLOW BUFFER
	IBP	PNTR		;ADVANCE TO NEXT HOLE
	JRST	BUSY1

IFN	FTTIME,<
TYPD2:	MOVEI CH,"0"
	CAIG TIME,^D9
	PUSHJ PDP,PUTCHR
>			;END TIME CONDITIONAL
TYPD:	SKIPGE	0
	JRST [MOVEI CH,"-"
		PUSHJ PDP,PUTCHR
		JRST .+1]
TYPDL:	IDIVI 12
	MOVMS 0
	HRLM 1,(PDP)
	SKIPE 0
	PUSHJ PDP,TYPDL
	HLRZ (PDP)
	ADDI 60
	MOVE CH,0
	JRST	PUTCHR

TYPO:	IDIVI 10
	HRLM	1,(PDP)
	SKIPE 0
	PUSHJ PDP,TYPO
	HLRZ (PDP)
	ADDI 60
	MOVE CH,0
	PUSHJ PDP,PUTCHR
	POPJ PDP,
MSG:	HRLI M,440700
MSG1:	ILDB CH,M
	JUMPE CH,CPOPJ
	PUSHJ	PDP,ALTQ
	  JRST	DONE
	PUSHJ PDP,PUTCHR
	JRST MSG1
DONE:

IFN	FTTIME,<
	MOVEI M,[ASCIZ /

[ Finished after     /]
	PUSHJ PDP,MSG
	MSTIME	TIME,
	SUB	TIME,STARTT	;[43] COMPUTE TIME FOR ENTIRE TRANSACTION
	PUSHJ	PDP,TIMOUT	;TYPE THE TIME
	MOVEI	M,[ASCIZ /]/]	;[43] GET CLOSE BRACKET
	PUSHJ	PDP,MSG		;[43] TYPE IT
>	;END TIME CONDITIONAL
	MOVEI M,[ASCIZ /
./]
	PUSHJ PDP,MSG
	RELEASE 1,
DONE1:	RESET		;CLEAR IO
	OUTSTR	[ASCIZ /
/]
	SKIPN	3,CCLNAM	;SEE IF CUSP SPECIFIED
	JRST	DONE2		;NO--JUST EXIT
	MOVSI	2,'SYS'	;YES--GET FROM SYS
	SETZB	4,5
	SETZB	6,7
	MOVEI	1,2
	SKIPE	CCLFLG		;SEE IF CCL CALL TO US
	HRLI	1,1		;YES--SAME TO HIM
	RUN	1,		;TRY TO DO IT
DONE2:	LOGOUT 1,		;CALL LOGOUT, BUT JUST PRINT DOT
	JRST .-1		;IN CASE USER TYPES CONTINUE
IFN	FTTIME,<
TIMOUT:	IDIVI TIME,^D1000
	IDIVI TIME,^D3600
	PUSH PDP,TIME1
	JUMPE	TIME,TYPMIN	;[43] DON'T TYPE IF HOURS=0
	PUSHJ PDP,TYPD2
	MOVEI CH,":"
	PUSHJ PDP,PUTCHR
TYPMIN:	POP	PDP,TIME
	IDIVI TIME,^D60
	PUSH PDP,TIME1
	PUSHJ PDP,TYPD2
	MOVEI CH,":"
	PUSHJ PDP,PUTCHR
	POP PDP,TIME
	JRST TYPD2
>			;END TIME CONDITIONAL

;HERE ON FATAL ERROR

ABORT:	SKPINL			;KILL ^O		[105..]
	  JFCL
	OUTCHR	["?"]
	CLRBFI			;CLEAR TYPEAHEAD
	PUSHJ	PDP,MESSAG
	JRST	DONE1

;HERE ON WARNING

WARN:	SKPINL			;KILL ^O
	  JFCL
	OUTCHR	["%"]

MESSAG:	GTMSG.	Q3		;GET /MESSAGE LEVEL
	HLRZ	Q1,M		;GET MESSAGE PREFIX
	HRLI	Q1,'PLS'	;ADD PLEASE PREFIX
	TLNE	Q3,(JW.WPR)	;SEE IF PREFIX
	PUSHJ	PDP,TYPSIX	;YES--TYPE IT
	OUTCHR	[" "]		;SPACE OVER
	TLNE	Q3,(JW.WFL)	;SEE IF TEXT
	OUTSTR	(M)		;YES--ISSUE IT
	POPJ	PDP,		;RETURN

;TYPE IN SIXBIT

TYPSIX:	MOVEI	Q,0		;CLEAR ACCUMULATOR
	LSHC	Q,6		;GET CHAR
	ADDI	Q,40		;CONVERT TO ASCII
	OUTCHR	Q		;OUTPUT
	JUMPN	Q1,TYPSIX	;LOOP UNTIL DONE
	POPJ	PDP,		;RETURN				[..105]
ALTQ:	CAIE CH,3	;CONTROL C?
	CAIN CH,32	;CONT Z?
	POPJ PDP,0	;YES
	CAIE CH,33	;ESC?
CPOPJ1:	AOS 0(PDP)
CPOPJ:	POPJ	PDP,0

GETCH:	ILDB	CH,PNTR		;GET NEXT CHARACTER
	JUMPE	CH,CPOPJ	;AT END--EXIT
	SKIPE	PARENS		;IF PAREN MODE,			[103]
	JRST	[CAIE CH,")"	; YES--CHECK FOR CLOSE		[103]
		 JRST .+1	;NO--OK CHAR			[103]
		 MOVEI CH,0	;YES--INDICATE END		[103]
		 DPB  CH,PNTR	;FORCEFULLY			[103]
		 POPJ PDP,]	;GIVE EOL RETURN		[103]
	CAIE	CH,177		;IGNORE RUBOUTS
	CAIN	CH,15		;IGNORE CARRIAGE RETURNS
	JRST	GETCH		; ..
	CAIL	CH,"A"+40	;UPGRADE LOWER CASE
	CAILE	CH,"Z"+40
	JRST CPOPJ1		;[47] GIVE SKIP RETURN
	SUBI	CH,40
	JRST CPOPJ1		;[47] GIVE SKIP RETURN

GETNAM:	MOVE	Q1,[POINT 6,Q]  ;GET SIXBIT WORD
	MOVEI	Q,0		;CLEAR RESULT
GETNM1:	PUSHJ	PDP,GETCH
	 POPJ	PDP,0		;[47] <LF> DETECTED
	CAIL	CH,"0"
	CAILE	CH,"Z"
	JRST	CPOPJ1		;[47] GIVE SKIP RETURN
	CAILE	CH,"9"
	CAIL	CH,"A"
	JRST	.+2
	JRST	CPOPJ1		;[47] GIVE SKIP RETURN
	SUBI	CH,40
	TLNE	Q1,770000
	IDPB	CH,Q1
	JRST	GETNM1
SIXFUL:	MOVE M,[XWD 440600,1]		;TYPE 6 CHARS
SIXFLL:	ILDB CH,M
	ADDI CH,40		;TO ASCII
	PUSHJ PDP,PUTCHR
	TLNE M,770000		;MORE?
	JRST SIXFLL		;YES. TYPE THEM.
	POPJ PDP,0

SIXOUT:	MOVE M,[XWD 440600,1]	;TYPE UP TO 6 CHARS
	JRST SIXOUN
SIXOUL:	ILDB CH,M
	ADDI CH,40
	PUSHJ PDP,PUTCHR
	MOVEI CH,0
	DPB CH,M
SIXOUN:	JUMPN 1,SIXOUL
	POPJ PDP,0
FLAG:	Z
PARENS:	Z
CCLFLG:	Z		;0 IF COMMAND CALL, FILE NAME IF CCL CALL
CCLNAM:	Z
TTYNO:	Z
INTBLK:	XWD	4,DONE		;[107]
	XWD	0,2		;[107] CONTROL C INTERCEPT
	Z			;[107]
	Z			;[107]
	VAR
IBUF:	BLOCK 3
OBUF:	BLOCK 3



PDLST:	BLOCK LN.PDL+1

	XLIST	;LITERALS
LIT
	LIST
TEXT:	BLOCK LN.TXT
	Z		;SAFEGUARD
	END PLEASE