Re: A86: Re: hl to text, part 2...


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

Re: A86: Re: hl to text, part 2...




Suddenly I get the feeling I'm missing some very important
headers or something. I know UNPACK_HL is declared in the
ZSHell includes... but where is it in the TI-86 ROM? Is it
the same thing as _div_ahl_10 ($404C)?

I wrote a routine almost exactly like that in C++ (where
there is a / and % operator) a while ago, and was working
on one for the TI-86 but I'm still unsure as to what 
exactly UNPACK_HL does and where its equivalent in the
TI-86 is.

Has anybody made an include off the list of calls on 86
Central?

Thanks,

Bryan

Jeremy Goetsch wrote:
> 
> The following routine prints HL in decimal in the small font at the current
> pen location.
> [String] is the address of a 5 byte buffer where the string will be stored.
> 
> ; Print HL in small font (B = num decimal places)
> vputHL:
>  ld de,String+5
>  xor a
>  ld (de),a
> RepUnp:
>  dec de
>  call UNPACK_HL
>  add a,48
>  ld (de),a
>  djnz RepUnp
>  ex de,hl
>  jp _vputs

-- 
Bryan Rittmeyer
mailto:bryanr@flash.net
http://www.bridges.edu/horizon/


Follow-Ups: References: