
/
/BINARY TO BCD PRINT
/ENTER AC = NUMBER
BINBCD	0
	DAC BINB0	/SAVE
	LAW 40
	JMS TYPE
	LAC BINB4
	DAC BRNG	/RANGE POINTER
BINB2	LAC* BRNG
	CMA!IAC
	CLL
	TAD BINB0
	SZL
	JMP BINB1	/IN RANGE
	LAW 40		/TYPE SPACE
	JMS TYPE
	LAC* BRNG	/WAS IT TEN?
	SAD (12
	JMP BINB3	/YES, LAST DIGIT
	ISZ BRNG	/NEXT RANGE
	JMP BINB2	/CONTINUE
BINB1	DZM BCNT	/CLEAR COUNTER
	LAC* BRNG
	CMA!IAC
	DAC BDIV
BINB5	LAC BINB0
	CLL
	TAD BDIV
	SNL
	JMP .+4	/DONE THIS RANGE
	DAC BINB0
	ISZ BCNT
	JMP BINB5	/REPEAT
	LAC BCNT
	TAD (60
	JMS TYPE
	LAC* BRNG	/WAS IT TEN?
	SAD (12
	JMP BINB3	/LAST DIGIT
	ISZ BRNG
	JMP BINB1	/NEXT DIGIT
BINB3	LAC BINB0	/LAST DIGIT
	TAD (60
	JMS TYPE
	CLA
	JMP* BINBCD	/DONE, RETURN
BINB0	0
BCNT	0
BRNG	0
BDIV	0
BINB4	BINB4+1
	.DEC
	100000
	10000
	1000
	100
	10
	.OCT
/
/
