I was able to test/try P5 (first version that is a full Pascal, not a subset of Pascal) on my computer (Fedora 43). It was not as trivial as describe, so it is why I take time to write this email.
I used the Sourceforge source code, and binary GNU pascal compiler binary given: gpc taken at: https://sourceforge.net/projects/pascalp5/files/ First, the rpm file did not install simply with: dnf install ./gpc-20070904-141.1.x86_64.rpm because there was no control sum for it. So I installed it with: sudo rpm -ivh --nosignature --nodigest ./gpc-20070904-141.1.x86_64.rpm But then, after chmod +x ./configure, I saw that it had DOS line endings. Then I change all files to UNIX with: find . -type f -exec dos2unix {} + Then I was able to ./configure did ./bin/make_flip [ unsure if it was needed ] In the Makefile, I had to remove --linemacro on the pascpp lines so that they become like: ====---------------------------------------------------------------------=== all: pcom pint spew pcom: source/pcom.pas pascpp source/pcom $(CPPFLAGS64) $(PC) $(PFLAGS) -o bin/pcom64 source/pcom.mpp.pas cp bin/pcom64 bin/pcom pcom_immerr: source/pcom.pas pascpp source/pcom $(CPPFLAGS64) -DIMM_ERR $(PC) $(PFLAGS) -o bin/pcom64 source/pcom.mpp.pas cp bin/pcom64 bin/pcom pcom_no_preamble: source/pcom.pas pascpp source/pcom $(CPPFLAGS64) -DNO_PREAMBLE $(PC) $(PFLAGS) -o bin/pcom64 source/pcom.mpp.pas ================---------------------========================== After that make worked. So I could then use: paul@fedora:~/pascal-p5$ p5 sample_programs/hello Compiling and running sample_programs/hello P5 Pascal compiler vs. 1.4 Pascal-P5 complies with the requirements of level 0 of ISO/IEC 7185. 1 -56 program hello(output); 2 -56 3 -56 begin 4 3 5 3 writeln('Hello, world') 6 11 7 11 end. Errors in program: 0 P5 Pascal interpreter vs. 1.4 Assembling/loading program Running program Hello, world program complete paul@fedora:~/pascal-p5$ Which, produce intermadiary p5-code hello.p5: paul@fedora:~/pascal-p5$ cat sample_programs/hello.p5 ! ! Pascal intermediate file Generated by P5 Pascal compiler vs. 1.4 ! o b-c+d+i-l+r+s-t-u+v+x-y-z- :1 :2 :3 :4 :5 l 3 :5 ents l 4 ente l 5 lca 12 'Hello, world' lao 2 swp 8 ldci 12 ldci 12 ! 10 csp wrs :6 :7 csp wln dmp 8 retp l 4=-56 l 5=-32 g 8 q l 7=0 ! 0 mst 0 l 7 ! 0 cup 0 l 3 stp f 0 q paul@fedora:~/pascal-p5$ As DJGPP project have a gpc binary compiler: https://www.delorie.com/pub/djgpp/current/v2gnu/gpc346b.zip maybe, it is possible to compile P5 to DJGPP... As to why it could be a more interesting path than FPC project... I guess it is smaller enough to be studied... Unclear to me if the beginning of the FPC was similar to that. > * https://homepages.cwi.nl/~steven/pascal/book/pascalimplementation.html ... > * https://www.standardpascal.org/ > * https://www.standardpascal.org/PascalP.html _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
