I had some free time and decided to write myself a 65816 assembler. If, for whatever reason, you're not satisfied with the excellent 65816 assemblers out there already, check it out on github
Any feature requests, bug reports, complaints or praises welcome.
The readme looks something like this:
snap (Super Nintendo Assembling Program) is a multi-pass 65816 assembler.
snap [-s <sym-file>] <in-file> <out-file>
(<sym-file> is where the assembler will dump its symbol table in the end.
This way you can easily determine what address a procedure is located at,
so you can add breakpoints or whatever)
Expression parsing isn't done yet. It may be, one day. As need basis.
Macros are not implemented. They may never be.
Syntax generally follows that laid out in the WDC 65816 docs and datasheets.
just compiling all the C files and linking them together should do it.
One day I might write a makefile.
gcc -ansi -Wall -g -c *.c
gcc -ansi -Wall -g *.o -o snap
-more math/expression parsing
-a bunch more directives
-more features for the existing directives
-riddled with bugs I am sure
-all instructions/addressing modes
-very very basic math/expression parsing
-memmap output - very handy!
; comments look like this
DefinesLookLikeThis: equ $20
ORG $8000 ; doesn't actually write any data, just changes the current PC
; the usual 65816 stuff
lda #$12 ; case insensitivity
LdA #%10010100 ; case insensitivity!
LONGI OFF ; these don't actually emit the necessary REP/SEP ops - they're for
; the assembler only
PAD $FFC0 ; writes 0s until PC = operand
ASCII "GAME TITLE"