PASCAL Compiler
PASCAL Compiler
I was wondering if anyone new of a PASCAL compiler out there for the 6502? Thanks. 
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
If executable size grows to be too big, then perhaps one should look into using direct, indirect, or subroutine-threaded code (a la Forth-style). I know a number of Pascal compilers for the Z-80 and 8085 used subroutine threading extensively. This ought to cut down substantially on executable size, although software will now take longer to execute.
Perhaps it's possible to explicitly declare specific procedures as speed-critical, so that it generates non-threaded code for maximum speed (alas, but now the resulting code is rather large).
Perhaps it's possible to explicitly declare specific procedures as speed-critical, so that it generates non-threaded code for maximum speed (alas, but now the resulting code is rather large).
Code: Select all
procedure ThisCodeRunsSlowly;
begin
blah;
blort;
SomeFastCode
end;
(*%fast%*)
procedure SomeFastCode;
begin
(* ..etc.. *)
end;
(*%compact%*)
(*..etc..*)
A good Pascal for 6502 Computers is Kyan Pascal (for Atari XL/XE and Apple II). It has inline assembler and produced moderate sized code. Maybe it is possible to patch Kyan Pascal to generate generic 65023 code (not Atari or Apple II dependend). I guess a generic Runtime Lib needs to be written.
A PASCAL -> C translator with CC65 might be worth a try.
Best regards
Carsten
A PASCAL -> C translator with CC65 might be worth a try.
Best regards
Carsten
GARTHWILSON wrote:
Have there been further developments since that post, Ruud?
I wished I could code a smaller Pascal. But the idea is to write it in Pascal. Which means that it can only run if it is capable of compiling itself. At this moment it is able to generate very small programs but only on a PC. Which is not bad at all, I must say. At this moment my compiler generates PRG's which can be run by the C64 emulator I use.
Code: Select all
___
/ __|__
/ / |_/ Groetjes, Ruud
\ \__|_\
\___| URL: www.baltissen.org