Atari Quill/Adventure Writer : Disassembly
This is a basic disassembly of the interpreter, created using py8dis. It is only lightly commented and some of the label names won't make a lot of sense. Some of the comments may be misleading. It's a work in progress but it is good enough to recreate the binary using the CA65 assembler. Optionally, it can be assembled to run at a different address.
CA65 will require a suitable configuration file to handle this. For example:
# Configuration file which assembles the interpreter binary at $AE10
MEMORY
{
ZP: start = $00CB, size = $0007, type = rw, define = yes;
RAM: start = $AE10, size = $1000, file = %O;
}
SEGMENTS
{
CODE: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
}
Use the following commands to assemble the code, assuming the source code is in interpreter.s and the configuration is in interpreter.cfg. Exact command syntax will vary by host operating system.
#!/bin/sh
ca65 --debug-info --ignore-case --target none --cpu 6502 -o interpreter.o --listing interpreter.txt interpreter.s
ld65 -C interpreter.cfg -Ln labels.txt -o interpreter.bin --mapfile interpreter.map interpreter.o
The assembled binary should be 3,599 bytes in size and, if the address is set to $7C0D, it should match the original byte for byte. Note that this is just a raw binary, not a .XEX file.
The source code can also be downloaded from here.