Hi!
I'm pretty new to Free Pascal. I used Delphi briefly about 20 years ago and I remember really enjoying it. I was recently looking for a language/compiler that could target modern OSes and DOS, but I didn't want to use C/C++. Object Pascal and Free Pascal felt like the perfect choice.
I'm writing a replacement for a preprocessor that forms part of an old Psion SDK. I want it to be a drop-in replacement for the original, but also run on modern Linux/Windows/macOS/etc. The source for the project is here:
https://github.com/PocketNerdIO/ctranHowever, after adding
uses Classes; to get
TStringList, it stopped compiling for DOS. I get one or more errors when linking, complaining that various code segments are too large for a 64K block. It doesn't matter which memory model I use, I always get errors.
Small Memory Model:
Error: Code segment "_TEXT" too large (exceeds 64k by 79732 bytes)
Medium Memory Model:
Error: Code segment "CLASSES_TEXT" too large (exceeds 64k by 8976 bytes)
Large Memory Model:
Error: Code segment "CLASSES_TEXT" too large (exceeds 64k by 36388 bytes)
Error: Code segment "SYSTEM_TEXT" too large (exceeds 64k by 207 bytes)
Compact Memory Model:
Error: Code segment "_TEXT" too large (exceeds 64k by 135480 bytes)
I've also attached a screenshot of the terminal output.
It compiles fine with
ppcx64.
Am I doing something wrong? Do I need to add some more switches to
ppcross8086 to get it to work?
Just so you know, I'm not using Lazarus for this - it's all command line, with NeoVim and an (incomplete) LSP.
Hope someone can point me in the right direction!
Alex