[A83] Re: HL to string


[Prev][Next][Index][Thread]

[A83] Re: HL to string




This BCD displaying function is a bit faster.

function(BCDToStr):
	push	hl
	ex	de,hl
@zero	ld	a,[hl]
	inc	hl
	dec	b
	jr	z,@done
	or	a
	jr	z,@zero
@done	dec	hl
	inc	b
	ld	a,'0'
	rld
	cp	'0'
	jr	z,@skip
@loop	ld	[de],a
	inc	de
@skip	rld
	ld	[de],a
	inc	de
	inc	hl
	rld
	djnz	@loop
	xor	a
	ld	[de],a
	pop	hl
	ret

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Kirk Meyer
Sent: Saturday, July 07, 2001 11:40 PM
To: assembly-83@lists.ticalc.org
Subject: [A83] Re: HL to string




Follow-Ups: References: