[fpc-pascal] Re: build a compiler for GO32v2 under Windows 8 (or 7)

Sven Barth pascaldragon at googlemail.com
Thu Sep 19 22:01:50 CEST 2013


On 18.09.2013 18:48, Philippe wrote:
> (first time I am using the mail list ... I may do it wrong!)
>
> I have a quite big program (now with more than 200.000 lines), first
> build with TP7. For example it accesses CGA memory through absolute
> address ...
>
> Years ago I moved to FPC. And it compiled ok under Windows 98 then under XP.
>
> Now with with a new PC running Windows 8 ... the compiler bugs. It works
> fine with small program .... but not with one which executable about 1.5
> Mb large (which is my case, I did not checked till which size it works!).

It's not necessarily a problem of your executable size, but the problem 
is the size/amount of units, because when compiling the compiler needs 
to keep all their interface meta-data in RAM.

> My program should run in prompt command window of any MS Windows version
> (compiling on XP machine, the executable runs fine on MS Windows 8 machine)

This will however not work on a 64-bit systems as the NT Virtual DOS 
Machine (ntvdm.exe) is not supported there anymore.

> The bug may not be fixed soon ... version of the compiler for DOS/GO32v2
> is not maintained any more.

It's still maintained. Though it's mostly used on DOS/GO32v2 systems and 
likely with less big projects.

> through bug tracker I have been told to build the compiler this way (using i386-win32 source and compiler):
>
> cd c:\fpc\2.6.2-src
> set PATH=c:\fpc\2.6.2\bin\i386-win32;%PATH%
> make clean crossall crossinstall CPU_TARGET=i386 OS_TARGET=go32v2
> BINUTILSPREFIX= INSTALL_PREFIX=c:\fpc\2.6.2 FPMAKEOPT="-T 2"
>
> but this does not build the fpc.exe
>
> it does build go32v2 units in the * \fpc\2.6.2\units\go32v2*
>
>
>
> I tried to compile the software for win32 (not GO32v2) ... but I got an error on the absolute address syntaxe ... then I tried to use {$mode TP} in the unit where is the absolute address ( TelaCGA     : Telas absolute $B800:0000;) ... but it looks like that {$mode ...} does not work as expected. It should be for the current unit ... but ... but next units does not compile any more ... may be because of related units ...

As Tomas wrote you'll likely not be able to convert the CGA code 1:1 to 
Windows as there this absolute addressing mode is not supported.
And yes, the additional compile errors are likely because that one unit 
could not be compiled.

Regards,
Sven



More information about the fpc-pascal mailing list