User guide

DCW <value> also EQUW <value>
Include a word (16 bit) value in the output, low byte first (6502-style).
DCZ "<string>" also EQUZ <value>
Include a zero-terminated string in the output.
FIL <count>, <value>
Insert <count> bytes (of <value>) into the output, to fill or pad as desired.
INF "<name>"
Load and embed the contents of the named file. You can use this to insert raw data or pre-
compiled code.
ORG
Set the value of “PC”, and where the assembly will write to next.
It is permissible to jump all around the addressing space, but for obvious reasons this is not to be
recommended.
Note that there are side effects – setting an address lower than that specified by BOT or higher
than that specified by TOP will update the respective marker. Bear this in mind if you ORG to a
low location after a ROM command.
ROM
The ROM command performs a number of actions that may be useful to quickly set up firmware
intended to be held in ROM or EPROM.
Initially, all bytes in the memory map will be set to the value &FF. This should permit faster
EPROM programming (as blank EPROMs are all-bytes-&FF, so the programmer will skip them).
Then, the following sequence is performed:
BOT &E000 ; ROM starts here
(&E000-&FFFF = 8192 bytes)
TOP &FFFF ; ROM ends here
ORG &FFFA ; set up vectors
DCW nmi_vector ; NMI
DCW reset_vector ; RESet
DCW irq_vector ; IRQ
ORG &E000 ; back to start
It is then up to you to provide the labels (and code) for nmi_vector, reset_vector, and irq_vector.
6502asm user guide – prerelease version
page 8