Re: A82: Keeping high Scores


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

Re: A82: Keeping high Scores




>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.

In 82 programs (beware: NOT 83 or 86 programs!), you simply modify memory
within your program and it will stay that way until you change it again.

ld hl,(thescore)
ld (highscore),hl
...

highscore:
.dw 0

-- Barubary