Re: [stella] Euchre update

Subject: Re: [stella] Euchre update
From: "Erik J. Eid" <eeid@xxxxxxxxx>
Date: Sun, 19 Aug 2001 22:32:45 -0400
At 03:41 PM 8/19/01 -0700, Glenn Saunders wrote:
Team1Score ds 1

What does this syntax mean?

This is syntax supported by DASM for setting aside memory for variables. Rather than explicitly giving an address for Team1Score, it is just given an address beyond the end of the previous one.


So, given the following declarations, the comments give the memory locations equivalent to the variable names:

org $80

     Team1Score  ds 1  ; $80
     Team2Score  ds 1  ; $80 + 1 = $81
     Team1Tricks ds 1  ; $81 + 1 = $82
     Team2Tricks ds 1  ; $82 + 1 = $83
     SouthHand   ds 5  ; $83 + 1 = $84
     WestHand    ds 5  ; $84 + 5 = $89
     NorthHand   ds 5  ; $89 + 5 = $8e
     EastHand    ds 5  ; $8e + 5 = $93
     SouthCard   ds 1  ; $93 + 5 = $98

I did this so I could shuffle around the order of variables without having to manually assign new addresses. It's already come in handy once, as all the north variables used to be first in the order rather than south's. It will also help in implementing a variable overlay.

"ds" stands for "declare space".


. . \_ +\_ + o_-/ . O
. \-_o -=/- . .
. . \=// .
---------\_______ ||O ___.______
/* Erik Eid */ \____||L/\_____/
/* eeid@xxxxxxxxx */_______________________



- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/

Current Thread