/
/NARBUG LOADER
	*20
TPAGE,	0
DWORDS, 0
C200,	200
C145,	145
CNTR,	0
TTOUT,	TTOUT1
NTRK,	0
BIN,	BIN1
CNTR2,	0
HALT,	HALT1
MSG,	MSG1
CRLF,	CRLF1
TTIN,	TTIN1
*176
WC,	7750
MA,	7751
/WE DO NOT START AT 200
/AS SOME OF THE TAPES MIGHT
/MIGHT CLOBBER 200
	*400
BEG1,	CAM
	TAD NTRK
	SHL
	5
	DEAL
	CLA
	DCA TPAGE
	JMS I BIN
	TAD C200
	DCA DWORDS
	JMS DWRT
	TAD C145
	DCA DWORDS
	TAD (-20
	DCA CNTR
LOOP,	JMS I BIN
	ISZ TPAGE
	JMS DWRT
	TAD TPAGE
	TAD (260
	JMS I TTOUT
	ISZ CNTR
	JMP LOOP
	JMP I .+1
	600
DWRT,	0
	TAD C7577
	DCA I 177
	TAD DWORDS
	CIA
	DCA I 176
	TAD TPAGE
	MQL MUY
	200
	CLA MQA
	DMAW
	DFSC
	JMP .-1
	DFSE
	JMP DERR
	JMP I DWRT
DERR,	JMS I MSG
	TEXT <DISC TRANSFER ERROR!<
	JMS I CRLF
	JMS I HALT
	JMP I DWRT
	JMP I DWRT
C7577,	7577
/END OF EDITOR PAGE
*600
	JMS I MSG
	TEXT <INPUT F.P. PACKAGE<
	JMS I CRLF
	JMS I HALT
	JMS I BIN
	CLA CLL
	TAD (-3100
	DCA I WC
	TAD (4477
	DCA I MA
	TAD NTRK
	DEAL
	CLA CLL
	TAD (4500
	DMAW
	DFSC
	JMP .-1
	TAD (-200
	DCA I WC
	TAD (7577
	DCA I MA
	TAD NTRK
	DEAL
	CLA CLL
	DMAR
	DFSC
	JMP .-1
	JMP I .+1
	7600
*1000
BIN1,	0
	CAM
	DCA CKSUM1
LDRLP,	JMS READ1
	TAD CHAR
	AND (200
	SZA CLA
	JMP LDRLP
LP1,	JMS CKSUM
	TAD CHAR
	AND C100	/ORIGIN?
	SZA CLA
	JMP ORIGIN
	TAD CHAR
	SHL
	5
	DCA T1
	JMS READ1
	JMS CKSUM
	TAD CHAR
	TAD T1
	DCA T1
	JMS READ1
	TAD CHAR	/TRAILER?
	TAD (-200
	SNA CLA
	JMP FIN
	TAD T1
	DCA I ADDRS
	TAD ADDRS
	IAC
	DCA ADDRS
	JMP LP1
FIN,	CLA CLL
	TAD T1
	LSR
	5
	DCA CHAR
	SHL
	5
	TAD CHAR
	CIA
	TAD CKSUM1
	CIA
	TAD T1
	SZA CLA
	JMP ERR
	JMP I BIN1
READ1,	0
	RFC
	RSF
	JMP .-1
	RRB
	DCA CHAR
	JMP I READ1
CHAR,	0
ERR,	JMP I .+1
	1200
ORIGIN, TAD CHAR
	SHL
	5
	DCA T1
	JMS READ1
	JMS CKSUM
	TAD T1
	TAD CHAR
	DCA ADDRS
	JMP LDRLP
CKSUM,	0
	CLA
	TAD CHAR
	TAD CKSUM1
	DCA CKSUM1
	JMP I CKSUM
CKSUM1, 0
QUES,	277
C100,	100
T1,	0
ADDRS,	0
CR,	215
LF,	212
*1200
	JMS I MSG
	TEXT <CHECKSUM ERROR!<
	JMS I CRLF
	JMS I MSG
	TEXT <IF IN MIDDLE OF LEADER, PRESS "L"<
	JMS I CRLF
	JMS I MSG
	TEXT <OTHERWISE RELOAD TAPE AND PRESS "R"<
	JMS I CRLF
CK2,	JMS I TTIN
	TAD CHAR
	CIA
	DCA CHAR
	TAD CHAR
	TAD ("L
	SNA CLA
	JMP I CK3
	TAD CHAR
	TAD ("R
	SNA CLA
	JMP I CK4
	JMS I MSG
	TEXT <CLUMSY!!!<
	JMS I CRLF
	JMP CK2
CK3,	BIN1+1
CK4,	BEG1
PAGE
TTIN1,	0
]KSF
]JMP .-1
]KRB
]DCA CHAR
]TAD CHAR
]JMS TTOUT1
]JMP I TTIN1
TTOUT1,]0
]TLS
]TSF
]JMP .-1
]CLA
]JMP I TTOUT1
CRLF1,]0
]TAD (215
]JMS I TTOUT
]TAD (212
]JMS I TTOUT
]JMP I CRLF1
FPIN1,]0
]TAD (-3100
]DCA I WC
]TAD (4477
]DCA I MA
]DEAL
]IAC
]TAD (4477
]DMAR
]DFSC
]JMP .-1
JMP I FPIN1
HALT1,]0
]KCC
]KSF
]JMP .-1
]KCC
]JMP I HALT1
PAGE
/
MSG1,]0
	CLA CMA	/SET C(AC)=-1
]TAD MSG1]/ADD LOCATION
	DCA 10	/AUTO-INDEX REGISTER
	TAD I 10	/FETCH FIRST WORD
	DCA MSRGHT	/SAVE IT
	TAD MSRGHT
	RTR
	RTR	/ROTATE 6 BITS RIGHT
	RTR
	JMS TYPECH	/TYPE IT
	TAD MSRGHT	/GET DATA AGAIN
	JMS TYPECH	/TYPE RIGHT HALF
]JMP MSG1+4]/CONTINUE
MSRGHT,	0	/TEMPORARY STORAGE
TYPECH,	0	/TYPE CHARACTER IN C(AC)6-11
	AND MASK77
	SNA	/IS IT END OF MESSAGE?
	JMP I 10	/YES: EXIT
	TAD M40	/SUBTRACT 40
	SMA	/<40?
	JMP .+3	/NO
	TAD C340	/YES: ADD 300
	JMP MTP	/TO CODES <40
	TAD M3	/SUBTRACT 3
	SZA	/IS IT ZERO?
	JMP .+3	/NO
	TAD C212	/YES: CODE 43 IS
	JMP MTP	/LINE-FEED (212)
	TAD M2	/SUBTRACT 2
	SZA	/IS IT ZERO?
	JMP .+3	/NO
	TAD C215	/YES: CODE 45 IS
	JMP MTP	/CARRIAGE-RETURN (215)
	TAD C245	/ADD 200 TO OTHERS >40
MTP,	JMS I TTOUT	/TRANSMIT A CHAR
	JMP I TYPECH	/RETURN
MASK77,	77
M40,	-40
C340,	340
M3,	-3
C212,	212
M2,	-2
C215,	215
C245,	245
]$
