[A83] Re: Displaying a value


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

[A83] Re: Displaying a value




_disphl displays the 2 byte value currently in HL.  so when you do ld
hl,txtscore you aren't displaying a score or a string, you are displaying
the decimal value of the pointer to the string.  try loading the score into
HL.


----------------------------------------------
Original Message
From: ""<Sk8a4good@aol.com>
Subject: [A83] Displaying a value
Date: Wed, 14 Mar 2001 17:02:20 EST

>If I have a variable in counter ( counter = saferam3 ), how would I
display 
>it on the screen after text saying score?  I have tried using disphl, but
I 
>cant get it to work, and I tried setting it to Op1 and then displaying.  
>Here's some code:
>ION HEADER
>CODE.........
>
>    ld  a,4
>    ld  (CURROW),a      ; current row               
>    ld  a,3             
>    ld  (CURCOL),a      ; current column
>    ld  hl,txtscore
>    bcall(_puts)
>                    ;ld a,(score)         <-wont work
>                    ;bcall(_setxxop1)<-wont work
>                    ;ld a,2<-wont work
>                    ;bcall(_dispop1a)<-wont work
>    call waitkey
>    cp gClear
>    ret z
>    jp (MY LABEL)
>    ret
>
>
>
>txtscore:
>       .db "Score:",0
>
>Thanks,
>Cole
>
>
>
>

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com