So I've got this compiler I've been working on. http://cowlark.com/cowgol/ The language is vaguely Ada-inspired, with proper types, 8/16/32-bit arithmetic etc, designed to generate good code for old 8-bit platforms, but it ports reasonably well to other architectures. It currently targets 6502, 65c02, 6303, 8080, Z80, 80386, PDP11, 6502 p-code, C and Basic. The generated code is pretty decent given the size. The compiler is written in its own language so it will self-host on a machine with enough memory.
Its big feature is that it will actually run _on_ 8-bit architectures: here's a life demo of it compiling a small program on a BBC Micro second-processor system (3MHz 65c02): https://bbc.godbolt.org/?&mode….com/cowgol/assembler.rom Press Shift+F12 to start the compilation script, and then type OUT once it's done to run the program. (Once it's finished, you can see the generated assembler source by doing DRIVE 1 and then EDIT S.TEST. You then almost certainly want to do SHIFT+F5 and select mode 0 to make text scrolling fast.)
While it would be easy to add the C64 as a cross-compilation target, and in fact I have done so on an earlier version of the language, I've not really thought about it for actually running the compiler on: the 1MHz 6502 on the C64 is pretty slow for raw number-crunching and the disk file API is kinda lacking. But, the Mega65 is rather different. Cowgol should run on this pretty well.
However, the compiler's written as a set of traditional command-line programs, which need to be run in sequence: the compiler itself is two programs, then there's a linker, and then finally the assembler. This is fine on the BBC Micro as it does provide a command-line environment. But, AFAIK, the C64 and the Mega65 don't. All you get is Basic.
So, what I need to make this work is a way to write a script which runs a sequence of commands, loaded from disk, each with their own set of command line arguments. The BBC Micro has a OS feature called *EXEC which interprets the contents of a file as keyboard input; this is (almost) ideal. Is there a way to do this on the Mega65? Alternatively, is there a DOS or CP/M like environment which could be loaded instead of Basic which could be used instead?
Also, it's not a requirement, but it'd help a lot of the Mega65 had a way to seek within SEQ files; the compiler doesn't require seekable files, but it'd speed up the linker a lot.
Also also, have the 6502 extensions supported by the Mega65 been finalised yet? They'd be great to support in the code generator.