-
Notifications
You must be signed in to change notification settings - Fork 2
Symbol Table Manager
Optionally, wAx maintains a symbol table for use with its somewhat symbolic assembly (see "Labels"). The @ tool provides a few ways to manage these symbols.
.@
On a line by itself, @ shows the symbol table. It will show you the following information:
- Defined labels with the label sigil (@)
- If followed by a hexadecimal number, the symbol's address
- If followed by a ? and a number, it indicates that the label was used as a forward reference and is still undefined. The number indicates the number of times the label was used and, thus, how many forward references will be resolved when the symbol's address is defined.
- The last line of the symbol table shows the current Command Pointer address
- If the Command Pointer address is followed by a ? and a number, it indicates the number of forward references that could not be defined because the number of forward references exceeded 12. This means that your code will probably not function properly. If you're entering code in direct mode, you'll be notified of this condition immediately with a ?SYMBOL ERROR. If this condition occurs within a BASIC program, it can be addressed with a second pass (see "Multi-Pass Assembly").
There are two ways to set the value associated with a label:
.A addr label
.@label addr
.@label byte
where addr is a valid 16-bit hexadecimal value, and label is a valid label name (09, AZ, @, and &). byte is a valid 8-bit hexadecimal value, which will be converted to a 16-bit value.
.@-
This clears the symbol table by writing $00 to all symbol table memory. This should be done at the start of a BASIC program that uses several labels.
The wAx symbol table is stored between $02a2 and $02ff. This memory is not addressed at all by wAx unless you use the somewhat symbolic features.