Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-10 - 43,50517/pure.mac
There are 9 other files named pure.mac in the archive. Click here to see a list.
SUBTTL	PURE CONSTANTS	BOB CURRIER

;WITH DUE CREDIT TO A.BLACKINGTON/CAM/SEB FOR THEIR COBOL PURE CODE
;  WHICH I USED (MOSTLY THE PHASE A STUFF)

; [201] ADDED EXTERNAL COBST.

	DEFINE .TITLE (X),<TITLE X FOR RPGII 1A(1)		>

TWOSEG
RELOC	400000

;THIS SOURCE IS IDENTICAL FOR PROGRAMS PURAB, PUREC, PURED, PUREE & PURFG
;	EXCEPT FOR THE VALUE OF MLOAD.

;ASSEMBLE WITH THE APPROPRIATE PARAMETER FILE PURAB.MAC,
;    PUREC.MAC, PURED.MAC, PUREE.MAC, OR PURFG.MAC TO MAKE THE
;    CORRESPONDING REL FILE




A.==1
B.==2
C.==4
D.==10
E.==20
F.==40
G.==100

AB.==A.!B.
ABC.==A.!B.!C.
ABCD.==A.!B.!C.!D.
ABCDE.==A.!B.!C.!D.!E.
ADEFG.==A.!D.!E.!F.!G.
CDE.==C.!D.!E.
BC.==B.!C.
BCE.==B.!C.!E.
BCD.==B.!C.!D.
BCDE.==B.!C.!D.!E.
BCDEFG==B.!C.!D.!E.!F.!G.
BDE.==B.!D.!E.
CD.==C.!D.
CDEFG.==C.!D.!E.!F.!G.
DE.==D.!E.
DEFG.==D.!E.!F.!G.!
EG.==E.!G.
FG.==F.!G.

IFNDEF %MLOAD,< %MLOAD=="A">		;GIVE THIS A VALUE FOR ONE-SEG COMPILER

IFE %MLOAD-"A",<MLOAD==A.!B.>
IFE %MLOAD-"C",<MLOAD==C.>
IFE %MLOAD-"D",<MLOAD==D.>
IFE %MLOAD-"E",<MLOAD==E.>
IFE %MLOAD-"F",<MLOAD==F.!G.>

	IFN MLOAD&AB.,	<.TITLE PURAB
		SUBTTL CONSTANTS USED BY PHASE A & B
		ENTRY PUREA
		PUREA:
		ENTRY PUREB
		PUREB:
		>

	IFN MLOAD&C.,	<.TITLE PUREC
		SUBTTL CONSTANTS USED BY PHASE C
		ENTRY PUREC
		PUREC:
	>

	IFN MLOAD&D.,	<.TITLE PURED 
		SUBTTL CONSTANTS USED BY PHASE D
		 ENTRY PURED
		 PURED:>

	IFN MLOAD&E.,	<.TITLE PUREE
		 SUBTTL CONSTANTS USED BY PHASE E
		 ENTRY PUREE
		 PUREE:>

	IFN MLOAD&FG.,	<.TITLE PURFG
		 SUBTTL CONSTANTS USED BY PHASES F & G
		ENTRY PUREF
		PUREF:
		ENTRY PUREG
		PUREG:
		>


	INTERNAL MLOAD1
	MLOAD1=="B"	;HIGHEST PHASE IN FIRST MACHINE LOAD
;GET NEXT MACHINE LOAD

IFE	ONESEG,<

	IFN MLOAD&AB.,<INTERNAL RPGIIC
RPGIIC:	MOVE	TA,[SIXBIT "RPGIIC"]
	JRST	GETFAZ
	>

	IFN MLOAD&ABC.,<INTERNAL RPGIID
RPGIID:	SKIPA	TA,[SIXBIT "RPGIID"]
	>

	IFN MLOAD&ABCD.,<INTERNAL RPGIIE
RPGIIE:	MOVE	TA,[SIXBIT "RPGIIE"]
	>

	IFN MLOAD&E.,<INTERNAL RPGIIF
RPGIIF:	MOVE	TA,[SIXBIT "RPGIIF"]
	>

	IFN MLOAD&ABCDE.,<EXTERNAL GETFAZ
	JRST	GETFAZ
	>>


	DEFINE SETUP (A,B), <
		INTERNAL A
		A: B
	>

	DEFINE SETVAL (A,B), <
		INTERNAL A
		A==B>
;CONSTANTS USED BY ALL PHASES


	SETUP ERAPOS,<POINT 7,DW,21>;  CHARACTER POSITION FIELD IN DIAG WORD
	SETUP ERALN,<POINT 13,DW,14>;  LINE NUMBER FIELD IN DIAG WORD
	SETUP ERANUM,<POINT 9,DW,35>;  DIAG NUMBER FIELD IN DIAG WORD
	SETUP ERAFAZ,<POINT 4,DW,25>;  PHASE NUMBER FIELD IN DIAG WORD
	SETUP OUTBOP,<OUTBUF 2>;	OUTBUF UUO
	SETUP INBOP,<INBUF 2>;		INBUF UUO

	SETVAL LINPAG,^D56;		;LINES PER PRINTED PAGE
	SETVAL CPMAXN,^D104		;CHARACTERS PER PRINTED LINE
	SETVAL ENDCL,CPMAXN-^D32	;LAST POSITION IN WHICH A COPIED WORD CAN START

	SETVAL MAXWSS,777777	;SIZE OF LARGEST ALLOWED ITEM IN WORKING-STORAGE
	SETVAL MAXFSS,7777	;SIZE OF LARGEST ALLOWED ITEM IN FILE SECTION
	SETVAL MAXOCC,77777	;GREATEST NUMBER OF OCCURENCES ALLOWED
	SETVAL WRKSIZ,^D10*2000	;SIZE OF IMPURE AREA
	SETVAL NAMCST,2		;A CONSTANT USED BY TRYNAM&BLDNAM

