delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/08/15:25:48

From: J DOT J DOT vanderHeijden AT student DOT utwente DOT nl (J.J. van der Heijden)
Newsgroups: comp.lang.pascal.misc,comp.os.msdos.djgpp
Subject: Re: A couple quick questions invloving GNU Pascal: Books, Accessing memory and Ports
Date: Wed, 08 Jan 1997 13:01:40 GMT
Organization: University of Twente, Enschede, The Netherlands
Lines: 47
Message-ID: <32d39688.2113810@news.student.utwente.nl>
References: <5as7s9$8m AT acs1 DOT star DOT net> <32D2F879 DOT 4209 AT cam DOT org>
NNTP-Posting-Host: wit381304.student.utwente.nl
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Tue, 07 Jan 1997 17:29:29 -0800, Tudor <tudor AT cam DOT org> wrote:

>I have almost the same problem.GNU pascal is supposed to be compatible
>with Turbo pascal;

No, you are wrong here.
GNU Pascal doesn't claim to be a drop-in replacement for Turbo Pascal.
It is designed to be a portable compiler, running on a variety of
hardware and operating systems. Although it accepts a large subset of
the Borland Pascal syntax, it (currently) doesn't come with the units
you are familiar with.
Some things which are legal in Borland Pascal (direct memory access)
are not portable at all and will probably never appear in GNU Pascal.

>What happens if I say 
>....
>program foo;
>uses crt;  <---legal in TP & BP ;GNU ???
>.....

The construction is perfectly legal, as long as you provide a CRT
unit. ;-)
No, serious: work is being done to write some borland replacement
units. A BGI replacement for djgpp already exists. We still need
volunteers.

>and another thingy: TP & BP don't make OBJ's,the linking is automatic.Is
>this a feature of Pascal or just the borland products?I mean,will GNU
>pascal produce any .O's ?

Yes.
Or assembly, if you prefer that....
If you invoke it with the --automake switch it will automatically
build units if necessary (like Borland does)

> Can I link GNU Pascal code in GCC progs?

If you mean GCC object code and libraries: yes.
Simply declare them as "external; C". That's all.

>Just curios.. 
>
Hope this helped,

JanJaap
--
"Nothing shocks me, I'm a scientist", Indiana Jones

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019