I’m making good progress on producing a version of SPITBOL for Linux.
One sign I’m on the right track is the performance that PC-SPITBOL delivers when run on Linux using Wine.
The translation is done in two steps.
The first step tokenizes the input, puts the operations in a standard form and drops the comments. This takes about 0.8 seconds to scan 31,000+ lines of MINIMAL source for v3.7, and produces just over 12,000 lines of tokenized instructions. This corresponds to about 2,325,000 lines/minute.
The second step generates assembly code for 386 for the 12,000 instructions. This results in 14,000 386 instructions and takes about 1.4 seconds. The scales up to about 500,000 statements/minute for the code generation phase.
The combined phases take just over 2 seconds to translate 31,000 lines of MINIMAL to 14,000 386 instructions. This corresponds to about 930,000 source lines per minute.
Not bad for a program written over 25 years ago.
And that’s before doing any tuning…