Eightball compiler targeting Gigatron - initial thoughts
Posted: 05 Jul 2019, 00:58
Now I have my Gigatron running, I am thinking of some interesting projects. Over the last couple of years I have been hacking on a programming language implementation for a novel language that I ended up calling Eightball (since it targets 8 bit machines.) It lives here: https://github.com/bobbimanners/EightBall
EightBall started out as an interpreter, running on VIC-20, C64 and Apple II. It subsequently evolved into a compiler which emits VM instructions. Eightball provides an implementation of the VM for 6502-based machines. The compiler is part of the interpreter, which means you can fool around with code in the interpreter, just like BASIC, and then compile for the VM. It is rather rough around the edges though! (Patches welcome, provided they don't make the code significantly bigger!)
I don't think it is feasible to port the interpreter to Gigatron right now, since it expects a device with a filesystem on it (floppy disk etc.) However it would be possible to implement the VM on Gigatron without too much effort I think. This would allow programs to be written in Eightball on an Apple II, C64 or a Linux PC and then compiled to create a bytecode file that can be run on the Gigatron.
Which approach makes the most sense:
1) Implement Eightball VM in Gigatron vCPU code.
2) Implement Eightball VM in native Gigatron code so it is a third virtual CPU (after vCPU and v6502)
3) Modify my compiler to emit Gigatron vCPU code (maybe gcl!?)
Any thoughts folks?
EightBall started out as an interpreter, running on VIC-20, C64 and Apple II. It subsequently evolved into a compiler which emits VM instructions. Eightball provides an implementation of the VM for 6502-based machines. The compiler is part of the interpreter, which means you can fool around with code in the interpreter, just like BASIC, and then compile for the VM. It is rather rough around the edges though! (Patches welcome, provided they don't make the code significantly bigger!)
I don't think it is feasible to port the interpreter to Gigatron right now, since it expects a device with a filesystem on it (floppy disk etc.) However it would be possible to implement the VM on Gigatron without too much effort I think. This would allow programs to be written in Eightball on an Apple II, C64 or a Linux PC and then compiled to create a bytecode file that can be run on the Gigatron.
Which approach makes the most sense:
1) Implement Eightball VM in Gigatron vCPU code.
2) Implement Eightball VM in native Gigatron code so it is a third virtual CPU (after vCPU and v6502)
3) Modify my compiler to emit Gigatron vCPU code (maybe gcl!?)
Any thoughts folks?