
EXTENDED TRACE
/LMH - 9-28-65
SEM=707701
EEM=SEM+1
LEM=SEM+3
EMIR=EEM+40
16000/
GO,	LAS		/TRACE STARTING ADDRESS
	AND (77777)
	DAC #PC
	DAC W#A16		/SAVE FOR LOOP RESTORAL
	AND (60000)		/KEEP EXTENDED ADDRESS
	DAC EPC		/EXTENDED PROGRAM COUNTER
	DAC EMA		/EXTENDED MEMORY ADDRESS
	HLT
	LAS		/COUNT FOR START
	SZA
	TAD (-0)
	CMA
	DAC W#A11
	HLT
	LAS		/STOP ADDRESS
	AND (77777)
	DAC W#A12
	HLT
	LAS		/STOP COUNT
	SZA
	TAD (-0)
	CMA
	DAC W#A13
	HLT
	LAS		/LOOP COUNTER
	SZA
	TAD (-0)
	CMA
	DAC W#A15
	HLT
	LAS		/STARTING ADDRESS
	AND (77777)
	DAC W#A14
	LAS
	RAL
	LAC MLP1		/JMP JMPLP
	SZL		/DO SKIPS
	ADD (1)		/JMP JMPLP+1
	DAC SKP2
	LAS
	RTL
	LAC TYPE1	/TAB
	SZL		/DO AC ETC.
	LAC TYPE3	/JUMP TYPE4
	DAC TYPE2
	HLT		/TO SET SWITCHES FOR MAIN PROGRAM
	JMS .+1		/TO DETERMINE MEMORY BANK
MBK,	0		/BITS 3-4 INDICATE TRACE MEMORY BANK

/17754=0
/17755=EEM
/17756=JMP I 17757
/17757=TRACE
/17760=EEM
/17761=JMP I 17762
/17762=INT
/INITIALIZE THE MAIN PROGRAM
INIT,	EMIR
	LAC I PC		/ORIGINAL INSTRUCTION
	DAC W#A10B
	LAC (JMS 17754)
	DAC I PC
	LAC EPC
	ADD (17754)
	DAC AX1		/AUTO INDEX REGISTER
	DAC WA30		/SAVE ADDRESS OF MAIN PROGRAM RETURN
	LAC LOC2		/EEM
	DAC I AX1
	LAC (JMP I 17757)
	DAC I AX1	/STORE JUMP TO TRACE ROUTINE
	LAC MBK
	AND (60000)	/GET EXTENDED BITS OF TRACE MEMORY
	ADD (TRACE)
	DAC I AX1	/STORE ADDRESS OF TRACE ROUTINE
	LAC LOC2		/EEM
	DAC I AX1
	LAC (JMP I 17762)
	DAC I AX1	/STORE JUMP TO INTERRUPT ROUTINE
	LAC MBK
	AND (60000)
	ADD (INT)
	DAC I AX1
	LAM DECIMAL -5000 OCTAL
	DAC OTY+5	/MODIFY TIMING LOOP IN TTY ROUTINES
	LAC (LAC TTYK)
	DAC OTY+3
	LAC (JMP INIT3)
	DAC INSTRX+1
	JMP I WA14	/START MAIN PROGRAM WITH EXTENDED MEM OFF
TTYK,	DECIMAL -14285 OCTAL	/DELAY CONSTANT
AX1=10

