Re: A82: Keeping high Scores


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

Re: A82: Keeping high Scores




Not quite.

hl is already the score

ld (HighScore), hl

If you are using Ash 2.0 or OS-82, and the high score is in bc:
ld hl, (PROGRAM_ADDR)
ld de, Highscore
add hl,de
ld (hl), bc

To read it, just do all the code, but switch the last args: ld hl,
(HighScore); ld bc, (hl)

HighScore:
.db $00

Andrew Weiland wrote:

> Is this the way to keep high scores in an asm game:
>
> ld hl,HighScore
> ld bc,(thescore)   ;thescore is where score is kept
> add hl,bc
>
> HighScore:
> .db $00
>
> If there is something wrong could someone correct it.  How then do I
> go on to store initials.
>
> Andrew
>
> ==
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Andrew Weiland
> greatyogi@yahoo.com
> aweiland@juno.com
> http://yogisplace.home.ml.org
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com




References: