Hi, On Sun, Jan 18, 2026 at 12:57 AM Paul Dufresne via Freedos-devel <[email protected]> wrote: > > I have a freshly compiled P5 compiler and interpreter compiled for use with > 32 bit FreeDOS (DJGPP): > https://gitlab.com/dufresnep/p5pascal
Okay, but I haven't tested it (yet??). > At first glance it seems to work (barely tested it), but it was made a bit > ... stupidly. > I means I did not set a word size, did not use pascpp on files to first get > pcom.m..pas and pint.mm.pas... > still not exactly sure what exactly they are. I guess he tried for portability. (For P6, he seemed only interested in 64-bit support.) > Just did: "gpc -o pcom.exe pcom.pas" and "gpc -o pint.exe pint.pas" I'd have to double-check, but I found '-O" too slow for testing. (Here I don't think you're optimizing at all.) I think I used something like "-O3 -mtune=i686 --no-range-checking" (and --classic-pascal if that wasn't already enabled by pragma). > ... when using uppercase was getting an internal error like --atmpfile not > given. GPC (like GCC) is case sensitive to file names. But you can use "-x Pascal file.name". (For instance, a ".C' [sic] file is treated as C++.) > Before that I tried to compile with fpc -M iso > ... but problematic with files... need assign before rewrite... but did not > made if for all, > so only hello.pas was working for me that way. Scott did test later versions of FPC but found them buggy. They don't necessarily reject invalid constructs, and there are some bugs. Their attempt isn't bad, just not perfect. So he sticks to (old) GPC. Beware that FPC output usually treats program headers as cmdline options. So "myprog.exe file1 file2" is how you normally run that. (That is not quite standard, it's implementation defined I think, but "most" do it that way.) There's also P5C (by Trevor Blight) which is basically a C rewrite that uses (newer) GCC or Clang as backend. > Also tried to compile for 8086 but code was like 2.3 X 64kb... and that was > causing problem even > with huge model. > > Guess this is still for early adopters. I don't think FPC 16-bit target was ever meant to be supported here, only 32-bit and higher. At least, I don't expect it to work. I have an old version of Pascal-S (subset) by Andrei Kholkov (?), the Context compiler guy, that's for 16-bit DOS and (almost??) self-hosting. Realistically, there isn't a lot of interest in strictly 16-bit Pascals. I know of some, but others (esp. commercial) have long vanished. What I sometimes tended to do was compile p2c with OpenWatcom and then compile its C output for 16-bit DOS. At least for relatively small programs that works. _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
