;	Process decimal assignment.

			ORG	03E1h

zDECHEX			LD		BC,0		;Init value to zero
DEC1			LD		A,(HL)		;P/u a char
			SUB		30h		;Cvrt to binary
			RET		C		;Return if < "0"
			CP		10		;Ck for bad decimal
			RET		NC		;Ret if not 0-9
			PUSH		BC		;Exchange BC & HL
			EX		(SP),HL		;& save HL on stack
			ADD		HL,HL		;Multiply by 10
			ADD		HL,HL
			ADD		HL,BC
			ADD		HL,HL
			LD		B,0		;Merge in new digit
			LD		C,A		;New digit to C
			ADD		HL,BC		;& add it in
			LD		B,H		;Current value to BC
			LD		C,L
			POP		HL		;Recover HL pointer
			INC		HL
			JR		DEC1		;Loop