Memory
memoryThe xyw virtual machine is able to access up to 64KiB of memory, which is the maximum that can be addressed using two bytes.
The memory is organized as follows
$0000: devices + zero page memory
$0100: start of user memory
...
$ffff: end of memory [65535 bytes]
In other words, except for the first page (256 bytes) of memory that is reserved for devices, everything else can be used for user programs. Note that you could also decide to use the higher addresses of the zero page for arbitrary memory, although this may collide with future devices. Still, normally addresses $A0-$FF are considered safe for use as arbitrary zero page memory.
Having devices mapped in memory means that their addresses can be read and written using the standard LDB, STB, and similar instructions, exactly like any other address in memory, within the need of separate instructions.
When executed, programs will be loaded in memory starting at address $0100 automatically.