it's running :-)_(re)

Wed, 9 Oct 96 12:53:52 CST


On Tue, 8 Oct 1996 21:04:16 +0100 (MET), 
Peter Gerwinski   wrote:

>According to Andreas Bauer:
>> - I've installed GPC into H:\GPC including DJGPP and the BINUTILS,
>>   I think it's all v2. When running gpc.exe says:
>>   ld.exe: cannot open -lgpc: No such file or directory (ENOENT)
>>   Do i have to pass params to gpc or to set an environment-var ?
>
>DJGPP (including GPC) searches for libraries and such things in a 
>specific directory structure.  Normally, an environment variable
>points to the DJGPP directory, e.g. "H:\DJGPP", where there is a
>configuration file for the rest of the story.  If you set it up
>in another directory tree structure, you have to specify library
>pathes either manually (-L) or by another environment variable
>which should be in the DJGPP documentation.
>

There's a more subtle way to do this: Edit the "specs" file in your main 
djgpp directory.

Locate the section [gcc] and copy it into a new section [gpc]
The variables in each section are passed to this program as environment 
variables, but they don't clutter your real environment. 

You have to set one env. var "DJGPP" (case sensitive if you're in win95!)
to point to the directory where "specs" lives. This is all documented in 
the DJGPP FAQ

>> - I noticed that the output of GPC can't be redirected to a file.
>>   Is there any posibility to write the compiler-output into a file ?
>
>Yes:  gpc foo.pas -o foo.exe 2>foo.err
>
>Errors go to the "error device", therefore ">foo.err" is not sufficient.
>
>> - Can you tell me if it's possible to use standard x86-assembly with
>>   gpc? Or is there at least a complete documentation of the gnu-assembler
>>   anywhere ? I can hardly get used to it :(
>
>I have the same problem.  Look into the GNU C documentation, section
>"Extensions to ASM" or similar.  There is a description, but I had
>problems to understand it.  Anybody out there who could explain
>to both of us how to use that inline assembler syntax?
>

It's AT&T syntax, not intel. Essentially, you have to read the arguments to 
an instruction in reverse. I think there was some explanation of this in the
djgpp docs too (not sure), and there's a intel->at&t asm converter around
somewhere (but probably won't do inline GPC asm).

>> - What must be done so that i can access the DPMI-interface through pascal
>>   without using assembly language ?
>
>I think you *must* use assembly language.  Interrupts and such things
>are not in Pascal's language standard.  However it would be nice to have
>a Unit with a function (written in assembler) which solves this task ...
>

There are a number of dpmi functions in the djgpp's C library. You _should_ 
be able to use these, if you declare them properly as external C style 
functions. These are the functions who's names start with __dpmi.
I say _should_ because I have never tried this. 

>>   Is there any docu about that topic ?
>
>I don't know of such a thing.  There could be some hints in the DJGPP
>and/or EMX documentation.
>
Yes, djgpp's DPMI functions are all documented in the djgpp C lib reference.
(libc.inf)

Please send us any working snapshots of code, then we have documentation!

JanJaap

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


J.J. van der Heijden (j.j.vanderheijden@student.utwente.nl)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es