EXTERNAL PPSIZE,PPLIST

	SETUP PPOINT,<XWD PPSIZE,PPLIST-1>
;PARAMETERS USED WHEN PLAYING WITH TABLE LINKS

	SETUP LNKCOD,<POINT 3,TA,20>	;CODE IN A TABLE LINK
	SETVAL LMASKB,77777	;MASK OF LINK BITS FOR TABLE-LINK OF BIG TABLE
	SETVAL LMASKS,77777	;SAME FOR SMALL TABLE
	DEFINE TABVAL (NAME,CODE),<
	INTERNAL TB.'NAME,TC.'NAME,TM.'NAME
	TB.'NAME==CODE
	TC.'NAME==CODE'*100000
	TM.'NAME==77777
	>

	TABVAL FIL,0
	TABVAL DAT,1
	TABVAL LIT,2
	TABVAL VAL,3
	TABVAL PRO,4
	TABVAL EXT,5
	TABVAL ICH,6
	TABVAL IND,7

	SETVAL TM.TAG,77777
;CONSTANTS USED BY PHASE A

	IFN MLOAD&A.!ONESEG,<

	SETUP ENTROP,<ENTER I1>;  ENTER UUO


;QUANTUM VALUES FOR SIZES OF NM1TAB&NM2TAB.
;SEE 'NTNSIZ' IN IMPURE FOR NUMBER OF ENTRIES.

	SETVAL NTSIZE,.
	DEC	1009
	DEC	1499
	DEC	1999
	DEC	2503
	DEC	3001
	DEC	3499
	DEC	4001
	DEC	4507
	DEC	5003
	DEC	5501
	DEC	6007
	DEC	6491
	DEC	7001
	DEC	7499
	DEC	8009
	DEC	8501
	DEC	9001
	DEC	9497
	DEC	10007

>
;CONSTANTS USED BY PHASES A,B,C,D

	IFN MLOAD&ABCDE.!ONESEG,<

	SETUP I0CHAN,<POINT 4,I0,12>;  AC FIELD OF "I0"
	SETUP OPENOP,<OPEN I1>;	OPEN UUO
	SETUP LOOKOP,<LOOKUP I1>;	LOOKUP UUO

	SETUP	ALLSPC,SIXBIT/      /	; WORD OF ALL SPACES FOR COMPARISON WITH PROGRAM ID

	SETVAL TRACEI,1B32	;CORESW FLAG FOR TRACEING ID
	SETVAL TRACEE,1B33	;CORESW FLAG FOR TRACEING ED
	SETVAL TRACED,1B34	;CORESW FLAG FOR TRACEING DD
	SETVAL TRACEP,1B35	;CORESW FLAG FOR TRACEING PD

	SETUP NAMVAL,<POINT 15,(TA),17>;VALUE OF RESERVED WORD IN NAMTAB ENTRY

	SETUP KASC,<SIXBIT/ASCII/>
	SETUP KBUF,<SIXBIT/BUFOF/>	;CONSTANTS USED BY FI SCAN

	>

	IFN MLOAD&DE.!ONESEG,<
;GENFIL OPERATOR CODES


	SETVAL	OPADD,	001		; ADD 2 TO 1
	SETVAL	OPZADD,	002		; CLEAR R, ADD 2
	SETVAL	OPSUB,	003		; SUBTRACT 2 FROM 1
	SETVAL	OPZSUB,	004		; CLEAR R, SUBTRACT 2
	SETVAL	OPMULT,	005		; MULTIPLY 1 BY 2
	SETVAL	OPDIV,	006		; DIVIDE 1 BY 2
	SETVAL	OPMVR,	007		; MOVE REMAINDER TO R

	SETVAL	OPXFOT,	010		; SUM ARRAY ELEMENTS INTO R
	SETVAL	OPSQRT,	011		; DERIVE SQUARE ROOT OF 2
	SETVAL	OPMOVE,	012		; MOVE 2 TO R, RIGHT JUSTIFIED
	SETVAL	OPMOVL,	013		; MOVE 2 TO R, LEFT JUSTIFIED
	SETVAL	OPMLLZ,	014		; MOVE ZONE OF LOW 2 TO LOW R
	SETVAL	OPMHHZ,	015		; MOVE ZONE OF HIGH 2 TO HIGH R
	SETVAL	OPMLHZ,	016		; MOVE ZONE OF LOW 2 TO HIGH R
	SETVAL	OPMHLZ,	017		; MOVE ZONE OF HIGH 2 TO LOW R

	SETVAL	OPCOMP,	020		; COMPARE FACTOR 1 TO 2
	SETVAL	OPTSTZ,	021		; IDENTIFY ZONE OF R
	SETVAL	OPBITN,	022		; SET ON SPECIFIED BITS
	SETVAL	OPBITF,	023		; SET OFF SPECIFIED BITS
	SETVAL	OPTSTB,	024		; TEST SPECIFIED BITS
	SETVAL	OPSETN,	025		; SET ON SPECIFIED INDICATORS
	SETVAL	OPSETF,	026		; SET OFF SPECIFIED INDICATORS
	SETVAL	OPGOTO,	027		; BRANCH

	SETVAL	OPTAG,	030		; DEFINE TAG
	SETVAL	OPEXIT,	031		; BRANCH TO EXTERNAL ROUTINE
	SETVAL	OPRLAB,	032		; TRANSFER DATA TO EXTERNAL ROUTINE
	SETVAL	OPTLOK,	033		; TABLE LOOKUP
	SETVAL	OPALOK,	034		; ARRAY LOOKUP
	SETVAL	OPBGSR,	035		; BEGIN SUBROUTINE
	SETVAL	OPENSR,	036		; END SUBROUTINE
	SETVAL	OPEXSR,	037		; CALL SUBROUTINE

	SETVAL	OPFORC,	040		; FORCE I/O
	SETVAL	OPXCPT,	041		; FORCE OUTPUT PRINTING
	SETVAL	OPDSPL,	042		; GET/PUT DATA ON USER TTY
	SETVAL	OPREAD,	043		; READ FROM DEMAND FILE
	SETVAL	OPCHAN,	044		; CHAIN
	SETVAL	OPDBUG,	045		; DUMP DEBUG DATA
	SETVAL	OPDET,	046		; DETAIL ESCAPE
	SETVAL	OPCAL,	047		; TOTAL ESCAPE

	SETVAL	OPMOVA,	050		; MOVE ALL
	SETVAL	OPTIME,	051		; GET TIME OF DAY

	>
	DEFINE D.PNTR (TBLNAM,TBLID),<

	DEFINE TBLID'.ITM (ITMID,WRDNO,LFTBIT,RTBIT),<
	INTERNAL TBLID'.'ITMID
TBLID'.'ITMID: POINT RTBIT-LFTBIT+1,WRDNO-1(TA),RTBIT
	>

	DEFINE TBLID'.FLG (FLGID,WRDNO,BITNO),<
	INTERNAL TBLID'.'FLGID
TBLID'.'FLGID: POINT 1,WRDNO-1(TA),BITNO
	>
	>

	RADIX 10
;FILTAB DEFINITIONS

	IFN MLOAD&BCDEFG!ONESEG,<

	D.PNTR	FILTAB,FI

	FI.ITM	NAM,1,3,17;	NAMTAB LINK
	FI.ITM	TYP,1,18,20;	FILE TYPE
	FI.ITM	DES,1,21,23;	FILE DESIGNATION
	FI.ITM	PRO,1,24,26;	PROCESSING MODE
	FI.ITM	ORG,1,27,28;	FILE ORGANIZATION
	FI.ITM	RAF,1,29,30;	RECORD ADDRESS FORMAT
	FI.ITM	DEV,1,31,34;	DEVICE NAME
		SETVAL	.FIMF1,0;	MFCU1
		SETVAL	.FIMF2,1;	MFCU2
		SETVAL	.FICDR,2;	READ01
		SETVAL	.FILPT,3;	PRINTER
		SETVAL	.FILP2,4;	PRINTR2 (obsolete)
		SETVAL	.FITTY,5;	CONSOLE
		SETVAL	.FIDSK,6;	DISK
		SETVAL	.FIMTA,7;	TAPE0-TAPE9
	FI.FLG	EOF,1,35;	END OF FILE PROCESSING

	FI.ITM	KYP,2,0,11;	KEY POSITION
	FI.ITM	BKL,2,12,23;	BLOCK LENGTH
	FI.ITM	RCL,2,24,35;	RECORD LENGTH
	FI.ITM	SEQ,3,0,1;	SEQUENCE CHECKING
	FI.ITM	BUF,3,2,8;	TAPE BUFFER OFFSET
	FI.FLG	AST,3,9;	ASCII TAPE OPTION
	FI.ITM	REW,3,10,11;	TAPE REWIND OPTION
	FI.ITM	EXT,3,12,17;	NUMBER OF EXTENTS
	FI.ITM	ADD,3,18,19;	FILE ADDITION
	FI.ITM	OVI,3,20,27;	OVERFLOW INDICATOR
	FI.FLG	ADF,3,28;	RA LINK FLAG
	FI.ITM	LPP,3,29,35;	LINES PER PAGE
	FI.ITM	OVL,4,0,5;	OVERFLOW LINE
	FI.ITM	UNT,4,6,9;	unit number for mag-tapes
	FI.ITM	KYL,4,12,16;	LENGTH OF KEY FIELD
	FI.ITM	EXI,4,17,24;	EXTERNAL INDICATOR
	FI.ITM	COR,5,0,17;	CORE INDEX SIZE
	FI.ITM	ADL,5,18,35;	LINK TO ADDROUT OR LIMIT FILE
	FI.ITM	DAT,6,0,17;	LINK TO DATAB
	FI.ITM	LIN,6,18,29;	LINE NUMBER OF FILE SPEC
	FI.ITM	PHY,7,0,35;	PHYSICAL NAME OF FILE
	FI.ITM	OTF,8,0,17;	link to corresponding OTFTAB item

>
;DATAB DEFINITIONS

	IFN MLOAD&BCDEFG!ONESEG,<

	D.PNTR	DATTAB,DA

	DA.ITM	NAM,1,3,17;	NAMTAB LINK
	DA.ITM	MAJ,1,18,35;	LINK TO NEXT MAJOR ITEM
	DA.ITM	BRO,2,0,17;	LINK TO NEXT MINOR ITEM
	DA.ITM	IND,2,18,35;	LINK TO INDICATORS
	DA.ITM	VAL,3,0,17;	LINK TO VALUE
	DA.ITM	COR,3,18,35;	LINK TO CORE LOCATION
	DA.ITM	NPS,4,0,1;	NUMBER OF ENTRIES/SEQ TYPE
	DA.FLG	RTR,4,2;	RECORD TYPE REQUIRED
	DA.FLG	TRA,4,3;	TRAILER ITEM
	DA.FLG	LHI,4,4;	LOOK-AHEAD ITEM
	DA.ITM	STS,4,5,7;	STACKER SELECT
	DA.ITM	FLD,4,8,9;	FIELD TYPE
	DA.ITM	SIZ,4,10,21;	FIELD SIZE
	DA.ITM	DEC,4,22,25;	DECIMAL POSITIONS
	DA.FLG	PRI,4,26;	PRINT & PUNCH
	DA.FLG	PRO,4,27;	PRINT ONLY
	DA.FLG	STR,4,28;	STIRLING SIGN
	DA.ITM	RES,4,29,34;	BYTE RESIDUE FOR CORE POINTER
	DA.FLG	IMD,4,35;	IMMEDIATE INDEX
	DA.ITM	RII,5,0,7;	RECORD IDENTIFYING INDICATOR
	DA.ITM	CLI,5,8,15;	CONTROL LEVEL INDICATOR
	DA.ITM	FPL,5,16,23;	POSITIVE FIELD INDICATOR
	DA.ITM	STP,5,24,35;	STIRLING POSITION
	DA.ITM	ORT,6,0,1;	OUTPUT RECORD TYPE
	DA.FLG	ARC,6,2;	ADD RECORD
	DA.FLG	FOV,6,3;	FETCH OVERFLOW
	DA.ITM	SPA,6,4,5;	SPACE AFTER
	DA.ITM	SKA,6,6,12;	SKIP AFTER
	DA.ITM	EDT,6,13,16;	EDIT CODE
	DA.FLG	BLA,6,17;	BLANK AFTER
	DA.ITM	SPB,6,18,19;	SPACE BEFORE
	DA.ITM	END,6,20,31;	END POSITION
	DA.FLG	LDC,6,32;	LOAD AT COMPILE TIME
	DA.FLG	LDR,6,33;	LOAD AT PRE-EXECUTION TIME
	DA.FLG	LDE,6,34;	LOAD AT EXECUTION
	DA.FLG	DMP,6,35;	DUMP AT END OF JOB
	DA.ITM	OCC,7,0,14;	NUMBER OF OCCURS
	DA.FLG	ALT,7,15;	ALTERNATE TABLE
	DA.FLG	INF,7,16;	INPUT SECTION FLAG
	DA.FLG	RND,7,17;	ROUND THE RESULT (HALF-ADJUST)
	DA.ITM	ALL,7,18,35;	TABLE LINK TO ALT TABLE
	DA.ITM	EPR,8,0,9;	ENTRIES/RECORD
	DA.ITM	SEQ,8,10,11;	SEQUENCE CHECKING
	DA.FLG	ARE,8,12;	ARRAY ENTRY
	DA.FLG	ADD,8,13;	ADD RECORD
	DA.ITM	FMT,8,14,17;	FIELD FORMAT (IE SIXBIT, ASCII,EBCDIC)
	DA.ITM	LDP,8,18,35;	POINTER TO FILE THIS LOADS FROM
	DA.ITM	DPP,9,0,17;	POINTER TO FILE THIS DUMPS TO
	DA.ITM	SNM,9,18,35;	LINK TO ITEM WITH SAME NAME
	DA.ITM	FRP,10,0,11;	FROM POINTER
	DA.ITM	TOP,10,12,23;	TO POINTER
	DA.ITM	MAT,10,24,31;	MATCHING RECORD INDICATOR
	DA.FLG	TAB,10,32;	TABLE FLAG (VALID FOR OCHTAB ITEMS ONLY)
	DA.ITM	FMN,11,0,7;	NEGATIVE FIELD INDICATOR
	DA.ITM	FBZ,11,8,15;	BLANK OR ZERO FIELD INDICATOR
	DA.ITM	SKB,11,16,22;	SKIP BEFORE
	DA.ITM	FRR,11,23,30;	FIELD RECORD RELATION
	DA.FLG	DUN,11,31;	ITEM SEEN
	DA.FLG	NDF,11,32;	NOT FULLY DEFINED
	DA.FLG	FLS,11,33;	defined in file section
	DA.ITM	ICH,12,0,17;	ICHTAB POINTER
	DA.ITM	ARP,12,18,35;	POINTER TO ARRAY
	DA.ITM	INP,13,0,17;	POINTER TO INDEX
	DA.ITM	LIN,13,18,30;	LINE NUMBER
	DA.FLG	LTF,13,31;	LITERAL FLAG
	DA.ITM	RSV,13,32,35;	RESERVED WORD FLAG/CODE
	DA.ITM	ISZ,14,0,11;	input size
	>
;EXTAB DEFINITIONS

	IFN MLOAD&BCDEFG!ONESEG.,<

	D.PNTR	EXTTAB,EX

	EX.ITM	NAM,1,3,17	;NAMTAB LINK
	EX.FLG	NRS,2,0;	USED BY NON-RESIDENT SEGMENT
	EX.FLG	USN,2,1;	OPSYS OR USER NAME
	EX.FLG	PID,2,2;	PROGRAM-ID ENTRY
	EX.FLG	ENT,2,3		;ENTRY ENTRY
	EX.FLG	CAL,2,4		;REFERENCED BY A CALL
	EX.ITM	CNT,2,15,17	;COUNT OF EXTRA WORDS ALLOCATED
	EX.ITM	HLD,2,18,35	;MISC USES (INCL HLDTAB LNK FOR CANCEL)

	>


;PROTAB DEFINITIONS

	IFN MLOAD&BCDEFG!ONESEG,<

	D.PNTR	PROTAB,PR

	PR.ITM	ID,1,0,2;	TABLE ID
	PR.ITM	NAM,1,3,17;	NAMTAB LINK
	PR.ITM	LNK,1,18,35;	LINK TO ASSIGNED CORE LOCATION
	PR.FLG	SEG,2,0;	SEGMENT FLAG
	PR.FLG	BSR,2,1;	BEGSR FLAG

	>

;OTFTAB DEFINITIONS

	IFN	MLOAD&EG.!ONESEG,<

	D.PNTR	OTFTAB,OT

	OT.ITM	COR,1,0,17;		POINTER TO CORE INDEX	*
	OT.ITM	ADP,1,18,35;		POINTER TO ADDROUT	*
	OT.ITM	BFP,2,0,17;		POINTER TO RECORD BUFFER*
	OT.ITM	OPC,2,18,35;		POINTER TO OUTPUT CHAIN	*
	OT.ITM	IPC,3,0,17;		POINTER TO INPUT CHAIN	*
	OT.ITM	FTB,3,18,35;		POINTER TO FTBTAB ENTRY	*
	OT.ITM	NAM,4,0,35;		PHYSICAL NAME
	OT.ITM	TYP,5,0,2;		FILE TYPE
	OT.ITM	DES,5,3,5;		FILE DESCRIPTION
	OT.ITM	PRO,5,6,8;		PROCESSING MODE
	OT.ITM	ORG,5,9,10;		ORGANIZATION
	OT.ITM	RAF,5,11,12;		RECORD ADDRESS FORMAT
	OT.ITM	DEV,5,13,16;		DEVICE
	OT.FLG	EOF,5,17;		EOF PROCESSING FLAG
	OT.ITM	BLK,5,18,35;		BLOCKING FACTOR
	OT.ITM	KYP,6,0,11;		KEY POSITION
	OT.ITM	SEQ,6,12,13;		SEQUENCE CHECKING
	OT.ITM	BUF,6,14,19;		BUFFER OFFSET
	OT.FLG	AST,6,20;		ASCII TAPE OPTION
	OT.ITM	REW,6,21,22;		REWIND OPTION
	OT.ITM	EXT,6,23,28;		NUMBER OF EXTENTS
	OT.ITM	ADD,6,29,30;		FILE ADDITION OPTION
	OT.ITM	KYL,6,31,35;		LENGTH OF KEY FIELD
	OT.ITM	OVI,7,0,7;		OVERFLOW INDICATOR
	OT.ITM	EXI,7,8,15;		EXTERNAL INDICATOR
	OT.ITM	OVL,7,16,21;		OVERFLOW LINE
	OT.ITM	CHN,7,28,31;		CURRENT CHANNEL
	OT.ITM	CHI,7,32,35;		INDEX CHANNEL
	OT.ITM	CRS,8,0,17;		CORE INDEX SIZE
	OT.ITM	BSZ,8,18,35;		BUFFER SIZE (WORDS)
	OT.ITM	BSC,9,0,17;		BUFFER SIZE (CHARACTERS)
	OT.FLG	LAS,9,18;		I AM LAST
	OT.ITM	LPP,9,19,25;		LINES PER PAGE

OTFSIZ==:^D9;				SIZE OF OTFTAB ENTRY

	>
;OCHTAB DEFINITIONS

	IFN	MLOAD&EG.!ONESEG,<

	D.PNTR	OCHTAB,OC

	OC.ITM	IDX,1,0,17;		POINTER TO INDEX	*
	OC.ITM	NXR,1,18,35;		NEXT RECORD		*
	OC.ITM	NXF,2,0,17;		NEXT FIELD		*
	OC.ITM	IND,2,18,35;		INDTAB POINTER		*
	OC.ITM	SRC,3,0,35;		SOURCE POINTER		*
	OC.ITM	FLD,4,0,1;		FIELD TYPE
	OC.ITM	SIZ,4,2,13;		SIZE
	OC.ITM	DEC,4,14,17;		DECIMAL POSITIONS
	OC.ITM	STP,4,18,29;		STERLING POSITION
	OC.FLG	PRI,4,30;		MFCU PRINT & PUNCH
	OC.FLG	PRO,4,31;		MFCU PRINT ONLY
	OC.FLG	STR,4,32;		STERLING SIGN
	OC.ITM	ORT,4,33,34;		OUTPUT RECORD TYPE
	OC.FLG	ADD,4,35;		ADD A RECORD
	OC.FLG	FOV,5,0;		FORCED OVERFLOW
	OC.ITM	SKB,5,1,7;		SKIP BEFORE
	OC.ITM	SKA,5,8,14;		SKIP AFTER
	OC.ITM	SPB,5,15,16;		SPACE BEFORE
	OC.ITM	SPA,5,17,18;		SPACE AFTER
	OC.ITM	END,5,19,30;		END POSITION
	OC.ITM	STS,5,31,34;		STACKER SELECT
	OC.FLG	IMD,5,35;		INDEX IMMEDIATE
	OC.ITM	OCC,6,0,14;		OCCURS
	OC.ITM	EDT,6,15,18;		EDIT CODE
	OC.FLG	LTF,6,19;		LITERAL OUTPUT FLAG
	OC.ITM	LSZ,6,20,28;		SIZE OF LITERAL
	OC.ITM	RSV,6,29,32;		RESERVED WORD
	OC.FLG	BLA,6,33;		BLANK AFTER
	OC.FLG	TAB,6,34;		TABLE FLAG
	OC.ITM	ARP,7,0,17;		ARRAY POINTER		*
	OC.ITM	EDP,7,18,35;		EDIT WORD/LITERAL PNTR	*

	>
;ICHTAB DEFINITIONS

	IFN	MLOAD&EG.!ONESEG,<

	D.PNTR	ICHTAB,IC

	IC.ITM	DES,1,0,35;		ASSIGNED CORE LOC	*
	IC.ITM	RII,2,0,17;		POINTER TO IDTTAB RII	*
	IC.ITM	NXF,2,18,35;		NEXT FIELD		*
	IC.ITM	NXR,3,0,17;		NEXT RECORD		*
	IC.ITM	ARP,3,18,35;		POINTER TO ARRAY	*
	IC.ITM	INP,4,0,17;		POINTER TO INDEX	*
	IC.ITM	FMN,5,0,7;		MINUS INDICATOR
	IC.ITM	FBZ,5,8,15;		BLANK/ZERO INDICATOR
	IC.ITM	FPL,5,16,23;		PLUS INDICATOR
	IC.ITM	CLI,5,24,31;		CONTROL LEVEL INDICATOR
	IC.ITM	NPS,5,32,33;		NUMBER PER SEQUENCE
	IC.ITM	FLD,5,34,35;		FIELD TYPE
	IC.ITM	FRR,6,0,7;		FIELD RECORD RELATION
	IC.ITM	MAT,6,8,15;		MATCHING INDICATOR
	IC.FLG	RTR,6,16;		RECORD TYPE REQUIRED
	IC.FLG	LHI,6,17;		LOOK AHEAD ITEM
	IC.ITM	STS,6,18,20;		STACKER SELECT
	IC.ITM	SIZ,6,21,32;		SIZE
	IC.ITM	SEQ,6,33,34;		SEQUENCE CHECK
	IC.FLG	IMD,6,35;		IMMEDIATE
	IC.ITM	SRC,7,0,11;		CHARACTER POSITION IS SOURCE
	IC.ITM	OCC,7,12,26;		OCCURS
	IC.ITM	FMT,7,27,31;		DATA FORMAT

	>

