Re: A86: Display HL Routine


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

Re: A86: Display HL Routine




this should be somewhat faster, but there's got to be better.  it's
pretty much the same thing with the call to 4a33 (_dispahl) stuck inline
and the stuff it doesn't need removed.

DispHL:
	ld de,$c08d
	ld b,5		;5 digits
DispHL1:
	call _hldiv10	;=$4044  a=hl%10  hl=hl/10
	add a,$30	;convert to decimal digit
	ld (de),a	;store it
	dec de
	djnz DispHL1
	xor a
	ld ($c08e),a	;end the string
	ex de,hl

	ld a,$30	;trim leading zeros
	ld b,4		;take these 7 lines
DispHL2:		;out and put in one
	inc hl		;inc hl
	cp (hl)		;instruction if
	jp nz,DispHL3	;you want to keep them
	djnz DispHL2	;

DispHL3:
	call _vputs	;display it
	ret

-josh

On Sun, 23 Aug 1998 14:07:19 EDT GrafixxHQ@aol.com writes:
>
>So far this is the fastest Display hl routine that I've found, but it 
>still
>doen't put the number fast enough.  If anyone has a faster routine 
>than this,
>please help!
>Thanks
>
>
>;-----Display HL Routine [By: SCaBBy]-----
>DispA:
> ld l,a
> ld h,0
>DispHL:					;dipslay 5 digits from 
>hl
> xor a
> ld de,-1
> ld (_curRow),de
> call 4A33h
> dec hl
> call _vputs
> ret
>


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


References: