	.TITLE MACRO9 FOR V4C TAPE RELEASE
/
/COPYRIGHT 1970, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/10-16-69.
/
/THE SYMBOL "BF" MUST BE
/DEFINED FOR BACKGROUND/
/FOREGROUND SYSTEMS
	.ABS
	.IFUND BANK
BANK=0		/BULK STORAGE SYSTEM
	.ENDC
	.IFDEF PTP
	.LOC BANK*20000+4634
	.ENDC
	.IFUND PDP7
	.IFUND PTP
	.IFDEF	%F2
	.LOC 6320
	.ENDC
	.IFUND	%F2
	.LOC 4550
	.ENDC
	.ENDC
	.ENDC
	.IFDEF PDP7
	.IFDEF %F2
	.LOC 6153
	.ENDC
	.IFUND %F2
	.LOC 4373
	.ENDC
	.ENDC
	.EJECT
/MACRO-9 TAPE 1A
/
/ENTER HERE FOR PASS 1
/
START	JMP INITBB		/INITIALIZE BANK BITS
/
/COMMAND STRING PROCESSOR
PASS1P	CAL+775
	6
	LAC CTLP
	SZA
	JMP* CTLP
/
PASS1	CAL+1775		/.INIT TTY OUTPUT
	1
MOD1	PASS1P		/RETURN TO PROCESSOR
POWA=.
CTLP	NOP
/
	DZM CTLP		/CONTROL P TO PASS1
/
/TYPE MACRO-9
/
CMDSTP	CAL+2775		/.WRITE ON TTY
	11
MOD2	M9MSG		/MACRO
BINEXT	.SIXBT /BIN/
/
L2775	CAL+2775		/TYPE >
	11
MOD1B	BRCKT
SRCEXT	.SIXBT /SRC/
/
	JMS UPBLB		/INIT 5/7 UNPACK TO RDBUF+2
	DZM FILE			/WILL HOLD FILE NAME
	DZM FILE+1
/
	CAL+2776		/.READ KEYBOARD
	10
