Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-12 - 43,50547/pltlib/sprout/sprout.fed
There is 1 other file named sprout.fed in the archive. Click here to see a list.
-!SPROUT.MAC_SPROUT.MAC
-3
	CSM01$==^D400	;Plotter has 3 pens, ON-LINE indicator, 400 SPI
	CSM02$==-1	;Compressed plot files
	CSM03$==-1	;Red and Black in banner
	CSM04$==-1	;Do CSM accounting (minutes and inches used)
	CSM05$==-1	;Add SLEEP time to $DSCHD macro for TTY response wait
	CSM06$==^D1200	;Support the TAB Products Card Terminal at 1200 baud
	CSM07$==-1	;Change some QUEUE defaults
	CSM08$==^D2400	;PTC-6 Plotter Terminal Controller at 2400 baud
IF2,<IFN CSM02$,<PRINTX	[CSM02$ uses TOLP.REL]>>
IF2,<IFN CSM06$,<PRINTX	[CSM06$ uses TABCDP.REL]>>
IF2,<IFN CSM08$,<PRINTX	[CSM08$ uses PTC6.REL]>>

REPEAT	0,<	;To completely remove the CSM changes, make this a REPEAT 1
	CSM01$==0	;Normal XY-10 plotter
	CSM02$==0	;Plot files are 1 byte per increment (very big)
	CSM03$==0	;Do not exercise the black and red pens
	CSM04$==0	;Account disk reads instead of forms type
	CSM05$==0	;No TTY I/O, therefore no sleep requests
	CSM06$==0	;Card punch is on I/O bus or front-end 11
	CSM07$==0	;Use whatever QUEUE says
	CSM08$==0	;Plotter is not connected to a TTY line
	DEFINE	CSMEDT($EDIT,$PART),<>	;Dummy macro
	CSMED$==0	;No additional edits
>  ;End of REPEAT 0
-25
		PAGE
	SALL		;Also searches UUOSYM and ACTSYM.UNV
-29
IFNDEF CSMEDT,<	SEARCH	CSMEDT	>	;CSM edit macro
	.XCREF	S1,S2,T1,T2,T3,T4,C,J,P	;[CSM] Save some trees

-35,37
	SPOWHO==2			;Who last patched (JMS @ CSM)

	%SPO==<BYTE (3)SPOWHO(9)SPOVER(6)SPOMIN(18)SPOEDT>+CSMED$
-47,151
SUBTTL	Table of Contents

;                  Table of Contents for SPROUT
;
;
;			   Section			      Page
;
;    1. Table of Contents  . . . . . . . . . . . . . . . . . .   1
;    2. Revision History . . . . . . . . . . . . . . . . . . .   2
;    3. CSM Revision History . . . . . . . . . . . . . . . . .   2
;    4. Constants  (Conditional and Unconditional) . . . . . .   4
;    5. MACROS . . . . . . . . . . . . . . . . . . . . . . . .   5
;    6. Special Forms Handling Parameters  . . . . . . . . . .   6
;    7. Flag Definitions . . . . . . . . . . . . . . . . . . .   7
;    8. Job Parameter Area . . . . . . . . . . . . . . . . . .   8
;    9. Random Impure Storage  . . . . . . . . . . . . . . . .  11
;   10. Resident JOB DaTABase  . . . . . . . . . . . . . . . .  12
;   11. Non-zero daTABase  . . . . . . . . . . . . . . . . . .  13
;   12. $TEXT Utilities  . . . . . . . . . . . . . . . . . . .  14
;   13. Program Initialization . . . . . . . . . . . . . . . .  15
;   14. Idle Loop  . . . . . . . . . . . . . . . . . . . . . .  16
;   15. Deschedule Process . . . . . . . . . . . . . . . . . .  17
;   16. CHKTIM - Routine to see if it's time to schedule a s .  17
;   17. Do the Job . . . . . . . . . . . . . . . . . . . . . .  18
;   18. Process a File . . . . . . . . . . . . . . . . . . . .  19
;   19. End of Job . . . . . . . . . . . . . . . . . . . . . .  20
;   20. FILDIS . . . . . . . . . . . . . . . . . . . . . . . .  21
;   21. CHKQUE . . . . . . . . . . . . . . . . . . . . . . . .  22
;   22. CHKOBJ . . . . . . . . . . . . . . . . . . . . . . . .  23
;   23. FNDOBJ . . . . . . . . . . . . . . . . . . . . . . . .  24
;   24. GETBLK . . . . . . . . . . . . . . . . . . . . . . . .  25
;   25. NEXTJOB Message from QUASAR  . . . . . . . . . . . . .  26
;   26. User CANCEL Request  . . . . . . . . . . . . . . . . .  27
;   27. UPDATE Routine to send status update . . . . . . . . .  28
;   28. CHKPNT Routine to send checkpoint message  . . . . . .  29
;   29. SETUP/SHUTDOWN Message . . . . . . . . . . . . . . . .  30
;   30. Response to setup message  . . . . . . . . . . . . . .  31
;   31. Operator CANCEL command  . . . . . . . . . . . . . . .  32
;   32. Operator STOP command  . . . . . . . . . . . . . . . .  33
;   33. Operator CONTINUE command  . . . . . . . . . . . . . .  33
;   34. Operator RESPONSE command  . . . . . . . . . . . . . .  33
;   35. Operator REQUEUE command . . . . . . . . . . . . . . .  34
;   36. CLRMSG and SNDQSR routines . . . . . . . . . . . . . .  35
;   37. FRMLEX - Forms limit exceeded routine  . . . . . . . .  36
;   38. Accounting routines  . . . . . . . . . . . . . . . . .  37
;   39. FORMS - Setup Forms for a job  . . . . . . . . . . . .  40
;   40. Forms switch Subroutines . . . . . . . . . . . . . . .  44
;   41. Plotter only switches  . . . . . . . . . . . . . . . .  45
;   42. I/O Subroutines for SPFORM.INI . . . . . . . . . . . .  46
;   43. INPOPN - Routine to open the input file  . . . . . . .  48
;   44. INPBUF - Read a buffer from the input file . . . . . .  49
;   45. INPBYT - Read a byte from the input file . . . . . . .  49
;   46. INPERR - Handle an input failure . . . . . . . . . . .  49
;   47. INPFEF - Force end-of-file on next input . . . . . . .  49
;   48. INPREW - Rewind the input file . . . . . . . . . . . .  49
;   49. OUTGET - OPEN the output device  . . . . . . . . . . .  49
;   50. OUTBYT - Deposit a byte in the output buffer . . . . .  53
;   51. OUTOUT - Routine to output a buffer  . . . . . . . . .  53
;   52. DEVERR - Handle Output Device Errors . . . . . . . . .  55
;   53. OUTREL - Release output device . . . . . . . . . . . .  56
;   54. OUTWON - Wait for on-line  . . . . . . . . . . . . . .  57
;   55. OUTFLS Routine to flush output buffers . . . . . . . .  58
;   56. TTY I/O
;        56.1   Input character from TTY, no wait  . . . . . .  59
;        56.2   Input character, wait up to 30 seconds . . . .  60
;   57. Card punch service
;        57.1   Dispatch table . . . . . . . . . . . . . . . .  61
;        57.2   Checkpoint text generation . . . . . . . . . .  62
;        57.3   File processing  . . . . . . . . . . . . . . .  63
;        57.4   File headers . . . . . . . . . . . . . . . . .  69
;        57.5   File trailers  . . . . . . . . . . . . . . . .  70
;        57.6   Banners  . . . . . . . . . . . . . . . . . . .  71
;        57.7   Word punching  . . . . . . . . . . . . . . . .  72
;        57.8   Letters  . . . . . . . . . . . . . . . . . . .  73
;        57.9   Byte output  . . . . . . . . . . . . . . . . .  74
;   58. Plotter service
;        58.1   Dispatch table . . . . . . . . . . . . . . . .  75
;        58.2   Checkpoint text generation . . . . . . . . . .  76
;        58.3   File processing  . . . . . . . . . . . . . . .  77
;        58.4   Expand CSM's compressed plot format  . . . . .  79
;        58.5   READ36, OPRTXT, PAUSEP, TITLE for TOLP . . . .  81
;        58.6   NEWPEN for 3-pen plotter . . . . . . . . . . .  82
;        58.7   DEVOUT output errors . . . . . . . . . . . . .  83
;        58.8   Banners  . . . . . . . . . . . . . . . . . . .  84
;        58.9   File headers . . . . . . . . . . . . . . . . .  85
;        58.10  File trailers  . . . . . . . . . . . . . . . .  86
;        58.11  Job trailers . . . . . . . . . . . . . . . . .  87
;        58.12  Solid lines  . . . . . . . . . . . . . . . . .  88
;        58.13  Dashed lines . . . . . . . . . . . . . . . . .  89
;        58.14  Job information plotting . . . . . . . . . . .  90
;        58.15  Alignment and testing  . . . . . . . . . . . .  91
;        58.16  Pen calibration  . . . . . . . . . . . . . . .  92
;        58.17  Compute character size . . . . . . . . . . . .  93
;        58.18  Letters  . . . . . . . . . . . . . . . . . . .  94
;        58.19  Line segments  . . . . . . . . . . . . . . . .  95
;        58.20  PTC-6 interface  . . . . . . . . . . . . . . .  97
;        58.21  Rotation and XY20 translation  . . . . . . . .  98
;        58.22  Pen movement generation  . . . . . . . . . . .  99
;        58.23  Character set  . . . . . . . . . . . . . . . . 101
;   59. Paper tape punch service
;        59.1   Dispatch table . . . . . . . . . . . . . . . . 106
;        59.2   Checkpoint text generation . . . . . . . . . . 107
;        59.3   File processing  . . . . . . . . . . . . . . . 108
;        59.4   Banners  . . . . . . . . . . . . . . . . . . . 113
;        59.5   File headers . . . . . . . . . . . . . . . . . 114
;        59.6   File trailers  . . . . . . . . . . . . . . . . 115
;        59.7   Trailers . . . . . . . . . . . . . . . . . . . 116
;        59.8   Blank folds  . . . . . . . . . . . . . . . . . 117
;        59.9   Letters  . . . . . . . . . . . . . . . . . . . 118
;        59.10  Byte output  . . . . . . . . . . . . . . . . . 119
;   60. Character Bit Array for 5 X 7 Character Matrix . . . . 120
;   61. Common Utilities . . . . . . . . . . . . . . . . . . . 122
;   62. Interrupt Module . . . . . . . . . . . . . . . . . . . 124
;   63. IPCF and DEVICE Interrupt service for TOPS10 . . . . . 128
;   64. IPCF and DEVICE interrupt service for TOPS20 . . . . . 129
-152:
-357,357

;BEGIN CODE MEINTENANCE

-361,362

End of revision history
\
PAGE
SUBTTL	CSM Revision History
				;
; Edit	  Date	   Who	Description
;======	=========  ===	===========
				;
;CSM01$	14-Nov-80  JMS	Plotter has 3 pens and an ON-LINE indicator.  Add
;			routines to change pens and proper positioning after
;			the plot.  Make sure the plotter is on-line at OUTOUT.
	CSMEDT	01	;Show value of CSM01$
	INCS=<CSM01$>	;400 increments per inch = 620 octal
IFN CSM01$,<ND	CKPTIM,^D60>	;Checkpoint every minute.
				;
