	;SINGLE PRECISION BINARY TO BCD - II
	;***********************************
        ;DIGITAL COMPUTER CONTROLS, INC.
	;116-0047A-L
        ;COPYRIGHT 1972  09282



NMBR:	NUMBR
PCC:	NUM
LOOP:	0
NUM:    0
ONE:	-1
TEN:	-12
HUN:	-144
THU:	-1750
TTHU:	-23420
NUMBR:	0
NUMB1:	0
NUMB2:	0
NUMB3:	0
NUMB4:	0
NUMB5:	0
TEMP1:	0
TEMP2:	0
TEMP3:	0
TEMP0:	0

        ;THIS ROUTINE TAKES THE CONTENTS OF "NUMBR" AND
        ;CONVERTS INTO DECIMAL DIGITS "NUMB1" TO "NUMB5"
        ;NUMB1 IS LEAST SIGNIFICANT
        ;NUMB5 IS MOST SIGNIFICANT

OCTDEC: STA     0,TEMP0         ;SAVE REGISTERS
        STA     1,TEMP1
        STA     2,TEMP2
        STA     3,TEMP3
        SUB     2,2             ;CLEAR AC2
        SUBZL   3,3             ;AC3=1
        ADDOL   3,3             ;AC3=5
        LDA     0,NUMBR         ;LOAD NUMBER
	STA	3,LOOP
LP:	LDA	3,LOOP
	LDA	1,PCC
	ADD	1,3
	LDA	1,0,3
        ADDL#   1,0,SZC
        JMP     .+4             ;NEGATIVE
        INC     2,2             ;POSITIVE
        ADD     1,0
        JMP     .-4
	LDA	3,LOOP
	LDA	1,NMBR
	ADD	1,3
	STA	2,0,3
        SUB     2,2
	DSZ	LOOP
        JMP     LP
        LDA     0,TEMP0
        LDA     1,TEMP1
        LDA     2,TEMP2
	JMP	@TEMP3

F