MOD1A	RDBUF
LM33	-33
	CAL+776
	12
	LAC AD14		/HDRLNE+2
	JMS P57INT		/INIT 5/7 PACKING
	LAC (201004
	DAC HDRLNE+2
	DAC HDRLNE+4
	LAC (020100
	DAC HDRLNE+3	/BLANKS TO HEADER LINE IMAGE
	DAC HDRLNE+5
	DZM CHRNUM
	CLC
	DAC NOIN2#		/NO ALTERNATE INPUT
	DZM LSTSW#
	DZM BNOPTN#		/BINARY OPTION
	DZM ALOPTN#		/LISTING OPTION
	DZM STOPTN#		/SYMBOL TABLE OPTION
CMDA	JMS GETCHR		/GET A CHARACTER
	SAD (137			/LEFT ARROW
	JMP CMDC			/GET FILE NAME
	SAD L15			/CR
	JMP CMDE			/ERROR
	SAD (175			/ALT MODE
	JMP CMDE			/ERROR
	SAD L102			/B
	JMP CMDB
	SAD L114			/L
	JMP CMDL
	SAD L123			/S
	JMP CMDS
	SAD L120		/P
	JMP CMDP
	JMP CMDA			/GET NEXT CHAR
CMDB	CLC
	DAC BNOPTN		/SET BINARY OPTION
	JMP CMDA
CMDL	CLC
	DAC ALOPTN		/SET LISTING OPTION
	DAC LSTSW
	JMP CMDA
CMDS	CLC
	DAC STOPTN		/SYMBOL TABLE OPTION
	DAC LSTSW
	JMP CMDA
CMDP	DZM NOIN2		/SET FOR
	JMP CMDA		/ALTERNATE INPUT
CMDC	JMS GETCHR
	SAD L15			/CR
	JMP CMDD
	SAD (175			/ALT MODE
	JMP CMDD-2
	JMS SIXP		/6 CHARS PACKED
	JMP CMDC			/YES
	LAC AD02		/FILE
	JMS P6BT		/PACK THE FILE NAME
	LAC CHRHLD		/PACK FILE NAME
	JMS PACK57		/IN HEADER LINE
	JMP CMDC
	CAL+775
	6
CMDD	LAC CHRNUM
	SNA
	JMP CMDE			/ERROR
	CLC
	DAC BATCH#
	LAC CHRHLD
	SAD (175			/ALT MODE
	DZM BATCH
	JMP PASS1A		/START ASSEMBLING
/
/ERROR IN COMMAND STRING
/
CMDE	CAL+2775		/TYPE  
	11
MOD3	ERMSG
LSTEXT=.
ERMSG	.SIXBT	/LST/
M9MSG	JMP CMDSTP		/GET NEW COMMAND STRING
	374320		/QUESTION MARK <15>
BRCKT=.+3
	.IFDEF	BF
	.ASCII	/MACRO BF3A/
	.ENDC
	.IFUND	BF
	.ASCII	/MACRO V5A /
	.ENDC
LF	050320		/LF CR
	373720		/> ALT MODE
FILE	0;	0		/FILE NAME
	0			/EXTENSION
/
/INITIALIZE LOCATIONS FOR PASS 1
/
PASS1A	LAC NOPLIT		/SET PASS 1
	DAC PASSNO#
	LAC AD41		/BPIT-1
	JMS ZEROIT		/ZERO SWITCHES
	BP1T-EP1T
	LAC* L103
	DAC USTEND#
	DAC BEGUST
	DZM MOD3A+1		/TO DETERMINE WHAT THE LISTING DEVICE IS
	LAC LSTSW		/LISTING REQUESTED
	SMA		/YES
	JMP READ1		/NO
/
	CAL+1766		/.INITD LISTING DEVICE
	1
MOD3A	PASS1P
	NOP
/
	LAC LSTEXT		/LST
	DAC FILE+2
/
L766	CAL+766		/.ENTER LISTING DEVICE
	4
MOD4	FILE
/
	JMP READ1
/
/ENTER HERE FOR PASS 2
/
PASS2	DZM CTLP		/SET CONTRL P TO PASS1
	LAC SKPLIT
	DAC PASSNO		/SET PASS 2 SWITCH
	DZM ERLNCT#		/ERROR LINE COUNT
	DZM PGCTR#		/PAGE COUNTER
	LAC BNOPTN		/BINARY REQUESTED
	SMA			/YES
	JMP READ1			/NO
/
	CAL+1765		/.INIT BINARY OUTPUT DEVICE
	1
MOD4A	PASS1P
BBFSIZ	0
	.IFUND %F2
	LAW -377
	TAD BBFSIZ
	DAC BBFSIZ
	LAC BMODE
	SZA!CLL
	CML
	LAC ABXEXT
	SNL
	.ENDC
/
	LAC BINEXT		/BINARY
	DAC FILE+2
/
	CAL+765		/.ENTER BINARY OUTPUT DEVICE
	4
MOD5	FILE
/
	DZM LLBCDE#
	LAC L1
	DAC LLWDCT#
	.IFUND %F2
	DZM BNADDR	/BINARY OUTPUT ADDRESS
	DZM BNWDCT	/BINARY OUTPUT WORD COUNT
	DZM BNCKSM	/BINARY OUTPUT CHECKSUM
	.ENDC
/
READ1	LAC* L102		/END OF USER MACRO TABLE
	DAC ENDUMT#
	.IFUND %F2
	DZM CSNL1		/CREATE SYMBOL - LEVEL 1
	LAC (7640		/4000 (10)
	DAC CSNL2		/CREATE SYMBOL - LEVEL 2
	LAC (15530		/7000 (10)
	DAC CSNL3		/CREATE SYMBOL - LEVEL 3
	.ENDC
	CLC
	DAC SYMTYP#		/SYMBOL TYPE -=REL,+=ABS
	DAC FSTLNE#		/FIRST LINE SWITCH
	LAC AD42		/BP12T-1
	JMS ZEROIT		/ZERO OUT SWITCHES
	BP12T-EP12T
	LAC NOIN2		/SECONDARY INPUT REQUESTED
	SPA		/YES
	JMP READ1A		/NO
L770	CAL+770		/INIT SECONDARY INPUT DEVICE
	1
MOD5B	PASS1P
	NOP
	JMP NEWTP1
READ1A	CAL+767		/INIT SOURCE INPUT DEVICE
	1
MOD5A	PASS1P
POWB	NOP
	LAC SRCEXT	/SRC
	DAC FILE+2
	CAL+767		/SEEK SOURCE INPUT
	3
MOD6	FILE
	JMP NEWTP1
/
/ENTER HERE FOR NEW TAPES
/
NEWTAP	LAC NOIN2		/WAS PREVIOUS TAPE SECONDARY INPUT
	SPA!CLC		/YES
	JMP READ1A		/NO
	DAC NOIN2
	DZM EOTSW	/ONLY NEEDED FOR BULK STORAGE
	CAL+770		/CLOSE SECONDARY
	6
	JMP READ1A		/GET PRIMARY INPUT
NEWTP1	DZM CTLP		/SET ^P TO PASS 1
	JMS RDSRC		/READ SOURCE
/
/READ SUBSEQUENT LINES
/
NXTLNE	DZM MWDSTP		/CLEAR C/R
	DZM MWDSTP+1	/IN MIDDLE
	LAC RASW		/IN MIDDLE OF R/A LAST
	SPA
	JMP RARET		/RETURN TO EXPANSION
	LAC EXPSW		/IS A MACRO BEING EXPANDED
	SPA		/NO
	JMP EXPMCR	/RETURN TO EXPANDING ROUTINE
	DZM NOREST
	JMS DBLBUF	/GET NEXT SOURCE LINE
	JMS PRTINT		/CLEAR PRINT AREA
/
/SCAN TAG FIELD
/
SCNTAG	CLC
	DAC NDIL#		/NO DATA IN LINE
	LAC AD43		/BST-1
	JMS ZEROIT		/ZERO OUT SWITCH
	BST-EST
	.IFUND %F2
	LAC DFNSW		/WITHIN A MACRO DEFINITION
	SPA
	JMP PKMCDF		/RETURN TO DEFINITION
	.ENDC
/
/GET NEXT TAG FIELD CHARACTER
/
NXTAG	LAC BYPASS	/CHECK IF CHAR
	SMA	/ALREADY IN
	JMS GETCHR	/GET NEXT CHARACTER
	DZM BYPASS
	CLA
	SAD CHRNUM	/FIRST CHARACTER
	JMP FSTCHR	/YES
SPTB	JMS CHRLKP	/CHECK FOR SPACE OR TAB
	007776	/GO TO SCAN OP FIELD
	JMP SCNOP	/IF SPACE OR TAB
	SAD (75	/CHECK FOR
	SKP	/PARAMETER ASSIGNMENT
	JMP .+4
	CLC
	DAC PASW		/SET INDICATOR
	JMP SCNOP	/SCAN FOR VALUE
	LAC CHRNUM	/FIRST CHAR
	SZA	/YES
	JMP NTFST
	LAC CHRHLD
	SAD L45	/%
	JMP TSTLST	/YES
	SAD L56	/.
	JMP CKNXT	/CHECK NEXT CHAR
	JMS CKALF	/CHECK FOR A-Z
	SKP
	JMP SYMBER	/SYMBOL ERROR
TSTLST	JMS SIXP		/6 CHAR PACKED
	JMP NXTAG		/YES
	LAC AD06		/PACKT
	JMS P6BT		/6 BIT PACKING
	JMP NXTAG
/
/SYMBOL ERROR
/
SYMBER	JMS SETFLG	/S TO FLAG WORD
	000020
	DZM PACKT
	DZM PACKT+1	/IGNORE COMPLETE SYMBOL
	LAC (6
	DAC CHRNUM
	JMP NXTAG	/GET NEXT TAG CHAR
/
/FIRST CHARACTER PROCESSING
/
FSTCHR	JMS CHRLKP	/CHECK FOR LF,FF OR VT
	157775
	JMP NXTAG	/GET NEXT TAG CHAR
	SAD L57	/SLASH
	JMP COMT	/COMMENT PROCESSING
	SAD L15	/CARRIAGE RETURN
	SKP
	JMP SPTB	/CHECK FOR SPACE OR TAB
COMT	LAC MWDSTP
	SZA	/CHECK FOR MULTIWORD LINE
	JMP NXTLNE
	JMS PRTP2		/PRINT IF PASS2
	JMP NXTLNE	/GET NEXT LINE
/
/IF . IS FIRST CHAR OF SYMBOL,
/CHECK NEXT CHAR FOR VALIDITY
/
CKNXT	JMS GETCHR	/PICK UP NEXT CHAR
	CLC
	DAC BYPASS		/BYPASS GETTING NEXT CHAR
	JMS CHRLKP	/CHECK FOR TAB, SPACE,
	007774	/;OR CARRIAGE RETURN
	JMP SYMBER	/SYMBOL ERROR
	JMS CKNUM	/CHECK FOR 0-9
	JMP SYMBER	/FOUND
	LAC (560000
	DAC PACKT
	ISZ CHRNUM
	JMP NXTAG
/
/PROCESSING OF TAG FIELD CHARACTERS
/SUBSEQUENT TO THE FIRST CHARACTER
/
NTFST	JMS CHRLKP	/CHECK FOR . OR %
	137776
	JMP TSTLST
	JMS CKALF	/CHECK FOR A-Z
	JMP TSTLST	/FOUND
	JMS CKNUM	/CHECK FOR 0-9
	JMP TSTLST
	JMS CHRLKP	/CHECK FOR ; OR CR
	027776
	JMP ENDLNE	/END WORD-LINE ROUTINE
	JMS SIXP		/ERROR FLAGGED AND
	SKP		/IGNORED IF PASSED
	JMP SYMBER	/THE 6TH CHARACTER
	JMS SETFLG	/S TO FLAG WORD
	000020
	JMP NXTAG	/GET NEXT TAG CHAR
/
/SCAN OPERATION AND ADDRESS FIELDS
/
SCNADR	CLC	/FIELD SWITCH
	DAC FLDSW		/+ = OPFIELD
	LAC ENDSW	/IF .END
	SMA	/DO NOT ZERO
	JMP SCNOP+1	/FLDVAL
	JMP SCNOP+2
SCNOP	DZM FLDSW
	DZM FLDVAL
	DZM BYPASS
	DZM OPRTR#	/ELEMENT OPERATOR
FLDCHR	JMS GETCHR	/GET NEXT CHARACTER
	SAD L40	/SPACE
	JMP FLDCHR	/IGNORE SPACES
	SAD L11	/TAB
	JMP .DSA	/END OF FIELD
OPLIT	JMS CHRLKP	/CHECK FOR / ; OR CR
	027775
	JMP ENDLNE	/END WORD/LINE ROUTINE
OPLITA	SAD (50	/CHECK FOR LITERAL
	SKP
	JMP CKSGN
	CLC
	DAC LITSW	/SET LITERAL INDICATOR
	LAC FLDSW
	SMA
	JMP NXTLT
	DZM FLDSW	/RESET TO OP FIELD
	LAC OPVAL
	DAC OPSAV#	/SAVE OP VALUE
	CLC
	DAC OPSVSW		/OP SAVED SWITCH
NXTLT	JMS GETCHR	/GET NEXT CHAR
	DZM NCD		/NOT COMPLETELY DEFINED
	DZM FLDVAL
	JMS CHRLKP	/CHECK FOR SP OR TAB
	007776
	SKP	/FOUND
	JMP OPLIT	/NOT FOUND
	CLC
	DAC FLDSW	/SET ADDRESS FIELD
	DZM OPVAL
	JMP FLDCHR
CKSGN	JMS CHRLKP	/CHECK FOR + OR -
	057776
	SKP
	JMP BYPIT
/
/GET SUBSEQUENT ELEMENTS
/
NXOPAD	LAC BYPASS	/CHECK IF CHAR IN
	SMA	/FROM INDIRECT REFERENCE
	JMP NOTIN	/CHECKING
	LAC L52		/*
	DAC OPRTR
	DZM BYPASS
	JMP BYPIT
NOTIN	LAC CHRHLD
	DAC OPRTR	/EXPRESSION OPERATOR
	JMS GETCHR	/GET NEXT CHARACTER
BYPIT	DZM CHRNUM
	JMS CKNUM	/IS CHARACTER NUMERIC
	JMP TLZ		/YES
	JMP ALPHA
/
/PROCESSING OF NUMERICAL VALUES
/
	JMS GETCHR	/GET NEXT CHAR
TLZ	LAC CHRHLD
	SAD (60	/BYPASS NEXT CHAR
	JMP TLZ-1
NUMTST	JMS CKNUM	/CHECK FOR 0-9
	SKP
	JMP NUMT1		/NOT FOUND
	LAW -7
	TAD CHRNUM		/7 CHARS
	SMA	/NO
	JMP NUMT2
	LAC AD07		/PACKN
	JMS P6BT		/6 BIT PACKING
NUMT2	JMS GETCHR		/GET NEXT CHAR
	JMP NUMTST
NUMT1	JMS CHRLKP		/CHECK FOR SPACE, TAB
	007774	/; OR CR
	JMP NUMEND	/END OF NUMBER
	SAD (51	/CHECK FOR LITERAL END
	SKP
	JMP .+4
	LAC L40	/CHANGE )
	DAC CHRHLD	/TO SPACE
	JMP NUMEND
	JMS CHRLKP	/CHECK FOR +,-,*,/,&,! OR 
	047771
	JMP NUMEND	/FOUND
/
/NUMBER ERROR
/
NUMER	JMS SETFLG	/N TO FLAG WORD
	000400
	JMS CHRLKP	/CHECK FOR ; OR CR
	027776
	JMP NUMEND
	JMS SCNEND	/SCAN TO END OF WORD
	JMP ENDLNE	/END WORD/LINE
NUMEND	JMS NUMEVL		/NUMBER EVALUATION
	DZM CREL
ARITHOP	LAC OPRTR	/DETERMINE WHAT OPERATION
	AND (7	/IS TO BE PERFORMED
	TAD (JMP .+4
	DAC .+2
	LAC FLDVAL
	0
	JMP ARTHS	/ADD
	JMP ARTHS+20	/INCLUSIVE OR
	JMP ARTHS+6		/MULTIPLY
	JMP ARTHS	/ADD
	JMP ARTHS+24	/EXCLUSIVE OR
	JMP ARTHS+2	/SUBTRACT
	JMP ARTHS+16	/AND
	JMP ARTHS+11	/DIVISION
ARTHS	TAD NUMBR
	JMP STORIT
	LAC NUMBR
	JMS TWOS		/CHANGE NUMBR TO 2'S COMP
	TAD FLDVAL
	JMP STORIT
	JMS MPY	/FLDVAL IS MULTIPLIER
	LAC NUMBR	/MULTIPLICAND
	JMP STORIT	/AC IS LOW ORDER PRODUCT
	CLA
	JMS DIVIDE	/DIVIDE ROUTINE
	LAC FLDVAL	/DIVIDEND
	LAC NUMBR	/DIVISOR
	JMP STORIT
	AND NUMBR
	JMP STORIT
	AND NUMBR
	XOR FLDVAL
	XOR NUMBR
	JMP STORIT
	XOR NUMBR
STORIT	DAC FLDVAL
/
/ACCUMULATE RELOCATION FOR INSTRUCTION ADDRESS
/
	.IFUND %F2
	LAC BMODE		/OUTPUT TYPE
	SZA		/REL
	JMP ENDFLD	/ABS
	.ENDC
	LAC OPRTR		/PICK UP OPERATOR
	AND (7
	TAD (JMP .+3
	DAC .+1
	0
	JMP ARLC		/ADD
	JMP ARLC		/OR
	JMP ARLA		/MPY
	JMP ARLC		/ADD
	JMP ARLC		/XOR
	JMP ARLB		/SUB
	JMP ARLC		/AND
			/DVD
ARLA	LAC CREL		/CURRENT RELOCATION
	SNA
	JMP ARLD
	LAC L1
	DAC AREL		/ACCUMULATED RELOCATION
ARLF	JMS SETFLG	/R TO FLAG WORD
	40
	JMP ARLE
ARLD	LAC AREL
	SAD L1
	JMP ARLF
	JMP ARLE
ARLB	LAC AREL
	SZA
	JMP ARLG
ARLC	LAC CREL
	JMP ARLH
ARLG	LAC CREL
	JMS TWOS
ARLH	TAD AREL
	DAC AREL
ARLE	DZM CREL
/
/END OF OP OR ADDRESS FIELD
/
ENDFLD	JMS CHRLKP	/CHECK FOR ; OR CR
	027776
	JMP ENDLNE	/END WORD-LINE ROUTINE
	JMS CHRLKP	/CHECK FOR SPACE OR TAB
	007776
	SKP
	JMP NXOPAD	/GET NEXT ELEMENT OF EXPRESSION
	LAC FLDSW	/WHAT FIELD
	SPA
	JMP ENDALL	/ADDRESS FIELD
	LAC FLDVAL	/OPERATION FIELD
	DAC OPVAL
	JMS GETCHR		/GET NEXT CHARACTER
	SAD L40
	JMP .-2		/BYPASS SPACES
	JMS CHRLKP
	017774		/CHECK FOR TAB,CR,;OR /
	JMP ENDALL		/END OF STATEMENT
	DZM FLDVAL
	DZM BYPASS		/RESET SWITCHES
	DZM OPRTR
	CLC
	DAC FLDSW		/SET FOR ADDRESS FIELD
	LAC CHRHLD		/GET CURRENT CHARACTER
	JMP OPLITA
ENDALL	JMS SCNEND	/SCAN TO END OF LINE
	JMP ENDLNE	/ENDING ROUTINE
/
/PROCESSING OF OP FIELD OR
/ADDRESS FIELD SYMBOLS - INITIAL CHARACTER
/
ALPHA	DZM VARSW		/VARIABLE INDICATOR
	DZM FNDSW
	DZM PACKS	/SYMBOLIC PACKING AREA
	DZM PACKS+1
ALPH1	JMS CKALF	/CHECK FOR A-Z
	JMP ALFND	/FOUND
	JMS CHRLKP	/CHECK FOR . OR %
	137776
	JMP ALFND	/FOUND
	JMS CHRLKP	/CHECK FOR ; OR CR
	027776
	JMP ENDLNE	/FOUND
	SAD (43	/#
	SKP
	JMP ALFER
	CLC
	DAC VARSW	/SET VARIABLE
	JMS GETCHR
	JMP ALPH1
ALFER	JMS SETFLG	/S TO ERROR FLAG WORD
	000020
	JMP NXALF
ALFND	JMS SIXP		/HAVE SIX BEEN PROCESSED
	JMP NXALF	/YES
	LAC AD08		/PACKS
	JMS P6BT
	JMP NXALF
STVR	CLC
	DAC VARSW	/SET VARIABLE INDICATOR
/
/PROCESS SUBSEQUENT CHARACTERS
/
NXALF	JMS GETCHR	/GET NEXT CHAR
	JMS CKALF	/CHECK FOR A-Z
	JMP ALFND	/FOUND
	JMS CKNUM	/CHECK 0-9
	JMP ALFND	/FOUND
	JMS CHRLKP	/CHECK FOR . OR %
	137776
	JMP ALFND	/FOUND
	SAD (43	/#
	JMP STVR
	JMS CHRLKP	/CHECK FOR SPACE, TAB,;,CR
	007765	/+,-,/,*,&,! OR
	JMP SYMBLD	/FOUND
	SAD (51	/)
	SKP	/TERMINATE LITERAL
	JMP ALFER	/ILLEGAL CHARACTER
	LAC L40
	DAC CHRHLD
/MACRO-9  TAPE 2
/
/SYMBOL TABLE BUILD UP ROUTINE
/
SYMBLD	LAC PACKS	/CHECK FOR CURRENT
	SZA	/NO SYMBOL
	JMP .+3
	DZM NUMBR
	JMP ARITHOP
	SAD (560000	/LOCATION REFERENCE
	SKP
	JMP NOTCLC
	LAC PC	/PC PICKED UP
	DAC NUMBR	/AS ITS VALUE
	DZM CREL
	LAC SYMTYP	/PICK UP RELOCATION
	SPA
	ISZ CREL
	JMP ARITHOP	/PERFORM ARITHMETIC OPERATIONS
NOTCLC=.
	.IFUND %F2
	LAC IFSW		/.IF STATEMENT
	SPA
	JMP IFEXP		/YES
	.ENDC
	LAC FLDSW
	SPA	/OP FIELD
	JMP CNVIT	/NO
	LAC PASW
	SPA	/PARAMETER VALUE
	JMP CNVIT	/YES
	LAC OPRTR	/CHECK OP FIELD
	SZA	/FOR SYMBOL OR EXPRESSION
	JMP CNVIT	/IF SYMBOL, LOOK FOR
	JMS CHRLKP	/PSEUDO-OP
	007774	/CHECK FOR SPACE, TAB, CR, OR ;
	SKP	/FOUND
	JMP CNVIT
	JMS SEARCH	/SEARCH PSEUDO-OP TABLE
	LAC POPEND
	LAC POPSZE	/CALLING SEQUENCE
	LAC AD08		/PACKS
	2	/
	SKP	/FOUND
	JMP CNVIT	/NOT FOUND
	JMS CKPFV
	LAC* MRGLOC
	JMS WRD3		/PICK UP JUMP INSTRUCTION
	.IFUND %F2
	SAD IFOP		/.IF PSEUDO OP
	JMP POPIT		/YES
/

	LAC CONDSW		/CONDITIONALIZED SECTION
	SMA		/YES
POPIT	XCT* MRGLOC	/NO - JUMP TO PSEUDO-OP RTNE
	LAC* MRGLOC
	SAD ENDCOP	/.ENDC
	.ENDC
	XCT* MRGLOC	/YES
CNVIT=.
	.IFUND %F2
	LAC CONDSW	/CONDITIONALIZED SECTION
	SPA		/NO
	JMP ENDLNE	/EXIT TO END LINE ROUTINE
	.ENDC
	JMS USTLKP	/LOOK UP SYMBOL IN USER TABLE
	SKP		/FOUND
	JMP CKSYSM		/NOT FOUND
	.IFUND %F2
	JMS CKMAC		/IS ENTRY A MACRO
	.ENDC
	JMP NOTMAC		/NO
	.IFUND %F2
	LAC FLDSW		/IF NOT OP FIELD
	SPA		/IT'S A USAGE ERROR
	JMP MACERR
	XCT PASSNO		/WHICH PASS
	JMP MACALL	/MACRO CALL ROUTINE
	LAC* TMP		/WAS MACRO DEFINED FOR PASS 2
	SPA		/NO
	JMP MACALL	/YES
MACERR	JMS SETFLG	/X TO FLAG WORD
	1
	DZM NUMBR
	JMP ARITHOP
	.ENDC
CKSYSM	LAC FLDSW		/BYPASS SYSTEM MACRO SEARCH
	SPA		/IF NOT OP FIELD
	JMP SPST
	JMS SEARCH	/SEARCH FOR SYSTEM MACRO
	LAC SMEND
	LAC SMSZE
	LAC AD08		/PACKS
	2
	SKP
	JMP SPST
	JMS WRD3		/PICK UP WORD3
	LAC* MRGLOC
	XOR BNKBTS
	JMP SYSCAL		/MACRO CALL PROLESSING
NOTMAC	LAC* MRGLOC	/IS IT A PARAMETER ASSIGNMENT
	SMA	/YES
	JMP STFND
	JMS GETREL		/PICK UP RELOCATION
	LAC VARSW		/VARIABLE INDICATOR ON
	SMA		/YES
	JMP SPSTA
	LAC* MRGLOC
	AND (377777
	DAC* MRGLOC		/CHANGE SYMBOL TABLE ENTRY
	JMS WRD3		/FROM P/A TO VARIABLE
	LAC* MRGLOC
	AND (377777
	XOR XCTLIT
	DAC* MRGLOC
	LAW -2
	TAD MRGLOC
	DAC MRGLOC
	ISZ VARCTR		/UPDATE VARIABLE COUNT
	JMP STFND
SPSTA	LAC FLDSW
	SMA
	JMP SPSTB

	JMS SYMVAL		/PICK UP SYMBOL VALUE
	JMP ARITHOP	/PERFORM ARITHMETIC OPERATIONS
STFND	CLC
	DAC FNDSW#	/SET FOUND IN USER TABLE
	LAC MRGLOC
	DAC MRGSAV#	/SAVE MERGING LOCATION
SPST	LAC FLDSW	/IF OP FIELD
	SPA	/SEARCH PERMANENT SYMBOL TABLE
	JMP NOTPST	/BYPASS SEARCH
	LAC PACKS+1		/BYPASS 2 WORDS
	SZA		/IF 2ND WORD NONFILE
	JMP SPSTF
	JMS SEARCH		/SEARCH 2 WORD S/T
	LAC PS2END
	LAC PS2SZE
	LAC AD08		/PACKS
L1	1
	JMP SPSTE		/FOUND
SPSTF	JMS SEARCH		/SEARCH 3 WORD S/T
	LAC PS3END
	LAC PS3SZE
	LAC AD08		/PACKS
L2	2
	JMP SPSTC		/FOUND
	JMP NOTPST		/NOT FOUND
SPSTE	LAW -1
	TAD MRGLOC		/SUBTRACT 1 FROM MRGLOC
	DAC MRGLOC		/FOR 2 WORD SYMBOLS
SPSTC	JMS CKPFV
	DZM CREL
SPSTB	JMS SYMVAL		/PICK UP SYMBOL VALUE
	LAC CHRHLD
	SAD L52	/*
	JMP CKMRI	/CHECK FOR MEMORY REFERENCE INSTR
ABSREL	JMP ARITHOP
CKMRI	CLC	/BYPASS GETTING
	DAC BYPASS	/NEXT CCHAR
	JMS GETCHR
	JMS CHRLKP	/CHECK FOR SPACE, TAB
	007774	/; OR CAR. RET.
	JMP CKOPCD	/FOUND
	SAD (51	/)
	SKP
	JMP ABSREL
	LAC L40	/CHANGE ) TO SPACE
	DAC CHRHLD
/
/CHECK IF SYMBOL IS A MEMORY REFERENCE INSTRUCTION
/
CKOPCD	CLL
	LAC NUMBR
	TAD (177777
	SZL
	JMP INDER	/NOT A MEMORY REFERENCE
	LAC NUMBR
	XOR L20000	/SET INDIRECT BIT
	DAC NUMBR
	JMP ABSREL
INDER	JMS SETFLG	/S TO FLAG WORD
	000020
	JMP ABSREL

NOTPST	LAC MRGSAV	/RESTORE MERGING LOCATION
	DAC MRGLOC
	XCT PASSNO		/WHICH PASS
	JMP P1SP	/PASS 1
	LAC FNDSW	/WAS IT IN USER'S TABLE
	SPA	/NO
	JMP P2FND
	JMS SETFLG	/E TO FLAG WORD
	020000
	DZM NUMBR
	JMP ENDFLD
P2FND	DZM FNDSW
	LAC* MRGSAV
	JMS GETREL		/PICK UP RELOCATION
	JMS MRGP1		/CHECK FOR UNDEFINED
	AND JMPLIT
	SZA
	JMP CKVT		/CHECK FOR VIRTUAL
	JMS SETFLG	/U TO FLAG WORD
L10	000010
	JMP VAL15
CKVT	SPA
	JMP CKMD		/CHECK FOR MULTIPLE DEFINITION
	CLC
	DAC EXTSW	/SET EXT SWITCH
	JMP VAL15	/PICK UP VALUE
CKMD	JMS MRGP1
	AND LACLIT
	SNA
	JMP VAL15
	JMS SETFLG	/D TO FLAG WORD
	040000
VAL15	JMS SYMVAL	/PICK UP SYMBOL VALUE
	AND (77777	/MASK OUT CONTROL BITS
	DAC NUMBR
	JMP ARITHOP
/
/LOOK UP SYMBOL IN USER'S TABLE
/
USTLKP	0
	LAC AD08		/PACKS
	JMS SQOZE		/CONVERT SYMBOL TO RADIX 50
	JMS SRCUST		/SEARCH USER TABLE
	JMP* USTLKP	/FOUND
	ISZ USTLKP
	JMP* USTLKP	/NOT FOUND
/
/PASS 1 SYMBOL PROCESSING
/
P1SP	LAC FNDSW	/FOUND IN USER'S TABLE
	SPA	/NO
	JMP P1FND	/YES
	CLC
	DAC NCD	/NOT COMPLETELY DEFINED
	JMS SRCUST	/SEARCH USER TABLE
	NOP
	JMS MERGE	/MERGE IN NEW SYMBOL
	LAW -2	/GET TABLE ADDRESS
	TAD* L11	/OF MERGED SYMBOL
	DAC MRGLOC
	LAC VARSW	/IS PACKS A VARIABLE
	SPA	/NO
	JMP FLGVAR
	ISZ UNDCTR	/UPDATE UNDEFINED SYMBOL COUNT
	JMP ENDFLD

IFEXP	DZM NUMBR
	JMS USTLKP	/LOOK UP SYMBOL
	JMP IFXPA		/FOUND
	CLC
	DAC NCD		/NOT FOUND
	JMP ARITHOP
IFXPA	LAC* MRGLOC
	SMA		/P/A
	JMP IFXPB
	JMS SYMVAL	/PICK UP 18 BITS
	JMP ARITHOP
IFXPB	JMS SYMVAL
	AND (77777	/PICK UP 15 BITS
	DAC NUMBR
	JMP ARITHOP
/
/FLAG VARIABLE SYMBOL
LAWM2=.
/
FLGVAR	LAW -2
	DAC CTR
	ISZ MRGLOC
	LAC* MRGLOC
	AND (377777
	XOR XCTLIT	/SET BIT 0 OF WORDS
	DAC* MRGLOC	/2 AND 3 OF ENTRY
	ISZ CTR#	/TO VARIABLE
	JMP FLGVAR+2
	LAC* MRGLOC
	AND IOTLIT	/PUT PC IN WORD 3
	XOR PC	/FOR MULTIPLE DEFINITION
	DAC* MRGLOC	/ERROR PRINTOUTS
	ISZ VARCTR	/UPDATE VARIABLE COUNT
	DZM VARSW
	JMP ENDFLD
/
/SYMBOL FOUND IN PASS 1
/
P1FND	DZM FNDSW	/RESET FOUND SWITCH
	LAC VARSW	/PACKS A VARIABLE
	SPA	/NO
	JMP P1VAR	/YES
	LAC* MRGSAV
	JMS GETREL		/GET RELOCATION
	JMS MRGP1		/IF SYMBOL IN TABLE
	AND XCTLIT	/IS NOT A VARIABLE
	SNA	/OR UNDEFINED, PICK
	JMP NOVAL	/UP ITS VALUE
	ISZ MRGSAV
	LAC* MRGSAV
	AND XCTLIT
	SNA
	JMP VAL15	/PICK UP 15 BITS OF VALUE
NOVAL	CLC
	DAC NCD
	JMP ENDFLD
/
/VARIABLE ENCOUNTERED IN PASS 1 AND SYMBOL FOUND IN TABLE
/
P1VAR	ISZ MRGSAV
	DZM VARSW
	CLC
	DAC NCD
	LAC* MRGSAV
	AND JMPLIT
	SZA		/CHECK FOR UNDEFINED
	JMP P1EXT	/OR EXTERNAL
	LAW -1	/IF UNDEFINED, DECREMENT
	TAD UNDCTR	/UNDEFINED COUNT AND
	DAC UNDCTR	/MARK SYMBOL AS A VARIABLE
	JMP FLGVAR
P1EXT	SAD LACLIT	/CHECK FOR EXTERNAL
	SKP
	JMP RDNTV	/CHECK FOR REDUNDANT VARIABLE
	LAC EXTCTR
	TAD LAWM1	/IF EXTERNAL, DECREMENT
	DAC EXTCTR	/EXTERNAL COUNT AND
	JMP FLGVAR	/MARK SYMBOL AS A VARIABLE

RDNTV	JMS MRGP1
	SPA
	JMP ENDFLD	/REDUNDANT VARIABLE
	AND L57S
	XOR LACLIT	/SET MULTIPLE DEFINITION FLAG
	DAC* MRGSAV
	LAC AD08	/PACKS
	JMS MDER	/PRINT MULTIPLE DEFINITION
	JMP ENDFLD

/
/END OF LINE (OR WORD) PROCESSING
/
ENDLNE	LAC NDIL	/ANY DATA IN LINE
	SPA	/YES
	JMP COMT	/NO, COMMENT PROCESSING
	.IFUND %F2
	LAC CONDSW		/CONDITIONAL SECTION
	SMA			/YES
	.ENDC
	JMP ENDLNA
	.IFUND %F2
	JMS SCNEND		/SCAN TO STATEMENT END
	LAC CHRHLD
	SAD L73			/;
	JMP SCNTAG		/NEXT TAG FIELD
	DZM MWDSTP
	JMS PRTP2		/PRINT LINE IF PASS 2
	JMP NXTLNE		/GET NEXT LINE
	.ENDC
ENDLNA=.
	.IFUND %F2
	LAC IFSW		/.IF SWITCH
	SPA
	JMP IFRET			/RETURN TO .IF RTNE
	.ENDC
	LAW -2		/IF AREL > 1
	TAD AREL		/FLAG AS POSSIBLE
	SPA		/RELOCATION ERROR
	JMP ARELOK
	JMS SETFLG	/R TO FLAGWORD
	40
	LAC L1
	DAC AREL
ARELOK	LAC ENDSW	/PASS 2 .END
	SMA	/YES
	JMP CKLOC
	LAC FLDVAL	/SAVE .END
	DAC ENDVAL
	JMP DACWD
CKLOC	LAC LOCSW	/.LOC
	SMA	/YES
	JMP CKFTXT		/NO
	LAC FLDVAL	/OPERAND VALUE
	DAC PC	/REPLACES PC
	LAC AREL		/SET SUCCEEDING
	SZA		/INSTRUCTIONS TO SAME
	CLC		/RELOCATION AS .LOC OPERAND
	DAC SYMTYP
	JMP OUTPUT
/
/CHECK FOR TEXT LINE
/
CKFTXT	LAC TEXTSW
	SMA
	JMP CKLFP
	LAC AD09	/TEXT LOCATION - TXTBF
	DAC TXTLOC#
	LAC TXTBF
	DAC WRDVAL
	JMP CKFTG	/CHECK FOR TAG
CKLFP	LAC SZESW		/.SIZE
	SMA
	JMP CKLFP2
	DZM SZESW
	LAC SYMSAV
	SPA
	LAC L1
	DAC AREL
	LAC PRGSZE	/PICK UP PROG SIZE
	DAC WRDVAL
	DZM BITS#		/0 = 15 BITS, -2 = 13 BITS
	JMP CKFTG		/CHECK FOR TAG
CKLFP2	LAW -2
	DAC BITS		/13 BITS
	LAC FLDSW
	SMA
	JMP CKLFP5
	LAC FLDVAL
	SNA
	JMP CKLFP3
	LAC OPVAL
	SZA
	JMP CKLFP1
	LAC NULOPF
	SMA
	JMP CKLFP1
	DZM BITS
	JMP CKLFP4
CKLFP5	DZM BITS
	JMP CKLFP1
CKLFP3	LAC OPVAL
	DAC FLDVAL
	LAC NULOPF
	SPA
	DZM BITS
CKLFP4	DZM FLDSW
CKLFP1	LAC FLDSW	/CHECK LAST FIELD PROCESSED
	SPA
	JMP WRDEVL
	LAC FLDVAL
	JMP DACWD

/
/COMPUTE WORD VALUE BY COMBINING
/OP FIELD AND ADDRESS FIELD VALUES
/
WRDEVL	LAC OPVAL	/OPERATION FIELD VALUE
	TAD FLDVAL	/ADDRESS FIELD VALUE
	AND (17777
	DAC WRDVAL	/WORD VALUE
LAWLIT	LAW
	AND OPVAL
	TAD WRDVAL
DACWD	DAC WRDVAL
/
/CHECK FOR POSSIBLE MEMORY BANK ERRORS
/
	LAC FLDSW
	SMA!CLL
	JMP LITRLS	/NO ADDRESS
	LAC OPVAL
	SNA
	JMP LITRET		/OP VAL IS ZERO
	TAD DZMLIT
	SZL
	JMP LITRLS
LITRET	LAC AREL		/ABS OR REL
	SZA		/ABS
	JMP BCKREL	/REL
	LAC FLDVAL
	AND (60000	/IF BANK BITS ARE
	DAC TMP	/NOT 00 COMPARE THEM
	SNA	/AGAINST PC'S BANK BITS
	JMP CKFER
	LAC PC
	AND (60000
	XOR TMP
	SNA
	JMP LITRLS
	JMP BNKER
BCKREL	LAW	/IF A REL ADDRESS IS
	TAD FLDVAL	/>17777, IT'S AN ERROR
	SPA
	JMP CKFER
BNKER	JMS SETFLG	/B TO FLAG WORD
	200000
	JMP LITRLS
/
/CHECK FOR POSSIBLE ERRONEOUS RESULTS
/
CKFER	LAC FLDVAL	/IF ADDRESS "ANDED"
	AND LAWLIT	/WITH 760000 DOES
	SAD LAWLIT	/NOT=0 OR 760000
	JMP LITRLS	/THEN ITS AN ERROR
	SNA
	JMP LITRLS
	JMS SETFLG	/E TO FLAG WORD
L20000	20000
/
/LITERAL PROCESSING
/
LITRLS	LAC LITSW	/IS THERE A LITERAL
	SMA	/YES
	JMP CKFTG	/NO
	DZM LITSW
	XCT PASSNO		/WHICH PASS
	SKP
	JMP LTP2	/PASS 2 LITERAL PROCESSING

/
/PASS 1 LITERAL PROCESSING
/
	LAC NCD	/IS IT COMPLETELY DEFINED
	SPA	/YES
	JMP NCDP1	/NO
	LAC WRDVAL
	DAC LITIN+2	/PICK UP LITERAL VALUE
	DZM LITIN+1
	LAC AREL	/GET RELOCATION
	SNA
	JMP NCDP1A
	ISZ LITIN+1	/SET LIT ADDRESS RELOCATABLE
			/13 BITS
	LAC BITS
	SMA
	ISZ LITIN+1		/REL 15 BITS
NCDP1A	LAC LITCTR		/IS IT THE FIRST ENTRY
	SZA	/YES
	JMP RDNCK	/NO, SEE IF IN TABLE
	JMP MRGLIT
NCDP1	LAC PC	/REFERENCING LOCATION
	DAC LITIN+2	/USED INSTEAD OF VALUE
	CLC
	DAC LITIN+1
/
/MERGE LITERAL INTO USER SYMBOL TABLE
/
MRGLIT	LAW 10000	/LITERAL INDICATOR
	TAD LITCTR	/AND COUNT TO
	DAC LITIN	/FIRST WORD OF LITERAL
	JMS SEARCH	/USE SEARCH ROUTINE
	LAC USTEND		/TO INITIALIZE THE
	LAC USTSZE	/MERGE ROUTINE
	LAC AD44		/LITIN
	2
	NOP
	JMS MERGE	/MERGE IN LITERAL
	ISZ LITCTR	/UPDATE LITERAL COUNT
	JMP CKFTG

/
/CHECK IF LITERAL IS ALREADY IN TABLE
/
RDNCK	JMS LITBEG	/GET LITERAL
	ISZ* L10	/STARTING POSITION
RDC4	LAC* 10	/COMPARE WORD 3
	SAD LITIN+2
	JMP RDC1
RDC3	ISZ CTR
	JMP RDC2
	JMP MRGLIT	/NOT FOUND, MERGE CURRENT
RDC1	JMS ALTA		/ADJUST ADDRESS
	SAD LITIN+1	/CHECK WORD 2
	JMP CKFTG	/LITERAL ALREADY IN
	ISZ* L10
	JMP RDC3
RDC2	ISZ* L10	/UPDATE FOR NEXT COMPARE
	ISZ* L10
	JMP RDC4
/
/PASS 2 LITERAL PROCESSING
/
LTP2	JMS LITBEG	/PERFORM STARTING
	ISZ* L10	/ADDRESS SEARCH
	LAC* L10
	DAC TMP
	LAC CTR
	DAC TMP1
LTP2A	LAC* 10	/CHECK IF NOT COMPLETELY
	SAD PC	/DEFINED IN PASS 1
	JMP LTP2C
LTP2B	ISZ CTR
	JMP LTP2J
	JMP LTP2D
LTP2J	ISZ* L10
	ISZ* L10
	JMP LTP2A
/
/PC FOUND, CHECK PREV. WORD FOR NCD
/
/
LTP2C	JMS ALTA
	SMA
	SKP	/IT'S A C/D LITERAL
	JMP LTP2E	/SO CONTINUE
	ISZ* L10
	JMP LTP2B

LTP2D	LAC TMP
	DAC* L10
LTP2G	LAC* 10
	SAD WRDVAL	/CHECK LITERAL VALUE
	JMP LTP2F	/AGAINST TABLE VALUE
LTP2H	ISZ TMP1
	JMP LTP2K
	JMS SETFLG	/L TO FLAG WORD
	002000
	DZM WRDVAL
	JMP CKFTG
LTP2F	JMS ALTA
	DAC TMP
	LAC AREL
	SZA		/ABS
	JMP LTP2N
	LAC TMP
	SNA
	JMP LTP2L		/LITERAL IS ABSOLUTE
	JMP LTP2M		/NOT THE SAME
LTP2N	LAC TMP
	SNA
	JMP LTP2M		/NOT THE SAME
	SAD L1
	JMP LTP2P
	LAC BITS
	SMA
	JMP LTP2L		/15 BITS RELOCATABLE
	JMP LTP2M
LTP2P	LAC BITS
	SMA		/13 BITS RELOCATABLE
	JMP LTP2M
	JMP LTP2L
LTP2M	ISZ* L10
	JMP LTP2H
LTP2L	ISZ* L10
	LAC* L10
	DAC TMP
	JMP LTP2I
LTP2K	ISZ* L10
	ISZ* L10
	JMP LTP2G
LTP2E	LAC* L10
	DAC TMP
	LAC AREL	/RELOCATION IND
	DAC* TMP	/INTO WORD 2
	SNA
	JMP LTP2Q
	LAC BITS
	SNA
	ISZ* TMP
LTP2Q	ISZ TMP
	LAC WRDVAL	/VALUE INTO
	DAC* TMP	/WORD 3
LTP2I	LAW -2
	TAD TMP
	DAC TMP
	LAC* TMP
	AND (7777	/LITERAL NUMBER
	TAD LITLOC#	/ADDED TO LITERAL STARTING
	DAC FLDVAL
	DAC WRDVAL	/LOCATION
	DZM AREL
	LAC SYMSAV	/LITERAL RELOCATABILITY
	SZA
	ISZ AREL
	DZM BITS
	LAC OPSVSW
	SMA
	JMP CKFTG
/
/IF THE SAVED OPVAL IS 0, THE LINE MUST BE SOMETHING LIKE
/  .DSA (ADDRESS  WHERE ADDRESS MUST BE RELOCATED TO 15 BITS.
/
	LAC NULOPF
	SZA		/IF NON 0 REL TO 13 BITS.
	JMP CKFTG	/15 BITS.
	LAW -2
	DAC BITS
	DZM OPSVSW
	LAC WRDVAL
	AND (17777
	XOR OPSAV		/ADD OP CODE TO
	DAC WRDVAL		/LITERAL STARTING LOC
	JMP LITRET
LITIN	0;	0;	0
/
/END OF LITERAL PROCESSING
/
CKFTG	LAC PACKT	/WAS THERE A TAG
	SZA	/NO
	JMP PRTGPA	/YES
	LAC PASW	/IS LINE A PARAMETER ASSIGNMENT
	SMA	/YES, THEN IT'S AN ERROR
	JMP OUTPUT
FLAGPA	JMS SETFLG	/A TO FLAG WORD
	400000
BLDPI=.
OUTPUT	XCT PASSNO		/WHICH PASS
	JMP INCPC	/PASS 1
	SKP
/
/*** BUILD PRINTING IMAGE ***
/
/
/BUILD ERROR FLAG WORD
/
BEFWD	0
	LAW -22
	DAC CTR
	LAC AD10		/FLAGS+6
	JMS P57INT
	LAC FLGWD	/ERROR FLAG WORD
	DAC FLGSAV#

	SNA
	JMP GTLCTN	/NO ERRORS
	ISZ ERLNCT		/UPDATE ERROR LINE COUNT
TNXBT	CLL
	LAC FLGWD	/ERROR WORD
	RAL	/BITS INTO LINK
	DAC FLGWD
	SZL
	JMP GTERCH	/PICK UP ERROR CHARACTER
NXER	ISZ CTR
	JMP TNXBT	/CHECK NEXT BIT
	JMP GTLCTN	/FINISHED
GTERCH	LAC (LAC ERTBL+1
	TAD CTR
	DAC .+1
	0
	JMS PACK57	/5/7 PACKING ROUTINE
	JMP NXER
/
/ERROR FLAG TABLE
/
	101	/A
L102	102	/B
L103	103	/C
	104	/D
	105	/E
	106	/F
	111	/I
L114	114	/L
	115	/M
	116	/N
L120	120	/P
	121	/Q
	122	/R
L123	123	/S
	125	/U
	126	/V
	127	/W
ERTBL	130	/X
/
/BUILD LOCATION
/
	0
GTLCTN	LAC PASW	/BYPASS LOCATION
	SPA	/IF P/A
	JMP GETOBJ
	LAC ENDSW	/BYPASS IF .END
	SPA
	JMP GETOBJ
	LAC AD11		/LCTN
	JMS P57INT
	LAW -5
	DAC CTR
PCBIN	JMS BNOCT	/BINARY TO OCTAL
	LAC PC	/PC AS INPUT
	JMS PACK57	/5/7 PACKING
	ISZ CTR
	JMP PCBIN	/GET NEXT PC DIGIT

/
/GET TAG TYPE
/
	.IFUND %F2
	LAC BMODE	/BYPASS IF
	SZA	/NOT A RELOCATABLE 
	JMP GETOBJ	/PROGRAM
	.ENDC
	LAC SYMTYP	/CHECK INSTRUCTION TYPE
	SPA	/ABSOLUTE
	JMP RTYPE	/RELOCATABLE
	LAC (201010
	DAC TGTYP	/A
	LAC (120100
	DAC TGTYP+1
	JMP GETOBJ
RTYPE	LAC (201012
	DAC TGTYP	/R
	LAC (220100
	DAC TGTYP+1
/
/BUILD OBJECT CODE
/
GETOBJ	LAC LOCSW	/BYPASS IF
	TAD MCLSW		/MACRO CALL
	SPA	/.LOC PSEUDO-OP
	JMP LISTIT
	LAC BSSW	/OR .BLOCK
	SPA
	JMP GTADTP
	LAC AD33		/OBJCDE
	JMS P57INT
	LAW -6
	DAC CTR
OBJBN	JMS BNOCT	/BINARY TO OCTAL
	LAC WRDVAL	/WRDVAL AS INPUT
	JMS PACK57	/5/7 PACKING
	ISZ CTR
	JMP OBJBN	/GET NEXT WRDVAL DIGIT
/
/GET ADDRESS TYPE
/
GTADTP=.
	.IFUND %F2
	LAC BMODE
	SZA
	JMP LISTIT
	.ENDC
	LAC EXTSW	/CHECK FOR VIRTUAL
	SMA
	JMP NOEXT
	LAC (042500		/E
	DAC ADTYP
	JMP LISTIT
NOEXT	LAC AREL	/ACCUMULATED RELOCATION
	SZA
	JMP RADR
	LAC (040500	/A
	DAC ADTYP
	JMP LISTIT
RADR	LAC (051100	/R
	DAC ADTYP
LISTIT	JMS PRINT	/PRINT SUBROUTINE
	NOP

INCPC	LAC ENDSW	/.END
	SPA
	JMP BKTEND
	LAC MCLSW		/MACRO CALL
	SPA
	JMP MCLH
	LAC BSSW	/WAS LINE .BLOCK
	SMA	/YES
	JMP INCPC2
	LAC PC	/ADD .BLOCK VALUE TO PC
	TAD WRDVAL
	DAC PC
	CLC
	DAC LASW
	JMS CKFLLB
	.IFUND %F2
	JMS BLDBIN	/BUILD BINARY OUTPUT
	.ENDC
	DZM BSSW
	JMP CKMWD
INCPC2	LAC LOCSW	/CHECK FOR .LOC
	SMA
	JMP INCPC1
	CLC
	DAC LASW
	JMS CKFLLB	/LINK LOADER RTNE
	.IFUND %F2
	JMS BLDBIN	/BUILD BINARY OUTPUT
	.ENDC
	DZM LOCSW
	JMP CKMWD
INCPC1	LAC PASW	/IS LINE A P/A
	SPA	/NO
	JMP CKMWD	/YES
	JMS CKFLLB
	.IFUND %F2
	JMS BLDBIN	/BUILD BINARY OUTPUT
	.ENDC
	ISZ PC	/UPDATE PC BY 1
	LAC TEXTSW		/TEXT SWITCH ON
	SMA	/YES
	JMP CKRPT
	ISZ TXTCTR	/FINISHED OUTPUTTING IT
	SKP	/NO
	JMP TXTND
	ISZ TXTLOC	/UPDATE FOR NEXT TEXT WORD
	LAC* TXTLOC
	DAC WRDVAL
	LAC (064000
	DAC MWDSTP
	JMP OUTPUT	/OUTPUT IT
TXTND	DZM TEXTSW	/RESET SWITCH
CKRPT=.
	.IFUND %F2
	LAC RPTSW		/REPEAT ON
	SMA		/YES
	.ENDC
	JMP CKMWD		/NO
	.IFUND %F2
	ISZ RPTCTR
	SKP
	JMP RPTND		/FINISHED .REPT
	LAC WRDVAL
	TAD RPTINC	/ADD INCREMENT TO
	DAC WRDVAL	/CURRENT VALUE
	LAC (252452
	DAC MWDSTP
	LAC (052032	/*RPT
	DAC MWDSTP+1
	JMP OUTPUT
RPTND	DZM RPTSW		/RESET SWITCH
	.ENDC
CKMWD	LAC PC
	CMA
	TAD CHVPC
	SMA
	JMP CKMWD1
	LAC PC		/CURRENT HIGH
	DAC CHVPC		/VALUE OF PC
CKMWD1	LAC CHRHLD	/CHECK FOR MULTIWORD LINE
	SAD L73	/;
	SKP
	JMP NXTLNE
	LAC (064000	/C/R TO MIDDLE OF
	DAC MWDSTP	/PRINT BUFFER
	JMP SCNTAG	/SCAN TAG FIELD
/MACRO9  TAPE 3
/
/PROCESSING OF TAG OR PARAMETER ASSIGNMENT
/
PRTGPA	LAC AD06		/PACKT
	JMS SQOZE		/TO SQOZED FORM
	LAC PASW	/IS IT A PARAMETER ASSIGNMENT
	SMA	/YES
	JMP PRCTAG	/NO, IT'S A TAG
/
/PARAMETER PROCESSING
/
	XCT PASSNO
	SKP
	JMP PAFR
	LAC NCD	/IS P/A A FWD REF
	SMA	/YES
	JMP PAFR
	DZM NCD
	JMS PRTSOH	/PRINT IN PASS1
MOD19A	RDBUF+1
	1
PAFR	LAC WRDVAL	/GET PARAMETER VALUE
	DAC SQZOUT+2
	LAC SQZOUT
	AND (177777
	XOR XCTLIT
	DAC SQZOUT	/SET PA AND ABS BITS
	LAC AREL
	SNA
	JMP STLCL
	LAC SQZOUT
	XOR LACLIT
	DAC SQZOUT	/SET PA AND REL BITS
	JMP STLCL
/
/TAG PROCESSING
/
PRCTAG	LAC PC	/PC IS VALUE
	DAC SQZOUT+2	/FOR THE SYMBOL
	LAC SQZOUT
	AND (177777
	DAC SQZOUT	/SET ABS
	LAC SYMTYP
	SMA
	JMP STLCL
	LAC SQZOUT
	XOR LACLIT	/SET REL
	DAC SQZOUT
STLCL	LAC SQZOUT+1	/SET SYMBOL AS LOCAL
	AND (177777
	XOR XCTLIT
	DAC SQZOUT+1
	JMS SRCUST		/SEARCH USER TABLE
	JMP TPAF
	XCT PASSNO
	SKP		/NOT FOUND IN PASS 2
	JMP P2NF
	JMS MERGE	/NOT FOUND, MERGE IT IN
	JMP BLDPI	/BUILD PRINT IMAGE
P2NF	JMS SETFLG	/P TO FLAG WORD
	000200
	JMP BLDPI
/
/TAG OR P.A. FOUND
/
TPAF=.
	.IFUND %F2
	JMS CKMAC		/IS TABLE ENTRY A MACRO
	JMP TPAF1		/NO
	JMS SETFLG	/X TO FLAGWORD
	1
	JMP BLDPI
	.ENDC
TPAF1	XCT PASSNO		/WHICH PASS
	SKP		/PASS 1
	JMP TPAFP2	/PASS 2
	LAC MRGLOC
	DAC MRGSAV
	JMS MRGP1		/GET 2ND WORD OF SYMBOL
	AND JMPLIT
	DAC TMP	/SAVE CONTROL BITS
	SZA
	JMP CKVRT	/CHECK FOR VIRTUAL
	LAW -1	/IF UNDEFINED IN TABLE
	TAD UNDCTR	/CHANGE TO LOCAL
	DAC UNDCTR
	JMP MRGSMB	/MERGE IN NEW VALUES
CKVRT	SPA
	JMP CKVART
	LAW -1	/CHANGE VIRTUAL IN
	TAD EXTCTR	/TABLE TO INTERNAL
	DAC EXTCTR
	LAC SQZOUT+1
	XOR LACLIT
	DAC SQZOUT+1
	JMP MRGSMB	/MERGE IN NEW VALUES
CKVART	JMS MRGP1		/IS ENTRY A VARIABLE
	SMA	/YES
	JMP MODCB	/NO
	LAC PASW	/IS SYMBOL A P.A.
	SPA	/NO
	JMP BLDPI
LAWM1	LAW -1
	TAD VARCTR	/SUBTRACT FROM VARIABLE COUNT
	DAC VARCTR
	LAC SQZOUT+2
	AND (77777
	XOR LACLIT	/SET MULTIPLE DEFINITION
	DAC SQZOUT+2
	LAC AD06		/PACKT
	JMS MDER	/PRINT ERROR
	JMP MRGSMB	/MERGE INTO SYMBOL TABLE
MODCB	LAC SQZOUT+1
	AND (177777
	XOR TMP
	DAC SQZOUT+1	/APPEND NEW CONTROL BITS
	LAC* MRGLOC	/IS TABLE SYMBOL A P/A
	SPA	/NO
	JMP MRGSMB	/YES
	LAC PASW	/IS CURRENT SYMBOL A P/A
	SPA	/NO
	JMP BLDPI
	LAC* MRGSAV
	AND L57S
	XOR LACLIT
	DAC* MRGSAV	/FLAG SYMBOL AS A
	LAC AD06
	JMS MDER	/PRINT ERROR
	JMP BLDPI	/MULTIPLE DEFINITION
/
/TAG OR P.A. FOUND IN TABLE
/DURING PASS 2
/
TPAFP2	LAC PASW	/IS CURRENT A P.A.
	SMA	/YES
	JMP CKVAR2
	LAC* MRGLOC	/IS TABLE ENTRY A PA
	SPA	/NO
	JMP MRGSMN	/YES, MERGE NEW VALUE
	JMP FLAGPA	/FLAG AS A P.A. ERROR
CKVAR2	JMS WRD3
	LAC* MRGLOC
	RAL	/CHECK FOR MULTIPLE
	SMA	/DEFINITION OF SYMBOL
	JMP CKPHSE
	JMS SETFLG
	001000	/M TO FLAG WORD
	JMP BLDPI
/
/CHECK PHASING
/
CKPHSE	LAC* MRGLOC
	AND (77777	/COMPARE PASS 1
	SAD PC	/AND PASS 2 VALUES
	JMP BLDPI
	JMS SETFLG	/P TO FLAG WORD
L200	000200
	JMP BLDPI	/BUILD PRINT IMAGE
MRGSMN	LAC MRGLOC
	DAC TMP		/SAVE GLOBL
	ISZ TMP		/INDICATOR
	LAC* TMP
	AND LACLIT
	XOR SQZOUT+1
	DAC SQZOUT+1
/
/MERGE IN NEW VALUES INTO SYMBOL TABLE
/
MRGSMB	LAC SQZOUT
	DAC* MRGLOC	/WORD 1
	ISZ MRGLOC
	LAC SQZOUT+1
	DAC* MRGLOC	/WORD 2
	ISZ MRGLOC
	LAC SQZOUT+2
	DAC* MRGLOC	/WORD 3
	JMP BLDPI
	.IFUND %F2
/
/CHECK SYMBOL TABLE ENTRY FOR MACRO
/
CKMAC	0
	LAC* MRGLOC
	SPA
	JMP* CKMAC	/PARAMETER ASSIGNMENT
	LAC MRGLOC
	DAC TMP
	ISZ TMP
	ISZ TMP
	LAC* TMP
	AND JMSLIT
	SZA		/IS ENTRY A MACRO
	ISZ CKMAC		/YES
	JMP* CKMAC	/NO
	.ENDC
/
/*** PSEUDO-OP ROUTINES ***
/
/*** .EJECT ***
/
.EJECT	CLC
	DAC EJCTSW		/SET SWITCH
	JMP PRPOP
/
/*** .OCT ***
/
.OCT	DZM RADIX		/SET OCTAL RADIX
	JMP PRPOP
/
/*** .DEC ***
/
.DEC	CLC		/SET DECIMAL RADIX
	DAC RADIX
	JMP PRPOP
/
/*** .LOC ***
/
.LOC	CLC
	DAC LOCSW		/SET .LOC INDICATOR
	JMP SCNADR	/GET ITS VALUE
/
/*** .BLOCK ***
/
.BLOCK	CLC
	DAC BSSW		/SET .BLOCK INDICATOR
	JMP SCNADR	/GET ITS VALUE
/
/***.DSA ***
/
.DSA	LAC FLDSW
	SPA
	JMP ENDFLD
	CLC
	DAC NULOPF		/NULL OPFIELD
	JMP ENDFLD
/
/*** .SIZE ***
/
.SIZE	CLC
	DAC SZESW		/SET SIZE SWITCH
	JMS SCNEND
	JMP ENDLNE
/
/*** .IODEV ***
/
.IODEV	JMS ARG		/SEARCH
	JMP PRPOP		/NO ARGUMENT
	JMP ARGN		/NUMERIC
	.IFUND %F2
	LAC BMODE		/WHAT TYPE OUTPUT
	SZA
	JMP IODVC			/NON LINK LOADER
	.ENDC
	JMS NUMEVL		/NUMBER EVALUATION ROUTINE
	LAC OPRTR
	SAD L55			/CHECK FOR NEGATIVE NUMBER
	SKP
	JMP IODVB
	LAC NUMBR
	JMS TWOS		/COMPLEMEMT NUMBER
	DAC NUMBR
IODVB	LAC NUMBR
	AND (777
	DAC LLBWRD		/9 BITS TO DATA WORD
	LAC (26			/CODE WORD
	DAC LLCODE
	JMS BLDLLB		/BUILD LINK LOAD BINARY
IODVC	LAC CHRHLD
	SAD (54			/CHECK FOR ,
	JMP .IODEV		/GET NEXT
	JMP PRPOP			/EXIT
/
/*** .GLOBL ***
/
.GLOBL	JMS ARG		/ARGUMENT SEARCH
	JMS PRPOP		/NO ARGUMENT
	JMP ARGS		/SYMBOL ARGUMENT
	XCT PASSNO		/WHICH PASS
	SKP		/PASS 1
	JMP TGBEND
	JMS USTLKP		/SEARCH USER TABLE
	JMP GBFTB	/FOUND
	LAC SQZOUT+1	/NOT FOUND
	XOR LACLIT
	DAC SQZOUT+1	/SET SYMBOL EXTERNAL
	JMS MERGE	/MERGE INTO TABLE
INCXT	ISZ EXTCTR	/UPDATE EXTERNAL COUNT
	JMP TGBEND
GBFTB	ISZ MRGLOC
	LAC* MRGLOC
	AND JMPLIT	/SYMBOL UNDEFINED
	SZA	/YES
	JMP GBLNU	/NO
	LAC* MRGLOC
	XOR LACLIT	/CHANGE TO EXTERNAL
	DAC* MRGLOC
	LAW -1	/SUBTRACT 1 FROM
	TAD UNDCTR	/UNDEFINED COUNT
	DAC UNDCTR
	JMP INCXT
GBLNU	LAC* MRGLOC
	AND L57S
	XOR LACLIT
	DAC* MRGLOC
TGBEND	LAC CHRHLD
	SAD (54	/,
	JMP .GLOBL	/GET NEXT SYMBOL
	JMP PRPOP	/END OF .GLOBL
	.IFUND %F2
/
/*** .REPT ***
/
.REPT	JMS ARG		/PICK UP REPEAT COUNT
	JMP PRPOP		/NO COUNT
	JMP ARGN
	JMS NUMEVL	/NUMBER EVALUATION
	LAC NUMBR
	SNA
	JMP PRPOP		/NUMBER IS 0
	JMS TWOS
	DAC RPTCTR#	/REPEAT COUNT
	DZM RPTINC#	/INCREMENT
	CLC
	DAC RPTSW		/SET REPEAT SWITCH
	JMS ARG
	JMP PRPOP		/0 INCREMENT
	JMP ARGN
	JMS NUMEVL
	LAC NUMBR
	DAC RPTINC
	LAC OPRTR
	SAD L55		/-
	SKP
	JMP PRPOP
	LAC NUMBR		/COMPLEMENT NEGATIVE INCREMENT
	JMS TWOS
	DAC RPTINC
	JMP PRPOP
/
/*** .FULL ***
/
.FULL	LAC PC	/IF PC IS NOT 0
	SNA	/DO NOT ACCEPT IT
	JMP .+4
	JMS SETFLG	/I TO FLAG WORD
	4000
	JMP PRPOP
	DZM SYMTYP	/SET SYMBOLS ABSOLUTE
	LAC L2	/SET FULL MODE
	DAC BMODE
	JMP PRPOP
	.ENDC
/
.EOT	CLC
	DAC EOTSW
	XCT PASSNO		/WHICH PASS
	JMP .+3
	JMS PRINT			/PRINT .EOT
	JMS EJECT			/SKIP TO HEAD OF FORM
	LAC BNOPTN		/BINARY REQUESTED
	SMA			/YES
	JMP .+3			/NO
/
	CAL+765		/.WAIT FOR BINARY OUTPUT DEVICE
	12
/
/TYPE EOT MESSAGE
/
	CAL+2775
	11
MOD26	EOTMSG
LITNO	472360
/
	LAC AD05		/NEWTAP
EOTMSG	DAC POWA
	JMP POW
	.ASCII	/ EOT/<15>
	.IFUND %F2
/
/*** .ENDC ***
/
.ENDC	LAC CONDSW	/ANY IFS OUTSTANDING
	SMA		/YES
	JMP PRPOP		/IGNORE
	ISZ IFCTR		/.IF COUNT SATISFIED
	JMP PRPOP		/NO
	DZM CONDSW	/RESET CONDITIONAL SWITCH
	JMP PRPOP
	.ENDC
/
/*** .ASCII ***
/
.ASCII	CLC
	DAC TXTYP#	/SET ASCII
	LAC AD09		/INITIALIZE 5/7 PACKING - TXTBF
	JMS P57INT
	JMP .SIXBT+5
TXTBF	.BLOCK 32		/26 (10) LOCATIONS ALLOCATED FOR TEXT
/
/***.SIXBT***
/
.SIXBT	DZM TXTYP	/SET SIXBT
	LAC AD09	/TXTBF
	DAC PKLOC	/INITIALIZE 6 BIT PACKING
	DAC PKLOCA
	DZM CHRNUM
	CLC
	DAC TEXTSW		/SET TEXT SWITCH
	LAW -32
	DAC CTR
	LAC AD13	/TXTBF-1
	DAC* L10
	DZM* 10	/CLEAR TEXT BUFFER
	ISZ CTR
	JMP .-2
	JMS CHRLKP
	027776	/CHECK CURRENT FOR ; OR CR
	JMP PRPOP	/TREAT AS COMMENT
TXTBP	JMS GETCHR
	JMS CHRLKP
	007776	/BYPASS INITIAL SPACES OR TABS
	JMP TXTBP
	SAD L15	/CR
	JMP PRPOP	/TREAT AS COMMENT
TXTC	SAD (74	/<
	JMP TXTD	/EVALUATE <> VALUE
	JMS CKVLD	/CHECK CHARACTER VALIDITY
	SKP	/OK
	JMP TXTA
	DAC DLMTR#	/SAVE AS CURRENT DELIMITER
TXTA	JMS GETCHR
	SAD L15
	JMP TXTE	/TERMINATE TEXT
	JMS CKVLD	/CHECK VALIDITY
	SKP
	JMP TXTA
	SAD DLMTR	/IS IT THE DELIMITER
	JMP TXTB	/YES
TXTF	LAC TXTYP	/WHICH TYPE
	SPA	/SIXBT
	JMP TXASCI	/ASCII
	LAC CHRHLD
	JMS PACK	/6 BIT PACKING
	JMP TXTI	/GET NEXT
TXASCI	LAC CHRHLD
	JMS PACK57	/5/7 PACKING
	JMP TXTI	/GET NEXT
TXTB	JMS GETCHR
	JMS CHRLKP	/CHECK FOR SPACE OR TAB
	007776
	JMP TXTE
	SAD L15	/CR
	JMP TXTE
	JMP TXTC
TXTD	DZM ANGLVL#	/ANGLE BRACKET EVALUATION
TXTG	JMS GETCHR
	SAD (76	/>
	JMP TXTH
	SAD L15
	JMP TXTE
	JMS CKNUM		/0-9
	SKP		/YES
	JMP TXTN		/NO - ERROR
	LAC CHRHLD
	AND L10		/8 OR 9
	SNA		/YES
	JMP TXTP
TXTN	JMS SETFLG		/N TO FLAGWORD
	400
TXTP	LAC CHRHLD
	AND (7	/ACCUMULATE VALUE
	DAC CHRHLD	/OF <>
	CLL
	LAC ANGLVL
	RTL
	RAL
	XOR CHRHLD
	DAC ANGLVL
	JMP TXTG
TXTH	LAC ANGLVL
	DAC CHRHLD
	CLC
	DAC BRKSW
	JMP TXTF	/PACK THE VALUE
TXTI	LAC BRKSW	/WAS LAST < > VALUE
	SMA	/YES
	JMP TXTA	/NO
	DZM BRKSW	/RESET SWITCH
	JMP TXTB
/
/END OF TEXT ENCOUNTERED
/
TXTE	LAC TXTYP	/WHICH TYPE
	SPA	/SIXBT
	JMP TXTJ	/ASCII
	LAC AD13	/TXTBF-1
	JMS TWOS
	TAD PKLOCA	/DERIVED FROM PACKING
	JMS TWOS
	DAC TXTCTR#	/NUMBER OF SIXBT TEXT WORDS
	JMP TXTM	/PROCESS
TXTJ	LAC CTR57	/IF 5/7 CTR IS 0
	SNA	/SEE IF ANY DATA PACKED
	JMP TXTK
TXTL	LAC AD13	/TXTBF-1
	JMS TWOS
	TAD PK57AD
	JMS TWOS
	AND LAWM2	/FORCE EVEN AMOUNT
	DAC TXTCTR	/NUMBER OF ASCII WORDS
	JMP TXTM	/PROCESS
TXTK	LAC PK57AD
	SAD AD09	/TXTBF
	JMP TXTL
	TAD LAWM1	/SUBTRACT 1 FROM
	DAC PK57AD	/PK57AD
	JMP TXTL
TXTM	JMS SCNEND	/SCAN TO END OF LINE
	JMP ENDLNE
/
/CHECK TEXT CHARACTER VALIDITY
/
CKVLD	0
	LAW -40
	TAD CHRHLD
	SPA
	JMP NTVLD	/<40
	LAW -140
	TAD CHRHLD
	SPA	/>137
	JMP CKVLDA
NTVLD	ISZ CKVLD
	JMS SETFLG	/S TO FLAGWORD
	000020
CKVLDA	LAC CHRHLD
	JMP* CKVLD
/MACRO9  TAPE 4
/
	.IFUND %F2
/
/*** .ABS ***
/
.ABS	LAC PC 		/IF PC IS NOT 0
	SNA 		/DO NOT ACCEPT IT
	JMP .+4
	JMS SETFLG 	/I TO FLAG WORD
	4000
	JMP PRPOP
	DZM SYMTYP	/SET ABSOLUTE MODE
	LAC L1
	DAC BMODE		/SET ABS OUTPUT MODE
	XCT PASSNO		/WHICH PASS
	JMP PRPOP 	/PASS 1
	JMS ARG		/SEARCH FOR NLD
	JMP PNCHLD	/NO OPTION SPECIFIED
	JMP ARGS	/SYMBOL SEARCH
/
	LAC PACKS
	TAD PACKS+1
	SAD (161404	/NLD
	JMP PRPOP	/NO LOADER REQUESTED
	JMS SETFLG	/S TO FLAG WORD
	20
/
/PUNCH THE .ABS LOADER
/
PNCHLD	LAC BNOPTN		/BINARY REQUESTED
	AND BBFSIZ
	SMA			/YES
	JMP PRPOP			/NO
/
	CAL+4765		/PUNCH LOADER DUMP MODE
	11
MOD27	BINLDR
	ENDLDR-BINLDR\777777+1	/2'S W/C
	CAL+3765
	11			/PUNCH HRI WORD
MOD28	HRMWD
	-6
	JMP PRPOP			/PRINT PSEUDO OP
ABXEXT	.SIXBT /ABS/

/
/*** .IF ***
/
.IFZER	LAC LSZA		/ZERO
	JMP IFA
.IFPNZ	LAC (SPA!SNA	/POSITIVE AND NON ZERO
	JMP IFA
.IFPOZ	LAC LSPA		/POSITIVE OR ZERO
	JMP IFA
.IFNEG	LAC LSMA		/NEGATIVE
	JMP IFA
.IFNOZ	LAC LSZMA		/NEGATIVE OR ZERO
	JMP IFA
.IFNZR	LAC LSNA		/NON ZERO
	JMP IFA
.IFDEF	LAC LSPA		/DEFINED
	SKP
.IFUND	LAC LSMA		/UNDEFINED
	DAC CNDTN
	LAC (LAC NCD	/INIT TO PICK UP DEF IND
	DAC VALDEF
	JMP IFC
IFA	DAC CNDTN
	LAC (LAC FLDVAL	/PICK UP VALUE
	DAC VALDEF
	JMP IFC
IFC	LAC CONDSW		/CONDITIONALIZED SECTION
	SMA		/YES
	JMP IFE
	LAW -1
	TAD IFCTR		/UPDATE IF COUNTER
	DAC IFCTR
	JMS SCNEND
	DZM FLGWD		/CLEAR FLAG WORD
	JMP PRPOP
IFE	CLC
	DAC IFSW		/SET IF SWITCH
	JMP SCNADR	/GET EXPRESSION
/
/RETURN FROM EXPRESSION EVALUATION
/
IFRET	DZM IFSW
VALDEF	XX		/LAC FLDVAL OR NCD
CNDTN	XX		/SMA,SPA,SZA,ETC
	SKP		/CONDITION NOT SATISFIED
	JMP PRPOP

	CLC
	DAC CONDSW		/SET CONDITIONAL SWITCH
	DAC IFCTR#	/-1 TO COUNTER
	JMP PRPOP
	.ENDC
/
/*** .TITLE
/
.TITLE	XCT PASSNO
	JMP PRPOP
	JMS SCNEND
	LAW 17677		/CLEAR Q FLAG
	AND FLGWD
	DAC FLGWD

/
/PRINT THE PSEUDO-OP
/
PRPOP	JMS SCNEND 	/SCAN TO END OF LINE
	XCT PASSNO
	JMP NXWD
	LAC FLGWD 	/ANY ERRORS
	SZA 		/NO
	JMP POPER 	/YES
	JMS PRINT 	/PRINT THE LINE
	LAC EJCTSW
	SPA
	JMS EJECT
	JMP NXWD-1
POPER	LAC (JMP* BEFWD
	DAC GTERCH-1
	JMS BEFWD 	/BUILD FLAGS
	LAC (JMP GTLCTN
	DAC GTERCH-1
	JMS PRINT 	/PRINT THE LINE
	LAC EJCTSW
	SPA
	JMS EJECT
	DZM EJCTSW
NXWD	LAC CHRHLD
	SAD L15 		/OR LINE
	JMP NXTLNE 	/NEXT LINE
	JMP SCNTAG 	/NEXT TAG
/
/
.END	CAL+767		/.CLOSE THE SOURCE FILE
	6
	XCT PASSNO		/WHICH PASS
	SKP		/PASS 1
	JMP ENDPS2 	/PASS 2
	LAC SYMTYP 
	SMA
	JMP .+2
	LAC LACLIT
	DAC SYMSAV# 	/SAVE LAST RELOCATION IND
	LAC CHVPC	/CURRENT HIGH VALUE OF PC
	DAC VARLOC# 	/VARIABLES STARTING LOCATION
	TAD VARCTR
	DAC UNDLOC# 	/UNDEFINES STARTING LOCATION
	TAD UNDCTR
	DAC EXTLOC# 	/V.T. STARTING LOCATION
	DAC EXTLC1#
	TAD EXTCTR
	DAC LITLOC# 	/LITERALS STARTING LOCATION
	TAD LITCTR
	DAC PRGSZE# 	/PROGRAM SIZE
	LAC VARCTR 	/CHECK IF ANY VARIABLES,
	TAD UNDCTR 	/UNDEFINES OR EXTERNALS
	TAD EXTCTR 	/WERE ENCOUNTERED
	SNA
	JMP P1CMPL 	/PASS 1 COMPLETED

	CLL
	LAC USTSZE
	RAL
	TAD USTSZE
	JMS TWOS		/COMPUTE STARTING ADDRESS
			/OF SYMBOL TABLE
	TAD USTEND
	DAC USTBEG#
	LAC LITCTR
	JMS TWOS
	TAD USTSZE 	/SYMBOL TABLE SIZE - LITERAL
	JMS TWOS		/COUNT EQUALS NUMBER
			/OF SYMBOLS
	DAC SZECTR#
/
/COMPUTE VALUES FOR VARIABLES, UNDEFINES
/AND EXTERNALS
CVA	LAC USTBEG
	DAC SWD1# 	/WORD 1 OF SYMBOL
	TAD L1
	DAC SWD2# 	/WORD 2 OF SYMBOL
	TAD L1
	DAC SWD3# 	/WORD 3 OF SYMBOL
	LAC* SWD3
	AND JMSLIT	/BYPASS MACRO NAME
	SZA
	JMP CVE
	LAC* SWD1 	/BYPASS P/A
	SPA
	JMP CVE
	LAC* SWD2
	AND JMPLIT
	SZA 		/UNDEFINED
	JMP CVB
	LAC* SWD3
	AND IOTLIT
	XOR UNDLOC 	/UNDEFINED LOCATION VALUE
	DAC* SWD3
/
/PRINT UNDEFINED SYMBOL
/IN PASS 1
/
	JMS UNSQZE	/UNSQOZE THE SYMBOL
	LAW -6
	DAC USBCTR#
	LAC AD16		/WHERE CHARS ARE -UNSQZV-1
	DAC* L10
	LAC AD09		/USING TEXT BUFFER - TXTBF
	JMS P57INT
PUSA	LAC* 10
	JMS PACK57		/PACK THE SYMBOL NAME
	ISZ USBCTR
	JMP PUSA
	LAC L40			/SPACE
	JMS PACK57
	LAW -5
	DAC CTR
PUSB	JMS BNOCT			/BINARY TO OCTAL
	LAC UNDLOC		/UNDLOC AS INPUT
	JMS PACK57
	ISZ CTR
	JMP PUSB
	LAC L15			/CR
	JMS PACK57
	JMS PRTSOH
MOD29	TXTBF-1
	1
	LAW -2	/RESTORE USTBEG
	TAD USTBEG	/WHICH WAS UPDATED
	DAC USTBEG 	/IN UNSQOZE ROUTINE
	ISZ UNDLOC
	JMP CVC
CVB	SPA 		/EXTERNAL
	JMP CVD
	LAC* SWD3
	AND IOTLIT
	XOR EXTLC1 	/EXTERNAL LOCATION VALUE
	DAC* SWD3
	ISZ EXTLC1
	JMP CVC

CVD	LAC* SWD3
	SMA 		/VARIABLE
	JMP CVE
	AND IOTLIT
	XOR VARLOC 	/VARIABLE LOCATION VALUE
	DAC* SWD3
	ISZ VARLOC
CVC	LAC* SWD1
	AND L57S
	XOR SYMSAV	/LAST REL IND
	DAC* SWD1
CVE	ISZ SZECTR#
	SKP
	JMP P1CMPL 	/FINISHED VALUE COMPUTING
	ISZ USTBEG
	ISZ USTBEG 	/UPDATE FOR NEXT SYMBOL
	ISZ USTBEG
	JMP CVA
/
/PASS 1 COMPLETED
/
P1CMPL	CAL+2775	/PRINT PASS 1 COMPLETED
	11
MOD30	PS1MSG
L377	377
	LAC AD37	/PASS2
	DAC POWA
POW	LAC EOTSW	/EOT ENCOUNTERED IN PROGRAM
	SPA		/NO
	JMP POWD		/WAIT FOR CONTROL P
	LAC POWB		/IF BULK STORAGE DEVICE
	SAD L377
	JMP* POWA	/CONTINUE, ELSE WAIT FOR
POWD	CAL+2775		/WRITE ^P
	11
MOD30A	CNTRLP
LAWM4=.
CNTRLP	-4
	JMP .		/WAIT FOR ^P
PS1MSG	.ASCII	/^P/<175>
	.LOC .-1
L57S	577777
	.ASCII	/ END OF PASS 1/<15>
/
/END OF PASS 2
/
ENDPS2	CLC
	DZM ENDVAL#
	DAC ENDSW
	DZM FLDVAL
	LAC CHRHLD
	SAD L15
	JMP ENDLNE
	JMP SCNADR 	/GET OPERAND VALUE
/
/RETURN FROM .END ADDRESS SCAN
/
BKTEND	DZM ENDSW
	LAC ENDVAL
	SZA
	XOR JMPLIT 	/SET MINUS ADDRESS ALSO A JMP
	DAC ENDVAL

/
/PRINT AND OUTPUT EXTERNALS AND LITERALS
/
	LAC EXTLOC 	/CONTAINS START OF V.T.
	DAC WRDVAL
	DAC PC
	LAC (JMP* GTLCTN-1
	DAC LISTIT+1
	LAC EXTCTR 	/EXTERNAL COUNT
	SNA
	JMP LITOUT
	JMS TWOS
	DAC CTR1#
	CLC 		/SET EXTERNAL SWITCH
	DAC EXTSW
	LAC (252132
	DAC MWDSTP
	LAC (453032
	DAC MWDSTP+1
	CLC
	DAC EXLTSW
	.IFUND %F2
	LAC BMODE
	SZA
	JMP .+3
	.ENDC
	JMS NEWLA		/OUTPUT NEW LOAD ADDRESS
	.IFUND %F2
	SKP
	JMS BLDBIN
	.ENDC
	DZM EXLTSW
NXEXT	JMS GTLCTN-1 	/GO TO PRINT ROUTINE
	.IFUND %F2
	LAC BMODE
	SZA		/L/L OUTPUT
	JMP ABSEXT
	.ENDC
	LAC PC
	DAC LLBWRD	/PC IS DATA WORD
	LAC (4		/ABS
	DAC LLCODE
	LAC SYMTYP
	SPA
	ISZ LLCODE		/REL 15
	JMS BLDLLB
	.IFUND %F2
	SKP
ABSEXT	JMS BLDBIN	/BUILD BINARY OUTPUT
	.ENDC
	ISZ PC
	ISZ WRDVAL
	ISZ CTR1
	JMP NXEXT 	/GET NEXT EXTERNAL
	.IFUND %F2
	LAC BMODE
	SZA
	JMP LITOUT-1
	.ENDC
	LAC L2
	DAC IOVS
	JMS GIVS		/OUTPUT EXT SYMBOLS
/
/LITERAL OUTPUTTING AT END OF PASS 2
/
	DZM EXTSW
LITOUT	LAC LITCTR 	/LITERAL COUNT
	SNA
	JMP RSTRIT
	LAC (252311
	DAC MWDSTP
	LAC (152032
	DAC MWDSTP+1
	CLC
	DAC EXLTSW
	.IFUND %F2
	LAC BMODE
	SZA
	JMS BLDBIN
	.ENDC
	DZM EXLTSW
	JMS LITBEG 	/GET START OF LITERALS
	LAC CTR
	DAC CTR1 		/SAVE COUNT
	LAC* L10
	DAC* L12
	CLC
	DAC LASW
NXLIT	DZM AREL		/ABS
	LAW -2
	DAC BITS		/13 BITS REL
	LAC* 12
	SZA
	ISZ AREL
	AND L1
	SNA
	DZM BITS		/15 BITS REL
	LAC* 12 		/GET LITERAL VALUE
	DAC WRDVAL
	JMS GTLCTN-1 	/GO TO PRINT ROUTINE
	JMS CKFLLB
	.IFUND %F2
	JMS BLDBIN 	/BUILD BINARY OUTPUT
	.ENDC
	ISZ PC
	ISZ* L12
	ISZ CTR1
	JMP NXLIT 	/GET NEXT LITERAL
RSTRIT	LAC NOPLIT
	DAC LISTIT+1
/
/PRINT OUT NUMBER OF ERROR LINES
/ENCOUNTERED, IF ANY
/
	LAC ERLNCT		/ANY ERRORS
	SZA		/NO
	JMP ERRS1		/YES
	LAC LITNO		/NO
	DAC ERNMBR
	JMP ERRS2
ERRS1	JMS BINDEC		/BINARY TO DECIMAL
	LAC ERLNCT		/INPUT
	LAC AD38		/ERNMBR
	JMS P57INT
	LAC AD24		/DECOUT+2
	DAC* L10
	LAW -3
	DAC CTR
	LAC* 10
	JMS PACK57		/5/7 PACKING
	ISZ CTR
	JMP .-3
ERRS2	JMS PRTSOH		/PRINT THE MESSAGE
MOD30B	ERRLIN-1
	0

	LAC MOD3A+1	/IF LISTING REQUESTED
	SAD L42		/AND DEVICE IS THE TTY
	JMP ERRS3		/OMIT 2ND ERROR PRINTOUT
	CAL+2775
	11
MOD30C	ERRLIN
L42	42
ERRS3	CLC
	DAC ENDSW
	.IFUND %F2
	LAC BNOPTN	/BINARY REQUESTED
	SMA	/YES
	JMP ANPST
	LAC BMODE	/WHAT TYPE OUTPUT
	SNA
	JMP ANPST 	/REL
	JMS BLDBIN
	DZM ENDSW
	CAL+765		/WAIT FOR PUNCH
	12
	LAC BMODE
	SAD L1
	JMP ABSEND 	/ABS OUTPUT
	LAC ENDVAL 	/FULL OUTPUT
	SZA
	JMP FULL1
	LAC HLTLIT
	DAC ENDVAL
FULL1	DZM UPKCTR
	LAC AD17	/ENDVAL
	DAC UPKLOC
	LAC AD34		/FULHRW+1
	DAC* L10	/OUTPUT AREA
	LAW -2
	DAC CTR
FULL2	JMS UNPACK		/PICK UP 6 BITS
	XOR L200
	DAC* 10
	ISZ CTR
	JMP FULL2
	JMS UNPACK
	XOR (300			/HRI WORD
	DAC* 10
	JMS NULFRM
	CAL+3765		/WRITE THE HRI WORD
	11
MOD31	FULHRW
	-6
/
	JMP ANPST
FULHRW	003500;	0
	0;	0;	0;	0
/
ABSEND	LAC ENDVAL
	SNA
	CLC
	DAC ENDVAL
	JMS NULFRM
	CAL+4765		/PUNCH DUMP MODE
	11
MOD31A	ENDVAL
	-2
/
	.ENDC

/
/ALPHA AND NUMERIC PRINTOUT OF SYMBOL TABLE
/ALPHA:
/
ANPST	LAC (064000
	DAC MWDSTP
	DZM MWDSTP+1
	CLC
	DAC STPSW
	LAC ALOPTN
	SNA		/IF NO LISTING
	DZM PGCTR		/RESET PAGE NO.
	LAC STOPTN		/SYMBOLS
	DAC ALOPTN		/FOR PRINT RTNE
	JMS GBST		/GET START OF S/T
	JMP ALFNXB		/NO SYMBOLS
	JMS EJECT
ALFNX=.
	.IFUND %F2
	LAC BMODE
	SZA
	JMP ALFNXA
	.ENDC
	JMS LLSTBL
	0
	.IFUND %F2
	SKP
ALFNXA	JMS SYM3		/PICK UP 3 SYMBOL WORDS
	.ENDC
	JMS BPSMB 	/BUILD AND PRINT SYMBOL
	ISZ USTBEG
	JMS CKEST 	/CHECK FOR END OF TABLE
	SKP 		/FOUND
	JMP ALFNX 	/GET NEXT SYMBOL
ALFNXB	LAC BNOPTN		/BINARY REQUESTED
	SMA			/YES
	JMP ALFNXD		/NO
	.IFUND %F2
	LAC BMODE			/WHAT TYPE OUTPUT
	SZA			/LINK LOAD
	JMP ALFNXC
	.ENDC
	LAC ENDVAL		/.END VALUE
	AND (17777
	DAC LLBWRD
	LAC (27			/END CODE
	DAC LLCODE
	JMS BLDLLB		/L/L BINARY ROUTINE
ALFNXC	CAL+765		/WAIT FOR BINARY
	12
/
	CAL+765		/CLOSE BINARY
	6
/
/
ALFNXD	LAC STOPTN
	SMA
	JMP EOJ
/
/NUMERIC PRINTOUT
/
	JMS GBST
	JMP EOJ		/NO SYMBOLS
	JMS EJECT 	/EJECT A PAGE
	DZM NUMVAL#
	.IFUND %F2
	LAC BEGUST
	DAC USTBEG
NUMNXH	JMS SYM3		/PICK UP SYMBOL
	LAC* SWD1
	SPA
	JMP NUMNXJ
	LAC* SWD3
	AND JMSLIT		/IS IT A MACRO
	SNA		/YES
	JMP NUMNXJ		/NO
	JMS BPSMB		/PRINT SYMBOL-MACRO
	JMP NUMNXK
NUMNXJ	ISZ USTBEG
	ISZ USTBEG		/UPDATE TABLE POSITION
NUMNXK	ISZ USTBEG
	JMS CKEST		/END OF TABLE
	SKP		/YES
	JMP NUMNXH		/GET NEXT SYMBOL
	.ENDC
NUMNXF	LAC BEGUST 	/RESET TO BEGINNING
	DAC USTBEG 	/OF TABLE
	CLC
	DAC NXHVL# 	/NEXT HIGHER VALUE
NUMNXB	JMS SYM3 		/PICK UP THE SYMBOL
	LAC* SWD3
	DAC TMP
	LAC* SWD1
	SPA
	JMP NUMNXA
	.IFUND %F2
	LAC* SWD3
	AND JMSLIT	/BYPASS MACROS
	SZA
	JMP NUMNXD
	.ENDC
	LAC TMP
	AND (77777
	DAC TMP
NUMNXA	LAC NUMVAL 	/COMPARE CURRENT NUMBER
	SAD TMP 		/AGAINST SYMBOL VALUE
	JMP NUMNXC
	JMS TRC 		/COMPARE SYMBOL VALUE
	LAC TMP 		/AGAINST NEXT HIGHER VALUE
	LAC NXHVL
	SKP 		/S/V < NXHVL
	JMP NUMNXD 	/S/V > NXHVL
	JMS TRC 		/COMPARE S/V AGAINST NUMVAL
	LAC TMP
	LAC NUMVAL
	JMP NUMNXD 	/S/V < NUMVAL
	LAC TMP 		/S/V > NUMVAL
	DAC NXHVL
NUMNXD	ISZ USTBEG
	ISZ USTBEG 	/UPDATE TABLE LOCATION
NUMNXG	ISZ USTBEG
	JMS CKEST 	/END OF TABLE
	JMP NUMNXE 	/YES
	JMP NUMNXB 	/NO, GET NEXT
NUMNXC	JMS BPSMB 	/BUILD AND PRINT SYMBOL
	JMP NUMNXG
NUMNXE	LAC NXHVL 	/IF CURRENT VALUE
	SAD NUMVAL 	/=NEXT HIGHER VALUE
	JMP EOJ		/EXIT
	DAC NUMVAL
	JMP NUMNXF
EOJ	LAC LSTSW
	SMA
	JMP EOJ1
	CAL+766		/CLOSE LISTING
	6

/
/*** END OF ASSEMBLY
/
EOJ1	LAC BATCH		/MORE ASSEMBLES
	SPA		/NO
	JMP PASS1		/YES
L775	CAL+775
	6
	CAL
	15		/EXIT TO MONITOR
ERRLIN	.ASCII <12><11><11><11><11>
ERNMBR	0;	0
	.ASCII	/ ERROR LINES/<15>
	.LOC .-1
LRCR	510320
/
/
/PICK UP 3 SYMBOL WORDS
/
SYM3	0
	LAC USTBEG
	DAC SWD1
	TAD L1
	DAC SWD2
	TAD L1
	DAC SWD3
	JMP* SYM3
/
/BUILD AND PRINT SYMBOL
/
BPSMB	0
	JMS UNSQZE 	/UNSQOZE THE SYMBOL
	LAW -6
	DAC CTR
	LAC AD18	/FLAGS
	JMS P57INT
	LAC AD16	/UNSQZV-1
	DAC* L10
BPSMBA	LAC* 10
	JMS PACK57 	/PACK SYMBOL
	ISZ CTR 		/INTO PRINT AREA
	JMP BPSMBA
	LAC AD19	/FLAGS+4
	JMS P57INT
	LAC* SWD1
	SPA
	JMP BPSMBG
	.IFUND %F2
	LAC* SWD3
	AND JMSLIT	/MACRO
	SZA		/NO
	JMP BPSMBF
	.ENDC
BPSMBG	LAW -6
	DAC CTR
	LAC* SWD1 	/IF SYMBOL IS A P/A
	SMA 		/PICK UP ALL 18 BITS,
	JMP BPSMBE 	/ELSE ONLY 15 BITS
BPSMBB	JMS BNOCT 	/BINARY TO OCTAL
	LAC* SWD3 	/WORD 3 AS INPUT
	JMS PACK57 	/PACK SYMBOL VALUE
	ISZ CTR 		/INTO PRINT AREA
	JMP BPSMBB
	.IFUND %F2
	LAC (200320 	/SPACE, CR
	DAC LCTN
	LAC BMODE 	/BY PASS ADDRESS TYPE
	SZA 		/IF NON REL ASSEMBLY
	JMP BPSMBC
	.ENDC
	LAC* SWD2
	AND JMPLIT 	/CHECK FOR VIRTUAL
	SNA
	JMP BPSMBD 	/CHECK FOR A OR R
	SPA

	JMP BPSMBD
	LAC (424320		/E, CR
	DAC LCTN
	JMP BPSMBC
BPSMBD	LAC (404320 	/A, CR
	DAC LCTN
	LAC* SWD1
	AND LACLIT
	SNA
	JMP BPSMBC
	LAC LRCR		/R, CR
	DAC LCTN
BPSMBC	JMS PRINT 	/PRINT THE LINE
	JMP* BPSMB
BPSMBE	ISZ CTR
	LAC L40
	JMS PACK57
	JMP BPSMBB
	.IFUND %F2
BPSMBF	LAC (202330	/ MAC
	DAC FLAGS+4
	LAC (141644	/RO
	DAC FLAGS+5
	LAC (474320	/CR
	DAC FLAGS+6
	JMP BPSMBC
	.ENDC
/
/CHECK FOR END OF SYMBOL TABLE
/
CKEST	0
	LAC USTBEG 	/CHECK NEXT
	SAD USTEND		/FOR END
	JMP* CKEST 	/FOUND
LAWITH	LAW 10000		/CHECK FOR LITERAL
	AND* USTBEG
	SAD LAWITH
	JMP* CKEST 	/FOUND
	ISZ CKEST 	/NOT FOUND
	JMP* CKEST
/
/CONVERT RADIX 50 VALUE TO ASCII VALUE
/
ASCVAL	0
	DAC TMP
	SZA 		/SPACE
	JMP ASCVA
	LAC L40
	JMP ASCVD
ASCVA	TAD LM33
	SMA
	JMP ASCVB
	LAC TMP 		/A-Z
	XOR L100
	JMP ASCVD
ASCVB	LAC TMP
	TAD LM35
	SPA
	JMP ASCVC
	LAC TMP 		/0-9
	TAD (23
	JMP ASCVD
ASCVC	DAC TMP
	LAC L56 		/.
	ISZ TMP
	LAC L45 		/%

ASCVD	DAC* UNSQZL
	ISZ UNSQZL
	JMP* ASCVAL
UNSQZV	0;	0;	0
	0;	0;	0
/
/UNSQOZING ROUTINE
/
UNSQZE	0
	LAC AD20	/UNSQZV
	DAC UNSQZL#
	LAW -2
	DAC USQCTR#
HALF2	LAC* USTBEG 	/SYMBOL
	AND (177777 	/MASK OUT
	DAC UNSQ# 	/CONTROL BITS
	CLA
	JMS DIVIDE 	/1'ST AND 4'TH CHARS
	LAC UNSQ 		/DIVIDEND
	LAC (3100 	/DIVISOR
	JMS ASCVAL 	/GET ASCII VALUE
	LAC DVD 		/REMAINDER SAVED
	DAC UNSQ
	CLA
	JMS DIVIDE
	LAC UNSQ
	LAC (50
	JMS ASCVAL 	/2ND AND 5TH CHARS
	LAC DVD
	JMS ASCVAL 	/3RD AND 6TH CHARS
	ISZ USTBEG
	ISZ USQCTR
	JMP HALF2 	/GET 2ND HALF
	JMP* UNSQZE
/
/LOCATIONS TO BE INITIALIZED FOR PASS1 ONLY
/
BP1T=.
LITCTR	0		/LITERAL COUNTER
VARCTR	0		/VARIABLE COUNTER
EXTCTR	0		/EXTERNAL COUNTER
UNDCTR	0		/UNDEFINED COUNTER
BMODE	0		/BINARY NODE - 0=REL, 1=ABS, 2=FULL
USTSZE	0		/USER S/T SIZE
EP1T=.
/
/LOCATIONS TO BE INITIALIZED FOR PASS1 AND PASS2
BP12T=.
RASUPL	0		/REAL ARGUMENT SUPPLIED
CSBSW	0		/CREATE SYMBOL SWITCH
RASW	0		/RETURN TO REAL ARGUMENTS
MCLCTR	0		/MACRO CALL LEVEL COUNTER
MCLSW	0		/MACRO CALL SWITCH
EXPSW	0		/MACRO EXPANDING SWITCH
NOREST	0
DFNSW	0		/MACRO DEFINITION SWITCH
PC	0		/PROGRAM COUNTER
CHVPC	0		/CURRENT HIGH VALUE OF PROGRAM COUNTER
EOTSW	0		/END OF TAPE SWITCH
	.IFUND %F2
RPTSW	0		/REPEAT SWITCH
CONDSW	0		/CONDITIONAL ASSEMBLY SWITCH
	.ENDC
RADIX	0		/RADIX +=OCTAL, -=DECIMAL
EP12T=.
/
/LOCATIONS TO BE INITIALIZED BEFORE
/EACH SOURCE STATEMENT IS ASSEMBLED
/
BST=.
PACKT	0;	0	/CONTAINS PACKED TAG
	.IFUND %F2
IFSW	0		/IF STATEMENT SWITCH
	.ENDC
BYPASS	0		/BYPASS GETTING NEXT CHARACTER
PASW	0		/PARAMETER ASSIGNMENT
FLDVAL	0		/ANY FIELD VALUE
WRDVAL	0		/WORD VALUE
OPVAL	0		/OPERATION FIELD VALUE
AREL	0		/ACCUMULATED RELOCATION
CREL	0		/CURRENT RELOCATION
CHRNUM	0		/PACKING CHARACTER NUMBER
NCD	0		/NOT CURRENTLY DEFINED SYMBOL
LITSW	0		/LITERAL SWITCH
STPSW	0		/SYMBOL TABLE PRINT SWITCH
BRKSW	0		/BRACKETS IN TEXT SWITCH
BSSW	0		/.BLOCK SWITCH
ENDSW	0		/.END SWITCH
EXLTSW	0		/EXTERNAL OR LITERAL
EXTSW	0		/EXTERNAL SWITCH
FLDSW	0		/WHICH FIELD SWITCH
SZESW	0		/.SIZE SWITCH
NULOPF	0		/NULL OPERATION FIELD
OPSVSW	0		/OP SAVED SWITCH
EJCTSW	0		/.EJECT SWITCH
TEXTSW	0		/.TEXT SWITCH
VARSW	0		/VARIABLE ENCOUNTER
LOCSW	0		/.LOC SWITCH
EST=.

/
/INITIALIZE 5/7 UNPACKING TO BEGINNING OF LINE BUFFER
/
UPBLB	0
	LAC	AD01	/RDBUF+2
	DAC UPKAD		/UNPACKING LOCATION
	LAC L1
	DAC PKNUM		/PACKING NUMBER
	JMP* UPBLB
/
/LOCATION ZEROING SUBROUTINE
/
/LAC (TABL-1
/JMS ZEROIT
/BEG-END	/TABLE SIZE
/
ZEROIT	0
	DAC* L10		/BEG-1 OF TABLE
	XCT* ZEROIT	/PICK UP LAW
	DAC CTR
	DZM* 10		/ZERO LOCATIONS
	ISZ CTR
	JMP .-2
	JMP* ZEROIT
/
/INITIALIZE FOR 5/7 PACKING
/
/LAC LOC
/JMS P57INT
/
P57INT	0
	DAC PK57AD#	/LOCATION TO PACK
	DZM CTR57#		/RESET COUNT
	JMP* P57INT
WRD3	0
	ISZ MRGLOC
	ISZ MRGLOC	/PICK UP WORD 3 OF S/T
	JMP* WRD3
/
GETREL	0
	RTL
	GLK
	DAC CREL		/PICK UP LOCATION
	JMP* GETREL
/
MRGP1	0
	ISZ MRGSAV
	LAC* MRGSAV	/UPDATE MERGE SAVE
	JMP* MRGP1
ALTA	0
	LAW -2
	TAD* L10		/ADJUST LITERAL TABLE ADDRESS
	DAC* L10
	LAC* 10
	JMP* ALTA

/
/CONVERT TO TWO'S COMPLEMENT
/
TWOS	0
	CMA
	TAD L1
	JMP* TWOS
/
/INITIALIZE SIXBIT PACKING
/
/LAC LOC
/JMS P6BT
/
P6BT	0
	DAC PKLOC		/PACKING LOCATION
	JMS PACK		/6 BIT PACKING ROUTINE
	JMP* P6BT
/
/CHECK FOR 6 CHARACTERS PACKED
/
SIXP	0
	LAW -6
	TAD CHRNUM	/6 CHARS PACKED
	SPA		/YES
	ISZ SIXP		/NO - ADD1 TO RETURN
	JMP* SIXP
/
/PRINT IF PASS2
/
PRTP2	0
	XCT PASSNO	/WHICH PASS
	SKP		/PASS 1
	JMS PRINT		/PRINT THE LINE
	JMP* PRTP2
/
/
/
SRCUST	0
	JMS SEARCH
	LAC USTEND	/END OF USER TABLE
	LAC USTSZE	/TABLE SIZE
	LAC AD32		/INPUT IN SQZOUT
	400002
	JMP* SRCUST	/FOUND
	ISZ SRCUST	/NOT FOUND
	JMP* SRCUST
/MACRO9  TAPE 5
/THIS ROUTINE CHECKS CHRHLD FOR A-Z.
/CALLING SEQUENCE:
/JMS CKALF
/FOUND
/NOT FOUND
/
CKALF	0	/RETURN LOCATION
	LAW -133
	TAD CHRHLD
	SMA
	JMP NTALF	/>Z
	LAW -101
	TAD CHRHLD
	SMA	/<A
	JMP* CKALF	/FOUND EXIT
NTALF	ISZ CKALF
	JMP* CKALF	/NOT FOUND EXIT
/
/ROUTINE TO COMPARE MAGNITUDES OF 2 LOCATIONS
/
/JMS TRC
/LAC LOC 1
/LAC LOC 2
/RETURN 1 - LOC 1 < LOC 2
/RETURN 2 - LOC 1 > OR = TO LOC 2
/	IF =, AC=0 ON RETURN 2
/
TRC	0
	XCT* TRC
	DAC HLE1#	/LOC 1
	ISZ TRC
	XCT* TRC
	DAC HLE2#	/LOC 2
	LAC HLE1
	SPA
	JMP TRC1
	LAC HLE2
	SPA
	JMP TRC4	/LOC 1 < LOC 2
	JMP TRC2	/BOTH HAVE SAME SIGN
TRC1	LAC HLE2
	SPA
	JMP TRC2
	CLC
	JMP TRC3	/LOC  1 > LOC 2
TRC2	CMA	/BOTH LOCS HAVE SAME SIGN
	TAD L1
	TAD HLE1
	SPA	/LOC 1 > OR=TO LOC 2
	SKP	/LOC 1 < LOC 2
TRC3	ISZ TRC	/LOC 1 > OR= TO LOC 2
TRC4	ISZ TRC	/LOC 1 < LOC 2
	JMP* TRC
/
/SYMBOLIC OR NUMERIC ARGUMENT PROCESSOR
/
/JMS ARG
/RETURN HERE IF NO ARGUMENTS
/JMP ARGN - NUMERIC ARGUMENTS
/JMP ARGS - SYMBOLIC ARGUMENTS
/CONTROL RETURNED HERE
/
ARG	0
	JMS CHRLKP	/CHECK FOR ; OR CR
	027776
	JMP* ARG		/NO ARGUMENTS
	JMS GETCHR		/GET NEXT CHARACTER
	JMS CHRLKP
	007776		/SPACE OR TAB
	JMP .-3
	JMS CHRLKP
	027775		/; CR OR /
	JMP* ARG		/NO ARGUMENTS
	DZM CHRNUM	/PACKING COUNT
	ISZ ARG
	XCT* ARG		/PICK UP ARGUMENT TYPE
/
/SYMBOLIC ARGUMENT SCAN
/
ARGS	DZM PACKS
	DZM PACKS+1
	JMS CKALF		/A-Z
	JMP ARGSA		/YES
	JMS CHRLKP
	137776		/. OR %
	JMP ARGSA		/YES
	SAD (77		/? - CREATE SYMBOL DESIGNATOR
	SKP
	JMP ARGSE
	LAC DFNSW		/WITHIN A MACRO DEFINITION
	SMA		/YES
	JMP ARGSE
	LAC XCTLIT
	DAC CSBSW		/SET CREATE SYMBOL SWITCH
	JMS GETCHR		/GET NEXT CHARACTER
	JMP ARGSD+3
ARGSE	JMS SETFLG		/S TO FLAG WORD
	20
	JMP ARGSD
ARGSC	JMS SIXP		/6 CHARS PACKED
	JMP ARGSD		/YES
ARGSA	LAC AD08		/PACKS
	JMS P6BT		/PACK THE SYMBOL
ARGSD	JMS GETCHR	/GET NEXT CHARACTER
	JMS CKNUM		/0-9
	JMP ARGSC
	JMS CKALF		/A-Z
	JMP ARGSC
	JMS CHRLKP
	137776		/. OR %
	JMP ARGSC
	JMS ARGTRM	/CHECK IF TERMINATION
	JMP ARGSD		/NO
/
/NUMERIC ARGUMENT SCAN
/
ARGN	DZM OPRTR
	DZM PACKN
	DZM PACKN+1
	JMS CHRLKP
	057776		/CHECK FOR + OR -
	SKP
	JMP ARGNA
	DAC OPRTR		/SAVE IT
	JMS GETCHR	/GET NEXT CHAR
ARGNA	SAD (60		/BYPASS LEADING ZEROES
	JMP ARGNA-1
ARGNB	JMS CKNUM		/CHECK IF NUMERIC
	JMP ARGNC		/YES
	JMS ARGTRM	/CHECK FOR ARGUMENT TERMINATION
ARGND	JMS GETCHR	/GET NEXT CHARACTER
	JMP ARGNB
ARGNC	JMS SIXP		/6 CHARACTERS PACKED
	JMP ARGND		/YES
	LAC AD07		/PACKN
	JMS P6BT		/PACK THE NUMBER
	JMP ARGND
/
/CHECK FOR ARGUMENT TERMINATION
/
ARGTRM	0
	JMS CHRLKP		/CHECK FOR SPACE, TAB
	007774		/; OR CR
	JMP ARGXT		/EXIT FROM ARGUMENT RTNE
	SAD (54		/,
	JMP ARGXT
	JMS SETFLG	/S TO FLAG WORD
	20
	JMP* ARGTRM
/
ARGXT	ISZ ARG		/UPDATE FOR EXIT
	JMP* ARG		/EXIT
/
/THIS ROUTINE CHECKS CHRHLD FOR 0-9.
/CALLING SEQUENCE:
/JMS CKNUM
/FOUND
/NOT FOUND
/
CKNUM	0	/RETURN LOCATION
	LAW -72
	TAD CHRHLD
	SMA
	JMP NTNUM	/>9
	LAW -60
	TAD CHRHLD
	SMA	/<0
	JMP* CKNUM	/FOUND EXIT
NTNUM	ISZ CKNUM
	JMP* CKNUM	/NOT FOUND EXIT
/
/PACKING SUBROUTINE (THREE 6 BIT CHARS/WORD)
/ENTRY:
/PKLOC=INITIAL LOCATION TO BE PACKED
/CHRNUM=CHARACTER NUMBER
/CHRHLD=CHARACTER TO BE PACKED
/
PACK	0
	CLA
	JMS DIVIDE	/DIVIDE CHRNUM BY 3
	LAC CHRNUM
	LAC (3	/QUOTIENT=WORD NUMBER
	TAD PKLOC#
	DAC PKLOCA#
	LAC DVD#	/REMAINDER=CHAR NUMBER
	TAD (JMP PKTBL
	DAC .+2
	LAC CHRHLD
	0
/
/CHARACTER PACKING JUMP TABLE
/
PKTBL	JMP PKCH1	/1ST CHARACTER
	JMP PKCH2	/2ND CHAR
	JMP PKCH3	/3RD CHAR
/
PKCH1	DZM* PKLOCA#
	RTR
	RTR
	RTR
	RAR
	AND LAWITH
	JMP PKCH3+1
PKCH2	RTL
	RTL
	RTL
	AND (7700
	SKP
PKCH3	AND (77
	XOR* PKLOCA#
	DAC* PKLOCA#
	ISZ CHRNUM	/UPDATE CHAR NUMBER
	JMP* PACK
/
/NON-ALPHANUMERIC CHARACTER LOOKUP ROUTINE.
/ENTRY: CHAR IN CHRHLD
/JMS CHRLKP
/XXYYYY	XX=STARTING POSITION IN TABLE (1ST=0)
/FOUND	YYYY=NUMBER OF POSITIONS TO SCAN (2'S COMPL)
/NOT FOUND
/
CHRLKP	0
	LAC* CHRLKP
	AND (7777
	XOR LAWITH
	DAC CTRLK#	/NUMBER OF POSITIONS TO SCAN
	LAC* CHRLKP
	RTL
	RTL
	RTL
	RAL
	AND (77
	TAD (SAD SPCHRS-1	/DEVELOP STARTING POSITION
	DAC CHCMP
	ISZ CHRLKP
	LAC CHRHLD
	ISZ .+1
CHCMP	SAD 0	/FOUND
	JMP* CHRLKP	/YES
	ISZ CTRLK
	JMP CHCMP-1
	ISZ CHRLKP
	JMP* CHRLKP	/NOT FOUND
/
/CHARACTER TABLE
/
L40=.
SPCHRS	40	/SPACE (0)
L11	11	/TAB (1)
L73	73	/; (2)
L15	15	/CR (3)
L57	57	/SLASH (4)
	53	/+ (5)
L55	55	/- (6)
L52	52	/* (7)
	46	/& (10)
	41	/! (11)
	134	/ (12)
L56	56	/. (13)
L45	45	/% (14)
L12	12	/LF (15)
L14	14	/FF (16)
L13	13	/VT (17)
L0	00	/NULL (20)
L177	177	/DELETE (21)
/
/UNPACKING ROUTINE FOR 6 BIT CHARS,
/3 CHARS/WORD.
/ENTRY:
/DZM UPKCTR
/LAC (INITIAL LOCATION TO UNPACK
/DAC UPKLOC
/JMS UNPACK
/UNPACKED CHAR IN UPKCHR
/
UNPACK	0
	LAC UPKCTR#
	TAD (JMP UPKTBL
	DAC .+2	/GET CHAR POSITION
	LAC* UPKLOC#	/GET WORD
	0
UPKTBL	JMP UPK1	/1ST CHAR
	JMP UPK2	/2ND CHAR
/3RD CHAR
	ISZ UPKLOC	/UPDATE FOR NEXT WORD
	DZM UPKCTR
	JMP UPKEND+1
UPK1	RTL
	RTL
	RTL
	RAL
	JMP UPKEND
UPK2	RTR
	RTR
	RTR
UPKEND	ISZ UPKCTR	/UPDATE FOR NEXT CHAR
	AND (77
	DAC UPKCHR#	/UNPACKED WORD
	JMP* UNPACK	/EXIT
/
/THIS ROUTINE UNPACKS CHARACTERS FROM 5/7 ASCII WORD
/PAIRS AND LEAVES THEM IN CHRHLD
/
GETCHR	0
	LAC PKNUM#	/PKNUM=1,2,3,4 OR 5
	TAD (JMP JMPTBL-1
	DAC .+2
	LAC* UPKAD#	/CONTAINS ADDR OF PACKED CHARS
	0	/JMP CHAR (1-5)
/UNPACKING JUMP TABLE
JMPTBL	JMP CHR1	/1ST CHARACTER
	JMP CHR2	/2ND CHARACTER
	JMP CHR3	/3RD CHARACTER
	JMP CHR4	/4TH CHARACTER
	JMP CHR5	/5TH CHARACTER
CHR1	RTL
	RTL
	RTL	/ROTATE 8 LEFT
	RTL
	JMP GETEND
CHR2	RTR	/ROTATE 4 RIGHT
	RTR
	JMP GETEND
CHR3	RTL
	RAL	/ROTATE 3 LEFT
	AND (170
	DAC TMP#	/SAVE LEFTMOST 4 BITS
	ISZ UPKAD
	LAC* UPKAD	/PICK UP NEXT WORD
	RTL
	RTL
	AND (7	/RIGHTMOST 3 BITS
	XOR TMP
	JMP GETEND+1
CHR4	RTR
	RTR	/ROTATE 8 RIGHT
	RTR
	RTR
	JMP GETEND
CHR5	RAR
	ISZ UPKAD	/UPDATE FOR NEXT 5/7 PAIR
	DZM PKNUM	/RESET CHAR NUMBER
GETEND	AND L177
	DAC CHRHLD#	/UNPACKED 7 BIT CHAR
	ISZ PKNUM
	JMS CHRLKP	/CHECK FOR SPACE, TAB
	007773	/CR, ; OR /
	JMP* GETCHR
	JMS CHRLKP	/CHECK FOR LF, FF, VT, NULL
	157773	/OR DELETE
	JMP* GETCHR
	DZM NDIL		/RESET NO DATA IN LINE
	JMP* GETCHR
/
/CHECK FOR # ON PERMANENT SYMBOL
/OR PSEUDO-OP
/
CKPFV	0
	LAC VARSW	/VAR SWITCH
	SMA
	JMP .+3
	JMS SETFLG	/S TO FLAG WORD
	20
	DZM VARSW
	JMP* CKPFV
/
/ROUTINE TO SCAN TO END OF WORD OR LINE
/
SCNEND	0
	JMS CHRLKP	/CHECK CURRENT CHARACTER
	027776	/FOR ; OR CR
	JMP* SCNEND	/FOUND
	SAD L57
	JMP SCND4
	LAC CHRHLD
	DAC PRVCHR#	/PREVIOUS CHARACTER
SCND3	JMS GETCHR	/GET NEXT CHAR
	JMS CHRLKP	/CHECK FOR ; OR CR
	027776
	JMP* SCNEND	/FOUND
	JMS CHRLKP	/CHECK FOR SPACE OR TAB
	007776
	JMP SCND1	/FOUND
	SAD L57	/CHECK FOR /
	JMP SCND2	/FOUND
	JMS SETFLG	/Q TO ERROR FLAG WORD
L100	000100
SCND1	LAC CHRHLD
	DAC PRVCHR	/SAVE CURRENT CHAR
	JMP SCND3
SCND2	LAC CHRHLD
	DAC TMP
	LAC PRVCHR
	DAC CHRHLD
	JMS CHRLKP	/CHECK PREVIOUS FOR SPACE OR TAB
	007776
	JMP .+3	/FOUND
	LAC TMP
	JMP SCND1+1
SCND4	LAC L15	/CARRIAGE RETURN
	DAC CHRHLD
	JMP* SCNEND	/EXIT
/
/SYMBOL SEARCH SUBROUTINE
/
/JMS SEARCH
/ENDLOC OF TABLE
/LAC LOC OF NUMBER OF ENTRIES
/LOC OF SYMBOL TO COMPARE WITH TABLE
/CONTROL
/FOUND
/NOT FOUND
/
SEARCH	0
	XCT* SEARCH		/ENDING LOCATION OF TABLE
	DAC HILIM#
	ISZ SEARCH
	XCT* SEARCH
	DAC SYMBLS	/NUMBER OF SYMBOLS
	ISZ SEARCH
	XCT* SEARCH		/LOCATION OF SYMBOL
	DAC CMPLOC	/TO COMPARE TABLE WITH
	ISZ SEARCH
	LAC* SEARCH	/PICK UP CONTROL WORD
	SPA
	JMP .+3
	LAC NOPLIT	/CHECK ALL 18 BITS
	JMP .+2
	LAC .+4	/CHECK LO ORDER 16 BITS
	DAC MSK2
	DAC MSK2A
	LAC* SEARCH
	AND (177777
	DAC INCR#
	ISZ INCR		/2 OR 3
	JMS TWOS		/TWOS COMPLEMENT
	DAC WORDCT#
	DAC CTR1
	ISZ SEARCH	/FOUND EXIT
/
/GET INITIAL TABLE LIMITS
/
	LAC SYMBLS#		/MULTIPLY SYMBOLS BY 3 OR 2
	SNA
	JMP ITEM1	/FIRST ENTRY
	ISZ CTR1
	TAD SYMBLS
	TAD SYMBLS
	JMS TWOS
	DAC TMP
	LAC HILIM#	/HIGH LIMIT OF TABLE
	TAD TMP
	DAC LOLIM#	/LOW LIMIT OF TABLE
	DAC TBLBEG#
/
/SPLIT TABLE LIMITS
/
SPLIT	LAC HILIM
	TAD LOLIM
	CLL
	RAR	/DIVIDE BY 2
	SZL	/ADJUST BY -1
	TAD LAWM1	/IF REMAINDER PRESENT
	DAC MRGLOC#	/MERGING LOCATION
	LAC WORDCT		/LENGTH 2 SYMBOL
	TAD L1
	SZA!CLA		/YES
	JMP CMPL1		/NO
	LAC HILIM
	TAD MRGLOC		/IF HIGH LIMIT AND MERGING
	AND L1		/LOCATION ARE NOT SAME WITH
	SNA!CLA		/RESPECT TO ODD/EVEN
	SKP		/ADJUST MRGLOC BY -1
	LAW -1
CMPL1	TAD MRGLOC
	DAC MRGLOC
/
/COMPARE ITEM VALUE AGAINST TABLE VALUE
/
	TAD LAWM1
	DAC* L10	/TABLE LOCATION
	LAC CMPLOC#
	TAD LAWM1
	DAC* L11	/ITEM LOCATION
	LAC WORDCT
	DAC CTR1#
CMPLUP	LAC* 10	/TABLE VALUE
MSK2	AND (177777	/OR NOP
	DAC TMPT#	/TABLE VALUE
	LAC* 11
MSK2A	AND (177777	/OR NOP
	DAC TMPI#	/ITEM VALUE
	SAD TMPT
	SKP
	JMP CKLORG	/CHECK <OR>
	ISZ CTR1	/CHECK N WORDS
	JMP CMPLUP
	JMP* SEARCH	/FOUND EXIT
CKLORG	JMS TRC	/CHECK FOR
	LAC TMPI	/< OR >
	LAC TMPT
	SKP	/<
	JMP GRTR	/>
LESS	LAC MRGLOC	/ITEM < TABLE
	SAD LOLIM	/END OF SPLITTING
	JMP NTFND+2	/YES, NOT FOUND
	DAC HILIM	/SET NEW HI LIMIT
	JMP SPLIT	/ONCE AGAIN
GRTR	LAC MRGLOC	/ITEM > TABLE
	SAD LOLIM	/END OF SPLITTING
	JMP NTFND	/YES, NOT FOUND
	TAD INCR		/2 OR 3
	SAD HILIM
	JMP NTFND+1
	DAC LOLIM	/SET NEW LOW LIMIT
	JMP SPLIT
ITEM1	LAC HILIM	/FIRST ENTRY
	DAC TBLBEG
	SKP
NTFND	TAD INCR		/2 OR 3
	DAC MRGLOC
	ISZ SEARCH	/NOT FOUND EXIT
	JMP* SEARCH
	.IFUND %F2
/
/IMBEDDED MACRO CALL OVERFLOW
/
ICOVA	LAC (416031
	DAC TORC		/CALL
	LAC (446000
	DAC TORC+1
	JMP STOVB
	.ENDC
/
/SYMBOL TABLE OVERFLOW
/
STOVA	LAC (522030
	DAC TORC		/TABLE
	LAC (246212
	DAC TORC+1
/
STOVB	CAL+2775
	11
MOD33	PRTOVA
LM35=.
PRTOVA	-35
	JMP PASS1		/RETURN TO COMMAND STRING
TORC	0;	0	/TABLE OR CALL
	.ASCII	/ OVERFLOW/<15>
/MERGE SYMBOL INTO SYMBOL TABLE ROUTINE
/
MERGE	0
	LAC ENDUMT	/LOWEST FREE REGISTER
	TAD (3		/JUST ABOVE MACRO TABLE
	CMA
	TAD TBLBEG
	SPA		/CHECK FOR SYMBOL
	JMP STOVA	/TABLE OVERFLOW
	LAC TBLBEG
	SAD MRGLOC
	JMP NEWLOW	/FIRST OR NEW LOW ENTRY
	JMS TWOS		/COMPUTE NUMBER OF LOCATIONS
	TAD MRGLOC		/TO BE MOVED UP
	CMA
	DAC CTR
	ISZ CTR
	LAC TBLBEG
	TAD LAWM1
	DAC* L10
	TAD LAWM3
	DAC* L11
	LAC* 10	/MOVE TABLE UP
	DAC* 11
	ISZ CTR
	JMP .-3
MRGIN	LAW -3
	DAC CTR
	LAC CMPLOC
	TAD LAWM1
	DAC* L10
	LAC* 10	/MERGE IN NEW SYMBOL
	DAC* 11
	ISZ CTR
	JMP .-3
	ISZ USTSZE		/UPDATE SYMBOL COUNT
LAWM3	LAW -3
	TAD TBLBEG	/INDICATE NEW STARTING
	DAC TBLBEG	/ADDRESS OF SYMBOL TABLE
	DAC BEGUST#
	DAC BEGDAL#
	JMP* MERGE
NEWLOW	TAD LAWM4
	DAC* L11
	JMP MRGIN
/MACRO9  TAPE 6
/
/MULTIPLY SUBROUTINE
/CALLING SEQUENCE:
/	LAC MULTIPLIER
/	JMS MPY
/	LAC MULTIPLICAND
/	RETURN; LOW ORDER PRODUCT IN AC, HIGH ORDER PRODUCT IN MP5
/
MPY	0
	DZM MP5#
	SNA
	JMP MPZ
	DAC MP1#
	XCT* MPY
	SNA
	JMP MPZ
	DAC MP2#
	LAW -22
	DAC MP3#
MP4	LAC MP1
	RAR
	DAC MP1
	LAC MP5
	SZL!CLL
	TAD MP2
	RAR
	DAC MP5
	ISZ MP3
	JMP MP4
	LAC MP1
	RAR
MPZ	ISZ MPY
	JMP* MPY
/PDP-9 ONE'S COMPLEMENT DIVIDE SUBROUTINE
/CALLING SEQUENCE:
/	LAC HIGH ORDER DIVIDEND
/	JMS DIVIDE
/	LAC LOW ORDER DIVIDEND
/	LAC DIVISOR
/	RETURN	;QUOT. IN AC, REM. IN D#VD
/IF HIGH DIVIDEND IS GREATER OR EQUAL TO DIVISOR, NO DIVIDE TAKES
/PLACE AND LINK IS SET TO 1.  TIME = 368 CYCLES MAXIMUM
DIVIDE	0	/HIGH ORDER DIVIDEND IN AC
	SPA!CLL	/IS DIVIDEND POSITIVE?
	CMA!CML	/NO, COMPLEMENT AC AND LINK
	DAC D#VD	/STORE HIGH ORDER DIVIDEND
	XCT* DIVIDE	/FETCH LOW ORDER DIVIDEND
	SZL	/DIVIDEND SIGN BIT POSITIVE?
	CMA	/NO, COMPLEMENT LOW ORDER DIVIDEND
	DAC Q#UO	/STORE LOW ORDER DIVIDEND
	JMS DV5	/DEPOSIT DIVIDEND SIGN BIT INTO DV5
DV5	0	/REMAINDER HAS SIGN OF DIVIDEND
	ISZ DIVIDE
	XCT* DIVIDE	/FETCH DIVISOR
	SMA!CML	/SKIP IF SIGN NEGATIVE AND COMPLEMENT LINK
	CMA!CML	/COMPLEMENT AC AND LINK
	JMS DV4	/DEPOSIT QUOTIENT SIGN BIT INTO DV4
DV4	0	/CONTAINS SIGN BIT OF QUOTIENT
	CLL	/CLEAR LINK
	TAD L1	/2'S COMPLEMENT OF DIVISOR
	DAC D#VS	/SAVE DIVISOR
	TAD DVD	/SUBTRACT DIVISOR FROM DIVIDEND
	ISZ DIVIDE	/INCREMENT TO EXIT ADDRESS
	SZL	/DIVIDEND GREATER THAN OR EQUAL TO DIVISOR?
	JMP* DIVIDE	/YES -- EXIT WITH LINK = 1
	LAW -23	/SET UP COUNTER
	DAC DV#1	/SAVE COUNTER
	JMP DV2	/START DIVISION
DV3	LAC DVD	/FETCH DIVIDEND
	RAL	/ROTATE LEFT TO PICK UP NEXT BIT
	DAC DVD	/STORE DIVIDEND
	TAD DVS	/SUBTRACT DIVISOR FROM DIVIDEND
	SZL	/DIVIDEND GREATER THAN OR EQUAL TO DIVISOR
	DAC DVD	/YES
DV2	LAC QUO	/FETCH QUOTIEND
	RAL	/PICK UP QUOTIENT BIT FROM LINK
	DAC QUO	/STORE NEW QUOTIENT
	ISZ DV1	/FINISHED?
	JMP DV3	/NO
	LAC DV5	/FETCH REMAINDER SIGN BIT
	RAL	/SIGN-BIT TO LINK
	LAC DVD	/FETCH REMAINDER
	SZL!CMA	/SIGN BIT POSITIVE?
	DAC DVD	/NO, STORE COMPLEMENT OF REMAINDER
	LAC DV4	/FETCH QUOTIENT SIGN BIT
	RAL	/SIGN BIT TO LINK
	LAC QUO	/FETCH QUOTIENT
	SZL	/QUOTIENT SIGN BIT POSITIVE?
	CMA!CLL	/NO, COMPLEMENT QUOTIENT--CLEAR LINK
	JMP* DIVIDE	/EXIT
/
/NUMBER EVALUATION ROUTINE
/
NUMEVL	0
	DZM NUMBR#	/WHERE RESULTS WILL BE
	LAC CHRNUM
	SNA
	JMP* NUMEVL	/NUMBER IS 0
	LAC (TAD NUMBR
	DAC OCTOUT
	LAC RADIX	/FIND RADIX
	SPA
	JMP CNVRSN	/DECIMAL
OCT	JMS INTUPN	/INITIALIZE UNPACKING RTNE
	JMS UNPACK	/GET A DIGIT
	TAD LM70	/CHECK FOR 8 OR 9
	SPA
	JMP SETOCT
	JMS SETFLG	/N TO ERROR FLAG WORD
	000400
	JMP CNVRSN	/CONVERSION ROUTINE
SETOCT	ISZ CTR
	JMP OCT+1
	LAC NOPLIT	/INITIALIZE CONVERSION
	DAC OCTOUT	/ROUTINE FOR OCTAL
/
/6 BIT DECIMAL TO BINARY, OCTAL TO BINARY CONVERSION
/
CNVRSN	JMS INTUPN	/INITIALIZE UNPACKING RTNE
NXTDGT	JMS UNPACK	/GET A DIGIT
	AND (17	/NEED ONLY 4 BITS
	DAC UPKCHR
	CLL
	LAC NUMBR
	RTL	/X4
	SZL
	JMP OVA	/CHECK FOR OVERFLOW
OCTOUT	TAD NUMBR	/X5-NOP FOR OCT
	SZL
	JMP OVA
	RAL	/X10
	SZL
	JMP OVA
	TAD UPKCHR
	SZL
	JMP OVA
	DAC NUMBR
	ISZ CTR	/FINISHED WITH NUMBER
	JMP NXTDGT	/GET NEXT DIGIT
	JMP* NUMEVL
OVA	JMS SETFLG	/N TO FLAG WORD
	000400
	JMP* NUMEVL
/
/INITIALIZE NUMERIC UNPACKING
/
INTUPN	0
	LAC CHRNUM
	JMS TWOS
	DAC CTR
	DZM UPKCTR
	LAC AD07	/PACKN
	DAC UPKLOC	/CALLING SEQUENCE
	JMP* INTUPN
/
/ERROR FLAG SETTING SUBROUTINE:
/JMS SETFLG
/XXXXXX	FLAG POSITION (0-17)
/
SETFLG	0
	LAC* SETFLG	/GET POSITION
	CMA
	AND FLGWD#	/FLAG WORD
	XOR* SETFLG	/SET NEW BIT
	DAC FLGWD
	ISZ SETFLG	/UPDATE FOR RETURN
	JMP* SETFLG
/
/FORMAT OF FLAG WORD
/
/ABC,DEF,ILM,NPQ,RSU,VWX
/
/
/INITIALIZE PRINT AREA WITH SPACES
/
PRTINT	0
	LAW -10
	DAC CTR	/8 TO COUNT
	LAC AD35	/FLAGS-1
	DAC* L10
	LAC (201004		/SPACES TO 1ST OF 5/7
	DAC* 10
	LAC (020100	/SPACES TO 2ND OF 5/7
	DAC* 10
	ISZ CTR
	JMP .-5
	DZM FLGWD	/INITIALIZE ERROR FLAG WORD
	DZM FLGSAV
	JMP* PRTINT
/
/PRINT AND READIN BUFFERS (5 CHARS/2 WORDS)
/
PRTBUF	201004;	020100	/HEADER WORDS
	050000;	0
FLAGS	0;	0	/FLAGS
	0;	0
	0;	0
	0;	0
LCTN	0;	0	/LOCATION
TGTYP	0;	0	/TAG TYPE
OBJCDE	0;	0	/OBJECT CODE
	0
ADTYP	0	/ADDRESS TYPE
MWDSTP	0;	0	/MULTIWORD STOPPER
/
RDBUF	201004;	020100	/HEADER WORDS
	.BLOCK 41
RDLST	0
/
/NUMERIC PACKING AREA (6 BITS/CHAR-7 CHARS)
/
PACKN	0
	0
	0
/
/SYMBOL PACKING AREA (6 BITS/GHAR-6 CHARS)
/
PACKS	0
	0
/
/PERMANENT SYMBOL TABLE FOR 3 WORD SYMBOLS
/SIX BIT TRIMMED - ZERO FILLED
/MUST BE MAINTAINED IN ALPHABETIC ORDER
/
PS3BEG=.
	.SIXBT	/ALSS/
	ALSS
	.SIXBT	/DIVS/
	DIVS
	.SIXBT	/FRDIV/
	FRDIV
	.SIXBT	/FRDIVS/
	FRDIVS
	.SIXBT	/IDIV/
	IDIV
	.SIXBT	/IDIVS/
	IDIVS
	.SIXBT	/IORS/
	IORS
	.SIXBT	/LACQ/
	LACQ
	.SIXBT	/LACS/
	LACS
	.SIXBT	/LLSS/
	LLSS
	.SIXBT	/LRSS/
	LRSS
	.SIXBT	/MULS/
	MULS
	.SIXBT	/NORM/
	NORM
	.SIXBT	/NORMS/
	NORMS
PS3END	PS3END
PS3SZE	PS3END-PS3BEG/3	/NUMBER OF SYMBOLS
/
/PERMANENT SYMBOL TABLE FOR 2 WORD SYMBOLS
/SIX BIT TRIMMED
/MUST BE MAINTAINED IN ALPHABETIC ORDER
/
PS2BEG=.
	.SIXBT	/ABS/
	ABS
	.SIXBT	/ADD/
	ADD
	.SIXBT	/ALS/
	ALS
	.SIXBT	/AND/
	AND
	.SIXBT	/CAF/
	CAF
	.SIXBT	/CAL/
	CAL
	.SIXBT	/CCL/
	CCL
	.SIXBT	/CLA/
	CLA
	.SIXBT	/CLC/
	CLC
	.SIXBT	/CLL/
	CLL
	.SIXBT	/CLQ/
	CLQ
	.SIXBT	/CMA/
	CMA
	.SIXBT	/CML/
	CML
	.SIXBT	/CMQ/
	CMQ
	.SIXBT	/DAC/
	DAC
	.SIXBT	/DBK/
	DBK
	.SIXBT	/DBR/
	DBR
	.SIXBT	/DIV/
	DIV
	.SIXBT	/DZM/
DZMLIT	DZM
	.SIXBT	/EAE/
	EAE
	.SIXBT	/EEM/
	EEM
	.SIXBT	/GLK/
	GLK
	.SIXBT	/GSM/
	GSM
	.SIXBT	/HLT/
HLTLIT	HLT
	.SIXBT	/IOF/
	IOF
	.SIXBT	/ION/
	ION
	.SIXBT	/IOT/
IOTLIT	IOT
	.SIXBT	/ISA/
	ISA
	.SIXBT	/ISZ/
	ISZ
	.SIXBT	/JMP/
JMPLIT	JMP
	.SIXBT	/JMS/
JMSLIT	JMS
	.SIXBT	/LAC/
LACLIT	LAC
	.SIXBT	/LAS/
	LAS
	.SIXBT	/LAT/
	LAT
	.SIXBT	/LAW/
	LAW
	.SIXBT	/LEM/
	LEM
	.SIXBT	/LLS/
	LLS
	.SIXBT	/LMQ/
	LMQ
	.SIXBT	/LRS/
	LRS
	.SIXBT	/MUL/
	MUL
	.SIXBT	/NOP/
NOPLIT	NOP
	.SIXBT	/OAS/
	OAS
	.SIXBT	/OMQ/
	OMQ
	.SIXBT	/OPR/
	OPR
	.SIXBT	/OSC/
	OSC
	.SIXBT	/RAL/
	RAL
	.SIXBT	/RAR/
	RAR
	.SIXBT	/RCL/
	RCL
	.SIXBT	/RCR/
	RCR
	.SIXBT	/RTL/
	RTL
	.SIXBT	/RTR/
	RTR
	.SIXBT	/SAD/
	SAD
	.SIXBT	/SEM/
	SEM
	.SIXBT	/SKP/
SKPLIT	SKP
	.SIXBT	/SMA/
LSMA	SMA
	.SIXBT	/SML/
	SML
	.SIXBT	/SNA/
LSNA	SNA
	.SIXBT	/SNL/
	SNL
	.SIXBT	/SPA/
LSPA	SPA
	.SIXBT	/SPI/
	SPI
	.SIXBT	/SPL/
	SPL
	.SIXBT	/STL/
	STL
	.SIXBT	/SZA/
LSZA	SZA
	.SIXBT	/SZL/
	SZL
	.SIXBT	/TAD/
	TAD
	.SIXBT	/XCT/
XCTLIT	XCT
	.SIXBT	/XOR/
	XOR
	.SIXBT	/XX/
	XX
PS2END	PS2END
PS2SZE	PS2END-PS2BEG/2	/NUMBER OF SYMBOLS
/
/MACRO9 TAPE 6A
/
/
/*** MACRO CALL PROCESSING
/
	.IFUND %F2
MACALL	JMS WRD3
	LAC* MRGLOC
	.ENDC
SYSCAL	DAC MACLOC#	/STARTING LOC OF MACRO DEF
	DZM CHVDA#		/CURRENT HIGH VALUE OF D/A
	LAC MCLCTR		/CALL LEVEL
	TAD LAWM1
	DAC MCLCTR		/UPDATE FOR NEXT LEVEL
	.IFUND %F2
	SAD LAWM4
	JMP ICOVA		/TOO MANY IMBEDDED CALLS
	.ENDC
	TAD (DAC BEGRL1+1
	DAC .+3		/GET BEGINNING OF R/A
	LAC ENDUMT		/LIST FOR CALL LEVEL N
	DAC BEGRAL#
	DAC 0		/BEGRL1, BEGRL2 OR BEGRL3
	JMS P57INT
	DZM RANUM#	/REAL ARGUMENT NUMBER
	LAC CHRHLD	/ANY ARGUMENTS
	DZM BRKCTR#	/ANGLE BRACKETS COUNTER
	SAD L15
	JMP MCLE		/END OF CALL
/
/STORING OF REAL ARGUMENTS
/
MCLA	JMS GETCHR
	JMS CHRLKP	/CHECK FOR SPACE OR TAB
	007776
	JMP MCLA		/BYPASS INITIAL SPACES AND TABS
	SAD L15
	JMP MCLE		/NO ARGUMENTS
MCLF	LAC L1		/ARGUMENT INDICATOR
	JMS PAKRAM	/REAL ARGUMENT PACKING
	LAC RANUM		/REAL ARGUMENT NUMBER
	JMS PAKRAM
	LAC CHRHLD
	SAD (54		/,
	JMP MCLB		/END OF ARGUMENT
	SAD (44		/$
	JMP MCLC		/ARGUMENT CONTINUATION
MCLJ	SAD (74		/<
	JMP MCLK
	SAD (76		/>
	JMP MCLL
MCLN	LAC CHRHLD
	JMS PAKRAM		/PACK CHARACTERS INTO TABLE
	JMP MCLD
MCLK	LAC BRKCTR		/IF OUTERMOST, DO NOT PACK IT
	SNA!CLC
	JMP MCLM
	LAC CHRHLD
	JMS PAKRAM		/PACK <
	LAC BRKCTR		/UPDATE COUNT FOR BALANCING
	TAD LAWM1
MCLM	DAC BRKCTR
	JMP MCLD
MCLL	LAC BRKCTR
	SNA
	JMP MCLN
	ISZ BRKCTR		/IF OUTERMOST, DO NOT PACK IT
	JMP MCLN
MCLD	JMS GETCHR	/GET NEXT CHARACTER
	JMS CHRLKP	/CHECK FOR SPACE OR TAB
	007776
	JMP MCLE		/END OF REAL ARGUMENTS
	SAD L15
	JMP MCLE
	SAD (54		/,
	JMP MCLB		/END OF CURRENT ARGUMENT
	SAD (44		/$
	JMP MCLC		/ARGUMENT CONTINUATION
	JMP MCLJ		/PACK THE CHARACTER

MCLB	LAC BRKCTR
	SZA
	JMP MCLN
	ISZ RANUM		/UPDATE R/A NUMBER
	LAC L1
	JMS PAKRAM
	LAC RANUM
	JMP MCLN+1		/PACK R/A #
MCLC	JMS PRTP2		/PRINT
	LAC MCLCTR
	TAD L1		/BYPASS READ ON IMBEDDED CALLS
	SMA
	JMS DBLBUF		/GET NEXT SOURCE LINE
	JMS GETCHR
	LAC CHRHLD
	SAD L12		/LINE FEED
	JMP MCLD
	JMP MCLD+1
MCLE	LAC BRKCTR		/CHAR ENCLOSED IN <>
	SNA		/YES
	JMP MCLP
	LAC CHRHLD
	SAD L15		/CR
	SKP
	JMP MCLN
	JMS PAKRAM	/PACK AND GET NEXT LINE
	JMP MCLC
MCLP	LAC L177		/END OF ARGUMENTS INDICATOR
	JMS PAKRAM
	LAC CTR57		/GET NEXT FREE LOCATION
	SZA
	ISZ PK57AD
	LAC PK57AD
	DAC ENDUMT#	/SET END+1 OF R/A'S
	LAC PACKT		/WAS THERE A TAG
	SNA		/ON THE CALL LINE
	JMP MCLG		/NO
	CLC
	DAC MCLSW		/MACRO CALL SWITCH
	JMP PRTGPA	/MERGE SYMBOL INTO
MCLH	DZM MCLSW		/TABLE AND PRINT LINE
	JMP EXPMAC
MCLG	JMS PRTP2		/PRINT
/
/*** MACRO EXPANSION ROUTINE **
/
EXPMAC	LAC MACLOC	/STARTING LOCATION OF DEFINTION
	DAC UPKAD		/INIT 5/7 UNPACKING
	LAC L1
	DAC PKNUM
	JMS SAVRDX	/SAVE CURRENT RADIX
	SKP

/
/RETURN HERE AFTER ASSEMBLING A DEFINITION LINE
/
EXPMCR    JMS GETRST /RESTORE MACRO DEFINITION POSITION
/
EXPMD     LAC AD01		/RDBUF+2
	JMS P57INT
	CLC
	DAC EXPSW		/SET EXPANDING SWITCH
EXPMA	JMS GETCHR	/GET CHAR FROM DEFINITION
	SNA
	JMP EXPMA		/BYPASS NULL
	SAD L177		/CHECK FOR END OF DEFINITION
	JMP EXPMB
	DAC DATYPE#
	TAD LAWM3		/D/A INDICATOR
	SPA
	JMP EXPMC		/YES
	JMS GETDEF	/PACK DEFINITION INTO RDBUF
	LAC CHRHLD
	SAD L15
	SKP
	JMP EXPMA		/GET NEXT MACRO CHARACTER
	JMS GETSAV	/SAVE MACRO DEFINITION POSITION
EXPMM	JMS UPBLB		/RESET TO RDBUF+2
	JMP SCNTAG	/SCAN TAG FIELD
EXPMB	LAC NOREST
	SPA
	JMP .+3		/DEFT. ENTERED IN TABLE DURING EXPANSION
	JMS GETRAL	/RESET FOR NEXT
	DAC ENDUMT	/DEFINITION OR R/A LIST
	LAC MCLCTR
	TAD (LAC CSNL1+1
	DAC EXPMJ
	LAC MCLCTR		/UPDATE BASE FOR CREATED SYMBOLS
	TAD (DAC CSNL1+1
	DAC EXPMK
EXPMJ	LAC 0		/CSNL1, CSNL2, CSNL3
	TAD CHVDA		/CURRENT HIGH VALUE OF D/A
	TAD L1
EXPMK	DAC 0		/CSNL1, CSNL2, CSNL3
	JMS RSTRDX	/RESTORE PRE-EXPANSION RADIX
	JMP NXTLNE	/GET NEXT LINE
EXPMC	JMS GETCHR	/PICK UP D/A NUMBER
	DAC SAVDA1#
	JMS TWOS
	DAC SAVDA#	/SAVE D/A NUMBER
	JMS GETSAV	/SAVE MACRO DEF POSITON
	JMS GETRAL
	DAC UPKAD		/GET START OF R/A LIST
	LAC L1
	DAC PKNUM
EXPMF	JMS GETCHR	/GET AN R/A CHARACTER
	SAD L177		/END OF LIST
	JMP EXPME		/YES
	SAD L1		/R/A INDICATOR
	SKP		/YES
	JMP EXPMF
	JMS GETCHR	/PICK UP R/A NUMBER
	LAC CHRHLD
	TAD SAVDA		/COMPARE TO D/A/ NUMBER
	SZA!SMA
	JMP EXPME		/NO REAL ARGUMENT
	SZA		/EQUAL
	JMP EXPMF		/D/A > R/A - LOOK FURTHER

EXPMG     JMS GETCHR
          LAC CHRHLD
          SAD L1
          JMP EXPME             /NO REAL ARGUMENT
          SAD L177
          JMP EXPME             /END OF R/A LIST
          JMS GETDEF /PACK R/A CHARACTER
          CLC
	DAC RASUPL		/R/A SUPPLIED
	LAC CHRHLD		/CHECK FOR A REAL ARGUMENT
	SAD L15		/GREATER THAN 1 LINE
	SKP
	JMP EXPMG
	LAC UPKAD
	DAC SVUPK#		/SAVE 5/7 UNPACKING VALUES
	LAC PKNUM
	DAC SVPKNM#
	CLC
	DAC RASW		/SET RETURN TO REAL ARGUMENT LIST
	JMP EXPMM		/ASSEMBLE THE LINE
/
/RETURN HERE TO CONTINUE GETTING INPUT FROM R/A LIST
/
RARET	LAC SVUPK
	DAC UPKAD
	LAC SVPKNM		/RESTORE UNPACKING VALUES
	DAC PKNUM
	LAC AD01		/RDBUF+2
	JMS P57INT
	DZM RASW		/RESET RETURN SWITCH
	JMP EXPMG
EXPME=.
	.IFUND %F2
	LAC DATYPE		/CREATE SYMBOL
	SAD L2
	SKP		/YES
	JMP EXPMH		/NO
	LAC RASUPL		/WAS R/A SUPPLIED
	SPA		/NO - CREATE A SYMBOL
	JMP EXPMH		/YES
	LAC MCLCTR
	TAD (LAC CSNL1+1
	DAC .+1
	LAC 0		/PICK UP BASE
	TAD SAVDA1		/DA NUMBER
	DAC CSBVAL#	/CREATE SYMBOL VALUE
	LAC CHVDA
	TAD SAVDA		/CHECK IF CURRENT D/A NUMBER
	SMA		/IS GREATER THAN CHVDA
	JMP .+3
	LAC SAVDA1
	DAC CHVDA		/NEW HIGH VALUE OF D/A
	JMS BINDEC		/BINARY TO DECIMAL
	LAC CSBVAL		/VIA CSBVAL
	LAC L56		/.
	DAC DECOUT
	DAC DECOUT+1
	LAC AD40		/DECOUT-1
	DAC* L10
	LAW -6
	DAC CTR
EXPML	LAC* 10
	SAD L40		/CHANGE SPACE TO ZERO
	LAC (60
	DAC CHRHLD
	JMS GETDEF		/PACK THE CREATED SYMBOL
	ISZ CTR
	JMP EXPML
	.ENDC
EXPMH	JMS GETRST		/RESTORE DEFINITION POSITION
	DZM RASUPL		/R/A SUPPLIED
	JMP EXPMA
	.IFUND %F2
/
/*** .DEFIN ***
/
/MACRO DEFINITION PROCESSING
/
.DEFIN	JMS ARG		/PICK UP MACRO NAME
	JMP PRPOP		/NO NAME
	JMP ARGS		/SYMBOLIC LOOKUP
	CLC
	DAC DFNCTR#	/DEFIN COUNT
	JMS USTLKP	/LOOK UP IN USER TABLE
	SKP		/FOUND
	JMP DFNA		/NOT FOUND
	JMS CKMAC		/IS ENTRY A MACRO
	SKP		/NO
	JMP DFNB		/YES
	LAC* TMP		/IS IT A VARIABLE
	SMA		/YES
	JMP DFNC
	LAC VARCTR	/SUBTRACT 1 FROM VARIABLE COUNT
	TAD LAWM1
	DAC VARCTR
	JMP DFNB
DFNC	ISZ MRGLOC
	LAC* MRGLOC
	AND JMPLIT
	SZA		/IT'S UNDEFINED
	JMP DFND
	LAC UNDCTR	/CHANGE UNDEFINED COUNT
	TAD LAWM1
	DAC UNDCTR
	JMP DFNB
DFND	SPA
	JMP DFNB
	LAC EXTCTR	/CHANGE EXTERNAL COUNT
	TAD LAWM1
	DAC EXTCTR
	JMP DFNB
DFNA	XCT PASSNO
	JMP DFNJ
	JMS SETFLG	/P TO FLAG WORD
	200
DFNJ	JMS MERGE	/MERGE MACRO NAME INTO S/T
	LAC* L11
	DAC TMP

DFNB	LAC ENDUMT		/STARTING LOCATION OF MACRO
	XOR JMSLIT	/MACRO BIT
	DAC* TMP
	XCT PASSNO
	JMP DFNE
	LAC* TMP
	XOR XCTLIT	/SET DEFINITION ENCOUNTERED
	DAC* TMP		/IS PASS 2
DFNE	LAC ENDUMT		/SET ADDRESS
	JMS P57INT		/FOR MACRO PACKING
	CLC
	DAC DFNSW		/SET DEFIN SWITCH
	DZM DANUM#	/DUMMY ARGUMENT NUMBER
	LAC BEGUST	/SET BEGINNING OF
	DAC BEGDAL#	/D/A LIST
DFNF	JMS ARG		/SCAN FOR D/A NAME
	JMP DFNK		/NO D/A'S
	JMP ARGS		/SYMBOLIC NAMES

/
/DUMMY ARGUMENT TO SYMBOL TABLE ROUTINE
/
	LAC DANUM		/FIRST DUMMY ARGUMENT
	SNA		/NO
	JMP DFNG		/YES
	JMS TWOS
	DAC CTR	/ARGUMENT SEARCH COUNT
	LAC BEGDAL#
	DAC TMP
	LAC* TMP
	SAD PACKS
	SKP		/1ST THREE CHARS SAME
	JMP DFNG		/SYMBOL NOT IN TABLE
	ISZ TMP
	LAC* TMP
	SAD PACKS+1
	JMP DFNH		/SYMBOLC ALREADY IN TABLE
DFNG	LAC BEGDAL	/BEGINNING OF D/A LIST
	TAD LAWM3
	DAC BEGDAL
	DAC TMP		/CAN D/A BE ENTERED
	JMS TWOS		/WITHOUT OVERFLOW
			/INTO MACRO TABLE
	TAD ENDUMT
	SMA		/YES
	JMP STOVA		/NO, TYPE OVERFLOW
/
/ENTER DUMMY ARGUMENT INTO TABLE
/
	LAC PACKS		/STORE 1ST THREE
	DAC* TMP
	ISZ TMP
	LAC PACKS+1
	DAC* TMP		/STORE LAST THREE
	ISZ TMP
	LAC DANUM
	TAD CSBSW		/CREATE SYMBOL IF MINUS
	DZM CSBSW
	DAC* TMP		/STORE D/A NUMBER
	ISZ DANUM		/UPDATE D/A NUMBER
DFNH	LAC CHRHLD	/ANY MORE D/A'S
	SAD (54		/,
	JMP DFNF		/YES, GET NEXT ARGUMENT
DFNK	JMS PUTSAV
	JMP PRPOP		/NO
/

/
/PACK MACRO DEFINITION INTO SYMBOL TABLE
/
PKMCDF	JMS PUTRST
	CLC
	DAC NDIL		/NO DATA IN LINE IND
PKMDJ	DZM VARSW		/VARIABLE SWITCH
	DZM CHRNUM
	DZM PACKS		/SYMBOL PACKING AREA
	DZM PACKS+1
	JMS GETCHR	/GET NEXT DEFINITION CHAR
	JMS CKALF		/A-Z
	JMP PKMDA	/YES
	JMS CHRLKP	/.OR%
	137776
	JMP PKMDA		/YES
	SAD L57		/SLASH
	SKP
	JMP PKMDB
	LAC NDIL		/COMMENT
	SMA		/YES
	JMP PKMDB		/NO
	LAC L15
	DAC CHRHLD	/CHANGE / TO CR
	JMP PKMDB
PKMDA	JMS SIXP		/6 CHARS PACKED
	JMP PKMDC		/YES
	LAC AD08		/PACKS
	JMS P6BT
PKMDC	JMS GETCHR	/GET NEXT CHARACTER
	JMS CKALF		/A-Z
	JMP PKMDA		/YES
	JMS CKNUM		/0-9
	JMP PKMDA		/YES
	JMS CHRLKP	/.OR%
	137776
	JMP PKMDA		/YES
	JMS CHRLKP	/SPACE,TAB,;,CR
	007765		/+,-,/,*,&,!,OR\
	JMP PKMDD		/YES
	SAD (75		/=
	JMP PKMDD
	SAD (54		/,
	JMP PKMDD
	SAD (43		/#
	SKP
	JMP PKMDC
	CLC
	DAC VARSW		/SET VARIABLE SWITCH
	JMP PKMDC		/GET NEXT CHARACTER

PKMDD	JMS SEARCH	/SEARCH FOR .DEFIN,
	LAC MOPEND		/.ENDM OR .ETC
	LAC MOPSZE
	LAC AD08		/PACKS
	2
	SKP		/FOUND
	JMP PKMDG
	ISZ MRGLOC
	ISZ MRGLOC
	XCT* MRGLOC	/SWITCH TO APPROPRIATE ROUTINE
/
/.DEFIN WITHIN A .DEFIN
/
NSTDFN	LAC DFNCTR
	TAD LAWM1
	DAC DFNCTR	/ADD -1 TO COUNTER
/
NSTDA	DZM UPKCTR
	LAC AD08		/PACKS
	DAC UPKLOC
	LAC CHRNUM
	JMS TWOS
	DAC CTR
PKMDE	JMS UNPACK	/UNPACK 6-BIT CHAR
	TAD LM33		/A-Z
	SMA		/YES
	JMP PKMDF
	LAC UPKCHR
	XOR L100		/APPEND BIT 7
	SKP
PKMDF	LAC UPKCHR
	JMS PAKRAM	/PACK INTO MACRO DEFINITION TABLE
	ISZ CTR
	JMP PKMDE
PKMDK	LAC VARSW		/VARIABLE ENCOUNTERED
	SMA		/YES
	JMP PKMDB
	DZM VARSW
	LAC (43		/#
	JMS PAKRAM
PKMDB	LAC CHRHLD	/PACK CURRENT CHARACTER
	JMS PAKRAM
	LAC CHRHLD
	SAD L15
	JMP PKMDH
	SAD L73		/;
	JMP PKMCDF+1
	JMS CHRLKP	/SPACE OR TAB
	007776
	JMP PKMCDF+1	/YES
	JMP PKMDJ

PKMDH	JMS PRTP2		/PRINT
	JMS PUTSAV
	JMP NXTLNE	/GET NEXT SOURCE LINE
/
/CHECK IF PACKED SYMBOL IS A DUMMY ARGUMENT
/
PKMDG	LAC BEGDAL
	TAD LAWM1
	DAC* L10
PSDA	LAC* L10		/CHECK IF END OF D/A LIST
	TAD L1
	SAD BEGUST
	JMP NSTDA		/NOT A DUMMY ARGUMENT
	LAC* 10
	SAD PACKS
	JMP PSDB		/1ST THREE COMPARE
	ISZ* L10
	ISZ* L10
	JMP PSDA		/GET NEXT ENTRY
PSDB	LAC* 10
	SAD PACKS+1
	JMP PSDC		/D/A FOUND
	ISZ* L10
	JMP PSDA
PSDC	LAC* 10		/GET D/A NUMBER
	DAC TMPT
	SPA!CLA		/CREATE SYMBOL
	LAC L1		/YES (2)
	TAD L1		/NO (1)
	JMS PAKRAM		/PACK D/A IND
	LAC TMPT		/PACK D/A NUMBER
	JMS PAKRAM
	JMP PKMDK		/CONTINUE

/
/*** .ENDM ***
/
.ENDM	ISZ DFNCTR	/IS .ENDM ASSOCIATED WITH
	JMP NSTDA		/HIGHEST LEVEL - NO
	DZM DFNSW		/YES
	LAC L177		/PACK END OF DEFINITION
	JMS PAKRAM
	LAC CTR57
	SZA
	ISZ PK57AD
	LAC PK57AD	/SET END OF
	DAC ENDUMT	/MACRO TABLE
	LAC BEGUST
	DAC BEGDAL
	LAC EXPSW
	SPA!CLC
	DAC NOREST
	JMP PRPOP
/
/*** .ETC ***
/
.ETC	LAC DFNCTR	/IS .ETC ASSOCIATED
	TAD L1		/WITH HIGHEST LEVEL .DEFIN
	SZA		/YES
	JMP NSTDA
	LAC ENDUMT
	DAC PK57AD
	DZM CTR57
	JMP DFNF		/SCAN FOR MORE D/A'S
/
/SPECIAL TABLE FOR MACRO PSEUDO-OPS
/
MOPST=.
	.SIXBT /.DEFIN/
	JMP NSTDFN
	.SIXBT /.ENDM/
	JMP .ENDM
	.SIXBT /.ETC/
	JMP .ETC
MOPEND	MOPEND
MOPSZE	MOPEND-MOPST/3
	.ENDC
/
/REAL ARGUMENT AND MACRO
/DEFINITION PACKING ROUTINE
/
PAKRAM	0
	DAC RAMCHR#
	LAC PK57AD	/TEST FOR OVERFLOW
	TAD L1
	SAD BEGDAL
	JMP STOVA		/TYPE OUT OVERFLOW
	LAC RAMCHR
	JMS PACK57	/5/7 PACKING
	JMP* PAKRAM

/
/ROUTINE TO GET CHARACTERS FROM MACRO
/DEFINITION IN SYMBOL TABLE AND PACK
/INTO SOURCE INPUT AREA
/
GETDEF	0
	LAC PK57AD
	SAD AD39		/RDLST
	JMP .+4		/LINE OVERFLOW
	LAC CHRHLD
	JMS PACK57
	JMP* GETDEF
	JMS SETFLG		/W TO FLAG WORD
	2
	JMP* GETDEF
BEGRL3	0		/R/A ADDRESS FOR LEVEL 3
BEGRL2	0		/R/A ADDRESS FOR LEVEL 2
BEGRL1	0		/R/A ADDRESS FOR LEVEL 1
CSNL3	0		/CREATE SYMBOL BASE -L3
CSNL2	0		/CSB -L2
CSNL1	0		/CSB -L1
SVUPK3	0		/UNPACKING SAVE -L3
SVUPK2	0		/LEVEL 2
SVUPK1	0		/LEVEL 1
SVPKN3	0
SVPKN2	0
SVPKN1	0
RDXSV3	0		/RADIX SAVE -L3
RDXSV2	0		/RADIX SAVE -L2
RDXSV1	0		/RADIX SAVE -L1
/
/SAVE UNPACKING VALUES
/
GETSAV	0
	LAC MCLCTR
	TAD (DAC SVUPK1+1
	DAC .+2
	LAC UPKAD
	DAC 0
	LAC MCLCTR
	TAD (DAC SVPKN1+1
	DAC .+2
	LAC PKNUM
	DAC 0
	JMP* GETSAV
/
/RESTORE UNPACKING VALUES
/
GETRST	0
	LAC MCLCTR
	TAD (LAC SVUPK1+1
	DAC .+1
	LAC 0
	DAC UPKAD
	LAC MCLCTR
	TAD (LAC SVPKN1+1
	DAC .+1
	LAC 0
	DAC PKNUM
	JMP* GETRST
	.IFUND %F2

/
/SAVE MACRO PACKING
/
PUTSAV	0
	LAC CTR57
	DAC CT57SV#
	LAC PK57AD
	DAC PK57SV#
	JMP* PUTSAV
/
/RESTORE MACRO PACKING
/
PUTRST	0
	LAC CT57SV#
	DAC CTR57
	LAC PK57SV#
	DAC PK57AD
	JMP* PUTRST
	.ENDC
/
/SAVE CURRENT RADIX
/
SAVRDX	0
	LAC MCLCTR
	TAD (DAC RDXSV1+1
	DAC .+2
	LAC RADIX
	DAC 0
	DZM RADIX		/SET TO OCTAL
	JMP* SAVRDX
/
/RESTORE PRE-EXPANSION RADIX
/
RSTRDX	0
	LAC MCLCTR
	TAD (LAC RDXSV1+1
	DAC .+1
	LAC 0
	DAC RADIX
	ISZ MCLCTR		/SWITCH TO NEXT LEVEL
	SKP
	DZM EXPSW		/RESET EXPANDING
	JMP* RSTRDX
/
/GET START OF ASSOCIATED REAL ARGUMENTS
/
GETRAL	0
	LAC MCLCTR
	TAD (LAC BEGRL1+1
	DAC .+1
	LAC 0
	JMP* GETRAL
/MACRO9  TAPE 7
/
/SQOZING SUBROUTINE
/LAC INPUT LOC
/JMS SQOZE
/OUTPUT IN SQZOUT AND SQZOUT+1
/
SQOZE	0
	DAC UPKLOC		/INIT UNPACKING
	DZM SQZOUT	/INITIALIZE SQOZING AREA
	DZM SQZOUT+1
	DZM SQZOUT+2
	LAC AD32	/SQZOUT
	DAC SQZLOC#
	LAW -6
	DAC CTR1#
	LAW -3
	DAC CTR
	DZM UPKCTR
SQZNXT	JMS UNPACK	/GET A CHARACTER
	DAC TMP
	LAC (50
	JMS MPY	/MULTIPLY ACCUMULATED
	LAC* SQZLOC	/SQOZED VALUE BY 50 (8)
	DAC* SQZLOC
	LAC TMP	/CONVERT CHAR TO RADIX 50 (8)
	AND L40
	SNA
	JMP SQZACM	/A-Z
	LAC TMP
	AND (20
	SNA
	JMP NONAN	/.OR %
	LAW -23
	TAD TMP	/0-9
	DAC TMP
	JMP SQZACM
NONAN	LAC (33
	DAC TMP
	LAC UPKCHR	/UNPACKED CHAR
	SAD L56	/.
	ISZ TMP	/FOR %
SQZACM	LAC* SQZLOC
	TAD TMP	/ADD NEW CHAR INTO
	DAC* SQZLOC	/ACCUMULATED SQOZED VALUE
	ISZ CTR
	SKP
	ISZ SQZLOC	/UPDATE FOR NEW OUTPUT WORD
	ISZ CTR1	/CHECK FOR 6 CHARS PROCESSED
	JMP SQZNXT	/GET NEXT CHAR
	JMP* SQOZE
SQZOUT	0;	0;	0

/
/5/7 ASCII PACKING SUBROUTINE
/
/DZM CTR57
/LAC (STLOC  -OUTPUT STARTING LOCATION
/DAC PK57AD
/INPUT IN AC
/
PACK57	0
	AND L177
	DAC TMP	/SAVE INPUT CHARACTER
	CLL
	LAC CTR57
	TAD (JMP .+4
	DAC .+2	/GET CHARACTER POSITION
	LAC TMP
	0
	JMP CH571		/1ST CHAR
	JMP CH572	/2ND CHAR
	JMP CH573	/3RD CHAR
	JMP CH574	/4TH CHAR
	JMP CH575	/5TH CHAR
CH571	RTR
	RTR	/8 RIGHT
	RTR
	RTR
	DAC TMP
	LAC* PK57AD
	AND (3777
	JMP END57
CH572	RTL
	RTL	/4 LEFT
	DAC TMP
	LAW 14017
	AND* PK57AD
	JMP END57
CH573	RTR	/3 RIGHT
	RAR
	AND (17
	DAC TMP1#
	LAW 17760
	AND* PK57AD
	XOR TMP1
	DAC* PK57AD
	ISZ PK57AD
	LAC TMP	/GET 2ND HALF
	RTR
	RTR	/4 RIGHT
	AND IOTLIT
	DAC TMP
	LAC* PK57AD
	AND (77777
	JMP END57

CH574	RTL
	RTL	/8 LEFT
	RTL
	RTL
	DAC TMP
	LAC* PK57AD
	AND (700377
	JMP END57
CH575	RAL
	DAC TMP
	LAW 17400
	AND* PK57AD
	DZM CTR57	/RESET 5/7 COUNTER
	SKP
END57	ISZ CTR57	/SET COUNTER FOR NEXT
	XOR TMP	/MERGE CHARACTER
	DAC* PK57AD	/INTO 5/7 PAIR
	LAC CTR57
	SNA
	ISZ PK57AD
	JMP* PACK57	/EXIT

/
/BINARY TO OCTAL - 1 CHARACTER AT A TIME
/
/CTR=POSITION IN WORD (2'S COMPLEMENT)
/JMS BNOCT
/LAC BNLOC
/ON EXIT; CHAR IN AC
/
BNOCT	0
	LAC (JMP BN2
	TAD CTR
	DAC .+2	/GET CHARACTER POSITION
	XCT* BNOCT	/PICK UP INPUT WORD
	0
	JMP BN1	/BITS 0-2
	JMP BN2	/BITS 3-5
	JMP BN3	/BITS 6-8
	JMP BN4	/BITS 9-11
	JMP BN5	/BITS 12-14
	JMP BN6		/BITS 15-17
BN2	RAL	/3-5
	RTL
BN1	RTL	/0-2
	RTL
	JMP BN6
BN3	RAR	/6-8
	RTR
BN4	RTR	/9-11
	RAR
BN5	RAR	/12-14
	RTR
BN6	AND (7	/15-17
	XOR (60
	ISZ BNOCT	/UPDATE FOR RETURN
	JMP* BNOCT

/
/ROUTINE TO PICK UP SYMBOL VALUE
/
SYMVAL	0
	ISZ MRGLOC
	ISZ MRGLOC
	LAC* MRGLOC
	DAC NUMBR
	JMP* SYMVAL

/
/PSEUDO-OP TABLE
/
POPST=.
	.IFUND %F2
	560102	/.ABS
	230000
	JMP .ABS
	.ENDC
	560123	/.ASCII
	031111
	JMP .ASCII
	560214	/.BLOCK
	170313
	JMP .BLOCK
	560405	/.DEC
	030000
	JMP .DEC
	.IFUND %F2
	.SIXBT /.DEFIN/
	JMP .DEFIN
	.ENDC
	560423	/.DSA
	010000
	JMP .DSA
	560512	/.EJECT
	050324
	JMP .EJECT
	560516	/.END
	040000
	JMP .END
	.IFUND %F2
	560516		/.ENDC
	040300
ENDCOP	JMP .ENDC
	.ENDC
	560517	/.EOT
	240000
	JMP .EOT
	.IFUND %F2
	560625	/.FULL
	141400
	JMP .FULL
	.ENDC
	560714	/.GLOBL
	170214
	JMP .GLOBL
	.IFUND %F2
IFOP	.SIXBT /.IFDEF/
	JMP .IFDEF
	.SIXBT /.IFNEG/
	JMP .IFNEG
	.SIXBT /.IFNOZ/
	JMP .IFNOZ
	.SIXBT /.IFNZR/
	JMP .IFNZR
	.SIXBT /.IFPNZ/
	JMP .IFPNZ
	.SIXBT /.IFPOZ/
	JMP .IFPOZ
	.SIXBT /.IFUND/
	JMP .IFUND
	.SIXBT /.IFZER/
	JMP .IFZER
	.ENDC
	561117	/.IODEV
	040526
	JMP .IODEV
	561417	/.LOC
	030000
	JMP .LOC
	561703	/.OCT
	240000
	JMP .OCT
	.IFUND %F2
	562205		/.REPT
	202400
	JMP .REPT
	.ENDC
	562311	/.SIXBT
	300224
	JMP .SIXBT
	562311	/.SIZE
	320500
	JMP .SIZE
	562411	/.TITLE
	241405
	JMP .TITLE
POPEND	POPEND
POPSZE	POPEND-POPST/3	/NUMBER OF ENTRIES (OCTAL)

/
/PRINT LISTING SUBROUTINE
/
PRINT	0
	LAC FSTLNE	/FIRST LINE
	SMA	/YES
	JMP NTFLN
	DZM FSTLNE
	.IFUND %F2
	LAC BMODE		/WHAT TYPE OUTPUT
	SZA		/LINKING LOADER
	JMP PFLH1
	.ENDC
	LAC PRGSZE
	DAC LLBWRD		/OUTPUT PROG SIZE
	LAC SYMSAV
	SZA
	JMP PFLH4
	LAC LLBWRD
	XOR XCTLIT
	DAC LLBWRD
PFLH4	LAC L1
	DAC LLCODE
	JMS BLDLLB
	LAC L1
	DAC IOVS		/INIT FOR INTERNAL
	JMS GIVS		/OUTPUT INTERNALS
	LAC AD02		/FILE
	JMS SQOZE		/PUT PROG NAME IN RADIX 50
	LAC SQZOUT
	DAC LLBWRD	/DATA WORD
	LAC (7
	DAC LLCODE	/CODE
	LAC SQZOUT+1
	SNA		/4-6 CHARS
	JMP PFLH2		/1-3 CHARS
	LAC SQZOUT
	AND (177777
	XOR XCTLIT	/SET 4-6 CHARS IND
	DAC LLBWRD
PFLH2	JMS BLDLLB	/BUILD L/L BINARY
	LAC SQZOUT+1
	DAC LLBWRD	/CHARS 4-6
	SNA
	JMP PFLH3
	LAC L10
	DAC LLCODE	/CURRENT CODE
	JMS BLDLLB
PFLH3	LAC (23		/PROG NAME CODE
	DAC LLCODE
	LAC XCTLIT
	DAC LLBWRD
	JMS BLDLLB
	CLC
	DAC LASW#		/OUTPUT NEW LOAD ADDRESS SWITCH

PFLH1	JMS EJECT	/PRINT FIRST LINE HEADING
NTFLN	ISZ LNCTR#	/60 LINES PRINTED
	JMP .+3
	JMS EJECT	/PAGE EJECT ROUTINE
	ISZ LNCTR
	LAC (201004
	DAC RDBUF	/SPACES TO READ
	LAC (020100	/HEADER AREA
	DAC RDBUF+1
	LAC EXPSW		/IN MACRO EXPANSION
	SMA		/YES
	JMP .+5
	LAC (436131	/GEN* TO LINE
	DAC RDBUF
	LAC (625100
	DAC RDBUF+1
	LAC CHRHLD
	DAC TMP
	LAC RDBUF+2
	RTL
	RTL
	RTL
	RTL
	AND L177
	DAC CHRHLD
	JMS CHRLKP	/CHECK FIRST CHARACTER FOR
	157775	/LF. FF OR VT
	SKP	/FOUND
	JMP PRTLNE
	LAC RDBUF+2
	AND (3777
	DAC RDBUF+2	/NULL TO 1ST CHARACTER
/
/PRINT THE SOURCE LINE
/
PRTLNE	LAC TMP
	DAC CHRHLD
	LAC STPSW
	SPA
	JMP PRTLNA
	LAC AD35		/FLAGS -1
	JMS ZEROIT
	-6
PRTLNA	DZM PRTLNB
	LAC FLGSAV		/ANY ERRORS 
	SZA		/NO
	ISZ PRTLNB		/YES
	JMS PRTSOH		/PRINT SOURCE
MOD33B	PRTBUF+1
PRTLNB	0		/0=NORMAL, 1=ERROR LINE
	JMS PRTINT	/CLEAR OUTPUT AREA
	JMP* PRINT

/
/ROUTINE TO PRINT MULTIPLE DEFINITIONS
/ENCOUNTERED IN PASS 1
/
MDER	0
	DZM UPKCTR	/INIT 6 BIT UNPACKING
	DAC UPKLOC	/LOCATION TO UNPACK
			/INIT 5/7 PACKING
	LAC AD09	/TXTBF
	JMS P57INT
	LAW -6
	DAC MDCTR#
MDERA	JMS UNPACK	/UNPACK SYMBOL
	SNA
	JMP MDERD		/SPACE
	TAD LM33
	SMA		/A-Z
	JMP MDERE
	LAC UPKCHR
	XOR L100		/APPEND BIT 7
	JMP MDERF
MDERD	LAC L40
	SKP
MDERE	LAC UPKCHR
MDERF	JMS PACK57	/5/7 PACKING
	ISZ MDCTR
	JMP MDERA
	LAC L40
	JMS PACK57
	LAW -5
	DAC CTR
	LAC* MRGSAV	/PICK UP CURRENT
	DAC CVSMB#	/VALUE IN S/T
MDERB	JMS BNOCT		/BINARY TO OCTAL
	LAC CVSMB	/CURRENT VALUE AS INPUT
	JMS PACK57		/5/7 PACKING
	ISZ CTR
	JMP MDERB
	LAC L73	/;
	JMS PACK57
	LAW -5
	DAC CTR
MDERC	JMS BNOCT		/BINARY TO OCTAL
	LAC PC	/PC AS INPUT
	JMS PACK57
	ISZ CTR
	JMP MDERC
	LAC L15
	JMS PACK57
	JMS PRTSOH		/PRINT ERROR
MOD33C	TXTBF-1
	1
	JMP* MDER
/
/ROUTINE TO COMPUTE LITERAL STARTING
/LOCATION IN USER SYMBOL TABLE
/COUNT IN CTR (2'S COMPL)
/1ST LOC IN 10
/
LITBEG	0
	LAC LITCTR	/LITERAL COUNT
	JMS TWOS
	DAC CTR	/COUNT IN 2'S COMP
	LAC LITCTR
	CLL
	RAL	/MULTIPLY BY 3
	TAD LITCTR	/AND SUBTRACT FROM
	JMS TWOS		/SYMBOL TABLE END
	TAD USTEND
	DAC* L10
	JMP* LITBEG
/
/EJECT SUBROUTINE
/
/
EJECT	0
	LAC PK57AD	/SAVE POINTERS TO
	DAC SVMCPT#	/MACRO TABLE.
	LAC CTR57
	DAC SVMCCT#
LM70	LAW -70
	DAC LNCTR
	ISZ PGCTR	/UPDATE PAGE COUNT
	JMS PRTSOH
MOD34	HOF-1
	0
	JMS BINDEC	/CONVERT PAGE COUNT
	LAC PGCTR	/TO DECIMAL
	LAC AD23	/PGNMBR
	JMS P57INT
	LAC AD24	/DECOUT+2
	DAC* L10
	LAW -3
	DAC CTR
	LAC* 10
	JMS PACK57	/PACK PAGE NUMBER
	ISZ CTR	/INTO HEADER LINE IMAGE
	JMP .-3
	JMS PRTSOH		/PRINT HEADING
MOD34A	HDRLNE+1
	0
	JMS PRTSOH		/PRINT LF
MOD34B	LF-1
	0
	LAC SVMCPT	/RESTORE POINTERS TO
	DAC PK57AD	/MACRO TABLE.
	LAC SVMCCT
	DAC CTR57
	JMP* EJECT
/
/HEADER LINE IMAGE
/
HDRLNE=.-2
	201004;	020100	/PROGRAM
	201004;	020100
	502030;	742500	/PAGE
PGNMBR	0;	32	/NUMBER C/R
HOF	060320		/FORM FEED, CARRIAGE RETURN

/
/SYSTEM MACROS SYMBOL TABLE
/
SMSTRT=.
	.SIXBT /.CLEAR/
	CLEAR.
	.SIXBT /.CLOSE/
	CLOSE.
	.SIXBT /.DLETE/
	DLETE.
	.SIXBT /.ENTER/
	ENTER.
	.SIXBT /.EXIT/
	EXIT.
	.SIXBT /.FSTAT/
	FSTAT.
	.IFDEF	BF
	.SIXBT /.IDLE/
	IDLE.
	.SIXBT /.IDLEC/
	IDLEC.
	.ENDC
	.SIXBT /.INIT/
	INIT.
	.SIXBT /.MTAPE/
	MTAPE.
	.SIXBT /.READ/
	READ.
	.IFDEF	BF
	.SIXBT /.REALR/
	REALR.
	.SIXBT /.REALW/
	REALW.
	.ENDC
	.SIXBT /.RENAM/
	RENAM.
	.IFDEF	BF
	.SIXBT /.RLXIT/
	RLXIT.
	.ENDC
	.SIXBT /.SEEK/
	SEEK.
	.SIXBT /.TIMER/
	TIMER.
	.SIXBT /.TRAN/
	TRAN.
	.SIXBT /.WAIT/
	WAIT.
	.SIXBT /.WAITR/
	WAITR.
	.SIXBT /.WRITE/
	WRITE.
SMEND	SMEND
SMSZE	SMEND-SMSTRT/3	/SIZE OF SYSTEM MACRO TABLE

/SYSTEM MACROS DEFINITIONS
/
CLEAR.	.ASCII <11>/CAL /<001><000>/&777/<15><11>/5/<15><177>
/
CLOSE.	.ASCII <11>/CAL /<001><000>/&777/<15><11>/6/<15><177>
/
DLETE.	.ASCII <11>/CAL+1000 /<001><000>/&777/<15><11>/2/<15>
	.ASCII <11><001><001><15><177>
/
ENTER.	.ASCII <11>/CAL /<001><000>/&777/<15><11>/4/<15>
	.ASCII <11><001><001><15><177>
/
EXIT.	.ASCII <11>/CAL/<15><11>/15/<15><177>
/
FSTAT.	.ASCII <11>/CAL+3000 /<001><000>/&777/<15><11>/2/<15>
	.ASCII <11><001><001><15><177>
	.IFDEF	BF
/
IDLE.	.ASCII <11>/CAL/<15><11>/17/<15><177>
/
IDLEC.	.ASCII <11>/CAL+1000/<15><11>/17/<15><177>
	.ENDC
/
INIT.	.ASCII <11>/CAL+/<001><001>/*1000 /<001><000>
	.ASCII /&777/<15><11>/1/<15><11><001><002>/+0/<15><11>/0/<15><177>
/
MTAPE.	.ASCII <11>/CAL+/<001><001>/*1000 /<001><000>
	.ASCII /&777/<15><11>/7/<15><177>
/
READ.	.ASCII <11>/CAL+/<001><001>/*1000 /<001><000>
	.ASCII /&777/<15><11>/10/<15><11>
	.ASCII <001><002><15><11>/.DEC/<15><11>
	.ASCII /-/<001><003><15><177>
	.IFDEF	BF
/
REALR.	.ASCII <11>/CAL+/<001><001>/*1000+10000 /<001>
	.ASCII <0>/&777/<15><11>/10/<15>
	.ASCII <11><001><002><15><11>/.DEC/<15>
	.ASCII <11>/-/<001><003><15>
	.ASCII <11>/.OCT/<15><11><001><005>/+/
	.ASCII /0*100000+/<001><004><15><177>
/
REALW.	.ASCII <11>/CAL+/<001><001>/*1000+10000 /<001>
	.ASCII <0>/&777/<15><11>/11/<15>
	.ASCII <11><001><002><15><11>/.DEC/<15>
	.ASCII <11>/-/<001><003><15>
	.ASCII <11>/.OCT/<15><11><001><005>/+/
	.ASCII /0*100000+/<001><004><15><177>
	.ENDC
RENAM.	.ASCII <11>/CAL+2000 /<001><000>/&777/<15><11>/2/<15>
	.ASCII <11><001><001><15><177>
	.IFDEF	BF
/
RLXIT.	.ASCII <11>/CAL /
	.ASCII <001><000><15><11>/20/<15><177>
	.ENDC
/
SEEK.	.ASCII <11>/CAL /<001><000>/&777/<15><11>/3/<15>
	.ASCII <11><001><001><15><177>
/
TIMER.	.ASCII <11>/CAL/<15><11>/14/<15><11>
	.ASCII <001><002>/+0*100000+/<001><001><15>
	.ASCII <11>/.DEC/
	.ASCII <15><11>/-/<001><000><15><177>
/
TRAN.	.ASCII <11><001><005>/+CAL*2+/
	.ASCII <001><001>/*1000 /<001><000>
	.ASCII /&777/<15><11>/13/<15><11>
	.ASCII <001><002><15><11><001>
	.ASCII <003><15><11>/.DEC/<15><11>/-/
	.ASCII <001><004><15><177>
/
WAIT.	.ASCII <11>/CAL /<001><000>/&777/<15><11>/12/<15><177>
/
WAITR.	.ASCII <11>/CAL+1000 /<001><000>/&777/<15><11>/12/
	.ASCII <15><11><001><001><15><177>
/
WRITE.	.ASCII <11>/CAL+/<001><001>/*1000 /<001><000>
	.ASCII /&777/<15><11>/11/<15><11>
	.ASCII <001><002><15><11>/.DEC/<15><11>
	.ASCII /-/<001><003><15><177>
/
/END OF SYSTEM MACROS DEFINITIONS
/
/MACRO9  TAPE 8
/
	.IFUND %F2
/BUILD BINARY OUTPUT ROUTINE
/
BLDBIN	0
	XCT PASSNO		/WHICH PASS
	JMP* BLDBIN	/EXIT ON PASS1
	LAC BNOPTN		/BINARY REQUESTED
	SMA		/YES
	JMP* BLDBIN		/NO
	LAC LOCSW	/.LOC
	TAD BSSW	/.BLOCK
	TAD ENDSW	/OR .END ON
	TAD EXLTSW	/OR EXT OR LIT
	SNA	/YES
	JMP BLDBN1	/NO
	LAC BNWDCT	/WORD COUNT 0
	SNA	/NO
	JMP* BLDBIN	/YES, EXIT
BLDBN2	DAC WDCSAV#	/SAVE WORD COUNT
	JMS TWOS
	DAC BNWDCT	/MAKE 2'S COMPLEMENT
	TAD BNCKSM	/ADD IT TO CHECKSUM
	JMS TWOS
	DAC BNCKSM	/2'S COMPLEMENT CHECKSUM
	CAL+765		/WAIT FOR PUNCH
	12
	LAC BMODE	/WHAT MODE
	SAD L2	/.FULL
	JMP BLDBN4
	LAC WDCSAV	/UPDATE WORD
	TAD (3	/COUNT BY 3
	DAC WDCSAV	/FOR .ABS
BLDBN4	LAC WDCSAV
	JMS TWOS
	DAC PTMVCT#	/MOVE COUNT
	LAC BMODE
	SAD L2
	JMP BLDBN5
	LAC AD25		/PICK UP ADDRESS - BNADDR-1
	JMP BLDBN5+1	/TO MOVE FROM
BLDBN5	LAC AD26		/BNDATA-1
	DAC* L10
	LAC AD27		/WHERE TO MOVE IT - PTPBUF+1
	DAC* L11
BLDBN6	LAC* 10	/MOVE IT
	DAC* 11
	ISZ PTMVCT
	JMP BLDBN6
	LAC WDCSAV		/WORD COUNT
	JMS TWOS
	DAC BLDBN3
	DZM BNWDCT
	JMS NULFRM
	CAL+4765		/WRITE DUMP MODE
	11
MOD35	PTPBUF+2
BLDBN3	0		/CONTAINS W/C IN 2'S
	JMP* BLDBIN	/EXIT
BLDBN1	LAC BNWDCT	/WORD COUNT 0
	SZA	/YES
	JMP BLDBN7
	LAC PC	/PC TO
	DAC BNADDR	/ADDRESS AND
	DAC BNCKSM	/CHECKSUM
BLDBN7	LAC WRDVAL	/ADD WORD
	TAD BNCKSM	/TO CHECKSUM
	DAC BNCKSM
	LAC (DAC BNDATA
	TAD BNWDCT
	DAC .+2
	LAC WRDVAL
	DAC 0	/STORE WORD IN
	LAC BNWDCT	/APPROPRIATE POSITION
	TAD L1
	DAC BNWDCT	/UPDATE WORD COUNT
	SAD (31	/CHECK IF FILLED UP
	JMP BLDBN2	/OUTPUT IT
	JMP* BLDBIN	/EXIT
NULFRM	0
	LAC BBFSIZ
	SMA
	JMP* NULFRM
	CAL+3765
	11
MOD34C	BLNKS
	-4
	JMP* NULFRM
BLNKS	002500;	0
	0;	0
	.ENDC
PTPBUF	000500;	0	/PUNCH BUFFER
/
/THE FOLLOWING AR%LOCATIONS FOR WHICH BANK BITS
/HAVE TO BE SET. THIS TABLE CAN BE OVERLAYED WHEN THE
/PROGRAM HAS BEEN INITIALIZED.
/
MODF=.
	MOD1
	MOD1A
	MOD1B
	MOD2
	MOD3
	MOD3A
	MOD4
	MOD4A
	MOD5
	MOD5A
	MOD5B
	MOD6
	MOD19A
	MOD26
	.IFUND %F2
	MOD27
	MOD28
	MOD31
	MOD31A
	MOPEND
	MOD34C
	MOD35
	.ENDC
	MOD29
	MOD30
	MOD30A
	MOD30B
	MOD30C
	PS3END
	PS2END
	SMEND
	POPEND
	MOD33
	MOD33B
	MOD33C
	MOD34
	MOD34A
	MOD34B
	MOD36
	MOD37
	MOD38
MODL=.
MODCT=MODL-MODF\777777+1	/MOD COUNT
	.BLOCK	MODF-MODL+34+34
BNADDR=.-34
BNWDCT=.-33
BNCKSM=.-32
BNDATA=.-31
/
/BUILD LINKING LOADER BINARY OUTPUT
/
IOPHDR=BNADDR
LLCKSM=BNWDCT
LLDATA=BNCKSM
BLDLLB	0
	XCT PASSNO
	JMP* BLDLLB
	LAC BNOPTN
	SMA
	JMP* BLDLLB
	LAC (DAC LLDATA
	TAD LLWDCT#	/OUTPUT DATA WORD TO
	DAC .+2		/APPROPRIATE BUFFER POSITION
	LAC LLBWRD#
	DAC 0
	ISZ LLWDCT	/UPDATE BUFFER POSITION
	CLA
	JMS DIVIDE	/DIVIDE POSITION BY 4
	LAC LLWDCT
	LAC (4
/
/PACK CURRENT CODE INTO ACCUMULATED CODE WORD
/
	LAC DVD		/REMAINDER; 2=1ST
	SZA		/3=2ND, 0=3RD
	JMP PKCDA
	LAC LLCODE#	/PICK UP CURRENT CODE
	JMP PKCDC
PKCDA	SAD (3
	JMP PKCDB
	LAC LLCODE
	RAR!CLL
	RTR;	RTR;	RTR
	JMP PKCDC
PKCDB	CLL
	LAC LLCODE
	RTL;	RTL;	RTL
PKCDC	XOR LLBCDE#
	DAC LLBCDE	/ACCUMULATE CODE WORD
	LAC DVD
	SNA
	JMP LLB1
	LAC LLCODE	/CHECK FOR
	SAD (27		/END OF PROGRAM CODE
	SKP
	JMP* BLDLLB	/EXIT
	ISZ LLWDCT
	LAC DVD		/ADJUST WORD COUNT
	SAD L2
	ISZ LLWDCT
LLB1	LAC (DAC LLDATA
	TAD LLWDCT	/OUTPUT CODE WORD
	TAD LAWM4		/TO APPROPRIATE POSITION
	DAC .+2
	LAC LLBCDE
	DAC 0
	DZM LLBCDE	/CLEAR ACCUMULATED CODE WORD
	LAC LLWDCT
	SAD (30		/BUFFER FULL
	JMP LLB3		/YES
	LAC LLCODE
	SAD (27		/END
	JMP LLB3		/YES
	ISZ LLWDCT	/UPDATE WORD COUNT
	JMP* BLDLLB	/EXIT
LLB3	ISZ LLWDCT
	ISZ LLWDCT	/WORD / PAIR COUNT
	LAC LLWDCT
	RTL
	RTL
	RTL
	RTL
	AND (77000
	XOR (500
	DAC IOPHDR
	CAL+765		/WAIT FOR BINARY DEVICE
	12
	LAC AD29	/IOPHDR-1
	DAC* L10
	LAC AD30	/PTPBUF-1
	DAC* L11
	LAW -32
	DAC CTR
	LAC* 10		/MOVE IMAGE AREA TO PUNCH AREA
	DAC* 11
	ISZ CTR
	JMP .-3
	LAC L1
	DAC LLWDCT	/RESET COUNT
	CAL+0765		/WRITE IOPS BINARY
	11
MOD36	PTPBUF
	-32
	JMP* BLDLLB
/
/CHECK FOR L/L BINARY
/
CKFLLB	0
	.IFUND %F2
	LAC BMODE		/WHAT TYPE OUTPUT
	SZA		/LINK LOAD
	JMP* CKFLLB
	ISZ CKFLLB	/UPDATE EXIT
	.ENDC
	XCT PASSNO
	JMP* CKFLLB
	LAC LASW		/NEW LOAD ADDRESS
	SMA		/YES
	JMP LLINST
	LAC LOCSW		/LOC OR
	TAD BSSW		/BLOCK
	SZA		/NO
	JMP* CKFLLB	/EXIT
	DZM LASW
	JMS NEWLA		/GET LOAD ADDRESS
LLINST	LAC WRDVAL	/DATA WORD
	DAC LLBWRD
	LAC (4		/ABS
	DAC LLCODE
	LAC AREL
	SNA
	JMP LLINSA
	ISZ LLCODE
	LAC BITS		/-2 = 13R, 0 = 15R
	TAD LLCODE
	DAC LLCODE
LLINSA	JMS BLDLLB
	JMP* CKFLLB
/
/GET NEW LOAD ADDRESS
/
NEWLA	0
	LAC L2		/L/A CODE
	DAC LLCODE
	LAC PC		/PC IS L/A
	DAC LLBWRD
	LAC SYMTYP
	SPA
	JMP .+4
	LAC LLBWRD
	XOR XCTLIT		/SET ABSOLUTE
	DAC LLBWRD
	JMS BLDLLB		/BUILD LL-BINARY
	JMP* NEWLA
/
/GET BEGINNING OF SYMBOL TABLE
/
GBST	0
	LAC BEGUST
	DAC USTBEG
	JMS CKEST
	JMP* GBST		/NO SYMBOLS RETURN
	ISZ GBST
	JMP* GBST
/
/BUILD LINKING LOADER SYMBOLS
/
LLSTBL	0
	JMS SYM3		/PICK UP 3 WORDS OF SYMBOL
	LAC* LLSTBL	/0=LOCAL, 1=INTERNAL
	TAD (JMP LLSTA	/2=VIRTUAL
	DAC LLSTB
	ISZ LLSTBL
	.IFUND %F2
	LAC* SWD1
	SPA
	JMP LLSTB-1
	LAC* SWD3
	AND JMSLIT
	SZA
	JMP* LLSTBL	/IGNORE MACROS
	.ENDC
	LAC* SWD2		/WORD 2 OF SYMBOL
LLSTB	JMP 0
LLSTA	JMP LLSBL		/LOCAL
	JMP LLSBI		/INTERNAL
	JMP LLSBV		/EXTERNAL
LLSBL	AND JMPLIT
LSZMA	SZA!SMA
	JMP* LLSTBL	/NOT LOCAL
	JMS PUSLL		/PICK UP SYMBOL
	LAC* SWD1		/WORD1
	SMA
	JMP LLSTC
	LAC (30		/P/A CODE
	DAC LLCODE
	LAC* SWD3		/VALUE
	JMP LLSTD
LLSTC	LAC (23		/LOCAL CODE
	DAC LLCODE
LLSTE	LAC* SWD3		/PICK UP 15 BITS OF VALUE
	AND (77777
LLSTD	DAC LLBWRD
	JMS BLDLLB	/BUILD L/L BINARY
	JMP* LLSTBL
LLSBI	AND JMPLIT
	XOR JMPLIT
	SZA
	JMP* LLSTBL	/NOT INTERNAL
	JMS PUSLL
	LAC L12		/INTERNAL CODE
	DAC LLCODE
	JMP LLSTE
LLSBV	AND JMPLIT
	SAD LACLIT
	SKP
	JMP* LLSTBL	/NOT VIRTUAL
	JMS PUSLL
	LAC L11
	DAC LLCODE
	JMP LLSTE
/
/PICK UP SYMBOL FOR LINK LOADER
/
PUSLL	0
	LAC (7
	DAC LLCODE	/L/L CODE 1-3
	LAC XCTLIT
	DAC TMP		/1-3 OR 4-6 INDICATOR
	LAC* SWD2
	AND (177777
	DAC TMP1		/SAVE LAST 3 CHARS, IF ANY
	SNA
	DZM TMP
	LAC* SWD1
	AND (177777
	XOR TMP		/LENGTH IND
	DAC LLBWRD	/DATA WORD
	JMS BLDLLB	/BUILD L/L BINARY
	LAC TMP
	SMA		/> 3 CHARS
	JMP* PUSLL	/NO
	LAC L10		/L/L CODE 4-6
	DAC LLCODE
	LAC TMP1		/CHARS 4-6
	DAC LLBWRD
	JMS BLDLLB
	JMP* PUSLL
/GET INTERNAL OR VIRTUAL SYMBOLS
/
GIVS	0
	JMS GBST		/GET START OF S/T
	JMP* GIVS		/NO SYMBOLS
GIVSN	JMS LLSTBL
IOVS	0		/1=INTERNAL, 2=VIRTUAL
	ISZ USTBEG
	ISZ USTBEG	/UPDATE FOR NEXT SYMBOL
	ISZ USTBEG
	JMS CKEST		/FINISHED
	JMP* GIVS		/YES
	JMP GIVSN		/NO
/
/BINARY TO DECIMAL SUBROUTINE
/
/JMS BINDEC
/LAC INPUT LOCATION
/OUTPUT IN DECOUT THRU DECOUT+5
/
BINDEC	0
	LAC L40
	DAC DECOUT
	DAC DECOUT+1
	DAC DECOUT+2	/SPACES TO OUTPUT AREA
	DAC DECOUT+3
	DAC DECOUT+4
	DAC DECOUT+5
	XCT* BINDEC	/PICK UP INPUT
	DAC BNDVND#	/SAVE AS DIVIDEND
	LAC AD31	/DECOUT+5
	DAC DECLOC#
DVDREM	CLA
	JMS DIVIDE	/DIVIDE BY 10 DECIMAL
	LAC BNDVND
	LAC L12
	DAC BNDVND
	LAC DVD
	XOR (60	/REMAINDER IS DECIMAL
	DAC* DECLOC	/DIGIT
	LAW -1
	TAD DECLOC
	DAC DECLOC
	LAC BNDVND	/IF QUOTIENT IS 0
	SNA	/EXIT, ELSE MAKE
	JMP* BINDEC	/QUOTIENT NEW DIVIDEND
	JMP DVDREM
/
/
DECOUT	0;	0;	0
	0;	0;	0
/
/PRINTING ROUTINE
/
/JMS PRTSOH
/AREA-1 TO BE PRINTED
/0 OR 1; 0=NORMAL LINE, 1=ERROR LINE
PRTSOH	0
	LAC* PRTSOH
	DAC* L13		/AREA-1 TO BE MOVED
	LAC L766	/INITIALIZE FOR LISTING DEVICE
	DAC PRTA		/.WAIT
	LAC (CAL+2766	/.WRITE
	DAC PRTB
	ISZ PRTSOH
	LAC* PRTSOH	/TYPE OF LINE
	DAC TMP		/0=NORMAL, 1=ERROR
	ISZ PRTSOH	/UPDATE FOR RETURN
	LAC ALOPTN	/LISTING OR S/T REQUESTED
	SPA		/NO
	JMP PRTA		/YES
	TAD TMP		/ERROR LINE
	SNA		/YES
	JMP* PRTSOH	/NO, EXIT
	LAC L775	/INIT FOR TT1
	DAC PRTA		/.WAIT
	LAC L2775	/.WRITE
	DAC PRTB
PRTA	CAL		/WAIT FOR -3 OR -12
	12
/
	LAC AD36	/PRTLIN+1
	DAC* L14
/
/MOVE THE DATA TO BE OUTPUT FROM THE DONOR AREA TO 
/THE OUTPUT BUFFER. DO NOT TRANSFER NULL WORD PAIRS.
/	
	LAW -34
	DAC CTR
PRTOP	LAC* 13		/TOP OF MOVE LOOP.
	SZA		/IF THE 1ST WORD IS 0 LOOK AT 2ND
	JMP PRSTOR	/OTHERWISE STORE IN OUTPUT BUFFER.
	LAC* 13		/IS 2ND WORD 0 ALSO?
	SNA
	JMP PRCOUT	/YES  UPDATE WORD PAIR COUNT
	LAW -2		/NO..RESTORE AUTOINDEX POINTER.
	TAD* L13
	DAC* L13
	LAC* 13
PRSTOR	DAC* 14
	LAC* 13
	DAC* 14
PRCOUT	ISZ CTR
	JMP PRTOP
/
/COMPUTE WORD/PAIR COUNT OF LISTING LINE
/
	LAC CHRHLD
	DAC MP1
	LAC UPKAD		/SAVE UNPACKING VALUES
	DAC MP2
	LAC PKNUM
	DAC MP3
	LAC AD45		/PRTLIN+2
	DAC UPKAD		/UNPACKING LOCATION
	LAC L1
	DAC PKNUM
	JMS GETCHR		/GET A CHARACTER
	SAD L15		/CR
	SKP
	JMP .-3
	LAC AD45		/PRTLIN+2
	JMS TWOS		/TWOS COMPLEMENT
	TAD (4
	TAD UPKAD		/GET END - BEG
	RTL
	RTL
	RTL
	RTL
	AND (077000
	DAC PRTLIN		/WORD/PAIR COUNT
	LAC MP1
	DAC CHRHLD
	LAC MP2
	DAC UPKAD		/RESTORE UNPACKING VALUES
	LAC MP3
	DAC PKNUM
/
PRTB	CAL		/WRITE ON -3 OR -12
	11
MOD37	PRTLIN
	-72
/
	JMP* PRTSOH
/
/BANK BITS INITIALIZATION ROUTINE.
/WILL BE OVERLAYED
/
PRTLIN	034500;	0	/PRINT BUFFER
INITBB=.
	LAC* L103
	AND INTOV1	/PICK UP BANK BITS
	XOR INTOV2
	DAC BNKBTS#	/FROM MONITOR
	ADCT		/ADCON COUNT
	DAC CTR
	LAC INTOV3
	XOR BNKBTS
	DAC* L10		/FIRST LOC-1 OF TABLE
	DAC* L11		/OF ADCONS
LOOP	LAC* 10
	XOR BNKBTS
	DAC* 11
	ISZ CTR
	JMP LOOP
/
/ROUTINE TO SET BANK BITS IN LOCATIONS
/SCATTERED THROUGHOUT THE PROGRAM
/
	MODCT		/LOCATION COUNT
	DAC CTR
	LAC AD00		/MODF
	DAC TMP		/FIRST LOC. OF TABLE
LOOP1	LAC* TMP
	XOR BNKBTS	/ADD ON BANK BITS
	DAC TMP1
	LAC* TMP1
	XOR BNKBTS
	DAC* TMP1
	ISZ TMP
	ISZ CTR
	JMP LOOP1
	JMP PASS1		/PROCEED WITH ASSEMBLY
INTOV1	60000
INTOV2	BANK*20000
INTOV3	ADF-1
	.BLOCK	INITBB-.+70
/
/SOURCE INPUT DOUBLE BUFFERING
/
DBLBUF	0
	LAC L770
	TAD NOIN2		/SECONDARY REQUEST
	DAC .+1
	CAL+767		/WAIT FOR SOURCE - PRIMARY OR SECONDARY
	12
	LAC SRCBUF
	AND (17
	SAD (6
	JMP .EOT
	SAD (5		/CONTROL D ENCOUNTERED
	JMP .EOT
	LAW -44
	DAC CTR
	LAC AD03		/SRCBUF-1 MOVE SOURCE LINE
	DAC* L13		/TO PROCESSING AREA
	LAC AD04		/RDBUF-1
	DAC* L14
	LAC* 13
	DAC* 14
	ISZ CTR
	JMP .-3
	JMS RDSRC		/READ NEXT SOURCE LINE
	LAC NOPLIT
	DAC LISTIT+1
	LAC RDLST
	AND IOTLIT
	XOR (6400		/CR IN
	DAC RDLST		/PSN 74
	JMS UPBLB		/RESET TO RDBUF+2
	JMP* DBLBUF
/
/READ SOURCE ASCII INPUT
/
RDSRC	0
	LAC (CAL+2770
	TAD NOIN2		/SECONDARY REQUEST
	DAC .+1
	CAL+2767		/READ IOPS ASCII
	10
MOD38	SRCBUF
	-44
	JMP* RDSRC
SRCBUF	.BLOCK 44	/SOURCE BUFFER
/
/ADDRESS CONSTANTS WHICH REQUIRE
/BANK BITS TO BE APPENDED
/
ADF=.
AD00	MODF
AD01	RDBUF+2
AD02	FILE
AD03	SRCBUF-1
AD04	RDBUF-1
AD05	NEWTAP
AD06	PACKT
AD07	PACKN
AD08	PACKS
AD09	TXTBF
AD10	FLAGS+6
AD11	LCTN
AD13	TXTBF-1
AD14	HDRLNE+2
AD15	USTEND
AD16	UNSQZV-1
AD17	ENDVAL
AD18	FLAGS
AD19	FLAGS+4
AD20	UNSQZV
AD22	PRTBUF+2
AD23	PGNMBR
AD24	DECOUT+2
AD25	BNADDR-1
AD26	BNDATA-1
AD27	PTPBUF+1
AD28	LLDATA-1
AD29	IOPHDR-1
AD30	PTPBUF-1
AD31	DECOUT+5
AD32	SQZOUT
AD33	OBJCDE
	.IFUND %F2
AD34	FULHRW+1
	.ENDC
AD35	FLAGS-1
AD36	PRTLIN+1
AD37	PASS2
AD38	ERNMBR
AD39	RDLST
AD40	DECOUT-1
AD41	BP1T-1
AD42	BP12T-1
AD43	BST-1
AD44	LITIN
AD45	PRTLIN+2
ADL=.
ADCT=ADL-ADF\777777+1
	.IFUND %F2
/
/***ABSOLUTE BINARY LOADER ***
/
CLOF=700004
RRB=700112
RSB=700144
RSF=700101
LDSTRT=17720
BINLDR	CAF	/CLEAR FLAGS
	CLOF	/CLOCK OFF
	IOF	/INTERRUPT OFF
	CLA
	ISA	/TURN OFF API
	MPLU	/TURN OFF MEMORY PROTECT
	EEM	/SET EXTENDED MEMORY LOAD
	RSB	/START READER UP
LDNXBK=17730
	DZM LDCKSM	/CHECKSUMMING LOCATION
	JMS LDREAD
	DAC LDSTAD	/GET STARTING ADDRESS
	SPA	/BLOCK HEADING OR
	JMP LDXFR	/START BLOCK
	TAD LDCKSM	/ACCUMULATE CHECKSUM
	DAC LDCKSM
	JMS LDREAD
	DAC LDWDCT	/WORD COUNT (2'S COMPLEMENT)
	TAD LDCKSM
	DAC LDCKSM
	JMS LDREAD
	TAD LDCKSM	/PROGRAM CHECKSUM (2'S COMP)
	DAC LDCKSM	/ADDED TO ACCUMULATED CHECKSUM
LDNXWD=17746
	JMS LDREAD
	DAC* LDSTAD	/LOAD DATA INTO APPROPRIATE
	ISZ LDSTAD	/MEMORY LOCATIONS
	TAD LDCKSM
	DAC LDCKSM	/ADD IN TO CHECKSUM
	ISZ LDWDCT	/FINISHED LOADING
	JMP LDNXWD	/NO
	SZA	/LDCKSM SHOULD CONTAIN 0
	HLT	/CHECKSUM ERROR HALT
	JMP LDNXBK	/PRESS CONTINUE TO IGNORE
LDXFR=17760
	DAC LDWDCT
	ISZ LDWDCT
	JMP LDWAIT		/WAIT FOR READER
	HLT	/NO ADDRESS ON .END STATEMENT
LDREAD=17764	/MANUALLY START USER PROGRAM
	0
	RSF
	JMP LDREAD+1	/.-1
	RRB
	RSB
	JMP* LDREAD
LDWAIT=17772
	RSF
	JMP LDWAIT
	JMP* LDSTAD	/EXECUTE START ADDRESS
ENDLDR=.
HRMWD	003500;	0		/HEADER
	261;	277	/HRM START
	320;	0
LDCKSM=17775
LDSTAD=17776
LDWDCT=17777
ISA=705504
MPLU=701702
/
/*** END OF LOADER ***
	.ENDC
/
	.IFDEF PTP
	.END BANK*20000+17720
	.ENDC
	.IFUND PTP
	.END
	.ENDC
