[fpc-pascal] Compiling for DOS
XHajT03 at mbox.vol.cz
Tue Nov 8 23:52:58 CET 2005
Date sent: Tue, 8 Nov 2005 20:16:47 -0200
From: Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com>
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Subject: [fpc-pascal] Compiling for DOS
Send reply to: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
<mailto:fpc-pascal-request at lists.freepascal.org?subject=unsubscribe>
<mailto:fpc-pascal-request at lists.freepascal.org?subject=subscribe>
> I am trying to compile a very simple app (hello world kind) for DOS or
> even for the Windows 98 rescue disk.
> My first attempts ended up with a "This program cannot be run in DOS
> On the FP IDE I see many targets, but I don´t know witch one to
> compile against. I see a few possible targets:
> * GO32 V2 DOS extender
> * Win32 for i386
> * WDOSX DOS extender
> * Watcom compatible DOS extenders
> Witch one should I compile against?? Win32 doesn´t work and GO32
> claims it can´t find system unit.
> Should I recompile FPC for GO32 in order to use it? What is the
> difference between it and WDOX or Watcom??
> One might wonder what the reason for compiling to DOS is? I happen to
> have an 486 running ibm-dos in my house and I´d like to use my own
> program to test the ISA Card I recently created, instead of the DEBUG
Your best choice probably is GO32v2. However, as for any other
target, you need RTL compiled for the given target, the appropriate
binutils (as and ld) and the right configuration. If you can compile
on a Win 9x/ME machine (or even machine with plain DOS), the easiest
solution (not requiring you to play with configuration, proper setup
of directories, etc.) is to download the old 1.0.10 version, make
sure you don't have any other FPC version (Win32) in PATH and use
that one. Alternatively you could overwrite that one with a 2.0.x
snapshot (for GO32v2 target). There are other options too, but these
might be more complex (I believe some of them were discussed in our
If you encounter any difficulties, just ask.
Hopefully a DOS (GO32v2) version of FPC 2.x gets released with one of
the next releases.
More information about the fpc-pascal