Since I am the original author of xa65, I can probably help...
jackliddle wrote:
Hi
Im putting together a 6502 based computer on an FPGA. I want to put a 4k ROM starting at 0xF000h.
What I don't understand is how to create this ROM in assembler. I have been using the xa65 assembler. The problems I am unable to solve are.
1) Getting the assembler to output a file exactly 4K long so I can convert it too VHDL easily.
2) Placing bytes at specific positions in this ROM (e.g. at byte FFFC to determine on reset behaviour).
Those two can actually be solved the same way. In absolute mode (i.e. the file starts with "*=$f000" for example to define the ROM start address), you can fill in bytes up to a specified address with
Code:
.byte $fff0-*, $ff
The pseudo opcode has two parameters, one the number of bytes to fill, second the byte used to fill (which is optional). Using "$fff0-*" computes the number of bytes to fill from current PC ("*") to address $FFF0. I.e. the following opcodes or data will be located at $fff0.
For example to put the vectors at the end of the ROM:
Code:
.byte $fffa-*, $ff
.word nmi
.word reset
.word irq
Quote:
3) Having all code labels from 0xF000h -> 0xFFFFh.
Not exactly sure what you mean with this. To output all labels into a specific file, add the command line option "-l labelfile" to the xa65 command line. Then xa writes the labels to the given file, but this is written in the man page.
Quote:
Thanks
Jack
Hope I could help,
André