Re: Pascal Compilers (was:Compilers needed for FreeDOS ? Lets talk abou

Aitor Santamaria Merino <[email protected]> Wed, 06 Nov 2002 11:35:06 +0100
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
Andreas K. Foerster wrote:

>On Wed, Nov 06, 2002 at 01:04:19AM +0100, Eric Auer wrote:
>
>>Some packages could be compiled with a buggy compiler or in a way that
>>makes them run only on a 286 or 386 or above, but I think those cases are
>>VERY rare (actually, I would like feedback on this - please do not mail
>>about packages that are MEANT to run only on at least this-or-that CPU).
>>
>
>Well for programs compiled with FreePascal (FPC) you need a 386 and
>dpmi support. The same is true with GNU Pascal (GPC), I think.
>
Well, are there programs compiled in FPC?
I just want to clarify that xkeyb compiles with TurboPascal7 (I'd like 
to try with 5.5). It was one of the reasons that I took over, I wanted 
to have it working, and nobody seemed to dare to take over a project in 
Pascal (?)
At this moment, I am rewriting the "core", that will be mainly in 
assembler instead of Pascal, in order to reduce the memory footprint to 
a minimum.
I could try and port to C, but I just don't want to rewrite the "X" 
stuff (Xstrings and Xfunctions) in C, it's not worth I think. Perhaps it 
could help if I knew how to get a .O file from a TP Unit. (This is for 
granted in FreePascal).

>Is there any free 16Bit Pascal Compiler?
>(I mean "free" not "for free")
>
Not that I know of.
I asked the FPC guys how feasible this would be, as this interests us 
(or at least me) for xkeyb, but their reply was that, firstly, there's a 
slight problem with pointers: in both TP and FPC pointers are 4 bytes 
long, but where as in TP they are FAR pointers, in FPC they are "near" 
32-bit offsets. The main obstacle is, however, that I was said the 
compiler is strongly making use of 386-specific code (meaning specific 
opcode/operands combinations, etc).

>(FYI: I didn't try them on FreeDOS yet, but I use both Compilers under 
>Linux: FPC is more compatible to Borland Pascal, while GPC is more 
>concerned with the ISO/ANSI Pascal standards; FPC seems to produce 
>the better result and comes with more additional stuff)
>
I seem to understand that the improvements (Units, for example) Borland 
introduced in TP over standard Pascal (and that left the "Why Pascal 
isn't..." paper by Kernighan
 obsolete) appeared themselves in some Pascal language standarization 
papers (I don't have references here about this).
There are also TMTPascal and Pascal32, that I haven't tried, but I guess 
that TP/Delphi compatibility, and compatibility with popular C 
compilers, DJGPP/cygwin/gcc for multiple platforms seemed to be the 
general choice after Borland products.

Aitor