;INDTAB DEFINITIONS

	IFN	MLOAD&CDEFG.!ONESEG,<

	D.PNTR	IDTTAB,ID

	ID.FLG	OR,1,0;			OR/AND FLAG
	ID.FLG	NOT,1,1;		NOT FLAG
	ID.ITM	IND,1,2,9;		INDICATOR/CHARACTER
	ID.ITM	POS,1,10,21;		POSITION
	ID.FLG	END,1,22;		END FLAG
	ID.ITM	RII,1,23,30;		RII (OR LINE ONLY)
	ID.ITM	SEQ,1,31,35;		ASSIGNED SEQ NUMBER (OR LINE ONLY)

	ID.ITM	SPB,1,18,19;		[357] space before
	ID.ITM	SKB,1,20,26;		[357] skip before
	ID.ITM	SPA,1,27,28;		[357] space after
	ID.ITM	SKA,1,29,35;		[357] skip after

	>

;FTBTAB DEFINITIONS

	IFN	MLOAD&EG.!ONESEG,<

	D.PNTR	FTBTAB,FT

	FT.ITM	FNM,1,0,35;		FILE NAME
	FT.ITM	CVR,6,0,5;		COMPILER VERSION NUMBER
	FT.FLG	BLC,6,6;		BUFFER LOCATION IS ASSIGNED
	FT.FLG	SDF,6,7;		SORT DESCRIPTOR FLAG
	FT.ITM	NOD,6,8,17;		NUMBER OF DEVICES
	FT.ITM	DNM,6,18,35;		ADDR OF FIRST DEVICE NAME
	FT.ITM	NFL,7,0,4;		NUMBER OF FILE LIMITS
	FT.ITM	PMT,7,5,17;		FILE POSITION ON MAG-TAPE
	FT.ITM	NFT,7,18,35;		NEXT FILE TABLE
	FT.ITM	NAB,8,0,4;		NUMBER OF ALTERNATE BUFFERS
	FT.ITM	MRS,8,5,17;		MAXIMUM RECORD SIZE (CHARACTERS)
	FT.ITM	RRC,8,18,35;		RECORDS BETWEEN RERUN DUMP
	FT.FLG	VLR,9,0;		VARIABLE LENGTH EBCDIC RECORDS
	FT.FLG	NSL,9,2;		NON-STANDARD LABELS
	FT.FLG	STL,9,3;		STANDARD LABELS
	FT.FLG	IOF,9,6;		INPUT/OUTPUT FILE
	FT.ITM	DDM,9,7,9;		DEVICE DATA MODE
	FT.FLG	RRE,9,10;		RERUN DUMP AT END-OF-REEL
	FT.FLG	RCR,9,11;		RERUN ON RECORD COUNT
	FT.FLG	OPT,9,13;		FILE IS OPTIONAL
	FT.ITM	CDM,9,14,15;		CORE DATA MODE
	FT.ITM	MOD,9,16,17;		I/O MODE
	FT.ITM	REC,9,18,35;		ADDRESS OF RECORD AREA
	FT.ITM	NLS,10,0,17;		NON-STANDARD LABEL SIZE
	FT.ITM	FSD,10,18,35;		LINK TO FILE THAT SHARES DEVICE
	FT.ITM	BKF,11,6,17;		BLOCKING FACTOR
	FT.ITM	ACK,11,18,35;		ADDRESS OF ACTUAL KEY TABLE
	FT.ITM	VID,12,0,35;		BYTE POINTER TO VALUE-OF-ID
	FT.ITM	VDW,13,0,35;		BYTE POINTER TO VALUE-OF-DATE-WRITTEN
	FT.ITM	SBA,14,0,17;		LINK TO FILE THAT SHARES BUFFER AREA
	FT.ITM	EUP,14,18,35;		ADDRESS OF ERROR-USE PROCEDURE
	FT.ITM	BBR,15,0,17;		ADDRESS OF BEFORE-BEGINNING-REEL PROCEDURE
	FT.ITM	BBF,15,18,35;		ADDRESS OF BEFORE-BEGINNING-FILE PROCEDURE
	FT.ITM	ABR,16,0,17;		ADDRESS OF AFTER-BEGINNING-REEL PROCEDURE
	FT.ITM	ABF,16,18,35;		ADDRESS OF AFTER-BEGINNING-FILE PROCEDURE
	FT.ITM	BER,17,0,17;		ADDRESS OF BEFORE-ENDING-REEL PROCEDURE
	FT.ITM	BEF,17,18,35;		ADDRESS OF BEFORE-ENDING-FILE PROCEDURE
	FT.ITM	AER,18,0,18;		ADDRESS	OF AFTER-ENDING-REEL PROCEDURE
	FT.ITM	AEF,18,18,35;		ADDRESS OF AFTER-ENDING-FILE PROCEDURE
	FT.ITM	DNS,19,0,2;		MAGTAPE DENSITY
	FT.FLG	PAR,19,4;		MAGTAPE PARITY
	FT.FLG	OUP,19,5;		OPEN USE-PROCEDURE WHEN ENTER FAILS
	FT.ITM	PPN,19,18,35;		POINTER TO PPN
	FT.ITM	BSK,20,0,35;		BYTE POINTER TO SYMBOLIC KEY
	FT.ITM	BRK,21,0,35;		BYTE POINTER TO RECORD KEY
	FT.ITM	KTY,22,15,17;		ISAM KEY TYPE
	FT.FLG	KSG,22,20;		ISAM KEY IS SIGNED
	FT.ITM	KLB,22,24,35;		ISAM KEY LENGTH IN BYTES
	FT.ITM	OWA,23,0,8;		OWNER WRITE ACCESS FOR ISAM
	FT.ITM	OTA,23,9,17;		OTHER WRITE ACCESS FOR ISAM
	FT.ITM	RTC,23,18,35;		ISAM RETAINED RECORD COUNT
	FT.ITM	PFS,24,0,35;		POINTER TO FILE-STATUS DATA ITEM
	FT.ITM	PEN,25,0,35;		POINTER TO ERROR-NUMBER DATA-ITEM
	FT.ITM	PAC,26,0,35;		POINTER TO ACTION-CODE DATA ITEM
	FT.ITM	PID,27,0,35;		POINTER TO VALUE-OF-ID DATA ITEM
	FT.ITM	PBN,28,0,35;		POINTER TO BLOCK-NUMBER DATA ITEM
	FT.ITM	PRN,29,0,35;		POINTER TO RECORD-NUMBER DATA ITEM
	FT.ITM	PFN,30,0,35;		POINTER TO FILE-NAME DATA ITEM
	FT.ITM	PFT,31,0,35;		POINTER TO FILE-TABLE DATA ITEM
	FT.ITM	LHL,32,0,35;		POINTER TO LOW,,HIGH FILE LIMIT
	>
;ARRTAB definitions

	IFN	MLOAD&E.!ONESEG,<

	D.PNTR	ARRTAB,AR

	AR.ITM	PNT,1,0,35;		pointer to array
	AR.ITM	SIZ,2,0,9;		size of array entry
	AR.ITM	OCC,2,10,19;		number of array entries
	AR.ITM	EPR,2,20,29;		number of entries/record
	AR.FLG	LDM,2,30;		is 1 if dump, 0 if load
	AR.FLG	LAS,2,31;		this is the last item
	AR.ITM	FIL,3,0,17;		link to OTFTAB item for file
	AR.ITM	ASZ,3,18,27;		size of alternating item
	AR.ITM	ALT,4,0,35;		pointer to alternating array

	>
;FLAGS AND BITS IN GENFIL OPERATORS

	IFN MLOAD&DE.!ONESEG,<

	EXTERNAL OPRTR


OBIT9:	POINT 1,OPRTR,9
OBIT10:	POINT 1,OPRTR,10
OBIT11:	POINT 1,OPRTR,11
OBIT12:	POINT 1,OPRTR,12
OBIT13:	POINT 1,OPRTR,13
OBIT14:	POINT 1,OPRTR,14
OBIT15:	POINT 1,OPRTR,15

	DEFINE OPBIT (X,Y),<SETVAL OP.'X,OBIT'Y>
	DEFINE OPFLD (W,X,Y,Z),<SETUP OP.'W,<POINT X,OPRTR+Z,Y>>

;FIELDS IN OPRTR WORD

	OPFLD	LN,13,28,0		; LINE NUMBER
	OPFLD	OP,8,8,0		; OP-CODE
	OPFLD	OPR,1,0,0		; OPERAND FLAG
	OPFLD	LIT,1,1,0		; LITERAL FLAG
	OPFLD	AC,1,2,0		; TEMP/AC FLAG
	OPFLD	LNK,18,35,0		; TABLE LINK
	OPFLD	NUM,1,2,0		; NUMERIC/ALPHA FLAG
	OPFLD	FIG,1,3,0		; FIGURATIVE CONSTANT FLAG

	>
	RADIX 8

;CONSTANTS USED BY B,C,D,E,F,G

	IFN MLOAD&BCDEFG!ONESEG,<

	SETUP TABCOD,<POINT 3,0(DT),2>	;TABLE CODE IN MAJOR TABLES

	SETVAL FTFLAG,5	;FILTAB WORD WHICH CONTAINS FLAGS
	SETUP FTBLOK,<POINT 7,4(DT),11>	;BLOCKING FACTOR FOR FILE
	SETUP FTDEVC,<POINT 6,3(DT),17>	;NUMBER OF DEVICES FOR THE FILE
	SETUP FTCMOD,<POINT 2,5(DT),15>	;CORE MODE (0=SIXBIT,2=ASCII)
	SETUP FTRSIZ,<POINT 12,6(DT),17> ;RECORD SIZE IN FILE-TABLE
	SETUP FTAMOD,<POINT 2,5(DT),17>	;ACCESS MODE IN FILTAB
	SETUP FTRMOD,<POINT 2,5(DT),1>	;RECORDING MODE IN FILTAB
	SETUP FTLABL,<POINT 2,5(DT),3>	;LABEL DEFINITION IN FILTAB
	SETUP FTRECD,<POINT 18,6(DT),35>;LOCATION OF "DATA RECORD" LINK IN FILE-TABLE
	SETUP FTDBAS,<POINT 18,^D15(DT),35>;BASE ADDRESS FOR ASSOCIATED DATA ENTRIES
	SETUP PTSEGN,<POINT 1,1(DT),0>	;SEGMENT NUMBER FOR PROTAB
	SETVAL PTFLAG,2		;PROTAB WORD WHICH CONTAINS FLAGS

	>
;ASSEMBLY CODES

	IFN MLOAD&BCDEFG!ONESEG,<

	SETVAL AC.CNS,0	;ADDRESS IS A CONSTANT .LT. 100000
	SETVAL AC.ICH,1	;ADDRESS IS AN ICHTAB ENTRY
	SETVAL AC.PRO,2	;ADDRESS IS A PROCEDURE NAME
	SETVAL AC.EXT,3	;ADDRESS IS AN EXTERNAL NAME
	SETVAL AC.FTB,4	;ADDRESS IS AN FTBTAB ENTRY
	SETVAL AC.OCH,5	;ADDRESS IS AN OCHTAB ENTRY
	SETVAL AC.CNB,6	;ADDRESS IS A CONSTANT .GT. 77777
	SETVAL AC.MSC,7	;ADDRESS IS MISCELLANEOUS

	SETVAL AS.CNS,<AC.CNS*1B20>
	SETVAL AS.ICH,<AC.ICH*1B20>
	SETVAL AS.PRO,<AC.PRO*1B20>
	SETVAL AS.EXT,<AC.EXT*1B20>
	SETVAL AS.FTB,<AC.FTB*1B20>
	SETVAL AS.OCH,<AC.OCH*1B20>
	SETVAL AS.CNB,<AC.CNB*1B20>
	SETVAL AS.MSC,<AC.MSC*1B20>

	SETVAL AC.ABS,0	;INCREMENT IS ABSOLUTE NUMBER
	SETVAL AC.OTB,1	;INCREMENT TO %OTF
	SETVAL AC.OCB,2	;OCHBAS
	SETVAL AC.LIT,3	;INCREMENT TO %LIT
	SETVAL AC.ICB,4	;ICHBAS
	SETVAL AC.DOT,5	;CURRENT PC
	SETVAL AC.TMP,6	;INCREMENT TO %TEMP
	SETVAL AC.DAT,7	;DATBAS

	SETVAL AS.ABS,<AC.ABS*1B20>
	SETVAL AS.OTB,<AC.OTB*1B20>
	SETVAL AS.OCB,<AC.OCB*1B20>
	SETVAL AS.LIT,<AC.LIT*1B20>
	SETVAL AS.ICB,<AC.ICB*1B20>
	SETVAL AS.DOT,<AC.DOT*1B20>
	SETVAL AS.TMP,<AC.TMP*1B20>
	SETVAL AS.DAT,<AC.DAT*1B20>

	SETVAL AS.BYT,4B20	;BYTE POINTER
	SETVAL AS.XWD,5B20	;XWD
	SETVAL AS.ASC,6B20+1B21	;ASCII
	SETVAL AS.SIX,6B20+1B22	;SIXBIT
	SETVAL AS.D1,6B20+1B23	;1-WORD DECIMAL
	SETVAL AS.D2,6B20+1B24	;2-WORD DECIMAL
	SETVAL AS.FLT,6B20+1B25	;COMP-1
	SETVAL AS.OCT,6B20+1B26	;OCTAL

	SETVAL AS.PN,7B20+1B21	;PROCEDURE NAME
	SETVAL AS.%X,7B20+1B22	;TAG DEFINITION
	SETVAL AS.REL,7B20+1B23	;RELOC
	SETVAL AS.ENT,7B20+1B24	;ENTRY

	>
;TABLE OF PRESET EXTERNAL NAMES

	IFN	MLOAD&ADEFG.!ONESEG,<

	NUMEXT==0
	USRNO==0
	USRFLG==0

	DEFINE EXTAB (X),<
	IFN MLOAD&A.!ONESEG,<
	SIXBIT "X"
	>
	IFN MLOAD&E.!ONESEG,<
	SETVAL X,NUMEXT*2+AS.EXT+1
	>
	NUMEXT==NUMEXT+1
IFN USRFLG,<USRNO==USRNO+1>
	>

DEFINE EXTMCS(EXTRTN),<
	EXTAB	EXTRTN
	IFN MLOAD&EG.!ONESEG,<%'EXTRTN==:300000+NUMEXT*2-1>
	>

EXTNAM:	EXTAB RESET.
	IFN MLOAD&G.!ONESEG,<RESET==:300000+NUMEXT*2-1> ;PHASE G ADDR OF RESET.

	EXTAB	FUNCT.
	IFN MLOAD&G.!ONESEG,<%FUNCT.==:NUMEXT-1>	; THIS IS ACTUALLY AN INTERNAL.

;THE FOLLOWING ONES MUST BE LAST, THEY ARE TREATED AS USER EXTERNALS

FIXLST:	EXTAB MEMRY.
	EXTAB .OTFBS

USR:	USRFLG==1

	EXTAB RPGST.
	IFN MLOAD&G.!ONESEG,<RPGSTR==:300000+NUMEXT*2-1> ; PHASE G ADDR OF RPGST.


DEFINE EXTABN(DBROUT),<
	EXTAB	DBROUT
	IFN MLOAD&D.!ONESEG,<%'DBROUT==:500000+NUMEXT*2-1>
	>

	IFN MLOAD&A.!ONESEG,<
	SETUP EXTPTR,<XWD -NUMEXT,EXTNAM>
	>

	SETVAL NUMEXT,<<NUMEXT-USRNO>*2>

	>
;CONSTANTS USED BY PHASE F

	IFN MLOAD&F.!ONESEG,<

	SETUP ERALNA,<POINT 14,DW,14>;	LINE NUMBER IN "DW" PLUS "IMBED" BIT

>

;CONSTANTS USED BY PHASE G

	IFN MLOAD&G.!ONESEG, <

	SETUP	ASOP,<POINT 7,W1,8>;	INSTRUCTION OP-CODE
	SETUP	INCTYP,<POINT 3,W2,20>;	INCREMENT CODE TYPE
	SETUP	ADRTYP,<POINT 3,W1,20>;	ADDRESS CODE TYPE

>

	END