Re: [stella] Constants in DASM?

Subject: Re: [stella] Constants in DASM?
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Sun, 19 Jan 2003 12:36:08 -0500
>That is,  GoodBang = $69 is neither a constant nor an address. It's a *label*.

I should try and explain this better.

An assembler is NOT a high level language. Generally, when you declare something in a high level language as a constant or integer or float the compiler or interpreter allocates the needed memory and then you're locked in. If you try to pass a float into an integer or try to change a constant you get an error.

An assembler is a far, far simpler beast.

When you create a label in an assembler, all that does is tell the assembler "At assembly time, do a Search&Replace on <label> and replace it with <constant>".

That's it. There is no implied meaning to any label. Any label can be used as a constant, an address, an offset, whatever. The assembler doesn't care how you use it as long as you declare it properly and the context in which you use it is legal.


Label EQU $80

lda Label ;is valid
lda #Label ;is valid
sta Label ;is valid
sta #Label ;is an error


Archives (includes files) at
Unsub & more at

Current Thread