I am very excited to announce the first public beta release of Pascal65, a project two years in the making. Pascal65 is an IDE and Pascal compiler that run directly on the MEGA 65.
Some notable highlights include:
- The compiler creates PRG files that can be distributed and run independently of the development environment.
- The IDE can edit multiple files at the same time.
- The compiler runs directly within the editor.
- The editor is a familiar scrolling cursor editor.
- A large portion of the Pascal language is implemented.
- 8-bit, 16-bit, and 32-bit signed and unsigned integers.
- Floating point math.
- Records and arrays, including multi-dimensional arrays and nested records.
- String data type.
- Linker libraries, including an API for third-party libraries.
- Screen library to write characters directly to the screen.
- Pascal Units to modularize code across files.
This is just the first beta and the project needs a lot of work yet. There are still many problems and lots of work ahead to make this a useful, stable product. Here is a list of shortcomings, limitations, and things I have planned.
- Variable initializers are not supported yet (assigning a value to a variable at the time of declaration).
- Array and record initializers.
- Pascal pointers are not currently implemented.
- Strings cannot be embedded in arrays or records.
- The compiler-generated code is horribly space inefficient.
I have many exciting plans for future additions.
- Syntax highlighting in the editor.
- Highlight compilation errors in the editor.
- Show contextual information for some error messages such as unrecognized identifiers, syntax errors, or unrecognized tokens.
- Libraries for math, file I/O, graphics, sound, etc.
- Versions for other CBM machines, including the Commander X16.
- The ability to generate P-Code and run the code in an interpreter. Think Java byte code.
Pascal65 is still immature and buggy. It is stable enough to play with but it not reliable enough for production use. Some notable problems are:
- The compiler currently cannot compile code more than 500-700 lines. In fact, it's dang slow when doing so.
- The compiler is huge and cannot fit in memory at the same time as the editor. This is solved by the editor running the compiler directly then the compiler re-launching the editor. This works for about 10-15 cycles then it crashes.
- The runtime library and generated code do not take advantage of the 4510 instruction set.
- The hardware integer math unit is not used by the generated code.
Clearly this is a huge project and I absolutely welcome all the help I can get.
A D81 disk image can be found at GitHub Releases.
The project source code can be found at GitHub.