Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-06 - decus/20-153/rpgiip.mac
There is 1 other file named rpgiip.mac in the archive. Click here to see a list.
SUBTTL	Parameter file for RPGII %1

;	Parameter file for RPGII
;
;	This file is assembled along with all other compiler modules to
;	define constants needed by those modules. A listing of this section
;	is only produced with RPGIIA. To change feature test switches, define
;	them as desired in the universal file RPGASM, not here. If you must
;	make changes to this module, note that it will be necessary to
;	reassemble all compiler modules.
;
;	Copyright (C) 1975, 1976, 1977 Robert Currier and Cerritos College
;	All rights reserved
;
;

	EDIT==374
	VERSION==300


	SEARCH	INTERM			; pick up parameters

;Assembly switches

	DEBUG==:DEBUG			; show DEBUG flag gotten from INTERM
	ONESEG==:ONESEG			; show ONESEG flag gotten from INTERM
	SWSET%==:SWSET%			; get compiler switch word
	BIS==:BIS			; get BIS flag (not supported)
	FTSCAN==:FTSCAN			; use SCAN/WILD command scanner (not supported)

;The following switches are known not to work when turned on, but are defined
;here for future times.

	IFNDEF	CREF,<CREF==0>		; CREF listings
	IFNDEF	MAPS,<MAPS==0>		; core maps with listings
	IFNDEF	REENT,<REENT==0>	; compile reentrant code
	IFNDEF	STERLN,<STERLN==0>	; sterling currency
	IFNDEF	BINARY,<BINARY==0>	; binary field handleing
	IFNDEF	FTENEX,<FTENEX==0>	; assemble for TENEX monitor

	%CPU==:%CPU			; 0 = CP166, KA10
					; 1 = KI10
					; 2 = KL10
					; 3 = DEC-20 (i.e. TOPS-20)
	SEARCH	MACTEN, UUOSYM, RPGUNV

	IFE	%CPU-%20,<SEARCH MONSYM>
	IFN	FTENEX,<SEARCH STENEX>

	LIBNAM	(RPGLIB);;		; define name of OTS for this compiler version

	CPUVER				; make sure all parameters set up correctly
;
;	Those who dare swear by the Edit must then benefit or suffer from
;	the consequences of the fixed pattern of destiny that they set in
;	motion. Many such oaths have been sworn in the history of the
;	Edit's existence, but none with such vast and terrible results
;	as those mighty oaths recorded in the pages of this ancient
;	narrative.
;
;				The High History of the Edit
;
;




