Re: Pascal Compiler

From: Patrycjusz R. Łogiewa (
Date: 2004-12-14 12:15:18

On 13 gru 2004, at 18:54, Greg King wrote:

> 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 
> 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.

Yes. That's more or less what I thought. And the bottom line of this is 
that the speedcode compilers' outputs aren't good examples to study 
when searching the ML solution to a given BASIC algorithm, are they?

> By the way, those compilers are recursively-built.  They are BASIC 
> programs
> which compiled themselves.

Huh, never realised that!

GNU - GNU's Not Unix - Richard Stallman?

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.