From: Greg King (gngking_at_erols.com)
Date: 2004-12-13 18:54:23
From: Patrycjusz R. Łogiewa; on Date: December 13, 2004 05:57 AM -0500 > > AFAIR, all the others mentioned here weren't really compiling BASIC into > machine code, but rather into so-called "speedcodes". That (AFAIR, again) > was something like calling BASIC routines for the given keywords rather > than having the interpreter to read and interpret the tokens. > > Corrections to the above, anyone? The speed-code output of the compilers is appended to a rather large run-time module that interprets them, in the same way that the BASIC ROM interprets BASIC tokens. Those compiled programs run faster because integer variables are combined directly by real integer operations, and data is predigested: during the compilation, PETSCII numbers are converted into binary, the lengths of string-literals are measured, and the variables tables are pre-built -- varible-names are replaced by offsets into those tables. The compiled program doesn't need to spend time creating and looking for its data. By the way, those compilers are recursively-built. They are BASIC programs which compiled themselves. Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.