Hi,

On Sun, Mar 19, 2023 at 11:16 PM Paul Dufresne via Freedos-devel
<freedos-devel@lists.sourceforge.net> wrote:
>
> I am thinking about using FreePascal to write programs for DOS.
>
> Writing an "hello world" program in FreePascal for 32 bit DOS (Go32) is easy, 
> because the fpc package can be installed
> with fdimples from the Live installer.
>
> But there is no 16 bit FreePascal directly for DOS.
> So one have to used some other OS like Windows or Linux, and use a FreePascal 
> cross-compiler to 80186  16 bit DOS.

If you unpack / install the Windows version (ppcross8086), you can
then use it with HX DOS extender (so both DOS host and target):

* https://github.com/Baron-von-Riedesel/HX/releases

> I say 80186, because this is the precompiled version, you would have to 
> compile your own cross-compiler for like 386 16 bit DOS.
> And now I am realizing that 80186 is kind of too advanced for FreeDos that 
> prefer 8086... but I think the older
> FreePascal can do is 80186.

Like you later mentioned, it does also support 8086 (and 286, 386 ...
not sure how "improved" those are, though).

> Rather than using fpc to compile a .pas file, you use: ppcross8086
> as describe in:
> https://wiki.freepascal.org/DOS
> which is not too clear, that's why I am writing this.

The Wiki is a bit outdated (esp. now that it's not only a snapshot but
an official release). But generally you use a (separate) cross
compiler for anything other than 386 (i.e. ppc386). Even the 64-bit
compiler (ppcx64) is a cross compiler, IIRC.


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to