A83: Alan J: Highscores.


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

A83: Alan J: Highscores.




Alan (or anyone else):

As you can see, I'm sifting through the old mail, to look for potential
tutorial material.  I just need a little clarification about this...could
you perhaps make a small program, or code fragments that show a program
storing a number to itself, and recalling it...I'm getting confused.

Thanks.

> I can only help you out with one thing, highscores (program writeback). 
> Just define a byte or word and change it.   For example for a high score
> from 0-255 do
> 
> If you don't understand the below, basiacally, you create a byte using
> .db or a word using .dw, load that to hl, and use (hl) to store something
> to the location.  Seeing how difficult it for me to express my ideas, you
> can see why I'm not making any tutorials. : )

Hehe, that's ok, thats my job :)...

> ; For storing the high score
> 
> StoreHS:
> 	ld	a,(currentscore)
>	ld	hl,HighScore
> 	ld	(hl),a
> 
> ; This area of the prog would acctually change after you got the
> highscore
> 
> HighScore:
> 	.db	0		; Or you could use .dw for a higher
> high 					; score capacity


Follow-Ups: