Hi,
I just gave a quick try at Ray McLaughlin's basic compiler on the Oric, with a small program drawing HIRES things.
It must have been an amazing amount of work to achieve this!
Anyway, here are the results:
- initial BASIC program, 87 bytes in memory, 8 seconds to draw
- resulting ASM program: 1.9KB big, 3 seconds to draw
So if memory is not important, the speed gain is quite cool (I was using SIN command, which could explain the size?).
But the result only works under Sedoric which is not very satisfying for my needs.
So I got a simple question: has there ever been a project of "Basic cross-compiler" for Oric on modern computers?
BASIC compiler?
Re: BASIC compiler?
The BASIC program is smaller because it's tokenized and most of the code is in the interpreter.
The compiler has to generate assembly to replace a lot of what the interpreter does, so the code has to be larger.
As for SIN, the compiler probably uses BASIC's floating point library, so that part isn't going to be any faster.
There is a BASIC compiler for the MC-10 that uses it's own fixed point math, which really speeds things up, but decimal math will be less accurate.
The compiler has to generate assembly to replace a lot of what the interpreter does, so the code has to be larger.
As for SIN, the compiler probably uses BASIC's floating point library, so that part isn't going to be any faster.
There is a BASIC compiler for the MC-10 that uses it's own fixed point math, which really speeds things up, but decimal math will be less accurate.