;CSM02$	14-Nov-80  JMS	Use the compressed plot file format as defined
;			in PLOT.REL (from CSM's FORLIB).  Instead of one
;			byte per increment, most halfwords in the file
;			contains 9-bits of delta-X and 9 of delta-Y.
;			Use TOLP.REL to translate the disk file back
;			into calls to subroutine PLOT.
	CSMEDT	02	;Show value of CSM02$
IFN CSM02$,<IFE CSM01$,<PRINTX ?Must have CSM01$ on for CSM02$>>
				;
;CSM03$	14-Nov-80  JMS	Change the plot banner to exercise the red and
;			black pens.  Plot error message even if no
;			/TRAILER and set blue pen at P$EOF.
	CSMEDT	03	;Show value of CSM03$
				;
;CSM04$	25-Mar-81  JMS	Put the forms name in place of DISK-WRITES,
;			amount of paper in PAGES-PRINTED, cards, feet,
;			or plot time in DISK-READS.
	CSMEDT	04	;Show value of CSM04$
				;
;CSM05$	 8-Jan-81  JMS	Add a sleep request to $DSCHD.  RH of flags is
;			number of seconds to wait.  This is needed for
;			non-blocking TTY I/O routines.
	CSMEDT	05	;Show value of CSM05$
				;
;CSM06$	 8-Jan-81  JMS	Add support for the TAB Products Card Terminal.
;			It is a Reader/Punch that acts like a TTY.
	CSMEDT	06	;Show baud rate (^D1200=^O2260)
IFN CSM06$,<IFE CSM05$,<PRINTX ?Must have CSM05$ on for CSM06$>>
				;
;CSM07$	 8-Mar-83  JMS	Remove DSPMOD so that cards are punched in ASCII,
;			paper tape is punched in ASCII, and plots are
;			done in 18-bit BINARY mode unless explicitly
;			requested otherwise.  This is so that output
;			from SOS or SED is not punched in image-binary.
;			Remove "BEGIN:", "JOB", "jobnam", "USER:" from
;			card punch banner, ignore QUEUE's default of
;			/NOHEADER and always punch file header on cards.
	CSMEDT	07	;Show value of CSM07$
				;
;CSM08$	28-Jun-83  JMS	Add support for the Houston Instruments PTC-6
;			Plotter Terminal Controller on a TTY line.
	CSMEDT	08	;Show value of CSM08$
IFN CSM08$,<	EXTERN	PTCINI,PTCMOV,PTCOUT,PTCFIN
IFE CSM05$,<PRINTX ?Must have CSM05$ on for CSM08$>>
				;

CSMED$==10	;Increment this to change .JBVER

;End of CSM Revision History
-422
COMMENT ~
  From the OPERATOR's point of view, the supply spool on the plotter is
above the pen holder, and the takeup spool is below the pen holder.
Therefore, to move the pen in the +Y direction, the pen holder moves to
the left.  To move the pen in the +X direction, the pen stays still and
the paper is moved down (towards the takeup spool).  The following
definitions are based on this point of view.
;End of COMMENT ~

-428,431
	XP	XYU,10			;-X   move the paper up
	XP	XYD,4			;+X   move the paper down
	XP	XYL,2			;+Y   move pen holder left
	XP	XYR,1			;-Y   move pen holder right
	PLUSX== XYD		;[CSM]	;Move in positive X direction   0
	PLUSY== XYL		;[CSM]	;Move in positive Y direction  90
	MINUSX==XYU		;[CSM]	;Move in negative X direction 180
	MINUSY==XYR		;[CSM]	;Move in negative Y direction 270
-436,436

	CSMEDT	01,0	;3-pen plotter, definitions
IFE CSM01$,<XP	PLTPEN,^D9>		;# TICS FOR PLOT PEN UP/DOWN
IFN CSM01$,<XP	PLTPEN,^D<1800*30/1000>	;30 millisec compared to 1800 per second

-437:	XP	PLTMOV,1		;# TICS FOR PEN MOVEMENT
-448,448
DEFINE LP(SYM,VAL,FLAG),<;;Flag="Z" marks a variable to be zeroed per job
-474,477
	SYM==J...X>;;END IF2>;;END DEFINE LP
;[CSM] Removed 2 CRLFs so that MACRO will show value in listing
-486,533
;Format of SYS:SPFORM.INI

;  DEV FORM/SWITCH	This line applies to all devices of this type
;  DEV FORM:ALL/SWITCH	This line applies to all devices of this type
;  DEV FORM:LOC/SWITCH	This line applies to devices at the central site
;  DEV FORM:REM/SWITCH	This line applies to devices on remote nodes

;	"DEV" can be one of PLT, CDP, or PTP
;	"FORM" is the name of the forms type, 6 characters or less

;Note:  SPROUT will use the first entry which meets the location
;	specification for its device.  Therefore, if ALL is used with
;	LOC or REM, ALL should be after the LOC or the REM.


;Switches legal for all devices

;	/BANNER		Output the job header
;	/HEADER		Output file headers
;	/TRAILER	Output the job trailer
;	/NOTE:AA	Type NOTE to the OPR when forms are mounted


;Switches legal for plotters only

;	/SPU:NN		Steps per unit (a factor of all XX and YY)
;	/SPS:NN		Steps per second (for calculating run time)
;	/MAXIMUM:XX:YY	Maximum pen position
;	/MINIMUM:XX:YY	Minimum pen position after file header


;In the above and below explanations:

;	NN	is a decimal number
;	AA	is a string of 1 to 50 characters, terminated by next "/"
;	XX	is a limit for the X axis
;	YY	is a limit for the Y axis


;Typical SPFORM.INI forms specification

;	CDP NORMAL/BANNER/HEADER -
;		  /NOTE:Load NORMAL Cards in Card Punch
;
;	PLT NORMAL/BANNER/HEADER/TRAILER/SPS:900
;		  /SPU:1/MINIMUM:0:0/MAXIMUM:0:5900-
;		  /NOTE:Set Plotter Controls to 200 Steps per inch
;
;	PTP NORMAL/BANNER/HEADER/TRAILER
;	PTP BLACK /BANNER/HEADER/TRAILER/NOTE:Black oiled paper tape

PAGE
COMMENT |	CSM interpretation of plotter parameters

						;
Example for a drum plotter:
						;
PLT NORMAL /SPS:1800/SPU:4/MINIMUM:0:0/MAXIMUM:0:1100 -
	   /BANNER/HEADER/TRAILER
						;
PLT		= This line applies to the plotter (not CDP or PTP).
NORMAL		= The forms name.
/SPS:1800	= Do accounting based on speed of 1800 steps per second.
/SPU:4		= This plotter uses 400 steps per inch, the following
                  numbers are in 1/100ths of an inch.
/MINIMUM:0:0	= Pen cannot go to left or below the starting point.
/MAXIMUM::1100	= There is no maximum limit in the +X direction, +Y movement
		  is limited to 11.00 inches.  The height of characters used
		  in the /BANNER/HEADER/TRAILER is 11.00/90 = 0.12 inches.
--		= Hypen indicates a continued line.
/BANNER		= Plot "* Start job XXX" 0.12 inches high, plot user's name
		  and PPN 0.36 inches high, and a line across the paper.
/HEADER		= Plot file name 0.12 inches high and a dashed line.
/TRAILER	= Plot a dashed line and the summary 0.12 inches high.
/NOTE		= No note is specified, so that "OPR>START PLOT 0" will
		  not require a "RESPOND 'PROCEED' WHEN READY".
						;
End of COMMENT |

-547,555
DEFINE FF(A),<	<<SIXBIT /A/>&777777B17>+S$'A	>;;All on 1 line to look nice

	XALL		;[CSM] Show definition in the listing
FFNAMS:	SWITCHES
	F$NSW==.-FFNAMS			;NUMBER OF SWITCHES
	SALL		;[CSM] Normal macro expansions
-611,611
	LP	J$FPLT,1		;-1 = Plotter-only switches are legal
-612:
-629

	CSMEDT	05,1	;TTY I/O and SLEEP, part 1 just before PLOTTER VARIABLES
IFN CSM05$,<	;Flags and variables
	LP	J$TTY,1			;'CDP' in LH, UDX in RH
	LP	J$WUDT,1		;UDT when to wakeup
	LP	J$NACK,1		;Count of Negative ACKs
>  ;End of IFN CSM05$
-633,633
;[CSM]	LP	J$PAUS,1		;PAUSE FOR EVERY FORM
-651
	CSMEDT	01,1	;3-Pen plotter, part 1 in "PLOTTER VARIABLES"
IFN CSM01$,<	;Flags and variables for plotter
	LP	J$PENN,1		;Pen number, from 1 to 3
	LP	J$XLOW,1		;Lowest XSTEP seen while pen was down
>  ;End of IFN CSM01$


-678,678
	LP	J$DSPX,1		;SPOOLED FILE EXTENSION
-683,683
	INTERN	J$$END		;[CSM]	;For .ASSIGNing data areas
-684:
-712,712
L.CON:	BLOCK	1			;SPROUT connect time in seconds
-751
	CSMEDT	05,2	;TTY I/O and SLEEP, part 2 before "LOWEND=="
IFN CSM05$,<
SLEEPT:	BLOCK	1			;Time to sleep
>  ;End of IFN CSM05$

-854

IFN CSM02$,<	;Check to see where LINK .ASSIGNed the buffers
	SKIPLE	[TOLP..##-1777]		;Make sure data area is only one page
	 OUTSTR	[ASCIZ	/?Data area for TOLP extends past 1777/]
>  ;End of IFN CSM02$
IFN CSM06$,<
	SKIPLE	[TABC..##-1777]		;Make sure data area is only one page
	 OUTSTR	[ASCIZ	/?Data area for TABCDP extends past 1777/]
>  ;End of IFN CSM06$
IFN CSM08$,<
	SKIPLE	[PTC6..##-1777]		;Make sure data area is only one page
	 OUTSTR	[ASCIZ	/?Data area for PTC6 extends past 1777/]
>  ;End of IFN CSM08$

-886,886
	JRST	MAIN			;AND GO!
-898,898
MAIN.2:	SKIPN	JOBACT(P1)		;IS THIS STREAM ACTIVE?
-899:	JRST	MAIN.3			;NO,,GET THE NEXT STREAM.
-903,903

	CSMEDT	05,2	;TTY I/O and SLEEP, part 2 at MAIN.2:+5
IFN CSM05$,<	;Watch for sleep time
	PUSHJ	P,CHKTIM		;Time to run this stream?
	JUMPF	MAIN.3			;Not yet
>  ;End of IFN CSM05$

	SKIPN	JOBSTW(P1)		;IS THE STREAM BLOCKED?
-912,914
IFE CSM05$,< MOVEI  S1,0	>	;SNOOZE FOR INTERRUPT
IFN CSM05$,< MOVE  S1,SLEEPT	>	;Get sleep time in seconds
	$CALL	I%SLP			;GO WAIT
	$CALL	CHKQUE			;PROCESS MESSAGES
IFN CSM05$,< SETZM  SLEEPT	>	;Clear timer request
-946,949

	CSMEDT	05,2	;TTY I/O and SLEEP, part 2 at DSCHD:+6
IFE CSM05$,< MOVE  S1,@0(S1) >		;GET THE FLAGS
IFN CSM05$,<
	HRRZ	T1,@0(S1)		;Get the seconds to sleep
	HLLZ	S1,@0(S1)		;Get the flags
>  ;End of IFN CSM05$

	HRRZ	S2,STREAM		;GET STREAM NUMBER
	IORM	S1,JOBSTW(S2)		;SET THE FLAGS

IFE CSM05$,< JRST  MAIN >		;AND GO LOOP
IFN CSM05$,<	;This code taken from LPTSPL
	JUMPE	T1,MAIN			;Loop if no sleep time

CONT. (SCHEDULER)
	SKIPE	SLEEPT			;Is a sleep time set?
	CAMG	T1,SLEEPT		;And current amount smaller?
	 MOVEM	T1,SLEEPT		;Yes, save shorter interval
	$CALL	I%NOW			;Get the current time
	IMULI	T1,3			;Seconds to UDT ticks
	ADD	T1,S1			;Build wake-up time
	MOVEM	T1,J$WUDT(J)		;Save for CHKTIM
	JRST	MAIN			;Loop

SUBTTL	CHKTIM - Routine to see if it's time to schedule a stream

;CALL:	J/  Pointer to job page
;
;REG:	TRUE if stream can be scheduled now (timewise)
;	FALSE if stream needs to wait

CHKTIM:	$CALL	I%NOW			;Get the current time
	MOVE	S2,S1			;Get the UDT in S2
	MOVE	S1,J$WUDT(J)		;Get the stream wakeup time
	SUB	S1,S2			;Get time left in UDT ticks
	IDIVI	S1,3			;Convert to seconds
	SKIPG	S1			;Any seconds left?
	 JRST	[SETZM	SLEEPT		  ;No, clear old sleep time
		 $RETT		]	  ;Return TRUE
	SKIPE	SLEEPT			;Is a sleep time set?
	CAMG	S1,SLEEPT		;And current amount smaller?
	 MOVEM	S1,SLEEPT		;Yes, save the shorter interval
	$RETF				;Return FALSE

;End of code taken from LPTSPL>  ;End of IFN CSM05$
-973,975
	$CALL	FILE			;Process the file
	TXNE	S,RQB+ABORT		;HAVE WE BEEN REQUEUED OR WORSE?
	JRST	ENDJOB			;YES, END NOW!
-1024,1030
TOPS10<	$CALL	OUTWAT	>		;OUTPUT AND WAIT UNTIL DONE

TOPS20<	$CALL	OUTOUT	>		;FORCE EVERYTHING OUT
-1031:
-1038,1040
TOPS20<	$CALL	OUTOUT	>		;FORCE OUTPUT
-1065,1065
-1078,1082
;**;[2533] Revamp code at FILD.1:+7L	CTK/16-DEC-82
	TXNE	T2,FP.DEL		;[2533] /DELETE specified?
	TXNE	S,ABORT			;[2533] Is ABORT set?
	TXNE	T2,FP.SPL		;[2533] Spool file?
	  PUSHJ	P,F%DEL			;[2533] YES,,DELETE THE FILE.
-1159,1159
	CAIE	T1,.OROBJ		;IS THIS THE OBJECT BLOCK?
-1294,1295
	TDNE	S2,JOBSTW(S1)		;ARE WE WAITING FOR OPR RESPONSE?
	$KWTOR	(JOBWAC(S1))		;YES,,KILL IT !
-1296:	ANDCAM	S2,JOBSTW(S1)		;AND CLEAR THE WAIT BIT
-1318,1320
	TXNE	S2,RQB			;REQUEUING JOB?
	MOVX	T2,%REQUE		;YES
	TXNE	S2,ABORT		;ABORTING JOB?
-1325,1329
	TXNE	S2,PSF%OR		;ARE WE WAITING FOR OPR RESPONSE?
	MOVX	T2,%OREWT		;YES,,SAY SO
	TXNE	S2,PSF%ST		;ARE WE STOPPED?
	MOVX	T2,%STOPD		;YES,,SAY SO
	TXNE	S2,PSF%DO		;ARE WE OFFLINE?
-1343,1343
; dependent service routines to generate half of the ASCIZ text that gets
-1347,1347
	SKIPN	JOBACT(S1)		;NEED TO CHECKPOINT?
-1353,1353
	SKIPGE	S1			;TIME TO CHECKPOINT YET?
-1354:	POPJ	P,			;NO - RETURN
-1379,1379
	PUSHJ	P,DCHKP(S1)		;GENERATE DEVICE dependent TEXT
-1396,1396
	JRST	SETU.2			;YES!
-1401,1402
;[CSM] There is a problem if two streams start with 1/3 of a second
SETU.2:	HRRZM	T2,STREAM		;SAVE THE STREAM NUMBER
	$CALL	I%NOW			;USE SETUP TIME AS ACK STAMP
	LSH	S1,3		;[CSM]	;Free up 3 bits
	IOR	S1,T2		;[CSM]	;Make it be unique
-1482,1483
	TDNE	S2,JOBSTW(S1)		;ARE WE WAITING FOR OPR RESPONSE?
	$KWTOR	(JOBWAC(S1))		;YES,,KILL IT !
-1492,1497
	CAIN	T1,.ORREA		;IS THIS THE REASON BLOCK?
	MOVEI	P1,0(T3)		;YES..SAVE ADDRESS OF REASON
	CAIE	T1,.CANTY		;IS THIS THE CANCEL TYPE BLOCK?
	JRST	OACC.1			;NO,,SKIP IT AND GET NEXT BLOCK
	MOVE	S1,0(T3)		;YES - LOAD THE CANCEL TYPE
	CAIE	S1,.CNPRG		;IS IT /PURGE?
-1498:	JRST	OACC.1			;NO,,PROCESS THE NEXT MSG BLK
-1556,1556
OACREQ:	TXNE	S,GOODBY		;IS IT TOO LATE FOR THIS?
-1567,1568
	TDNE	S2,JOBSTW(S1)		;ARE WE WAITING FOR OPR RESPONSE?
	$KWTOR	(JOBWAC(S1))		;YES,,KILL IT !
-1575,1577
	CAIN	T1,.REQTY		;IS THIS THE REQUEST TYPE BLOCK?
	JRST	OACR.2			;YES,,GO PROGESS IT
	CAIN	T1,.ORREA		;IS THIS THE REASON BLOCK?
-1646
SUBTTL	FRMLEX - Forms limit exceeded routine

-1651,1651
	JRST	OUTIGN			;YES, set to +infinity
-1652:
-1664,1664
	TXNE	S,ABORT			;WERE WE CANCELLED?
-1711,1711
	TLNN	S1,-1			;ARE WE DEATCHED?
-1720,1722
	TXNE	S2,GL.ITY		;ARE WE A PTY?
	MOVE	TF,[ASCII/P/]		;YES,,MAKE US 'PTY'
	TXNE	S2,GL.CTY		;ARE WE THE CTY?
-1763
CONT. (ACTEND)
-1798,1798

	CSMEDT	04,1	;CSM accounting, part 1 after QUEUE. uuo
IFE CSM04$,< SETZM FACTBL+7 >		;No disk writes
IFN CSM04$,<
	MOVE	S1,J$FORM(J)		;Get the forms type
	MOVEM	S1,FACTBL+7		;Instead of disk writes
>  ;End of CSM04$

CONT. (ACTEND)

-1799:	MOVE	S1,J$LDEV(J)		;DEVICE NAME
-1803,1804
	MOVE	S1,J$APRT(J)		;Number of cards, feet, minutes
	MOVEM	S1,FACTBL+12		;Store as pages printed
-1823,1823
ACTRNT:	SKIPN	ACTFLG			;Accounting turned on?
-1867,1867
	USNM3.	(.EQOWN+1(J))		;USER NAME 2 (TOPS10)
-1905,1906
	CAMN	S1,[POINT 7,J$XTBF(J)]	;IS THERE A MESSAGE FOR THE OPERATOR?
	$RETT				;NO,,RETURN.

IFN CSM02$,< FORM.3:	>	;PUSHJ to here to wait for 'PROCEED' in OPRTXT

-1933,1936
	JUMPF	FRMIEX			;EOF!
	GETLIM	T2,.EQLIM(J),FORM	;GET FORMS
	CAMN	T1,T2			;MATCH?
	JRST	FRMI.4			;YES!
-1937:	JRST	FRMI.2			;NO -- END LINE
-1950,1951
	JUMPF	FRMIEX			;EOF!
	JUMPE	T1,FRMI.6		;MAYBE PAREN?
-1975,1978
	  SKIPA				;NO!
	JRST	FRMSWI			;YES!
	CAMN	T1,J$LDEV(J)		;COMPARE TO OUR DEVNAM
	JRST	FRMSWI			;MATCH!
-1998,2001
	JUMPF	FRMIEX			;EOF!
	JRST	FRMSWI			;AND LOOP AROUND
FRMS.1:	$CALL	FH$SIX			;GET THE SWITCH
	JUMPF	FRMIEX			;EOF!
-2012,2012
	CAMN	T3,T1			;MATCH?
-2021,2021
	PUSHJ	P,0(T3)			;GO!
-2022:	JUMPF	FRMERR			;REPORT FAILURE AND GIVE UP
-2056,2056
	JUMPF	S$NOT2			;EOF, FINISH UP!
-2097
	SKIPE	T1		;[CSM]	;If not zero,
-2101
	SKIPE	T1		;[CSM]	;If not zero,
-2118,2118
	  SKIPA				;ITS NOT!
-2167,2167
	IMULI	T1,^D10		;[CSM]	;Shift one decimal place
-2168:	ADDI	T1,-"0"(C)		;ADD IN A DIGIT
-2267,2267
	TXNE	S,DSKOPN		;IS THE SPOOL FILE OPEN?
-2274,2274
	TXNE	S,DSKOPN		;IS THE SPOOL FILE OPEN?
-2289,2291
	MOVEI	S2,T$DISP		;YES!
	CAXN	S1,.OTCDP		;NO, HOW ABOUT A CARD PUNCH?
	MOVEI	S2,C$DISP		;WIN!
-2308,2309
	MOVX	T1,.IOIMG+UU.PHS+UU.AIO	;IMAGE+PHONLY+NBIO

	CSMEDT	05,3	;TTY I/O and SLEEP, part 3 after DEVNAM in OUTGET
IFN CSM05$,<	;Check for devices connected to TTY lines
	HLRZ	T2,J$LDEV(J)		;Get first part of physical name
	CAIE	T2,'TTY'		;Is it a terminal?
	 JRST	CSM05Z			;No
	MOVE	S2,J$LSER(J)		;Get service routine
	MOVE	S1,DNAME(S2)		;Get 'PLT' or 'CDP'
	MOVEM	S1,J$TTY(J)		;Put in LH
	MOVE	T2,J$LDEV(J)		;Get device again
	IONDX.	T2,			;Get UDX
	  SETZB	T2,J$TTY(J)		;Should never happen
	HRRM	T2,J$TTY(J)		;Store TTY UDX in RH

CONT.	(OUTGET)		;FORCE NEW LISTING PAGE

;Disable free CRLFs every 80 characters and SET TTY NO GAG

	MOVX	T1,.TONFC+.TOSET	;Change setting to
	MOVEI	T3,1			; no free CRLFs
	MOVE	S1,[3,,T1]
	TRMOP.	S1,			;SET TTY NO CRLF
	  JFCL

;*BUG*;	MOVX	T1,.IOPIM+UU.PHS	;Packed image mode (no echo)
	MOVX	T1,.IOIMG+UU.PHS+IO.SUP	;Image mode, no echo
	HLRZ	S1,J$TTY(J)		;Get device type
	CAIN	S1,'PLT'		;Output to plotter?
	 MOVX	T1,.IOASC+UU.PHS+IO.SUP	;ASCII mode, no echo
CSM05Z:	>  ;End of IFN CSM05$

-2318,2322
	MOVE	S1,J$LSER(J)		;GET DEVICE DISPATCH ADDRESS
	MOVE	S1,DBYTE(S1)		;GET OUTPUT BYTE SIZE

IFN CSM05$,<	;Cannot use 6 bits to PTC-6
	HLRZ	S2,J$TTY(J)		;Nonzero if TTY as output device
	CAIN	S2,'PLT'		;Going to the plotter?
	 MOVEI	S1,7			;Yes, use normal ASCII mode

;SET TTY NO GAG after it has been inited

	MOVX	T1,.TOSND+.TOSET	;Change setting to
	HRRZ	T2,J$TTY(J)
	MOVEI	T3,0			; no SENDs allowed
	MOVE	S2,[3,,T1]
	SKIPE	T2			;Don't TRMOP. if not a TTY
	 TRMOP.	S2,			;SET TTY GAG
	  JFCL
>  ;End of IFN CSM05$

-2323:	STORE	S1,J$LBRH+1(J),BP.SIZ	;STORE IT
-2361,2361
	CAXN	S1,.OTPLT		;PLOTTER?
-2375,2375
	  ERJMP	OUTDDE			;DEVICE DOESNT EXIST!
-2433

	CSMEDT	01,2	;3-Pen plotter, part 2 at OUTOUT:+1 <TOPS10>
IFN CSM01$,<	;The plotter does not interrupt for off-line or on-line
	SKIPE	J$FPLT(J)		;Is this going to the plotter?
	 PUSHJ	P,PLTCHK		;Yes, check if it is on-line
>  ;End of CSM01$

-2458,2459

CONT. (OUTOUT)

IFN CSM01$,<	;After OUTWAT: inside TOPS10<>
;Ask the monitor to do a CONI to check if PLT is on-line

	OPDEF	STSPL.	[CALLI	-4]	;CSM UUO to do <CONI PLT,T1>
	PLT.ON==1B30			;The plotter power is on

PLTCHK:	CSMEDT	08,1	;PTC-6 Plotter Controller, part 1 inside CSM01$
IFN CSM08$,<
	SKIPE	J$TTY(J)		;Output going to a TTY?
	 POPJ	P,			;Yes, cannot determine on-line status
>  ;End of IFN CSM08$
	STSPL.	S1,			;Get current status of plotter
	TXNE	S1,PLT.ON		;Is the POWER-ON bit set?
	 JRST	PLTONL			;Yes, plotter is on-line now
	AOS	S1,J$NACK(J)		;Increment NACK count
	IDIVI	S1,^D30			;Set S2 modulo 30
	JUMPN	S2,PLTCH1		;Complain every 30 seconds
	HRRZ	S1,STREAM		;Get stream number
	SETOM	JOBCHK(S1)		;Request checkpoint
	$WTO	(Off-line,,@JOBOBA(S1))
PLTCH1:	CSMEDT	05,4	;TTY I/O and SLEEP, part 4 after PLTCHK:
IFN CSM05$,< $DSCHD  (1) >		;De-schedule for 1 second
IFE CSM05$,< MOVEI   S1,1		;Wait 1 second
	     SLEEP   S1, >		; before continuing
	JRST	PLTCHK			;Check if it is on-line now

PLTONL:	SETOM	J$NACK(J)		;Plotter is on-line now
	$RETT				;OK to do the OUT UUO
>  ;End of IFN CSM01$
>  ;END TOPS10 CONDITIONAL

	CONT.	(OUTOUT)
-2628
SUBTTL	TTY I/O -- Input character from TTY, no wait

	CSMEDT	05,5	;TTY I/O and SLEEP, part 5 between OUTFLS and C$DISP
IFN CSM05$,<	INTERN	TIWAIT,TTYIN,TRMERR	;Entry points for TABCDP.MAC

;Routine to input a single character from terminal into S1.
;Uses T1 and T2.

TTYIN::	MOVX	T1,.TOSIP		;Skip if input in progress
	HRRZ	T2,J$TTY(J)		;Get UDX
	MOVE	S1,[2,,T1]		;Point to args
	TRMOP.	S1,			;Check if input
	  JRST	TTYIN1			;Nothing there
	MOVX	T1,.TOISC		;Input single character
	MOVE	S1,[2,,T1]		;Point to args
	TRMOP.	S1,			;Get the char
	  PUSHJ	P,TRMERR		;Should never happen
	$RETT				;Got char in S1

TTYIN1:	MOVEI	S1,0			;Signify failure
	$RETF

TRMERR::$STOP	(TUF,TRMOP. UUO Failure)
SUBTTL	TTY I/O -- Input character, wait up to 30 seconds

;Routine to wait up to 30 seconds for a character to come in.
;Returns TRUE if char in S1, FALSE and zero in S1 if timed out

TIWAIT::PUSHJ	P,TTYIN			;Check for input
	JUMPT	TIWAI2			;Clear NACK counter if got input

;There is a good possibility that the response will come in within 1 second

	MOVX	S1,HB.RTC+^D1000	;Wait 1 second, wake on char ready
	HIBER	S1,
	  JFCL
	PUSHJ	P,TTYIN			;Anything now?
	JUMPT	TIWAI2			;Return if so
	AOS	J$NACK(J)		;No, waited 1 second already

TIWAT1:	$DSCHD	(1)			;De-schedule this stream for 1 second

	PUSHJ	P,TTYIN			;Input now?
	JUMPT	TIWAI2			;Yes, continue
	AOSG	S1,J$NACK(J)		;No, count failure
	 JRST	TIWAT1			;Keep waiting if negative or zero
	IDIVI	S1,^D30			;Set S2 modulo 30
	JUMPN	S2,TIWAT1		;If less than 30 seconds, wait again
	HRRZ	S1,STREAM		;Get stream number
	$WTO	(<No response from ^W/J$LDEV(J)/ after ^D/J$NACK(J)/ seconds>,,@JOBOBA(S1))
	MOVEI	S1,0			;Signify no response
	$RETF

TIWAI2:	SETZM	J$NACK(J)		;Terminal is responding
	POPJ	P,			;TF has been set to TRUE already

>  ;End of IFN CSM05$
-2629:SUBTTL	Card punch service -- Dispatch table
-2641,2642

	CSMEDT	04,2	;CSM accounting, part 2 at C$DISP:+11
IFE CSM04$,< JRST  .RETT >		;(11) ACCOUNTING
IFN CSM04$,< JRST  CSMACT >		;(11) Accounting

	JRST	C$CHKP			;(12) CHECKPOINT TEXT GENERATION

IFN CSM04$,<
CSMACT:	MOVE	S1,J$APRT(J)		;Get cards punched or feet punched
	MOVEM	S1,J$ADRD(J)		;Save instead of disk reads
	$RETT
>  ;End of IFN CSM04$
-2650,2654
	CAMN	P2,[.INFIN]		;+INFINITY?
	JRST	C$CHK1			;YES
	CAMG	P1,J$RLIM(J)		;OPERATOR ALLOW LIMIT TO EXCEED?
	$TEXT	(DEPBP,<punched ^D/P1/ of ^D/J$RLIM(J)/ cards^0>)
	CAMLE	P1,J$RLIM(J)		;OPERATOR ALLOW LIMIT TO EXCEED?
-2664

	CSMEDT	07,1	;QUEUE defaults, part 1 at C$PROC:+4
IFE CSM07$,<
-2668,2669
>  ;End of CSM07$
IFN CSM07$,<JRST CDASC>			;Default to ASCII mode
-2716,2716
	JUMPF	.RETT			;THIS SHOULD NEVER REALLY HAPPEN!
-2717:	JRST	CDIM.1			;AND THEN LOOP FOR MORE
-2793,2793
	CAIN	C,.CHTAB		;IS IT A HORIZONTAL TAB?
-2855,2866
;The following alphabetics are lowercase
	BYTE (12)	0402,5400,5200	;` a b
	BYTE (12)	5100,5040,5020	;c d e
	BYTE (12)	5010,5004,5002	;f g h
	BYTE (12)	5001,6400,6200	;i j k
	BYTE (12)	6100,6040,6020	;l m n
	BYTE (12)	6010,6004,6002	;o p q
	BYTE (12)	6001,3200,3100	;r s t
	BYTE (12)	3040,3020,3010	;u v w
	BYTE (12)	3004,3002,3001	;x y z
	BYTE (12)	5000,6000,3000	;{ | }
	BYTE (12)	3400,0000,0000	;~ DEL
-2903,2914
;The following alphabetics are lowercase
	BYTE (12)	0402,5400,5200	;` a b
	BYTE (12)	5100,5040,5020	;c d e
	BYTE (12)	5010,5004,5002	;f g h
	BYTE (12)	5001,6400,6200	;i j k
	BYTE (12)	6100,6040,6020	;l m n
	BYTE (12)	6010,6004,6002	;o p q
	BYTE (12)	6001,3200,3100	;r s t
	BYTE (12)	3040,3020,3010	;u v w
	BYTE (12)	3004,3002,3001	;x y z
	BYTE (12)	5000,6000,3000	;{ | }
	BYTE (12)	3400,0000,0000	;~ DEL
-2921,2922

	CSMEDT	07,2	;QUEUE defaults, part 2 at C$HEAD:+2
IFE CSM07$,<	;Ignore QUEUE's default of /NOHEADER, always punch it
	LOAD	S1,.FPINF(E),FP.NFH	;GET NO FILE HEADER BIT
	JUMPN	S1,.RETT		;RETURN IF NOT WANTED
>  ;End of IFN CSM07$

-2956,2956
;[CSM]	PJRST	OUTOUT			;FORCE OUTPUT
	PJRST	OUTCD1		;[CSM]	;FORCE OUTPUT
-2957:
-2961,2961
C$BANN:	CSMEDT	06,1	;TTY CDP, part 1 at C$BANN:
IFN CSM06$,<	;Set terminal to PUNCH+PRINT mode if /FORMS:NORMAL
	MOVEI	S1,J$FORM(J)		;Get forms name
	CAMN	S1,['NORMAL']		;Normal forms?
	 MOVEI	S1,0			;Yes, turn on print mode
	SKIPE	S2,J$TTY(J)		;Punch really a terminal?
	 PUSHJ	P,TABINI##		;Yes, set it up
>  ;End of IFN CSM06$

	SKIPN	J$FBAN(J)		;BANNER cards wanted?
-2965,2969

	CSMEDT	07,3	;QUEUE defaults, part 3 at C$BANN:+4
IFE CSM07$,<	;"BEGIN: JOB jobnam USER:" wastes 4 cards.
	MOVEI	S1,[ITEXT<BEGIN:>]
	PJRST	CTRA.1			;FALL INTO COMMON CODE
>  ;End of IFE CSM07$
IFN CSM07$,<	;Punch just NAME, PPN, and NOTE (if any)
	PJRST	CTRA.2			;Punch user name
>  ;End of IFN CSM07$

IFE CSM06$,<
C$TRAI:	SKIPN	J$FTRA(J)		;Check TRAILER wanted flag
	$RETT				;RETURN IF ZERO
>  ;End of IFE CSM06$
IFN CSM06$,<	;Call TABFIN after all is done
C$TRAI:	SKIPE	J$FTRA(J)		;Trailer cards wanted?
	 $CALL	CTRA.0			;Yes
	SKIPE	J$TTY(J)		;Output to a TTY?
	 PUSHJ	P,TABFIN##		;Yes, finish up
	$RETT
CTRA.0:	>  ;End of IFN CSM06$

-2983
	CONT.	(C$BANN)
IFN CSM07$,< CTRA.2: >			;Here to skip over garbage
-3051,3051
;[CSM]	PJRST	OUTOUT			;PUNCH CARD AND RETURN
	PJRST	OUTCD1		;[CSM]	;PUNCH CARD AND RETURN
-3057,3060
;Call with ASCII character to punch in S1.
;Punches 6 characters as 10 frames each followed by 2 blank frames.
;Character is punched in Rows 0 thru 6.  The contents of J$CMSK is
;OR'ed with the column punch to identify the card as a Job or File card.
-3061:
-3065,3065
	CAILE	S1,"_"			;UPPER CASE?
-3085,3085
CDPBYT:	CSMEDT	06,2	;TTY CDP, part 2 at CDPBYT
IFE CSM06$,< PJRST  OUTBYT >
IFN CSM06$,<	;Special output for TAB Products Cardpunch Terminal
	SKIPN	J$TTY(J)		;Output to a TTY?
	 PJRST	OUTBYT			;No
	$SAVE	<S1,S2>			;Yes, preserve ACs used
	MOVE	S1,C			;Copy to expected AC
	PJRST	TABBYT##		;Store byte in other buffer
>  ;End of IFN CSM06$
-3090,3094
OUTCDP:	AOS	S1,J$APRT(J)		;COUNT ANOTHER ONE
	CAMLE	S1,J$RLIM(J)		;OVER LIMIT?
	PUSHJ	P,FRMLEX		;HANDLE LIMIT EXCEEDED

OUTCD1:					;Output without counting
IFN CSM06$,<	;Special output for TAB Products Cardpunch Terminal
	SKIPE	J$TTY(J)		;Output to a TTY?
	 PJRST	TABPUN##		;Yes, output the card
>  ;End of IFN CSM06$
	PJRST	OUTOUT			;FORCE CARD OUT
-3104,3104
;[CSM]	PUSHJ	P,PTPBYT		;OUTPUT A BYTE
	PUSHJ	P,CDPBYT	;[CSM]	;Use the right output routine
-3111,3111
-3112:P$DISP:	JRST	P$HEAD			;(0) FILE HEADER
-3121,3122

	CSMEDT	04,3	;CSM accounting, part 3 at P$DISP:+11
IFE CSM04$,<JRST .RETT>			;(11) ACCOUNTING
IFN CSM04$,<JRST PLTACT>		;(11) Plotter accounting

	JRST	P$CHKP			;(12) CHECKPOINT TEXT GENERATION


IFN CSM04$,<	;Account for both elapsed time and paper used
PLTACT:	MOVE	S1,J$XLIM(J)		;Get total X increments
	ADDI	S1,INCS/2		;Round up
	IDIVI	S1,INCS			;Convert to inches
	EXCH	S1,J$APRT(J)		;Store amount of paper used
	MOVEM	S1,J$ADRD(J)		;Store minutes in place of disk reads
	$RETT
>  ;End of IFN CSM04$
-3129,3138
	IDIV	P1,J$PTPM(J)		;P1:= MINUTES, P2:= FRACTION
	IMULI	P2,^D10			;[CSM] One decimal place
	IDIV	P2,J$PTPM(J)		;P2:= DECIMAL FRACTION OF A MINUTE
	MOVE	P3,J$RLIM(J)		;GET LIMIT
	CAMN	P3,[.INFIN]		;+INFINITY?
	JRST	P$CHK1			;YES
	CAMG	P1,J$RLIM(J)		;OPERATOR ALLOW LIMIT TO EXCEED?
	$TEXT	(DEPBP,<plotted ^D/P1/.^D/P2/ of ^D/J$RLIM(J)/ minutes^0>)
	CAMLE	P1,J$RLIM(J)		;OPERATOR ALLOW LIMIT TO EXCEED?
P$CHK1:	$TEXT	(DEPBP,<plotted ^D/P1/.^D/P2/ minutes (limit exceeded)^0>)
-3147

	CSMEDT	07,4	;QUEUE defaults, part 4 at P$PROC:+4
IFE CSM07$,<	;This code removed because all plots must be BINARY halfwords
-3150
>  ;End of IFE CSM07$
IFN CSM07$,< JRST  PLTHLF >		;Default always to halfword format
-3155,3155

	CSMEDT	02,1	;Halfword format, part 1 at P$ROUT:+3
IFE CSM02$,<EXP	PLTSIX>			;/PLOT:BINARY	(6 BIT)
IFN CSM02$,<EXP	PLTHLF>			;/PLOT:BINARY	(18 bit)
-3156:	PLROUL==.-P$ROUT		;LENGTH OF ROUTINE TABLE
-3200

;Here at end of plot file

-"BUFFER OVERFLOW!!!!"