/START TRACE IF REQUIRED, PROGRAM IS IN EXTEND MODE
TRACE,	DAC AC
	GLK
	DAC LINK
	LAC I W#A30
	DAC W#A31		/SAVE RETURN
	ISZ WA11		/SHOULD TRACE START
	JMP INIT2	/CONTINUE WITH THE MAIN PROGRAM
	DZM IORS#WA	/INTERRUPT OFF
	DZM #AC1		/CLEAR FOR FIRST COMPARISON
	DZM E#MIRSW	/EMIR SWITCH, NO EMIR IN PROGRESS
	DZM I#NTSW	/CLEAR INTERRUPT SWITCH
	IORS
	SPA
	ISZ IORSWA	/SET INTERRUPT ON
	IOF		/TURN INTERRUPT OFF
	LAC WA31		/RETURN
	AND (200000)
	DAC EXTD		/SAVE EXTEND MODE BIT
	RTL		/PUT EEM BIT IN LINK
	LAC (SKP)
	DAC INSTRX+1
	SZL		/NOT IN EXTEND MODE
	LAC (NOP)
	DAC EXTDSW	/SET EXTEND MODE SWITCH
	DZM TS#FSW	/0=TTO FLAG UP
	TSF
	ISZ TSFSW	/1=TTO FLAG DOWN
	LEM
	TIN
	LAW MSG2
	TSR
	EEM
	DZM TYP#SW	/0=JUST TYPED
	LAC WA10B	/ORIGINAL INSTR
	DAC I PC
	LAC I (1)	/PICK UP INTERRUPT LOCATION
	DAC INT#WA
	LAC (JMP 17760)	/SET INTERRUPT TO TRACE
	DAC I (1)	/STORE AT INTERRUPT LOCATION
	JMP MAINLP

INIT2,	LAC WA10B	/ORIGINAL INSTRUCTION
	JMP MAINLP+2	/EXECUTE THE INSTRUCTION
INIT3,	EMIR
	JMP I WA31	/RETURN TO THE MAIN PROGRAM

/MAIN LOOP FOR PROCESSING INSTRUCTIONS
MAINLP,	LAC I PC		/GET INSTRUCTION
	IOF
	DAC INSTR	/SAVE INSTRUCTION
	DAC INSTRX	/SAVE INSTRUCTION
	AND (LAW 40)
	SAD (HLT)
	JMP HLTLP
	AND (NOP)	/GET OP CODE ONLY
	DAC I#NSTR2	/SAVE OP CODE
	SAD (NOP)
	JMP INSTGO	/OPERATE,LAW OR LAM
	SAD (IOT)
	JMP IOTLP	/IOT
	SNA
	JMP CALLP	/CAL
	SAD (640000)
	JMP EAELP
	JMS ADRLP	/CALCULATE EFFECTIVE ADDR
	LAC INSTR2	/OP CODE
	SAD (JMP)
MLP1,	JMP JMPLP
	SAD (JMS)
	JMP JMSLP
	SAD (XCT)
	JMP XCTLP
	JMS CHG		/MODIFY THE ORIGINAL INSTRUCTION
INSTGO,	LAC LI#NK
	RAR		/RESTORE LINK
	LAC #AC		/RESTORE AC
INSTRX,	XX		/EXECUTE INSTRUCTION
	SKP		/JMP INIT3 AT START
	JMP SKPLP	/SKP TYPE INSTR SKIPPED
EAERET,	DAC AC		/SAVE AC
	GLK
	DAC LINK		/SAVE LINK
	JMS IDXPC	/INDEX THE PC
	AND (60000)	/KEEP EXTENDED ADDRESS BITS
MLP2,	DAC EMA		/SAVE FOR ADDRESS CALCULATION

LP2,	JMS INTRES
	LAC PC
	SAD WA12		/STOP ADDRESS
	ISZ WA13		/COUNT
	JMP MAINLP
	IOF
	LAC INTWA
	DAC I (1)	/RESTORE INTERRUPT
	LEM
	TIN
	LAW MSG1
	TSR
	EMIR
	LAC TSFSW
	SNA		/FLAG SHOULD BE DOWN
	JMP .+4
	TSF
	JMP .-1
	TCF
	LAC PC
	ADD EXTD		/ADD EXTENDED MEMORY BIT
	DAC INSTR	/TEMPORARY WORK AREA
	ISZ WA15		/MAJOR LOOP COUNTER
	SKP		/NO MORE TRACING
	JMP LP3
	LAM
	DAC WA13
	DAC WA11
	LAC (JMS 17754)
	DAC I WA16	/REPLACE ORIGINAL INSTRUCTION OF THE MAIN
	LAC WA16		/PROGRAM
	DAC PC		/SET PSEUDO-PC TO STARTING ADDRESS
LP3,	LAC IORSWA
	SZA		/INTERRUPT SHOULD NOT BE ON
	ION
	LAC LINK
	RAR
	LAC AC
	JMP I INSTR	/RETURN TO MAIN PROGRAM IN PROPER MODE
/XCT LOOP
XCTLP,	LAC EFFA		/EFFECTIVE ADDRESS
	AND (60000)	/KEEP EXTENDED ADDRESS
	DAC EMA		/SAVE FOR EFFECTIVE ADDRESS CALCULATIONS
	LAC I EFFA	/PICK UP NEW INSTRUCTION
	JMP MAINLP+2	/GET INSTRUCTION TO EXECUTE

/JMP LOOP
JMPLP,	TYPE		/TYPE TRANSFER LINE
	LAC EFFA		/EFFECTIVE ADDRESS
JMP2,	DAC PC		/CHANGE NEW PC
	AND (60000)	/KEEP EXTENDED ADDRESS
	DAC EPC		/EXTENDED PROGRAM COUNTER
	LAC INSTR
	AND (720000)
	SAD (JMP I 0)	/CHECK FOR JMP I CONDITION
	JMP EMIRCH	/CHECK FOR EMIR
JMP3,	LAC EPC		/EXTENDED PROGRAM COUNTER
	JMP MLP2		/CONTINUE

/JMS LOOP
JMSLP,	TYPE		/TYPE TRANSFER LINE
	JMS IDXPC	/INDEX THE PC
	LAC LINK
	RTR		/PLACE IN BIT 0
	AND (XCT)	/KEEP BIT 0 ONLY
	ADD E#XTD		/ADD EXTEND MODE BIT
	ADD PC		/CREATE CORRECT JMS WORD
	DAC I EFFA	/STORE IN EFFECTIVE ADDRESS
	LAC EFFA		/EFFECTIVE ADDRESS
	TAD (1)		/INDEX THE EFFECTIVE ADDRESS
	AND (17777)	/KEEP 13 BITS
	ADD EMA		/ADD EXTENDED ADDRESS
	JMP JMP2		/CHANGE THE PC

/INDEX THE PC
IDXPC,	0
	LAC PC		/PSEUDO-PC
	TAD (1)		/INDEX THE PC
	AND (17777)	/KEEP 13 BITS
	ADD E#PC		/ADD EXTENDED PC
	DAC PC		/STORE 15 BIT ADDRESS
	JMP I IDXPC

/CAL LOOP
CALLP,	LAC (JMSLP)	/ADDRESS CALC RETURN
	DAC ADRLP	/SAVE INDIRECT BIT
	LAC INSTR	/ORIGINAL INSTRUCTION
	AND (I)		/KEEP INDIRECT BIT
	XCT EXTDSW	/SKP=NOT EXTEND, NOP=EXTEND
	JMP CAL2		/EXTEND MODE
	LAW 20		/CAL ADDRESS
	JMP ADRLP+2	/TO STORE EFFECTIVE ADDRESS
CAL2,	ADD (LAC K20)	/CREATE LAC INSTR
	DAC .+1		/NEXT INSTR
	LAC K20		/OR LAC I K20
	JMP ADR2+1	/TO STORE EFFECTIVE ADDRESS
K20,	20

