Re: A86: Displaying Strings


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

Re: A86: Displaying Strings




eightynine@juno.com wrote:

> I was trying to put together a little routine that would display numbers
> in a string.  I thought that this is an important series of commands
> espically for creating games with levels that are drawn by strings of
> numbers.  I can't get it going.  If someone could tell me what I am doing
> wrong it would make my day.  Thanks.  - Mike
>
> #include "asm86.h"
> #include "ti86asm.inc"
>
> .org _asm_exec_ram
>
>      call BUSY_OFF
>      call _clrLCD
>      ld hl, $0303
>      ld (_curRow), hl
>
>      ld hl, string
>      add hl, de

_clrLCD leaves with de = 0, so this does nothing, which is what you want
because you would only be changing the offset of the string, not the contents

of the string

>      call D_HL_DECI

I've never seen this before

>      jp gklp1
>
> gklp1:
>      call GET_KEY
>      cp $37
>      jp z, QUIT
>      jr gklp1
>
> QUIT:
>    call _clrLCD
>    ret
>
> string:
>  .db 255,255
>
> .end
> END

Even if you did alter the .dbs, you would only be displaying characters.  I
think what you want is call $4a33 - display ahl in decimal.  So if you want
to display hl
 xor a
 call $4a33



Follow-Ups: References: