Oppolzer - Informatik / Stanford Pascal Compiler

Home       Lebenslauf       Schwerpunkte       Kenntnisse       Seminare       Kunden       Projekte       Produkte       Blog       Stanford Pascal       Kontakt

The Stanford Pascal Compiler / Evolution Steps

Back to Compiler main page

Pascal library

My future extensions to the runtime library will be Pascal functions, not ASSEMBLER, so I tried to change the system in a way that it is easier to add new (Pascal) library functions.

At the moment, SNAPSHOT is the only Pascal library function that is added to the compiler generated Pascal code.

SNAPSHOT is an external Pascal function with a dummy Pascal main program, containing the X+ compiler switch. This has three effects:

But this is not sufficient at all. When you add another "module" built in this way, you get duplicate names (#MAINBLK) on the linkage editor. And: the internal procedures of deeper nesting levels have the external attribute, too. In the end, I want to be able to add more than one external module (written in Pascal) to the compiler generated main program, and it should be no problem, if there exist procedures with the same name anywhere at deeper levels.

So I changed the Pascal system in the following way:

When this all worked, I converted SNAPSHOT to the new design (MODULE keyword etc.) and renamed it to $PASSNAP. This all worked without problems.

Then I did further renames to make the names more consistent accross the Pascal system. That is:

In fact, we now have four kinds of predefined procedures or functions:

Back to Compiler main page