Hello FPC list,

I would like to inform you, that I ported an improved version
of the Stanford Pascal compiler (a descendant of the Wirth P4
compiler) to Windows, OS/2 and Linux.

I improved this compiler, which comes from the IBM mainframe,
by adding several features that I needed and that I found useful,
in the past few months.

Then I started to write a P-Code interpreter on Windows, which
interprets the generated P-Code; while doing this, I discovered
some severe portability issues, which required additional changes
in the compiler, for example: branch tables which were based on
the EBCDIC char sets; difficulties with sets of char or
sets of subranges of chars and so on. For all those problems,
I found portable solutions, that is: extensions or changes
to the P-Code, that eliminated those dependencies on the
code page of the target machine.

Now the compiler runs with identical results on all the target
platforms, including IBM mainframe; the generated P-Code files
may be transferred freely between the platforms. Running them
on the different platforms will yield the same results.

On the mainframe, the P-Code is translated to machine instructions;
on all the other platforms, the P-Code is interpreted. A true
P-Code translator on the non-mainframe platforms may follow later.
Maybe the P-Code to machine code translater from the mainframe
can be used as a starting point to do this, we will see; it does
some significant optimizations which are IMO indipendent of the
target machine's machine code.

BTW: the P-Code interpreter is written in ANSI-C.

Because I am working with an emulated mainframe (Hercules),
the interpreted compiler on Windows is in fact faster than
the machine code based compiler on Hercules (which will be not true
on a real IBM machine, of course). The compiler compiles itself
in 2 to 3 seconds on both platforms (using a laptop running
Windows 10 or the Hercules emulator; the laptop is not brand new).

You find some stories about my efforts of the last years and
months on my web site:

http://bernd-oppolzer.de/job9.htm

There are still some parts of the language missing on Windows etc.,
for example binary files (files, which are not files of char),
and modules (that is, linking of seperately compiled program units).
This will be added in the next weeks and months.

If you want to know more about this project, feel free
to contact me offline.

Kind regards,
merry Christmas and a happy new year

Bernd


_______________________________________________
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other

Reply via email to