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 + free "zero page" memory
$0100: start of user memory
...
$ffff: end of memory [65536 bytes]
In other words, most of the available memory can be used for user programs, except for the first 80 bytes of the zero page that are currently used for devices. Also, the remaining 176 bytes of the zero page can be addressed with a single byte instead of two, making it particularly convenient for storing frequently-accessed data.
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.