/BCD-TO-BIN CONVERSION-INTERNAL SUBROUTINE
/EXECUTION TIME: 87 MICROSECONDS
/CALLING SEQUENCE: JMS* %BCDB
/     AC=4-DIGIT BCD VALUE
/EXIT: AC=BINARY EQUIVALENT
	.TITLE %BCDB
	.GLOBL %BCDB
	.DEFIN STEP,MPCAND
	DAC BIN     /SAVE PARTIAL OUTPUT
	LAC BCD     /LOAD INPUT
		/REMAINDER
	RTR
	RTR
	DAC BCD     /SAVE INPUT
		/REMAINDER
	AND (17     /MASK OFF CURRENT
	            /BCD CHARACTER
	CLL
	MUL
	.DEC
	MPCAND
	.OCT
	LACQ
	TAD BIN     /UPDATE PARTIAL
		/OUTPUT
	.ENDM
%BCDB	0
	DAC BCD     /SAVE INPUT
	AND (17     /UNITS PLACE
	STEP 10     /TENS PLACE
	STEP 100    /HUNDREDS PLACE
	STEP 1000   /THOUSANDS PLACE
	JMP* %BCDB
BCD
BIN
	.END
