[A86] Re: Displaying Variables


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

[A86] Re: Displaying Variables




the easiest way to show a 'variable' is to do the call to $4a33 which
displays ahl in the big font at the current cursor position, if you have a 1
byte value then load 0 to a and h, and if you have a 2 byte value load 0 to
just a, otherwise itll be a 3 byte value that it displays. i dont believe
there is a call like this for the variable width fonth tho, but you could
load the value to an op and do the variable width op display call.

>
> The numbers 0-9 in ascii are represented by characters $30 to $39, so
> if you have a single-digit number, all you need to do is add $30 to
> it, then you can call _vputmap or whatever to display it.
>
> If you have a larger number, you'll need to do something like this:
> (I'll let you work out the actual code)
>
>         divide number by 10
>         add $30 to the remainder
>         display that with your favorite rom routine
>         see if the quotient was 0
>         if not, repeat the whole process
>
> On Saturday, September 15, 2001, ToRiHe2000 wrote:
> > Hi, I'm a beginner at ASM and I was wondering how to go about displaying
a
> > variable since every time I load a var into a register it just displays
a
> > bunch of wierd symbols to screen when it's run.
>
> --
> Aaron was here.
> mailto:acurti1@umbc.edu
>
>
>
>




References: