/RELOCATABLE ASSEMBLER PART 4A 6-6-63

/PSEUDO-INST CHAR

FIODEC

PCHAR,	JMS GCII
	JMS GCC
	SAD (CHAR RL
	JMP CHAR1
	ISZ DOCHAR 1
	SAD (CHAR RM
	JMP CHAR1
	ISZ DOCHAR 1
	SAD (CHAR RR
	JMP CHAR1
	JMS ERR
	FLEX IFI

CHAR1,	JMS I GCI
	XCT DOCHAR 1
	DAC NUM
	JMP PFLEX 4

TELETYPE

/TEXT PSUEDO-INST

PTEXT,	JMS GCC
	LAC F#CHR
	DAC END#CHR
	JMS GCII
	JMS I GCI
	DAC TSC#HR
	LAC FCHR
	SAD ENDCHR
	JMP OUT
	LAC TSCHR
	JMS DOCHAR
	JMP PTEXT 4
	DZM C1NR
	JMS DWD
	ISZ CAI
	JMS TSET
	JMP PTEXT 4

OUT,	LAC ENDCOD
	XCT DOCHAR 1
	ADD NUM
	DZM C1NR
	JMS DWD
	ISZ CAI
	JMP GO


/MORE TELETYPE INPUT PSEUDO-INSTS

PFLEX,	JMS GCII
	JMS I GCI
	JMS DOCHAR
	JMP .-2
	JMS GCHAR
	JMP ILF
	JMP ILF
	JMP RETI

/SOME ROUTINES TO HANDLE THE CHARACTER INPUT INSTRUCTION

GETTAB,	0
	LAC CC#T
	ADD (-TAB1
	JMP .+2
	ADD (-TAB
	SMA
	JMP .-2
	ADD (1
	SMA
	LAC (-TAB
	ADD (-1
	JMP I GETTAB


ILF,	JMS ERR
	FLEX IFI
	JMP PFLEX+4

MEMOV,	JMS ERR
	FLEX SCE
	HLT!CLA
	JMP .-1

/GET NEXT TELETYPE CHARACTER

GCT,	0
	JMS GCC
	SNA
	JMP SSSP
	SAD (74
	JMP SUC
	SAD (72
	JMP SLC
	SAD (77
	JMP SSCR
	SAD (36
	JMP SSTB
	ADD (LAC CTABLE
	DAC .+1
	XX
GCT1,	NOP
	AND (77
GCT2,	ISZ CCT
	DAC TCHR
	RCR
	JMS . 1
GCAS,	0
	RAL
	JMP I GCT

SUC,	LAC (JMS RR6
	JMP .+2
SLC,	LAC (NOP
	DAC GCT1
	JMP GCT 1


/SPECIAL CHARACTERS IN TELETYPE PSEUDO-OPS

SSCR,	LAC (JMP SSLF
	DAC GCT+1
	JMS SSRET
	2

SSLF,	LAC (JMS GCC
	DAC GCT 1
	DZM CCT
	JMS SSRET
	10

SSSP,	JMS SSRET
	4

SSRET,	0
	LAC GCAS
	RAL
	LAC I SSRET
	RAL
	JMP GCT2

SSTB,	JMS GETTAB
	DAC SST#BC
	LAC (JMP .+2
	DAC GCT 1
	ISZ SSTBC
	JMP .+3
	LAC (JMS GCC
	DAC GCT 1
	JMP SSSP


/SOME MORE FLEXO INPUT ROUTINES

GCII,	0
	LAC (NOP
	DAC GCT1
	LAC (JMS GCC
	DAC GCT 1
	DZM CCT
	DZM GCAS
	LAC (NOP
	DAC GCAL-3
	JMS TSET
	JMP I GCII

/GET NEXT ANELEX CHARACTER

GCA,	0
	JMS GCC
	SAD (74
	JMP GCAU
	SAD (72
	JMP GCAL
	SAD (36
	JMP GCATB
	SAD (77
	CLA
	NOP
	ISZ CCT
	JMP I GCA

GCAL,	LAC (NOP
	DAC .-4
	JMP GCA 1
	
GCAU,	LAC (JMP GCAU1
	JMP GCAL+1

GCAU1,	ADD (LAC CTABLE	/FOR UPPER CASE CHAR
	DAC .+1
	XX
	JMS RL6
	RAL
	AND (77
	JMP I GCA

GCATB,	JMS GETTAB
	DAC SSTBC
	LAC (JMP .+2
	DAC GCA 1
	ISZ SSTBC
	JMP .+3
	LAC (JMS GCC
	DAC GCA 1
	CLA
	JMP GCAL-2


/GET A CHARACTER AND DECODE

GCHAR,	0
	JMS GCC
	ADD (LAC TTT
	DAC . 1
	XX
GMOD,	NOP		/FOR \& OR \!
	AND (777
	DAC TEM
	AND (3
	JMS DSP
	JMP GNUM
	JMP GLET
	JMP GPNC
	LAC TEM
	JMS RR3
	AND (7
	JMS DSP
	JMP ILLEGAL
	JMP GUC
	JMP GLC
	JMP GCHAR 1
	JMP GOVBAR
	JMP GUNBAR

GPNC,	LAC TEM
	JMS RR3
	DAC TEM
	AND (7
	DAC PCLASS
	LAC TEM
	JMS RR3
	AND (17
	DAC PN#UMB
	ADD (JMP PDSPT-1
	DAC PNC
	ISZ GCHAR
	ISZ GCHAR
	JMP I GCHAR

GLET,	ISZ GCHAR
GNUM,	LAC TEM
	JMS RR3
	AND (77
	DAC CHR
	JMP I GCHAR

GUC,	LAC (JMS RR9
	JMP . 2
GLC,	LAC (NOP
	DAC GMOD
	JMP GCHAR 1

GOVBAR,	ISZ OVBAR
	JMP GCHAR 1

GUNBAR,	ISZ UN#BAR
	JMP GCHAR 1

/ROUTINE TO CHECK AN 8 BIT
/FIO-DEC CHARACTER

CHARCK,	0
	LAC FCHR
	DZM PARITY
	RCR
	RCR+SPL-OPR
	ISZ PAR#ITY
	SZA
	JMP .-3		/LAST BIT IN LINK
	LAC PARITY
	SPL+RAR-OPR
	CML
	SML
	JMP PARERR
	LAC FCHR
	AND (77
	JMP I CHARCK

PARERR,	JMS ERRA
	FLEX ILP
	LAC SYMPT
	JMS PRS
	JMS TYT
	LAC FCHR
	JMS OPS
	LAC FCHR
	HLT
	JMS TCR
	LAT
	JMP PARERR-2

GCC,	0
	JMS GCR
	JMS CHARCK
	JMP I GCC

/ILLEGAL CHARACTER FOUND IN GCHAR

ILLEGAL,	JMS ERRA
	FLEX ICH
	LAC FCHR
	JMS OPS
	JMS TCR
	JMP GCHAR 1

/DISPATCH TABLE FOR CLASS 2 PUNCT

PDSPT,	JMP TERM
	JMP TERM
	JMP CONST
	JMP ENDCON
	JMP COMMA
	JMP EQUALS
	JMP SLASH
	XX	XX	XX	XX

ENDCON,	JMP GO

/INITIALIZE AND TERMINATE INTERRUPT ROUTINES

WAIT,	0
	LAC PON
	SPA
	JMP I WAIT
	JMP WAIT 1

PUNCHI,	0
	LAW PUNBEG
	DAC PUNI
	DAC PUNO
	CLC
	DAC PON
	LAM PUNBEG-PUNEND+1
	DAC PUNCNT
	JMP I PUNCHI

R1E1AD,	0
	LAS
	AND (200
	SZA!STL
	CML
	LAC (NOP
	SZL
	LAC (SKP
	DAC GCC2
	LAC (CLA
	SZL
	LAC (NOP
	DAC TAPINH
	LAC (200
	DAC AFC#ASE
	DZM MEDI#AT
	LAW TAPBUF
	DAC TAPO
	DAC TAPI
	LAC (RRB
	DAC TAPIN
	CLC
	DAC TAPCNT
	DAC RON
	JMP I R1E1AD


/CODE TABLE FOR INPUT TRANSLATION
/BYTES ARE 3BITS, 3 BITS, 3 BITS
/MEANING   NUMBER CLASS  TYPE

TTT,	012012	3010
	3020	3030
	3040	212050
	312060	3070
	3100	3110
	3003	33033
	3003	3003
	3003	3003

	3000	3722
	3231	3241
	3251	3261
	3271	3301
	3311	3321
	3303	622522
	3003	3003
	222222	3003

	53003	3121
	3131	3141
	3151	3161
	3171	3201
	3211	3221
	3003	3003
	012412	232422
	3043	132322

	3003	3011
	3021	3031
	3041	3051
	3061	3071
	3101	3111
	23023	3331
	13013	3003
	3003	122122

/TABLE FOR FIO-DEC TO ANELEX AND TELETYPE CONVERSION

CTABLE,	01110	324373	/SPACE 1 "
	126563	130041	/2'  3_
	140025	150003	/4%  5!
	160053	170071	/6&  7<
	340031	350007	/8>  9^
	0	0
	0	0
	0	0

	360033	374757	/0@  /?
	225050	230202	/ST
	247070	253636	/UV
	266262	275656	/WX
	305252	314242	/YZ
	0	533515	/,=
	0	0
	0	0

	600000	416464	/$ J
	427474	432222	/KL
	441616	451414	/MN
	460606	473232	/OP
	507272	512424	/QR
	0	0
	741061	750023	/-+ )]
	760000	770075	/#\   ([

	0	616060	/  A
	624646	633434	/BC
	644444	654040	/DE
	665454	672626	/FG
	701212	713030	/HI
	0	720017	/.*
	0	0
	0	000504	/C.R.

/INTERNAL TO TELETYPE

TTABLE,	60	4634	/SP A B C
	4440	5426	/D E F G
	1230	6474	/H I J K
	2216	1406	/L M N O
	3272	2450	/P Q R S
	0270	3662	/T U V W
	5652	4210	/X Y Z .
	3373	6341	/0 1 2 3
	2503	5371	/4 5 6 7
	3107	0000	/8 9

/TITLE PUNCH TABLE

TITLE,	0	0	/SPACE
	40	774200	/1
	4651	515162	/2
	3245	454122	/3
	1077	111214	/4
	3145	454517		/5
	3045	454536	/6
	305	710101	/7
	3245	454532	/8
	3651	515106	/9
	0	0
	0	0
	0	0
	0		0
	0	0
	0	0

	3641	414136	/ZERO
	0	770000	/ /
	3045	454522	/S
	101	770101	/T
	3740	404037	/U
	730	603007	/V
	2760	146037	/W
	4122	142241	/X
	102	740201	/Y
	4345	415161	/Z
	0	0
	1414	141414	/=
	0	0
	0	0
	0	0
	0	0



/MORE TITLE PUNCH TABLE

	0	0
	3740	404020	/J
	4122	141077	/K
	4040	404077		/L
	7702	140277	/M
	7720	140277	/N
	3641	414136	/O
	611	111177	/P
	5621	514136	/Q
	4631	111177	/R
	0	0
	0	0
	1010	101010	/-
	1422	410000	/)
	1010	741010	/+
	41	221400	/(
	0	0
	7611	111176	/A
	3245	454577	/B
 2241	414136	/C
	3641	414177	/D
	4141	454577	/E
	101	50577	/F
	3051	514136	/G
	7710	101077		/H
	41	774100	/I
	3	10000	/QUOTE
	60	600000	/.
	2	30000	/QUOTE

START
