Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Sooo I have done pretty much exactly this, targetting the 65816 / Apple IIgs. The compiler is written as a Fennel library (Fennel being a simple Lisp that compiles to Lua); you feed it input by writing a Fennel program, and it outputs a rich data structure with full symbol table-to-address lookup and byte arrays for the various sections of the program. (The assembler is also written as a Fennel library.) I have other tools that turn that into disk images or upload them directly into emulator memory or whatever. There's a little macro that turns Fennel syntax into data structures, with the ability to escape at any point and inject arbitrary Fennel code or data, so I didn't even bother writing a parser and I have the full power of Fennel at my disposal as a macro language at all times.