Re: LZ: A number printing routine


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

Re: LZ: A number printing routine



KEITH T BURZINSKI wrote:
> 
> >Yes, the call UNPACK_HL, which loads the ones digit
> >into hl?, or de?, and then the next time it loads the
> >tens digit into the byte lower.  These will have to
> >be converted to ascii characters before doing D_LM_STR
> >The routine might be somewhere on ticalc.org, or i
> >could get it out if you really need it now.
> Well, no.  Not really.  UNPACK_HL is for printing the value in hl as
> a decimal number.  It will put a number in a (0-9) which can then be
> printed using M_CHARPUT or stored in a string and printed later
> (using D_ZM_STR or D_LM_STR).
> 
> What I really need is something that will print the value in a (0-
> 255), not hl, as a decimal number.  Got it?  ;)
> 
> Cheers,
> 
> ____
> ~Keith
> FFNP69C@PRODIGY.COM

wouldn't you then just do this:
ld l,a
ld h,0
and then do UNPACK_HL.
You can modify it to only take the first 3 digits if you want.

-- 
Compliments of:
_-_-_-_-_-_-_-_
  Alan Bailey
  mailto:bailala@mw.sisna.com
  IRC:Abalone
  Web:http://www.mw.sisna.com/users/bailala/home.htm


References: