Re: A82: Re: Displaying numbers
[Prev][Next][Index][Thread]
Re: A82: Re: Displaying numbers
In a message dated 97-10-11 15:47:49 EDT, you write:
> To display a, just tack on these two instructions before displaying hl:
> ld l, a
> ld h, 0
>
> To display hl, do either of these
> ROM_CALL(D_HL_DECI) or call DM_HL_DECI
>
> DM_HL_DECI has not been found in the ROM, if it exists. Here it is:
> It needs a variable of 5 bytes, called string
>
> ;--- Jimmy Mardell's DM_HL_DECI Code
> DM_HL_DECI:
> ld de, string+5
> xor a
> ld (de), a
> DM_HL_DECI_Repeat:
> call UNPACK_HL
> add a, '0'
> dec de
> ld (de), a
> ld a, h
> or l
> jr nz, DM_HL_DECI_Repeat
> ex de, hl
> ROM_CALL(D_ZM_STR)
> ret
>
> ilya winham wrote:
>
> > So, how would I display the value in 'a' in menu and text style? And how
> > do I display the value in 'hl' in menu and text style? (I know about
> > setting the coordinates so don't tell me that stuff)
it's 6 bytes, not 5
~Adamman