;[374]	21-May-78 23:47:29	Fix RPGIIC to check for improper end position
;				on O specs, by saving possible size.
;[373]	6-Jan-78 02:09:36	Fix RPGIIA to enter LINK at CCL entry point
;[372]	24-Oct-77 22:09:06	Fix LOKUP to work when no equal indicator is specified.
;[371]	6-OCT-77 21:29:30	FIX ADD O SPECS TO WORK WITH EDIT 357.
;[370]	13-SEP-77 02:15:39	FIX FLOATING DIVIDE CODE FOR CASE WHERE OP2
;				IS A SINGLE PRECISION FIXED POINT
;[367]	28-AUG-77 23:58:28	FIX LOOKUP CODE FOR HIGH OR LOW SEARCH
;[366]	19-Aug-77 22:40:49	Add floating point code to divide to make it work for
;				high precision freaks.
;[365]	17-Aug-77 22:00:34	Fix super-precision multiplication by rounding floating num before
;				fixing.
;[364]	14-Aug-77 23:10:49	Fix rounding on divide by allowing extra digit of
;				precision.
;[363]	6-Aug-77 22:10:37	Fix F?NMC9 in RPGIID to properly set links
;[362]	6-Aug-77 01:10:38	Fix GTF1C1 in RPGIID to properly handle subscripted
;				arrays with names six characters long.
;[361]	1-Aug-77 00:02:18	Add floating code to .MULT in E
;[360]	31-July-77 21:24:28	Fix SHFT5 in GENCOM to handle double precision ok
;[357]	2-July-77 22:56:12	Add code to C to support spacing and skipping entries
;				on OR O specs. Also add new ID. symbols to PURE to support
;				this edit. Related to edit 147 of RPGLIB.
;[356]	1-July-77 01:16:39	Fix debug symbol output so that correct value of %DAT is
;				output to the REL file.
;[355]	30-June-77 22:31:48	Take another crack at making compile time tables work
;				when alternating format is specified.
;[354]	29-June-77 19:56:29	Fix ADD to work properly with double precision result
;				in phase E.
;[353]	4-June-77 01:07:02	Fix double-precision DIV in RPGIIE and GENCOM
;[352]	31-May-77 01:01:37	Remove part of edit 272 in RPGIIE.
;[351]	26-May-77 23:46:29	Make two changes to RPGIIE: Correct UMONTH handleing
;				by spelling it correctly; Make undefined field error (edit 342)
;				handleing work right and give the right error message.
;[350]	26-May-77 01:16:26	Add code to XFOOT in phase E to initialize result
;				field at start of loop.
;[347]	25-May-77 21:51:22	Change the way RPGIIC sets up ID.OR for output lines
;				so that they work when more than one indicator is specified.
;				Also clean up code in area for better listings, and
;				change error message 142 to be more accurate.
;[346]	17-May-77 01:40:47	Fix RPGIIE compile time table code to work when secret
;				flag is set in DA.ALL
;[345]	17-May-77 01:16:77	Remove code from RPGIIE that tries to optimize
;				blocking factor.
;[344]	17-May-77 00:24:16	Add code to LOOKUP to make sure we generate a linear search
;				whenever a subscript is given.
;[343]	16-May-77 00:11:31	Fix phase C to properly reset DA.NPS
;[342]	13-May-77 21:07:38	Add code to phase E to better trap errors caused
;				by undefined fields. Also add error #717 to RPGERR.
;				Also fix phase C to make it stop stashing garbage
;				NAMTAB links so we can use it in phase E change.
;[341]	12-May-77 22:28:17	Change phase B to output an error message when
;				sequential within limits is specified, rather
;				than trying to run code that isn't there.
;[340]	12-May-77 21:23:52	Fix compile time table loading. Also fix
;				CALFIL opening code in phase D to request only 1 buffer.
;[326]-[337]			Reserved
;[325]	16-May-77 21:52:01	LOOKUP code fixed to properly initialize subscript
;				if there is one, and to properly save index when done.
;[324]	17-May-77 00:46:52	RPGIIC and RPGIIE modified to fix problem where subscripted
;				array elements in the 'I' specs were flagged and a bad
;				address was generated for the pointer in the ICH table.
;[323]	13-Apr-77 22:41:48	Fix linear search code by duplicating some code to
;				make sure needed tag is defined. This is fallout
;				of Edit 309. Edit at .LOKLN+8 in LOOKUP.MAC
;[322]	28-June-77 21:17:29	Fix DSPLY op code to work correctly for all cases (DJJ)
;[321]	3-July-77 00:21:08	Correction to edit 271. Save TB before calling NMVRFY. (DJJ)
;[320]				Reserved
;[317]	9-May-77 22:36:34	Expand DATAB and add symbol DA.ISZ for input
;				size for whole arrays on input specs. Install code
;				in RPGIIE and RPGIIC to support it.
;[316]	7-May-77 23:41:07	Change things so we can assemble using MACRO %52
;				without making LINK complain. Change symbol DEVSIZ to be
;				DEVSZ in RPGIIA, IMPURE, and STINFL.
;[315]	7-May-77 22:21:13	Modify LOKUP code generators to output the
;				related table entry and modify LOOKUP to use this
;				pointer rather than the alternate table link.
;[314]	3-May-77 22:15:42	Fix miscellaneous problems such as phas C
;				not properly handleing compile-time arrays and
;				bad error handleing in phase D.
;[313]	1-May-77 20:23:18	Fix RPGIIC to properly set up size of item for
;				a whole array on input specs
;[312]	14-Apr-77 01:09:26	Screw edits 115 and 243 and don't check for
;				word boundary, just allocate the word. It only
;				saves one word anyway, and hardly seems
;				worth the headache of three edits.
;[311]	14-Apr-77 00:17:49	Fix LOOKUP to properly look up pointers for tables
;				when generating code. Fixes at .LOK05+6 and
;				.LOK14+4 in LOOKUP.MAC
;[310]	29-Mar-77 22:14:19	Fix RPGIIB to properly handle comment cards in
;				the extension specifications. Move tag EXTSPC
;				to do this.
;[307]	28-Mar-77 00:36:12	Fix LOKUP to properly work with ordered tables
;				that are not a power of two in size. Also take this
;				oppurtunity to correct some internal documentation.
;[306]	19-Mar-77 00:46:03	Fix RPGIIC to check for decimal positions and
;				set up field size for look-ahead fields.
;[305]	19-Mar-77 00:10:56	Fix LOOKUP to properly turn off resulting
;				indicators before searching.
;[304]	18-Mar-77 01:32:07	Fix RPGIID and GENCOM to allow plus signs on
;				numeric literals in calculation specs.
;[303]	18-Mar-77 01:06:22	Fix RPGIIA to accept lower case input for 
;				the "!" CUSP call. Also make it enter CUSP at
;				standard entry point, not CCL entry point.
;[302]	18-Mar-77 00:31:12	Fix RPGIIC and PREDIT to check to see if a floating dollar or
;				asterisk fill is being used with an edit code before
;				complaining about edit word size. Edit at OU.20A
;				in RPGIIC and PRE12A in PREDIT.
;[301]	18-Mar-77 00:01:23	Fix RPGIIC to clear the old size and occurs when
;				defining a new output item. The only time these will get
;				set is when a whole array/table is being output, at
;				which time it will set these fields up. Edit at OU.11L+13.
;[300]	14-Mar-77 22:19:43	Fix RPGIID to allow use of an item before it is
;				defined in the calculation specs by adding code to restore
;				factor name at GTFC1K+3.
;[277]	12-Mar-77 23:17:24	Fix RPGIIK to return to phase A properly when
;				assembled for one-segement compiler.
;[276]	12-Mar-77 22:59:12	Replace parts of edit 275 to make all cases of
;				sequential versus random checking in phase E work. This
;				involves one change to RPGIIB at FI.08C+4 and several
;				in RPGIIE at BLDFT3-1.
;[275]	28-Feb-77 19:47:59	Fix RPGIIE at BLD.05-1 and BLD.5A+1 to load
;				execution time tables OK. This edit makes sure that
;				the array entry size gets set up properly in ARRTAB.
;[274]	28-Feb-77 19:21:04	Fix RPGIIC at CA.00+2 to prevent it from going into
;				an endless loop when no O specs are found.
;[273]	26-Feb-77 21:51:17	Make the output space specifications a little bit
;				more realistic based on the printers we run on. If the
;				space entry is blank (" ") assume single spacing for
;				space after entry, zero for space after. No spacing is
;				available via a zero ("0") entry.
;[272]	24-Feb-77 22:17:59	Fix RPGIIC at I.02G2+3 to accept I cards with no
;				record identifying indicator.
;[271]	24-Feb-77 21:18:32	Fix calculation field scanner in RPGIID to verify
;				that name of field is a valid RPGII name. Fix at
;				GTF1C1+2 in RPGIID
;[270]	24-Feb-77 21:05:37	Fix GETSRC at GETSL+2 to properly convert lower case
;				source input to upper case.
;[267]	24-Feb-77 20:47:14	Fix RPGIIA to give proper error message in case of
;				filename greater than six characters. Fix at BADNAM+1
;[266]	19-Feb-77 02:53:02	Change phase F start address in END statement from
;				REGO to RPGIIF. This makes things load OK for ONESEG.
;[265]	19-Feb-77 02:42:47	Rearrange conditionals in SETIMP in RPGIIA so that the
;				TOPS-20 version will work OK with symbols and no DEBUG.
;[264]	12-Feb-77 19:29:23	Fix KILL in RPGCOM to work right by adding ONESEG conditionals
;[263]	29-Jan-77 02:10:28	Add code at RPGIIB+14 to default PRGID even if
;				no H card is found.
;[262]	9-Jan-77 02:54:28	Fix LOOKUP to generate index stash code for alternating
;				tables at .LOKCM+31.
;[261]	8-Jan-77 21:58:17	Add symbol output to RPGIIG. This edit is spread all over
;				the place in RPGIIG.
;[260]	8-Jan-77 21:24:44	Fix CLSUP and FINE in RPGIIE to properly set up
;				TEMBAS. Also fix TMPINC+1 in RPGIIG to leave TEMBAS alone.
;[257]	4-Jan-77 02:39:48	Fix LOOKUP to generate ADDB's instead of ADDM's.
;[256]	4-Jan-77 02:17:21	Change LOOKUP at .LOK14+6 to use routine PUTPT2
;				instead of PUTPTR so we don't imbed size.
;[255]	4-Jan-77 01:44:28	Finish edit 235 by fixing last remaining uses of
;				AC5 in LOOKUP. Change them to AC0.
;[254]	4-Jan-77 00:30:13	Add code at BLD.03+2 in RPGIIE to take care of
;				the case where a table or array is used as a whole array or
;				table and causes phase E to reserve space twice. This
;				edit prevents any array/table from being defined twice.
;[253]	1-Jan-77 22:57:12	Insert instruction to get back proper ARRTAB pointer
;				at ARR.01+25 in RPGIIE.
;[252]	1-Jan-77 22:24:20	Make changes similar to edits 250 and 251 for the
;				DA.ALL link at EX.10+50 and EX.10+6 in RPGIIB and at
;				BLDARD+43 in RPGIIE to handle valid zero link.
;[251]	1-Jan-77 21:54:28	Replace the SKIPN's installed in RPGIIB as part of
;				edit 250 with TRNN's  to test only right half.
;[250]	30-Dec-76 01:42:30	Add code at EX.10+1 in RPGIIB and at BLDARD+25 in
;				RPGIIE to handle load/dump pointer of zero (e.g. first
;				defined file.)
;[247]	28-Dec-76 01:41:38	Change RPGIIF at MAPOT1+6 to support edit 246.
;[246]	27-Dec-76 22:21:48	Change RPGIIE to allocate temporary storage after LITAB
;				rather than before DATAB.
;[245]	16-Dec-76 02:16:40	At IN.10X in RPGIIC add code to get correct pointer before
;				depositing matching indicator.
;[244]	12-Dec-76 03:13:42	Add field validty checking routine to RPGCOM and call it
;				from appropriate places in RPGIIC.
;
;********** %1I(243) Limited Release Edition **********
;[243]	27-Nov-76 01:45:53	Fix edit 115 to check for the really, truly proper
;				word boundary.
;[242]	27-Nov-76 00:56:13	Change error 277 (Improper size edit word) to be a
;				warning instead of a fatal.
;[241]	22-Nov-76 00:52:21	Fix shift routines to call ROUND before changing
;				the size register.
;
;********** %1H(240) Limited release edition **********
;[240]	17-Nov-76 22:34:05	Add code to PREDIT to check for undefined field; to count
;				number of replacable edit characters; and to check for
;				the special case of initial zero with extra edit positions.
;[237]	18-Oct-76 01:06:18	Change OU.10B in RPGIIC to place and/or flag in
;				new IDTAB entry rather than current one.
;[236]	17-Oct-76 23:30:04	Fix OCHTAB building routines in RPGIIE to initialize
;				OC.LTF and OC.LSZ to be zero.
;[235]	17-Oct-76 03:41:46	Change all subscripting routines to use AC0 instead
;				of AC5 in phase E. Also change whole array start code and
;				byte increment code to accomodate AC0.
;[234]	15-Oct-76 23:22:03	Use OP1SIZ to keep track of element size and HISIZ to keep
;				track of total size in RPGIIE during core allocation.
;[233]	13-Oct-76 21:51:24	Add code to RPGIIC to set DA.FLS properly now that we
;				moved it for edit 232.
;[232]	12-Oct-76 17:06:09	Fix DA.RES to be six bits like it should be to store the
;				entire byte residue. This is the cause a hell of alot of
;				of problems.
;[231]	6-Oct-76 22:21:47	Fix floating dollar sign code in PREDIT at PRE.08+7
;[230]	29-Sep-76 22:28:53	Add code to RPGIIC at OU.11P+6 to properly set up NAMTAB
;				link for subscript so that newly defined item will
;				get linked into DATAB chain when fully defined later.
;[227]	29-Sep-76 16:44:07	Add code to RPGIIE to set up DA.SIZ, DA.DEC, and DA.FLD for
;				all related DATAB entries.
;[226]	19-Sep-76 21:55:13	Remove edit 225 and put appropriate code
;				into CBLIO to fix problem.
;[225]	11-Sep-76 10:48:49	Fix LABELs code at BLDFTB in RPGIIE
;
;********** %1G(224) Limited Release Edition **********
;[224]	1-Sep-76 13:06:58	Add EOF code to FINB in RPGIIB.
;[223]	30-Aug-76 12:47:18	Add FI.UNT to PURE to support multiple tape
;				files. Also add symbols to use for device name. Add
;				all this junk to RPGIIB and RPGIIE.
;[222]	28-Aug-76 09:21:17	Add code to RPGIIE to handle OC.ARP of zero.
;[221]	16-Aug-76 14:22:31	Remove DA.NDF code from BLD.2A in E. It
;				doesn't seem to be needed, and it sure screws up 
;				LOKUP's.
;[220]	26-Aug-76 13:37:07	Fix OU.11N in RPGIIC to restore NAMWRD properly.
;[217]	25-Aug-76 13:24:54	Change IN.03 in RPGIIC to look at proper column for and/or
;[216]	24-Aug-76 17:47:31	Fix OU.00 in RPGIIC to properly handle comment card as 
;				first output specification.
;[215]	24-Aug-76 17:26:37	Remove remnents of *PRINT code from phase C so we don't
;				fool anyone into thinking we support it.
;[214]	24-Aug-76 16:28:07	Fix BLD.11 routines in RPGIIE to use CURREC as a relative
;				pointer to avoid problems when LITAB expands.
;[213]	23-Aug-76 11:03:28	Move the F1P flag to the LH of SW.
;[212]	23-Aug-76 10:34:56	Add 1P support to phase G. Hide the flag in TABDEX.
;[211]	20-Aug-76 17:04:18	Fix LOKUP in phase D to properly handle number of occurs
;				on related table. Make fix at SETR0B+2 in RPGIID.
;[210]	20-Aug-76 16:55:04	Add true support of H card column 15 (DEBUG) to phase
;				D at DEBUG.
;[207]	19-Aug-76 16:12:36	Fix KILLCALL in RPGCOM to work for one segment compiler.
;[206]	17-Aug-76 13:23:22	Add MFCU support code to phase E. Also add new
;				fixed area word %STLST.
;[205]	13-Aug-76 11:46:32	Rewrite the header card handler in RPGIIB to work
;				more like is should for a DECsystem-10 RPG II
;				rather than System-3. Also update error messages.
;[204]	12-Aug-76 14:06:57	Add code to BLD.03 in RPGIIE to reset
;				any ICHTAB entries that may be linked to
;				the DATAB entries we are trying to
;				reset.
;[203]	12-Aug-76 13:24:39	Finish installing edit 202. Add DA.TAB and OC.TAB
;				to PURE.
;[202]	11-Aug-76 14:44:29	Fix RPGIIC and RPGIIE to properly handle
;				whole arrays and tables on output.
;[201]	6-Aug-76 11:46:41	Rearrange code for BLD.2A in RPGIIE
;				so that IC.DES get's properly setup on call
;				to BLD11C.
;[200]	5-Aug-76 13:18:23	An appropriate bicentennial edit. Fix it so
;				we can can compile more than one program without
;				restarting in between. Do this by adding more
;				core clearing code to SETIMP in RPGIIA and by
;				modifying some of what was already there.
;[177]	5-Aug-76 12:13:32	Fix RESTRT code in RPGCOM to properly
;				handle ONESEG code.
;[176]	4-Aug-76 15:16:58	Add ONESEG code to compiler.
;[175]	4-Aug-76 14:10:03	Fix LITSET in GENCOM to output LITAB correctly
;				if it has been written to disk.
;[174]	23-Jul-76 02:47:19	Make an attempt to speed up RPGIIE if at all possible
;				by getting rid of lots of byte instructions in favor
;				of half-word instructions.
;[173]	23-Jul-76 00:02:23	Get rid of unnecessary error messages in Phase C.
;[172]	22-Jul-76 03:10:03	Get FILTAB pointer back into TA after call to
;				GETDCB at FI.12+3 in RPGIIB. This stops the card buffer
;				from getting messed over.
;[171]	21-Jul-76 16:03:19	Fix CA.01A+10 to properly stash OR flag into indicator
;				chain. This should make OR lines work properly.
;[170]	20-Jul-76 01:14:19	Fix BLDFTB in RPGIIE to make the simulated MFCU
;				be a sequential, unblocked, ASCII device.
;[170]	18-Jul-76 00:12:52	Start to implement SCAN/WILD command scanner for
;				RPGIIA and IMPURE. Add feature test switch FTSCAN.
;[166]	12-Jul-76 00:36:15	Clean up LOOKUP code in both phases E and D for
;				bounded array searches.
;
;********** %1F(165) Limited Release Edition **********
;[165]	9-Jul-76 01:26:23	Add code to RPGIIE to support compile time arrays.
;				Add FLALT and FLUALT to RPGIIP for this.
;[164]	8-Jul-76 00:00:12	Fix a bunch of bugs in RPGIID, RPGIIE and GENCOM
;				that have to do with indexing with fields as opposed
;				to constants.
;[163]	1-Jul-76 13:58:23	Add ARRTAB to all appropriate modules and
;				add support code for arrays in E and G.
;[162]	25-Jun-76 01:04:20	Add reserved word handlers to GENCOM
;[161]	23-Jun-76 23:04:16	Change PRGSTR to TOTBAS in phase G.
;
;********** %1E(160) Limited Release Edition **********;
;[160]	22-Jun-76 00:22:28	Add the TIME verb to all phases.
;[157]	21-Jun-76 02:46:51	Add switch BINARY to help alleviate overhead in phase E
;				since we don't really support binary anyway. Also add
;				MOVEA code to RPGIIE.
;[156]	18-Jun-76 00:54:20	Add PUTPT2 to GENCOM so that SUBSCR works right.
;				Also fix the STBYT routines to give proper count for
;				literals.
;[155]	14-Jun-76 02:43:13	Add code for READ verb to RPGIID and RPGIIE. In
;				the process generalize the routines in TAG.0 and ENDSR1
;[154]	13-Jun-76 03:36:29	Add code to RPGIID and RPGIIE to support the
;				FORCE and EXCPT verbs. Also add FI.OTF as pointer to
;				corresponding OTFTAB item. Clean up phase G error
;				messages.
;[153]	7-Jun-76 02:21:35	Add code to RPGIIG to take into account the device table.
;[152]	7-Jun-76 01:28:51	Make sure all pointers into FTBTAB in RPGIIE are properly
;				adjusted for the device table. Add new storage location
;				FTBNUM to IMPURE to accomadate this edit.
;[151]	7-Jun-76 01:01:23	Add code to RPGIIE to output space for device table
;				before each FTBTAB entry. We would have put it in
;				earlier, but there is no documentation saying that
;				it is necessary.
;[150]	3-JUN-76 22:31:29	FIX LINE COUNTER SPEC BUG IN RPGIIB AND
;				CLEAN UP LINE SPEC ROUTINES IN GENERAL.
;[147]	27-MAY-76 22:58:10	ADD CODE TO RPGIIE TO OUTPUT AND BUILD FTBTAB.
;				DEFINE FTBTAB IN PURE AND RPGIIP. ALSO 
;				MODIFY TABLE OUTPUT ROUTINES IN RPGIIE TO MAKE
;				BETTER USE OF PC INCREMENT.
;
;********** %1D(146) LIMITED RELEASE EDITION **********
;[146]	18-MAY-76 23:09:52	FIX STILL ANOTHER BUG HAVING TO DO WITH PROPER OPERAND
;				ALLIGNMENT DURING A DIVIDE. THIS ONE FIXES THE
;				PROBLEM WITH OP2 HAVING ZERO DECIMALS WHEN
;				OP1 AND RESULT HAVE EQUAL DECIMALS. IT WAS
;				SHIFTING LEFT BY NUMBER OF DECIMALS IN OP1.
;				IT NOW DOES NO SHIFTING.
;[145]	18-MAY-76 22:46:23	ADD CODE AT IN.04L TO SWAP POINTERS BEFORE WE
;				PICK UP NUMBER OF OCCURS.
;[144]	18-MAY-76 21:39:38	FIX SETR0B IN RPGIID TO AVOID STUFFING TOO MUCH
;				DATA ONTO THE STACK. THIS WAS THE CAUSE
;				OF THE OCCASIONAL ILLEGAL UUO IN THE LOW SEG.
;[143]	4-MAY-76 20:53:20	ADD FLAG FOP1WL FOR THE SECOND TIME TO MAKE
;				ALL THAT PHASE E WHOLE ARRAY STUFF WORK.
;[142]	29-APR-76 22:20:28	FIX ZADD AND ZSUB CODE IN RPGIIE AFTER WE
;				MANGLED IT INSTALLING WHOLE ARRAYS.
;[141]	24-APR-76 00:26:32	ADD CODE TO RPGIIE TO SUPPORT WHOLE ARRAYS.
;[140]	23-APR-76 23:01:29	ADD CODE TO GENCOM TO SUPPORT WHOLE ARRAYS
;[137]	23-APR-76 21:32:58	ADD REST OF CODE TO RPGIIE AND GENCOM TO FULLY
;				HANDLE TABLES/ARRAYS ON ALPHAMERIC TYPE.
;[136]	23-APR-76 20:31:29	FIX GETFAC IN RPGIID TO SAVE BYTE POINTER BEFORE
;				CALLING TRYNAM, WHICH BOPS AC14.
;[135]	14-APR-76 16:48:20	FIX CA.02C IN RPGIID TO USE PROPER LINK TO GET DA.OCC
;[134]	14-APR-76 14:22:30	MODIFY .MOVE IN RPGIIE TO HANDLE SUBSCRIPTED
;				OPERANDS.
;[133]	13-APR-76 20:06:28	ADD FOPXAR AND FOPXTB FLAGS TO RPGIIP FOR USE
;				IN PHASE E. ALSO ADD ROUTINES TO GENCOM.MAC
;				TO START SUPPORT OF ALPHAMERIC TABLES/ARRAYS
;
;********* %1C(132) LIMITED RELEASE EDITION *********;
;[132]	3-APR-76 02:08:29	MODIFY GOTO. IN RPGIID.MAC TO CHECK PROPER
;				FLAG (F2LNK) INSTEAD OF F1LNK. SOLVES PROBLEM
;				WITH EXSR.
;[131]	2-APR-76 21:29:39	FIX BEGSR AND EXSR IN PHASE D TO GET PROPER OP-CODE.
;[130]	29-MAR-76 16:51:29	ADD BEGSR, ENDSR AND EXSR TO PHASE E.
;[127]	26-MAR-76 23:54:20	ADD BEGSR, ENDSR AND EXSR TO PHASE D.
;[126]	26-MAR-76 00:23:52	ADD ERROR CHECKING TO PHASE C TO TRAP
;				CONDITION OF END POSITION TO LOW FOR 
;				CONSTANT/EDIT WORD ON OUTPUT SPECS.
;[125]	25-MAR-76 02:22:04	ADD MOVE ZONE VERBS TO PHASES D AND E.
;[124]	23-MAR-76 03:35:26	FIX ANOTHER BUG IN STBYT IN GENCOM. THIS IS ONE
;				LIKE WE FIXED IN EDIT [121]. THE COMP VERB
;				SHOULD NEVER HAVE WORKED WITH THIS IN. ALL
;				WE HAVE TO DO IS REPLACE CONSTANT ^D35 WITH
;				^D42 WHEN CALCULATING BYTE OFFSET FOR LITERAL.
;[123]	23-MAR-76 03:02:39	MODIFY SETRES IN RPGIID.MAC TO PROPERLY HANDLE
;				NON-NUMERIC RESULT FIELDS IF NOT DEFINTION.
;[122]	23-MAR-76 02:26:49	ADD MOVEL CODE TO PHASE E.
;[121]	21-MAR-76 23:27:49	FIX STBYT IN GENCOM TO PUT BYTE SIZE IN PROPER
;				PLACE IN A BYTE POINTER. HOW THE HELL COMP
;				EVER WORKED WITH IT THIS WAY I DON'T KNOW.
;[120]	21-MAR-76 20:59:25	ADD MOVE CODE TO RPGIIE.MAC
;[117]	20-MAR-76 00:43:59	REDEFINE SIZES OF VARIOUS TABLES TO OPTIMIZE
;				EXPANSION AND HOPEFULLY SPEED THINGS UP
;				A TRIFLE.
;[116]	19-MAR-76 11:47:26	ADD CODE AT BLDCH IN RPGIIE.MAC TO SUPPORT
;				BINARY FIELDS. LOOKS LIKE THOSE TURKEYS
;				ARE ACTUALLY GOING TO BE USED.
;[115]	18-MAR-76 21:36:41	FIX CHECK AT BLD.06+2 IN RPGIIE.MAC
;				TO CHECK FOR PROPER CONDITION OF WORD
;				BOUNDARY.
;[114]	18-MAR-76 18:05:13	MODIFY INDCHK IN GENCOM.MAC TO GENERATE CODE
;				FOR A DIRECT PUSHJ TO INDC. RATHER THAN A
;				UUO CALL. SHOULD SPEED THINGS UP A BIT.
;[113]	18-MAR-76 02:34:17	HAVE NOW FIGURED OUT WHAT EDIT [106] WAS
;				FIXING, BUT SINCE IT DIDN'T DO IT'S JOB
;				ANYWAY, LEAVE IT OUT AND ADD INSTRUCTION
;				AT .MVR+2 IN RPGIIE.MAC. THIS SHOULD FIX
;				THE MYSTERIOUS "FACTOR 2 NOT DEFINED" ERROR
;				MESSAGES FROM ATTACKING MVR.
;[112]	18-MAR-76 02:10:05	REMOVE EDIT [106]. DON'T KNOW WHY IT WAS PUT
;				IN, BUT IT SURE SCREWS UP .MVR IN RPGIIE.
;[111]	16-MAR-76 03:25:36	FIX UP THE DIVIDE ROUTINES IN PHASE E SO
;				THEY WORK BACKWARDS LIKE THEY'RE SUPPOSED TO.
;[110]	16-MAR-76 00:54:25	ADD ROUTINE SHFT3B TO SHFTAC IN GENCOM.MAC
;				TO ALLOW PROPER CONVERSION FROM SINGLE TO
;				DOUBLE.
;[107]	14-MAR-76 01:29:26	REWRITE SMALL PORTIONS OF LOOKUP.MAC SO THAT
;				EVERYTHING IS TAKEN CARE OF IN THE CODE WE
;				GENERATE, RATHER THEN MAKING SOME CALLS TO A 
;				RUNTIME ROUTINE. THIS SHOULD KEEP SPEED FREAKS HAPPY.
;[106]	13-MAR-76 00:51:32	FIX PUTAC IN GENCOM TO PASS CORRECT INDEX TO
;				GTFLD WHEN WE ARE USING AC5 (PTR2.2+3)
;[105]	12-MAR-76 22:08:34	MODIFY RECORD IDENTIFYING INDICATOR ROUTINES
;				IN RPGIIC.MAC TO PROPERLY HANDLE MULTIPLE
;				OR LINES AND MULTIPLE RII'S.
;
;********** %1B(104) LIMITED RELEASE EDITION **********;
;[104]	29-FEB-76 23:01:38	ADD LINEAR SEARCH CODE TO LOOKUP.MAC
;[103]	29-FEB-76 21:35:21	REWRITE ROUTINE .LOK14 IN LOOKUP.MAC SO THAT
;				WE CAN START MODIFYING STBYT IN GENCOM FOR
;				TABLES/ARRAYS.
;[102]	29-FEB-76 03:14:06	ADD PHASE E CODE TO SUPPORT TABLES AND ARRAY
;				BY MODIFYING GTFACX AND PUTAC IN GENCOM.
;[101]	28-FEB-76 22:13:24	ADD PHASE D CODE TO SUPPORT TABLES AND ARRAYS
;				BY ADDING ROUTINE INDFAC TO RPGIID. AT THE
;				SAME TIME REMOVE SOME AMBIGUOUS FLAGS.
;[100]	25-FEB-76 22:44:23	ADD IC.FMT TO PURE.MAC TO SUPPORT TABLE
;				LOOKUP CODE IN RUNTIME SYS
;[077]	22-FEB-76 22:32:25	CLEAN UP GOTO CODE IN PHASE D SO THAT IT
;				WORKS PROPERLY.
;[076]	22-FEB-76 22:20:04	CLEAN UP ERROR HANDLING CODE IN PHASE F AND
;				MAKE SURE WE ALLOW TEN BITS FOR ERROR MESSAGE
;				NUMBER IN ALL PLACES.
;[075]	21-FEB-76 18:35:26	ADD CODE TO HANDLE RESULTING INDICATORS ON
;				ARITHMETIC OPERATIONS.
;[074]	21-FEB-76 1:39:58	ADD LOOKUP CODE IN FILE LOOKUP.MAC
;[073]	9-FEB-76 20:22:41	REPLACE MYSTERIOUSLY DISSAPEARED INSTRUCTION
;				AT EX.00+11 IN RPGIIB.
;[072]	7-FEB-76 20:00:12	MODIFY RPGIID AT GETFAC+8 TO PROPERLY HANDLE
;				NUMERIC LITERAL WITH UNARY MINUS.
;[071]	7-FEB-76 00:02:04	THE INFAMOUS BLUE EDIT. THIS EDIT IS DESIGNED
;				TO CORRECT ALL PROBLEMS THAT SHOULD OF BEEN
;				FIXED FOR THE LAST RELEASE TAPE, BUT WERE
;				NOT, DUE TO INSUFFICIENT TEMPORAL RESOURCES.
;				THESE FIXES INCLUDE: MAKE ALL NAMTAB POINTERS
;				RELATIVE TO FIX NAMTAB OVERLAY PROBLEM; CLEAN
;				UP ALL PHASES SO THEY ARE MORE READABLE; AND
;				START HACKING AWAY AT TABLE HANDLING CODE, SO
;				WE CAN MAKE IT WORK IN THE NEAR FUTURE.
;
;********** %1A(70) LIMITED RELEASE EDITION **********;
;[070]	31-JAN-76 23:58:22	ADD CODE IN FNDLNK IN RPGCOM TO RESTORE NAMTAB
;				POINTER EVEN IF ERROR RETURN IS TAKEN.
;[067]	31-JAN-76 00:13:58	ADD CODE AT IN.04 IN RPGIIC TO CLEAR NAMWRD+1.
;[066]	30-JAN-76 13:59:26	FIX OU.07H IN RPGIIC TO HANDLE SKIP ENTRIES
;				GREATER THAN 19. SEE ALSO EDIT 44.
;[065]	30-JAN-76 00:26:47	FIX GTF.1B IN GENCOM TO SUPPORT EDIT 64.
;[064]	30-JAN-76 00:14:12	FIX GTFLD IN GENCOM TO PROPERLY STASH LINK WHEN
;				WE HAVE TO DO A NAMTAB LINK LOOKUP. THIS EDIT
;				SHOULD SOLVE THE LAST OF THE "FACTOR NOT DEFINED"
;				PROBLEMS. CF. EDIT 60.
;[063]	24-JAN-76 19:47:52	FIX OU.01 IN RPGIIC TO WORK WITH AND LINES.
;				ALSO CONVERT TO BPNT MACRO TO ALLOW EASIER DEBUGGING.
;[062]	24-JAN-76 19:31:26	MAKE OU.10 IN RPGIIC PROPERLY HANDLE AND/OR LINES.
;[061]	24-JAN-76 16:36:27	MODIFY IN.04G IN PHASE C TO PROPERLY HANDLE
;				AN INPUT RECORD WITH ONLY ONE ITEM. THIS
;				WAS THE CAUSE OF THE CORE BLOW-UP IN PHASE E.
;[060]	23-JAN-76 11:52:22	FIX UP ROUTINE GTFACX IN GENCOM TO BE SURE
;				WE FIND DATAB LINK. FIX GTF.1B TO GET NAMTAB LINK
;				ON THE FIRST TRY.
;[057]	18-JAN-76 17:43:13	TO ALLOW EASIER INTERFACE WITH THE NEW RPGLIB
;				WHICH MAKES USE OF LIBOL-10 COMPONENTS, RPGASM IS
;				NOW A UNIVERSAL, WE NOW SEARCH INTERM TO GET THE
;				SWITCH DEFAULTS.
;[056]	10-JAN-76 23:18:26	CLEAN UP PHASE F AND SET UP SO WARNINGS ARE NOT IMBEDDED.
;[055]	10-JAN-76 17:47:55	ADD F1LNK & F2LNK TO RPGIIP AS PHASE D FLAGS
;				SO THAT WE CAN REFERENCE FORWARDS ON GOTO'S.
;[054]	10-JAN-76 17:19:23	MODIFY FNDLNK IN RPGCOM.MAC TO PROPERLY HANDLE SEARCH
;				IF TABLE IS ZERO LENGTH.
;[053]	10-JAN-76 17:00:25	ADD PROTAB FLAG PR.BSR TO ACCOMADATE THE BEGSR VERB.
;[052]	1-JAN-76 23:06:26	FIX GT1AC1 IN GENCOM.MAC TO  PROPERLY SET UP SIZE
;[051]	1-JAN-76 21:59:25	REPLACE SYMBOL ORCAM. WITH TDNN. IN GENCOM AND 
;				RPGIIG TO ACCOMODATE DOUBLE PRECISION ZSUB.
;[050]	27-DEC-75 22:57:02	MODIFY PREDIT.MAC TO PROPERLY HANDLE AN EDIT STRING
;				OF THE FORM '0.  '.
;[047]	27-DEC-75 14:06:25	SET UP TO SEARCH MACTEN AND UUOSYM, AND STENEX IF
;				ON A 20. ALSO CLEAN UP PHASE A DIAGNOSTICS SO
;				THEY WILL WORK ON A TWENTY. LOAD HELPER
;				AND DDT VIA .REQUIRE TO SIMPLIFY LOADING. ALSO ADD
;				PORTAL'S SO THAT WE RUN PROPERLY ON A KI.
;
;********** %1(46) LIMITED RELEASE EDITION *********;
;[046]	15-DEC-75 01:48:25	TURN OFF ROUNDING FLAG AT GEN.01+1 IN E. /RBC
;[045]	14-DEC-75 23:26:25	FIX SUB OP TO WORK RIGHT. MOD IN .SUB IN E. /RBC
;[044]	14-DEC-75 21:22:01	FIX SKIP ENTRY AT OU.07H+13 IN C. /RBC
;[043]	14-DEC-74 00:31:15	FIX XPAND TO SAVE ALL AC'S IN PROPER PLACE. /RBC
;[042]	13-DEC-75 22:46:25	ADD PROPER INITIALIZATION TO IN.03A IN C. /RBC
;[041]	13-DEC-75 20:07:12	MODIFY XPAND TO CLEAR NEW TABLE SPACE. THIS
;				EDIT REPLACES EDIT [037] AND [040]. /RBC
;[040]	9-DEC-75 19:32:43	STILL MORE PROBLEMS WITH EXPANDING DATAB ARE FIXED. /RBC
;[037]	9-DEC-75 16:58:27	MODIFY SETR01 IN PHASE D TO PROPERLY HANDLE
;				TABLE LINKS, WHEN TABLES ARE EXPANDED BY THE GETENT.
;				NOTE THAT THIS BUG MAY CROP UP ELSEWHERE AND SHOULD
;				BE WATCHED FOR. /RBC
;[036]	9-DEC-75 13:19:07	FIX GETFAC+8 TO WORK WHEN NUMERIC LITERAL
;				STARTS OFF WITH A DECIMAL POINT. /RBC
;[035]	1-DEC-75 00:32:26	FIX STIND2 IN D TO WORK WITH NON-NUMERIC INDICATORS. /RBC
;[034]	30-NOV-75 22:47:36	FIX OVERFLOW INDICATOR SETUP IN PHASES C & D. /RBC
;[033]	25-NOV-75 17:31:06	FIX BLD.3A+2 IN PHASE E SO THAT ALL POINTERS
;				ARE PROPERLY SET UP. /RBC
;[032]	14-NOV-75 16:30:09	ALLOW A SPACE FOR FILE FORMAT ENTRY ON FILE
;				DESCRIPTION CARD. /RBC
;[031]	14-NOV-75 13:51:58	FIX MORE PROBLEMS ASSOCIATED WITH EDIT [027]. /RBC
;[030]	7-NOV-75 23:22:31	FIX PROBLEMS WITH FLOATING DOLLAR SIGN
;				IN PREDIT.MAC. /RBC
;[027]	6-NOV-75 21:38:08	FIX REGETS IN GETSRC.MAC TO PROPERLY HANDLE
;				BATCH INPUT WHEN SET TO $RPG CARD SET TO "SUPPRESS". /RBC
;[026]	4-NOV-75 19:16:31	ADD FINDON TO RPGIIP.MAC AND FIX
;				UP THE INDICATOR CHECK CODE GENERATORS. /RBC
;[025]	3-NOV-75 21:56:34	ADD OC.RSV & OC.BLA TO PURE.MAC AND
;				ADD DA.BLA & OC.BLA TO RPGIIE.MAC. /RBC
;[024]	26-OCT-75 00:17:23	FIX MAJOR LINKING PROBLEM IN PHASE C
;				SO THAT INDTAB ENTRIES ARE PROPERLY LINKED. /RBC
;[023]	25-OCT-75 17:00:43	ADD DA.LIN TO DATAB SO WE CAN TRAP SOME
;				MORE ERRORS IN PHASE E. ALSO ADD SOME DIAGNOSTICS SO 
;				THAT WE CAN PROVIDE BETTER SERVICE THAN IBM. /RBC
;[022]	22-OCT-75 19:43:17	FIX A FEW BUGS IN PREDIT. /RBC
;[021]	20-OCT-75 22:16:43	FIX BLD IN RPGIIE TO PROPERLY HANDLE
;				INCREMENT OF ZERO FOR OT.OPC & OT.IPC. /RBC
;[020]	19-OCT-75 15:11:01	CHANGE VALUE OF SZ.PRO TO REFLECT NEW ECONOMY
;				VERSION, AND TO SHOW FISCAL AUSTERITY. /RBC
;[017]	16-OCT-75 19:46:32	ADD VARIOUS CODE GENERATOR FLAGS IN RPGIIP /RBC
;[016]	15-OCT-75 22:14:12	ADD FMINUS AND FDECPT TO RPGIIP /RBC
;[015]	12-OCT-75 02:48:23	FIX MANY POTENTIAL PROBLEMS IN PREDIT AS WELL
;				AS SOME MORE PROBLEMS IN LITSET. /RBC
;[014]	11-OCT-75 22:50:04	FIX UP SOME PROBLEMS WITH LITSET IN GENCOM. /RBC
;[013]	29-SEP-75 23:03:01	FIX PROBLEMS WITH EDIT [003] AS WELL AS
;				PROBLEMS WITH SHORT SOURCE FILE. /RBC
;[012]	29-SEP-75 20:43:58	MODIFY IDNTYP TO INCREMENT RETURN PC RATHER
;				THAN THE RETURNED VALUE. /RBC
;[011]	25-SEP-75 00:02:41	RESET NAMWRD+1 AT OU.11 IN PHASE C, SO PHASE D
;				WILL FIND ITEM DEFINED PROPERLY IN NAMTAB. /RBC
;[010]	23-SEP-75 00:53:40	TACK A LINE FEED ONTO ALL CALFIL LINES /RBC
;[007]	22-SEP-75 02:53:17	REWRITE GETCRD ROUTINE TO SPEED UP 30-40 TIMES
;				AND MAKE APPROPRIATE CHANGES ELSEWHERE. ALSO ADDED FNOCPY
;				FLAG IN RPGIIP. /RBC
;[006]	22-SEP-75 00:54:23	FIX PROBLEMS ASSOCIATED WITH EDIT [004] /RBC
;[005]	19-SEP-75 00:43:54	FIX PROBLEMS IN RPGIIC RELATING TO OUTPUT
;				INDICATORS IN ROUTINES OU.09 & OU.10 /RBC
;[004]	19-SEP-75 00:02:23	ADD BPNT MACRO TO RPGIIP SO WE CAN
;				MAKE MORE SENSE OF THE CODE /RBC
;[003]	12-SEP-75 00:26:37	FIX PROBLEMS ASSOCIATED WITH BEING
;				FED A MACRO PROGRAM /RBC
;[002]	6-SEP-75 21:06:24	ADD DA.INF TO PURE.MAC AND RPGIIC.MAC /RBC
;[001]	1-SEP-75 04:35:54	REPLACE THE GODDAMN JOBxxx's WITH .JBxxx's /RBC
;
;
;Copyright (C) 1975, 1976, 1977
;Cerritos Community College District and Robert Currier
;
;
;This software is furnished under license for  use  only  on  a  single
;computer system and may be copied only with the inclusion of the above
;copyright notice.  This software, or any other copies thereof, may not
;be provided or otherwise made available to any other person except for
;use on such system and to one  who  agrees  to  these  license  terms.
;Title  to and ownership of the software shall at all times remain with
;Cerritos Community College District and Robert Currier.
;
;The information in this software is subject to change  without  notice
;and  should  not  be  construed  as  a  commitment  by either Cerritos
;Community College District or Robert Currier.
;






	IFNDEF	RPGIIA,<XLIST>
;ACCUMULATORS

SW=0					; SWITCHES
LN=1					; GUARANTEED INTEGRITY THRU ALL SUBROUTINES
CP=2					; CHARACTER POSITION
DT=3					; ADDRESS OF A TABLE ENTRY
CH=4					; I/O CHARACTER
W1=6					; FIRST OUTPUT WORD FROM I/0
W2=7					; SECOND OUTPUT WORD FROM I/O
COL=10					; CARD COLUMN NUMBER
DW==CH					; DIAGNOSTIC WORD

TE=12					; TEMP
TD=13					; TEMP
TC=14					; TEMP
TB=15					; TEMP
TA=16					; TEMP


PP=17					; PUSH-DOWN POINTER



;ACCUMLATORS USED BY PHASE A

A==1					; used by SCAN routines
B==2					; used by SCAN routines
C==3					; used by SCAN routines
D==4					; used by SCAN routines
X==5					; used by SCAN routines
C2==7					; used by SCAN routines
DA=1					; ADDRESS OF A DEVICE TABLE
DC=2					; A DEVICE CHANNEL NUMBER

I0==5					; UUO TO BE EXECUTED
I1==6					; UUO PARAMETER
I2==I1+1				; UUO PARAMETER
I3==I2+1				; UUO PARAMETER
I4==I3+1				; UUO PARAMETER

;ACCUMULATORS USED BY PHASE G

CT==10					; MISC
OP=5					; POINTS TO AN ENTRY IN THE OP TABLE
RB==CP					; BYTE POINTER TO NEXT PLACE TO PUT RELOCATION BITS
GP==LN					; IOWD TO NEXT LOCATION TO STASH A BINARY OUTPUT WORD
PC=11					; PROGRAM COUNTER
;I/O CHANNEL NUMBERS

TTY==1					; USERS CONSOLE
SRC==2					; SOURCE
LST==3					; LISTING
BIN==4					; BINARY

CAL==5					; CALFIL
NAM==6					; NAMFIL
ERA==7					; ERAFIL
GEN==10					; GENFIL
CPY==11					; CPYFIL
AS1==12					; AS1FIL
AS2==13					; AS2FIL
AS3==14					; AS3FIL
LIT==15					; LITFIL
CRF==16					; CRFFIL


FSC==CAL				; FIRST SCRATCH CHANNEL
LSC==CRF				; LAST SCRATCH CHANNEL
ASY==AS1


COM==17					; COMMAND FILE FROM DISK


SF1==SRC				; SCRATCH FILE FOR CREF SORT
SF2==BIN				; SCRATCH FILE FORR CREF SORT
SF3==CAL				; SCRATCH FILE FOR CREF SORT


F.FIN==SRC				; used by SCAN
F.FLST==LST				; used by SCAN
F.FREL==BIN				; used by SCAN
;ALL SORTS OF BITS FOR MONITOR COMMUNICATION (DON'T LET ANYONE TELL YOU THAT
;	TOPS-10 IS A TWO-BIT MONITOR!)

$BIN==1B23				; DEVICE CAN WRITE BINARY

$OUT==1					; DEVICE CAN DO OUTPUT
$IN==2					; DEVICE CAN DO INPUT
$DIREC==4				; DEVICE HAS A DIRECTORY
$TTY==10				; DEVICE IS A TTY
$MTA==100				; DEVICE IS A MAG-TAPE
$DTA==100				; DEVICE IS A DEC-TAPE
$LPT==40000				; DEVICE IS A LINE-PRINTER
$CDR==100000				; DEVICE IS A CARD-READER
$DSK==200000				; DEVICE IS A DISK
$AVAIL==40				; DEVICE IS AVAILABLE
$CONSL==10000				; DEVICE IS A CONSOLE

$REW==2					; REWIND MAG-TAPE
$ERAS==740000				; DEVICE ERROR FLAGS
$EOT==2000				; END OF MAG-TAPE

$PPOVF==200000				; ENABLE PUSH-DOWN OVERFLOW TRAP
$ILMEM==20000				; ENABLE ILLEGAL MEMORY REFRENCE TRAP
$NONEX==10000				; ENABLE NON-EXISTANT MEMORY TRAP

$APRF==$PPOVF!$ILMEM!$NONEX

$CLS40==40				; CLOSE DISCARDING NEW FILE, KEEPING OLD
;FLAGS SET IN ACCUMULATOR "SW"

FTERA==1B0				; TYPE ERRORS ON CONSOLE
F1P==1B1				; one if 1P repeat desired
FNOLST==1B2				; NO LISTING
FOBJEC==1B4				; LIST OBJECT CODE IF 0
FFATAL==1B5				; THERE IS A FATAL ERROR
FMAP==1B6				; MAPS REQUESTED
FEOF==1B7				; END OF SOURCE
FESRC==1B8				; NO MORE SOURCE FILES IN THIS COMMAND
FECOM==1B9				; END OF COMMAND FILE
FSYNER==1B10				; ERROR OCCURRED IN SYNTAX
FECOPY==1B11				; FINISH UP COPY FILE
FREENT==1B12				; OBJECT PROGRAM IS TO BE REENTRANT
FSEQ==1B13				; SOURCE IS SEQUENCED
FDBUG==1B14				; 1 IF "DEBUG" CALC-OP TO BE ALLOWED
FDSKC==1B15				; COMMANDS TAKEN FROM DSK
FNOCPY==1B16				; INHIBIT COPY
FNDTRC==1B16				; TURN ON SYNTAX TRACE
FLTTY==1B17				; LISTING FILE IS TTY


;BITS IS RH USED BY COMMAND SCANNER

FCOMCH==1B18				; REGET A COMMAND CHARACTER
FCOMWD==1B19				; REGET A COMMAND WORD
FHELP==1B20				; TYPE HELP MESSAGE

;BITS IN RH OF "SW" USED BY "GET SOURCE" ROUTINES

FREGCH==1B18				; REGET PREVIOUS SOURCE CHARACTER

;BIT IN RH OF "SW" USED BY B, C, & D

FALTSQ==1B19				; ???????????

;BITS IN RH OF "SW" USED BY EXTENSION SPEC ROUTINES

FCOMP==1B22				; TABLE TO BE LOADED AT COMPILE TIME
FEXEC==1B23				; TABLE TO BE LOADED DURING EXECUTION
FRAF==1B24				; FILE IS RECORD ADDRESS
FPRE==1B25				; TABLE TO BE LOADED DURING PRE-EXECUTION
FDUMP==1B26				; TABLE TO BE DUMPED AT END OF RUN
FALTAB==1B27				; WE ARE PROCESSING AN ALTERNATE TABLE

;BITS IN RH OF "SW" USED BY INPUT SPEC ROUTINES

FMDFIL==1B22				; FLAG TO SHOW WE ARE PROCESSING A FILE
FSPRED==1B23				; FLAG TO SHOW WE HAVE SPREAD RECORDS
FLOKHD==1B24				; WE HAVE A LOOK AHEAD RECORD
FDATLK==1B25				; WE HAVE A DATEB LINK SET UP
FANDOR==1B26				; WE ARE PROCESSING A AND/OR LINE
FARRAY==1B27				; WE HAVE AN ARRAY ENTRY
FARRY==1B28				; WE HAVE AN ARRAY
FIMD==1B29				; ARRAY INDEX IS IMMEDIATE

;BITS IN RH OF "SW" USED BY OUTPUT SPEC ROUTINES

;FMDFIL==1B22				; FLAG TO SHOW WE ARE PROCESSING A FILE
FLAG==1B23				; GENERAL PURPOSE FLAG
FCON==1B24				; CONSTANT LINE FLAG
;FARRAY==1B27				; WE HAVE AN ARRAY ENTRY
;FARRY==1B28				; WE HAVE AN ARRAY OR TABLE
;FIMD==1B29				; ARRAY INDEX IS IMMEDIATE

;BITS IN RH OF "SW" USED BY CALCULATION SYNTAX SCANNER (PHASE D)

F1LNK==1B20				; = 0 IF F1LINK CONTAINS LINK
F2LNK==1B21				; = 1 IF F2LINK CONTAINS SIXBIT SYMBOL
FDET==1B22				; DETAIL SECTION FLAG
FTOT==1B23				; TOTAL SECTION FLAG
FLR==1B24				; LAST RECORD SECTION FLAG
FSR==1B25				; SUBROUTINE SECTION FLAG
FANDOR==1B26				; AND/OR FLAG
FMAGIC==1B26				; THE MAGIC FLAG
F1LIT==1B27				; FACTOR 1 LITERAL FLAG
F2LIT==1B28				; FACTOR 2 LITERAL FLAG
F1NUM==1B29				; FACTOR 1 NUMERIC FLAG
F2NUM==1B30				; FACTOR 2 NUMERIC FLAG
F1DAT==1B33				; FACTOR 1 DATA ITEM FLAG
F2DAT==1B34				; FACTOR 2 DATA ITEM FLAG
FDIV==1B35				; DIVIDE WAS LAST OP SEEN

;BITS IN RH OF "SW" USED BY CODE GENERATORS (PHASE E)

FOP1WL==1B20				; OP1 IS A WHOLE ARRAY
FWHOLE==1B21				; WE ARE HANDLING WHOLE ARRAYS
FAS3==1B22				; WE ARE USING AS3FIL
FZFILL==1B23				; ZERO FILL
FSTAR==1B24				; STAR FILL
FLOATD==1B25				; FLOATING DOLLAR SIGN
FZERO==1B26				; ZERO SEEN
FIRST==1B27				; FIRST PASS FLAG
FOP1AR==1B23				; OP 1 IS ARRAY ENTRY
FOP2AR==1B24				; OP 2 IS ARRAY ENTRY
FOP1TB==1B25				; OP 1 IS TABLE
FOP2TB==1B26				; OP 2 IS TABLE
FWZARD==1B27				; THAUMATURGICAL PRODIGY
FMINUS==1B28				; UNARY MINUS SEEN
FDECPT==1B29				; DECIMAL POINT SEEN
FINDON==1B30				; INDICATOR ESCAPE GENERATED
FROUND==1B31				; ROUND THE AC'S
FASCEN==1B32				; TABLE IS IN ASCENDING SEQUENCE
FLKNUM==1B33				; LOOKUP IS NUMERIC
FINC==1B33				; we must increment in BNCGN2
FPUT==1B34				; WE ARE PUTTING NOT GETTING
FLKLIN==1B35				; WE ARE USING LINEAR SEARCH
FBINRY==1B35				; WE ARE DEALING WITH BINARY
FLALT==1B34				; we are using alternating arrays
FLUALT==1B35				; right at this instant

;BITS IN RH OF "SW" USED BY LISTING PHASE

FERALN==1B22				; CURRENT LINE HAS DIAGNOSTICS
FLWARN==1B23				; WE ARE PUTTING OUT WARNING DIAGNOSTICS AT END

;BITS IN RH OF "SW" USED BY ASSEMBLER

FASPAR==1B22				; A PARAGRAPH NAME HAS BEEN PRINTED FOR CURRENT LOCATION
FASSEG==1B23				; CURRENTLY PROCESSING NON-RESIDENT SEGMENT
FASDAT==1B24				; CURRENTLY ASSEMBLING DATA AREA
FASEXT==1B25				; CURRENTLY LISTING AN EXTERNAL NAME
FGDEC==1B26				; DECIMAL INCREMENTS ALLOWED
FRELOC==1B27				; ASSEMBLING CODE FOR RELOCTABLE SECTION OF PROGRAM
FSRTID==1B28				; THERE ARE SOME CREF SORT FILES OPEN
;DEFINE MISC FLAGS

ASINC==200000				; INCREMENT WORD FOLLOWS
AC0==0B30				; Use AC0
AC1==1B30				; USE AC1
AC2==2B30				; USE AC2
AC3==3B30				; USE AC3
AC4==4B30				; USE AC4
AC5==5B30				; USE AC5
AC6==6B30				; USE AC6 (BE CAREFULL USING AC6)
AC10==10B30				; USE AC10 (ARG ONLY)
AC16==16B30				; USE AC16 (UUO PARAMETERS ONLY)
AC17==17B30				; USE AC17 (PUSH AND POP ONLY)
;FLAGS IN LEFT HALF OF "W1" DURING ASSEMBLY (WORD 1 OF ASYFIL)

ASINC==200000				; INCREMENT WORD FOLLOWS OPERATOR
ASCASC==40000				; ASCII CONSTANT
ASCSIX==20000				; SIXBIT CONSTANT
ASCD1==10000				; 1-WORD DECIMAL CONSTANT
ASCD2==4000				; 2-WORD ASCII CONSTANT
ASCFLT==2000				; FLOATING POINT CONSTANT
ASCOCT==1000				; OCTAL CONSTANT
ASCON==ASCASC!ASCSIX!ASCD1!ASCD2!ASCFLT!ASCOCT

ASPARN==40000				; MISCELLANEOUS IS PARAGRAPH OR SECTION NAME
ASTAGN==20000				; 	"	IS TAG NAME
ASREL==10000				;	"	IS "RELOC"
ASENTN==4000				;	"	IS ENTRY POINT


;VARIOUS OTHER FLAGS

DWFATL==1B21				; FATAL FLAG IN DIAG WORD
DWIMBD==200000				; DO NOT IMBED DIAGNOSTIC MESSAGE IN LISTING
;GENERAL MACRO CALLS


;GENERAL "SW" TESTER

	DEFINE SWTEST (A,B),<
	IFLE A-777777,<TR'B SW,A>
	IFG A-777777,<
	IFE A&777777,<TL'B SW,(A)>
	IFN A&777777,<TD'B SW,[A]>
	>
	>

DEFINE SWON (A),<SWTEST A,O>		; TURN ON FLAGS
DEFINE SWOFF (A),<SWTEST A,Z>		; TURN OFF FLAGS
DEFINE TSWC (A),<SWTEST A,C>		; COMPLEMENT FLAGS
DEFINE TSWF (A),<SWTEST A,NE>		; TEST FLAG AND SKIP IF OFF
DEFINE TSWT (A),<SWTEST A,NN>		; TEST FLAG AND SKIP IF ON
DEFINE TSWFZ (A),<SWTEST A,ZE>		; CLEAR FLAG, SKIP IF IT WAS ON
DEFINE TSWTZ (A),<SWTEST A,ZN>		; CLEAR FLAG, SKIP IF IT WAS OFF
DEFINE TSWFS (A),<SWTEST A,OE>		; SET FLAG, SKIP IF IT WAS OFF
DEFINE TSWTS (A),<SWTEST A,ON>		; SET FLAG, SKIP IF IT WAS ON
DEFINE TSWFC (A),<SWTEST A,CE>		; COMPLEMENT FLAG, SKIP IF IT WAS OFF
DEFINE TSWTS (A),<SWTEST A,CN>		; COMPLEMENT FLGA, SKIP IF IT WAS ON
DEFINE SWONS (A),<SWTEST A,OA>		; SET FLAG AND ALWAYS SKIP
DEFINE SWOFFS (A),<SWTEST A,ZA>		; CLEAR FLAG AND ALWAYS SKIP
	DEFINE SETFAZ (X),<
		INTERNAL RPGII'X
	MOVEI	TA,"'X"
	MOVEM	TA,PHASEN
	MOVE	PP,PPOINT
	EXTERNAL PHASEN, PPOINT, IMPURE

	IFE	ONESEG,<	EXTERNAL PURE'X	>



IFDIF <X><B><IFDIF<X><G><
	EXTERNAL KILL,REDO,RESTRT,WEDIED,XPNPPL,UUOCAL
	IFE	ONESEG,<
	REGO==RPGII'X
	INTERNAL REGO
	>
	IFN	%CPU-%20,<
	IFN	DEBUG,<.REQUEST DDT>
			>

	MOVEI	TA,KILL
	MOVEM	TA,WEDIED+1
	MOVEI	TA,REDO
	HRRM	TA,.JBSA
	MOVEI	TA,RESTRT
	HRRM	TA,.JBREN
	MOVE	TA,[PUSHJ PP,UUOCAL]
	MOVEM	TA,.JB41
	MOVEI	TA,XPNPPL
	HRRM	TA,.JBAPR
	MOVEI	TA,$APRF
	APRENB	TA,
	>>


	IFN DEBUG,<EXTERNAL %'X'TIME,%R'X'TIM,PATCH
	IFN %CPU-%20,<EXTERNAL DDT>
	IFDIF <X><A><IFDIF <X><G><IFDIF <X><B><
	OUTSTR	[ASCIZ "Phase X
"]
>>>
	MSTIME	TA,
	MOVEM	TA,%'X'TIME
	MOVEI	TA,0
	RUNTIM	TA,
	MOVEM	TA,%R'X'TIM
>>
;END OF PHASE CODE

DEFINE ENDFAZ (X),<

	IFN DEBUG,<EXTERNAL %'X'TIME,%R'X'TIM

	IFDIF <X><G><
	MOVEI	TA,0
	RUNTIM	TA,
	MOVEM	TA,%R'X'TIM+1
	MSTIME	TA,
	MOVEM	TA,%'X'TIME+1
	>>

	IFIDN <X><A><EXTERNAL RPGIIB
	JRST	RPGIIB>
	IFIDN <X><B><EXTERNAL RPGIIC
	JRST 	RPGIIC>
	IFIDN <X><C><EXTERNAL RPGIID
	JRST	RPGIID>
	IFIDN <X><D><EXTERNAL RPGIIE
	JRST	RPGIIE>
	IFIDN <X><E><EXTERNAL RPGIIF
	JRST RPGIIF>
	IFIDN <X><E><EXTERNAL RPGIIF
	JRST 	RPGIIF>
	IFIDN <X><F><EXTERNAL RPGIIG
	JRST	RPGIIG>
	>
;BYTE POINTER MACRO


DEFINE BPNT (COLUM),<

<^D36-<<<<^D'COLUM-1>-<<<^D'COLUM-1>/5>*5>>+1>*7>>B5+<7>B11+CRDBUF##+<<^D'COLUM-1>/5>


		    >
;TABLE DEFINITIONS
;
;PARAMETER	1 -  MNEMONIC FOR A TABLE
;		2 -  INITIAL TABLE SIZE
;		3 -  AMOUNT TO EXPAND IF NECESSARY
;		4 -  NAME, FOR LISTING PURPOSES
;		5 -  CODES FOR CLEANING TABLES AFTER PHASE D:
;			0 - LEAVE TABLE EMPTY
;			1 - THROW AWAY EMPTY WORDS
;			2 - LEAVE TABLE AS IS
;		6 -  CODES FOR CLEANING TABLES AT START OF PHASE F
;			SAME AS PARAMETER 5

	DEFINE TABLES,<
	XLIST
	TABSET NAM,900,0,NAMTAB,2,2
	TABSET DAT,1000,600,DATAB,1,2
	TABSET FIL,50,50,FILTAB,1,2
	TABSET EXT,50,20,EXTAB,2,1
	TABSET VAL,200,200,VALTAB,1,2
	TABSET LIT,500,200,LITAB,2,2
	TABSET TEM,12,10,TEMTAB,0,0
	TABSET IND,200,50,INDTAB,1,2
	TABSET OTF,50,20,OTFTAB,1,2
	TABSET ICH,200,100,ICHTAB,1,2
	TABSET OCH,500,400,OCHTAB,1,2
	TABSET PRO,200,150,PROTAB,1,2
	TABSET FTB,160,50,FTBTAB,1,2
	TABSET ARR,30,60,ARRTAB,1,2

	LIST
	>
;Define table sizes and ID codes
;
;Define them as internals so we can tell if they all agree in all
;modules as they are loaded.
;
;

CD.FIL==:0
CD.DAT==:1
CD.LIT==:2
CD.VAL==:3
CD.PRO==:4
CD.EXT==:5
CD.ICH==:6
CD.IND==:7
CD.OTF==:10
CD.OCH==:11

SZ.FIL==:10
SZ.DAT==:16
SZ.LIT==:1
SZ.VAL==:777777
SZ.CPY==:2
SZ.EXT==:2
SZ.HLD==:2
SZ.IND==:777777
SZ.ICH==:7
SZ.OCH==:7
SZ.OTF==:11
SZ.PRO==:2
SZ.FTB==:42
SZ.DEV==:32		; size of CBLIO's channel table entries
SZ.ARR==:4
;DEFINE UUO'S

OPDEF	WARNX [1B8]			; OUTPUT ERROR TO ERAFIL

DEFINE WARN (X),<
		WARNX	^D'X
	>




	LIST
	SALL
	SALL