Pascal's TechBlog

Thursday, September 22, 2005

P4 Pascal on my Router

In the last couple of days I managed to get the P4 Pascal compiler / interpreter running on my ADMtek 5120P based router.

Anyway the main problem cross compiling P4 Pascal was the elderly toolchain supplied by Edimax. Apparently Edimax (or ADMtek) didn't think it wouldn't be necessary to include libm, which is the standard math library. Ofcourse the P4 Pascal interpreter needed the math functions. Buildroot to the rescue!

The cool thing about P4 Pascal is that it's a classic compiler outputting p-Code (much like the UCSD p-System), which is a form of assembly for non-existant hardware. Then this p-Code can be fed to the p-Machine (which basically is a pcode interpreter).

This predates the Java VM concept by almost two decades! Most of the credit goes to Urs Ammann, who also wrote P4 Pascal.


Post a Comment

<< Home