Re: A83: A few Qs
[Prev][Next][Index][Thread]
Re: A83: A few Qs
On 23-Aug-98, Michael Cook wrote:
>I have a few questions.
>1. If I want to compare something in a 2 words of mem (defined as
"High_Score"
>at the end of the prog (.db style)) with ("Score", defined at the top) and jp
>to
>a lable called New_High_Done_1 if the Score is less than the new high score
>how
>do I do that?
>2. How would I load the 2 words from "Score", and save them into
"High_Score"?
>Michael Bryan Cook
> ... rest not quoted ...
When you say 2 words, do you mean 2 _bytes_ or 2 _words_ (= 4 bytes)? If it
is 2 bytes, you can load one into hl and the other into de, then call
_cphlde, then carry will be set if de was bigger than hl. If hl was the
biggest, or they were equal, carry isn't set. Then you can use jp c,label or
jp nc,label according to your needs...
Linus
References: