A82: Re: Displaying # value in 'a' = use ROM_CALL(M_CHARPUT)??


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

A82: Re: Displaying # value in 'a' = use ROM_CALL(M_CHARPUT)??




This will show char number 3 in the menu font. To display the char '3' add
'0' to the number before you show it (this only works if  0<=(level)<10).
If you level can get bigger than 9, but not bigger than 99, convert it to
BCD and show one char at a time. Otherwise I would D_HL_DECI or UNPACK_HL
to show the number. If 0<=(level)<100 then you might want to store the
number as BCD (actually packed BCD), so you do not need to convert it
(remember to use the DAA instruction). 

Dines
-----Original Message-----
From: ilya winham <ilyamojo@geocities.com>
To: assembly-82@lists.ticalc.org <assembly-82@lists.ticalc.org>
Date: 25. december 1997 02:25
Subject: A82: Displaying # value in 'a' = use ROM_CALL(M_CHARPUT)??


>
>Somebody, please tell me if this works the way I want it to:
>
>ld a,3            ;load 3 into a
>ld (level),a      ;set it to level 3 for this example
>ld hl,25*256+30  ;just some random coordinates
>ld (CURSOR_X),hl ;set the postition to display the #
>ld a,(level)  ;load the # of the level into the a register
>ROM_CALL(M_CHARPUT)  ;display the value in a (menu style), at current 
>position
>
>Will this display a '3' at the defined position or the character whose 
>number is 3. What I need to know is what is the fastest way to display 
>the value in the 'a' register in menu style! If this doesn't work I know 
>a way around it, but it takes more mem :(  I know what TR_CHARPUT does, 
>but am confused on M_CHARPUT. It sounds like (in ti82.h) it displayes 
>what is loaded in the a register in menu style, where as TR_CHARPUT 
>displays the _translated_ value in a. Please help, this is not a hard 
>question.
>
>~Ilya
>

_______________________________________

Dines Justesen
Email: dines@post1.com or
       c958362@student.dtu.dk
WWW  : http://www.gbar.dtu.dk/~c958362/
_______________________________________