/IOT LOOP.  CHECK FOR COMMANDS WHICH REFERENCE SWITCHES ETC.
IOTLP,	LAC INSTR
	SAD (ION)
	JMP IONLP
	SAD (EEM)
	JMP EEMLP
	SAD (IOF)
	DZM IORSWA		/CLEAR ION SWITCH
	SAD (LEM)
	JMP LEMLP
	SAD (IORS)
	JMP IORSLP
	SAD (SEM)
	JMP SEMLP
	SAD (EMIR)
	JMP EMIRLP
	JMP INSTGO	/IOT CAN BE EXECUTED
/ION LOOP
IONLP,	ISZ IORSWA	/SET INTERRUPT ION
	JMS IDXPC	/INDEX THE PC
	LAC TYPSW
	SZA		/JUST TYPED
	JMP .+3
	TSF
	JMP .-1
	TCF
	ISZ TYPSW		/CLEAR TYPE SWITCH
	JMP LP2+1
/IORS LOOP
IORSLP,	IORS
	AND (377777)
	DAC AC
	LAC IORSWA
	SZA
	LAC (XCT)	/ADD IN INTERRUPT ON BIT
	ADD AC
	DAC AC
IORS1,	JMS IDXPC
	JMP LP2

/HALT LOOP
HLTLP,	LEM
	TIN
	LAW MSG4
	JMS LOCLP
	JMP INSTGO

LOCLP,	0
	TSR
	LAW MSG3
	TSR
	LAC PC
	TWDZ6
	DZM TYPSW		/SET SWITCH FOR JUST TYPED
LOC2,	EEM
	JMP I LOCLP

/EMIR LOOP
EMIRLP,	ISZ EMIRSW	/SET EMIR SWITCH

/EEM LOOP
EEMLP,	JMS EEMLP2		/SET EXTEND MODE ON
	JMP IORS1

/LEM LOOP
LEMLP,	JMS LEMLP2		/SET EXTEND MODE OFF
	JMP IORS1	/CLEAR SWITCH

/SEM LOOP
SEMLP,	LAC EXTD
	SZA
	JMP SKP1		/SIMULATE SKIP
	JMP IORS1

/CHECK FOR EMIR CONDITION
EMIRCH,	LAC EMIRSW
	SNA		/IS EMIR CONDITION SET

	JMP EMIR3	/CHECK FOR JMP I 0
	JMS LEMLP2		/SET EXTEND MODE OFF
	LAC EMIRWA	/INDIRECT LOCATION
	AND (200000)
	SZA		/EXTEND MODE TO BE SHUT OFF
	JMS EEMLP2		/SET TEXT END MODE ON 
	DZM EMIRSW	/CLEAR EMIR
EMIR3,	LAC INSTR
	SAD (JMP I 0)
	SKP
	JMP JMP3
	LAC INTSW	/ARE WE IN INTERRUPT
	SNA		/YES, LEAVE INTERRUPT
	JMP JMP3		/CONTINUE
	DZM INTSW
	LAC INTSV
	RAL		/RESTORE LINK
	LAC INTAC	/RESTORE AC
	EMIR
	ION
	JMP I INTSV

LEMLP2,	0
	DZM EXTD		/CLEAR EXTEND BITS
	LAC (SKP)
	DAC EXTDSW		/CLEAR EXTEND SWITCH
	JMP I LEMLP2

EEMLP2,	0
	LAC (200000)
	DAC EXTD		/SET EXTEND BITS
	LAC (NOP)
	DAC EXTDSW		/SET EXTEND SWITCH.
	JMP I EEMLP2

/INSTRUCTIONS TO CATCH INTERRUPT, EXTEND MODE IS ON
INT,	DAC INT#AC	/SAVE ACCUMULATOR
	LAC I (0)
	DAC I#NTSV	/SAVE REAL RETURN
	LAC LINK
	RTR
	AND (XCT)	/SAVE BIT 0 ONLY
	ADD EXTD		/PUT IN EXTEND MODE BIT
	ADD PC
	DAC I (0)	/CREATE ACTUAL CONTENTS OF 0
	LEM
	TIN
	LAW MSG5
	JMS LOCLP
	LAC (1)
	DAC PC		/SET PC CORRECTLY
	DZM EPC		/CLEAR EPC
	DZM EMA		/CLEAR EMA
	ISZ INTSW	/SET INTERRUPT SWITCH
	JMS LEMLP2		/SET EXTEND MODE OFF
	DZM IORSWA	/CLEAR INTERRUPT SWITCH
	LAC INTWA	/PICK UP SAVED INSTR
	JMP MAINLP+1

