The main theoretical advantages of using Pascal over it's concurrent, C, are:
- The language enforces a stronger disciplines when it comes to array sizes, etc..
- The language can be compiled to p-code and be interpreated, which means porting it to 6502 is much easier as it doesn't need rewriting part of a compiler
- The usage of sub-range types makes it easier to store things on 8-bits while documenting the intent clearly (i.e. don't have to use "chars" for numbers that are not chars)
- It also means that code density can be increased, you can have more code in a ROM bank, thus less ROM banks in total
- Widely used and standardized language (as opposed to, Acheron VM and PLASMA for instance)
The problems are: Where can we found a cross compiler that transform Pascal sources into p-codes (not need to be compatible with the original UCSD)? The requirements are:
- Can run on a PC (cross-development), do NOT require a 6502 machine or an emulator for compiling the sources
- Should be on a permissive licence, should allow at least commercial but non-profit usage (i.e. selling carts that were developed with it for non-profit should be allowed)
- The p-codes should be documented (not necessary compatible with the UCSD originals), and an example of implementation on any system (not necessary 6502) should be provided
- It should be possible to call assembly from Pascal. If Pascal can be called from Assembly then it's even better
- Should use a standardized version of Pascal (or Modula, pretty much the same thing). Floating point support is not necessary. No incompatibilities with other major Pascal compilers.
G-Pascal seems nice, but does not support cross-compilation.
The most promising seems to be this, but I cannot manage to build it on neither Cygwin or Linux.