Skip to content

wAx Memory Usage

Chysn edited this page Sep 8, 2023 · 10 revisions

wAx's memory usage is generally unobtrusive and leaves most common storage options open to the programmer, but it is helpful for the programmer to understand wAx's memory footprint. wAx uses the following memory locations:

Command Pointer: $0003-$0004

$0003 and $0004 will be overwritten by most wAx operations to store *, the address of the next instruction or list operation. You can safely overwrite this within machine language programs, as the Command Pointer is usually set explicitly just before implicit use. Mostly, avoid writing to this area during execution of a BASIC program that uses wAx commands.

User Plug-In Vector: $0005-$0006 (optional)

When you use the User Plug-In Tool, wAx executes the code specified by the vector $0005 and $0006. The plug-in can then use wAx's API (or any other user-defined routines) to parse and act on parameters. The user plug-in is initialized when wAx is started. However, if you don't rely on a user plug-in, you can use these locations for your own purposes.

Zeropage Temporary Workspace: $00a3-$00b2

wAx uses this space during the course of most operations. You can use this space in your own programs (usually) without affecting wAx, but such use may affect your ability to inspect these locations accurately.

Temporary Buffer Workspace: $0230-$0255

wAx uses this space when a wAx command is issued. Otherwise, this space is used by BASIC as the input buffer. Since wAx commands are always one line or less, wAx can divide this buffer space up for temporary use for its own input and output buffer. Once wAx is done with its operation, this area is available for BASIC's normal use.

Breakpoint Storage: $0256-$0258 (optional)

wAx stores its breakpoint information here. You can overwrite this if you enter a line of 84 or more characters. So avoid super-long BASIC lines while using the breakpoint features.

Symbol Table: $02a2-$02ff (optional)

wAx stores its symbol table (comprised of symbol names, symbol values, and unresolved forward reference data) here. If you do not use wAx's "somewhat symbolic" features (symbol definition or symbol table initialization), then wAx will leave this range untouched.