/EAE LOOP
EAELP,	LAC INSTR	/ORIGINAL INSTRUCTION
	AND (700)	/KEEP BITS 9,10,11
	SAD (100)	/MULTIPLY
	JMP EAEL2	/PICK UP 2ND OPERAND
	SAD (300)	/DIVIDE
	JMP EAEL2	/PICK UP 2ND OPERAND
	JMP INSTGO	/NORMAL RETURN
EAEL2,	JMS IDXPC	/INDEX THE PC
	LAC I PC		/PICK UP THE OPERAND
	DAC INSTR+1	/STORE OPERAND
	LAC LINK
	RAR		/RESTORE LINK
	LAC AC		/RESTORE AC
INSTR,	XX		/EAE INSTRUCTION
	XX		/OPERAND
	JMP EAERET	/CONTINUE

/SKIP LOOP
SKPLP,	DAC AC		/SAVE AC
	GLK
	DAC LINK		/SAVE LINK
SKP1,	LAC PC		/PROGRAM COUNTER
	TAD (2)		/SKIP
	AND (17777)	/KEEP 13 BITS
	ADD EPC		/EXTENDED PC
	DAC EFFA		/STORE AS EFFECTIVE ADDRESS
SKP2,	JMP JMPLP	/OR JMP JMPLP+1

MSG1,	TEXT .END TRACE.
MSG2,	TEXT /ADDR.     INSTR.   JMP TO   L ACCUM/
MSG3,	TEXT . AT LOCATION .
MSG4,	TEXT .HALT.
MSG5,	TEXT .INTERRUPT.

/CALCULATE EFFECTIVE ADDRESS OF THE INSTRUCTION
ADRLP,	0
	LAC I#NSTR	/PICK UP INSTRUCTION
	AND (17777)	/TAKE 13 BIT ADDRESS
	ADD #EMA		/ADD EXTENDED MEMORY BITS
	DAC #EFFA		/STORE AS EFFECTIVE ADDR
	LAC INSTR	/PICK UP INSTRUCTION
	AND (I)		/KEEP INDIRECT BIT
	SNA		/IS INDIRECT INSTR
	JMP I ADRLP	/NOT INDIRECT, EXIT
	LAC EFFA		/PICK UP EFFECTIVE ADDRESS
	AND (17770)	/KEEP BITS 5-14 ONLY
	SNA		/ADDR IS GREATER THAN 7
	JMP ADR2		/ADDR IS LESS THAN 10
	AND (17760)	/ELIMINATE BIT 14
	SZA		/ADDR IS BETWEEN 10 AND 17
	JMP ADR2		/ADDR IS GREATER THAN 17
	ISZ I EFFA	/SIMULATE AUTO INDEX (AC IS 0)
ADR2,	LAC I EFFA	/PICK UP INDIRECT ADDRESS
	DAC EMIR#WA	/FOR EMIR CHECK
	AND (77777)	/KEEP 15 BIT ADDRESS
EXTDSW,	SKP		/OR NOP IF IN EXTEND MODE
	JMP .+3		/MAIN PROGRAM IS IN EXTEND MODE
	AND (17777)	/TAKE 13 BIT ADDRESS
	ADD EMA		/ADD EXTENDED MEMORY BITS
	DAC EFFA		/STORE AS EFFECTIVE ADDR
	JMP I ADRLP	/EXIT

/CHANGE INSTRUCTION TO REFER TO CALCULATED EFFECTIVE ADDRESS
CHG,	0
	LAC INSTRX
	AND (NOP)	/KEEP OP CODE
	ADD (I EFFA)
	DAC INSTRX
	JMP I CHG

/TYPING LOOP
TYPE=JMS .
	0
	LEM
	TIN
	LAC PC
	TWDZ6		/TYPE CURRENT PC
TYPE1,	TAB
	LAC INSTR
	TWORD		/TYPE ACTUAL INSTRUCTION
	6
	TAB
	LAC EFFA
	TWDZ6		/TYPE NEW PC
TYPE2,	TAB		/OR JMP TYPE4
	LAC LINK
	TDIGIT		/TYPE LINK
	TSP
	LAC AC
	SAD A#C1
TYPE3,	JMP TYPE4
	DAC AC1
	TWDZ6		/TYPE AC
TYPE4,	DZM TYPSW	/SET TYPE SW TO JUST TYPED
	EEM
	JMP I TYPE-JMS	/EXIT

TWDZ6=JMS .
	0
	TWORDZ		/TYPE 6 CHARACTER ZERO SUPPRESSED WORD
	6
	JMP I TWDZ6-JMS

/INTERRUPT RESTORE
INTRES,	0
	LAC IORSWA		/ION SWITCH
	SNA
	JMP I INTRES	/EXIT
	LAC TYPSW
	SZA		/JUST TYPED
	JMP INTION		/DO NOT WAIT FOR TT FLAG
	TSF
	JMP .-1		/WAIT FOR TT FLAG
	TCF
	ISZ TYPSW		/CLEAR TYPE FLAG
INTION,	ION
	JMP I INTRES

/TELETYPE OUTPUT PACKAGE,OCTAL PRINT,ASCII-FIODEC LMH  9-2-65
/TURNS INTERRUPT OFF

/OCTAL PRINT, WITH ZERO SUPPRESSION
/FORMAT	LAC WD
/	TWORDZ
/	N	/N=NUMBER OF DIGITS TO PRINT FROM LEFT END OF WORD

OCTAL
TWORDZ=JMS .
	0
	DAC DCPN#UM
	LAC (SZA)
	DAC TWORDZ+17-JMS
	LAC I TWORDZ-JMS
	CMA
	DAC DCPC#NT
	ISZ DCPCNT
	ISZ TWORDZ-JMS
	LAC DCPNUM
	RTL
	RAL
	DAC DCPNUM
	RAL
	AND (7)
	SZA	/MODIFIED
	JMP TWORDZ+25-JMS
	ISZ DCPCNT
	JMP TWORDZ+11-JMS
	TDIGIT
	JMP I TWORDZ-JMS
	DAC DCPD#IG
	LAC (JMP TWORDZ+31-JMS)
	DAC TWORDZ+17-JMS
	LAC DCPDIG
	TDIGIT
	ISZ DCPCNT
	JMP TWORDZ+11-JMS
	JMP I TWORDZ-JMS

/OCTAL PRINT, NO ZERO SUPPRESSION
/FORMAT SAME AS TWORDZ

TWORD=JMS .
	0
	DAC DCPNUM
	LAC TWORD-JMS
	DAC TWORDZ-JMS
	LAC (JMP TWORDZ+31-JMS)
	JMP TWORDZ+3-JMS

/TABLE FOR OCTAL TO DECIMAL CONVERSION
DECIMAL
DCPTAB,	100000	10000	1000	100	10	1
OCTAL

/TELETYPE OUTPUT PACKAGE MODIFIED FOR MICROTOG LMH (DLF) 12-5-64

EXT=JMP I-JMS	TTAB=10

/TYPE 1 CHARACTER FROM AC BITS 12-17

TY1=JMS .
	0
	RAR
	JMS TY1A
	EXT TY1

/TYPE 1 CHARACTER (5 BIT), LINK INDICATES CASE

TY1A,	0
	DAC T#EMY
	AND (37
	SNA
	JMP TY2
	703301
	SKP
	JMP TY1BBB
	LAC OCL
	SPL
	LAC OCU
	SAD OCS
	JMP . 3
	JMS OTY
	DAC OCS
	LAC TEMY
	JMS OTY
	ISZ T#BC
TY2,	LAC TEMY
	JMP I TY1A

/TYPE 3 CHARACTERS FROM AC 0-5, 6-11,12-17 RESPECTIVELY

TY3=JMS .
	0
	JMS RL6
	JMS TY1A
	JMS RL6
	JMS TY1A
	JMS RL6
	JMS TY1A
	EXT TY3

/TYPE A CARRIAGE RETURN, AND LINE FEED

TCR=JMS .
	0
	703301
	JMP TCRSSS
	LAW 215
	JMS OTY
	LAW 212
	JMP TCRRRR
TCRSSS,	LAW 2
	JMS OTY
	LAW 10
TCRRRR,	JMS OTY
	DZM TBC
	EXT TCR

/TELETYPE OUTPUT PACKAGE - PAGE 2


/TYPE A SPACE

TSP=JMS .
	0
	LAW 4
	703301
	SKP
	LAW 240
	JMS OTY
	ISZ TBC
	EXT TSP

/TYPE A TABULATION

TYT=JMS .
TAB=TYT
	0
	LAC TBC
	ADD (-TTAB-1
	SMA
	JMP .-2
	ADD (1
	SMA
	LAC (-TTAB-1
	ADD (-1
	DAC T#EM
	TSP
	ISZ TEM
	JMP .-2
	EXT TYT

/TYPEWRITER INITIALIZE

TIN=JMS .
	0
	LAC OCL
	DAC OCS
	703301
	JMS OTY
	TCR
	EXT TIN

/TYPE THE DIGIT IN THE AC

TDIGIT=JMS .
	0
	AND (17
	ADD (LAC NCT
	DAC . 1
	XX
	703301
	JMP TDIGT1
	RCL
	JMS RL6
	JMS OTY
	ISZ TBC
	EXT TDIGIT
TDIGT1,	TY1
	EXT TDIGIT

/TELETYPE OUTPUT PACKAGE - PAGE 3

/TYPE A STRING OF CHARACTERS

TSR=JMS .
	0
	DAC T#EMY1
	LAC (JMP TSR1
	DAC TY1A 4
	LAC I TEMY1
	TY3
	ISZ TEMY1
	JMP .-3
TSR1,	LAC (JMP TY2
	DAC TY1A 4
	LAC TEMY1
	EXT TSR
/OUTPUT ONE FIVE BIT CHARACTER
OTY,	0
	IOF
	DAC TWORD-JMS	/SAVE
	LAC NIOT		/COUNTER
	703341
	LAW
	DAC RL6
	LAC TWORD-JMS
	TSF
	SKP
	JMP .+3
	ISZ RL6
	JMP .-4
	TLS
	JMP I OTY

/ROTATE LEFT 6

RL6,	0
	RTL
	RTL
	RTL
	JMP I RL6

/TABLE OF DIGITS

NCT,	600033	610073	620063	630041
	640025	650003	660053	670071
NIOT,	700031	710007
/CASE STORAGE

OCU,	33
OCL,	37
OCS,	0

TY1BBB,	ADD (LAC MTATAB
	DAC . 1
	XX
	SZL
	JMP TY2-2
	JMS RL6
	RTL
	RTL
	JMP TY2-2
/BAUDOT TO ASCII CONVERSION, LWR CASE IN LEFT HALF, UPPER CASE IN RIGHT HALF
MTATAB,	200200	324265	215215	317271
	240240	310243	316254	315256
	212212	314251	322264	307246
	311270	320260	303272	326273
	305263	332242	304244	302277
	323207	331266	306241	330257
	301255	327262	312247	377377
	325267	321261	313250	377377
START
