comp.lang.ada
 help / color / mirror / Atom feed
* DOS GNAT questions
@ 1996-06-02  0:00 tmoran
  1996-06-02  0:00 ` Michael Feldman
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: tmoran @ 1996-06-02  0:00 UTC (permalink / raw)



  How can I access the routines in pc.h?  (I don't run ANSI.SYS and
want to fix screen.adb so the dining philosophers output is visible.)
I've looked at all 11 README.* and most of the 15 *.DOC or *.TXT
files added "pragma Import(C, ScreenClear);"  etc. to screen.adb
But the link says "screen.adb (.text+0x3f8) : undefined reference to
ScreenClear" (or something close to that).
  Also, where is int86 (etc.) documented?  I'd like to call the BIOS,
but don't know how to select which of the Union of REGS is being used
or whether I need to ask DPMI to call the BIOS, or if that is
implicit in int86.
  Finally, what will make gnatbl run faster.  I've got 3MB of smartdrv
but it still sounds like it's thrashing the disk.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DOS GNAT questions
  1996-06-02  0:00 tmoran
@ 1996-06-02  0:00 ` Michael Feldman
  1996-06-02  0:00 ` Michael Feldman
  1996-06-02  0:00 ` Michael Feldman
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Feldman @ 1996-06-02  0:00 UTC (permalink / raw)



In article <4ot621$6os@news1.delphi.com>,  <tmoran@bix.com> wrote:
>  How can I access the routines in pc.h?  (I don't run ANSI.SYS and
>want to fix screen.adb so the dining philosophers output is visible.)

Nice idea. If you figure it out, will you release the new code for
Screen, please?

Mike Feldman




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DOS GNAT questions
  1996-06-02  0:00 tmoran
  1996-06-02  0:00 ` Michael Feldman
  1996-06-02  0:00 ` Michael Feldman
@ 1996-06-02  0:00 ` Michael Feldman
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Feldman @ 1996-06-02  0:00 UTC (permalink / raw)



In article <4ot621$6os@news1.delphi.com>,  <tmoran@bix.com> wrote:
>  How can I access the routines in pc.h?  (I don't run ANSI.SYS and
>want to fix screen.adb so the dining philosophers output is visible.)
>I've looked at all 11 README.* and most of the 15 *.DOC or *.TXT
>files added "pragma Import(C, ScreenClear);"  etc. to screen.adb
>But the link says "screen.adb (.text+0x3f8) : undefined reference to
>ScreenClear" (or something close to that).

As usual with a Unix-ish link operation, just add -lpc to your
link command.

I know what you mean about all the various READMEs and docs.
The DJGPP "culture" is Unix-like in this regard, as in other regards.:-)

>  Also, where is int86 (etc.) documented?  I'd like to call the BIOS,
>but don't know how to select which of the Union of REGS is being used
>or whether I need to ask DPMI to call the BIOS, or if that is
>implicit in int86.

I assume you are using NAT 3.04, which comes with djgpp200.zip.
This is purely a DJGPP thing. I think you'll need to consult the
djgppfaq.txt, which unpacked with your distribution. If it's not
there, try a post to comp.os.msdos.djgpp. Once you figure it out
at djgpp level, you should be able to access it from GNAT.

>  Finally, what will make gnatbl run faster.  I've got 3MB of smartdrv
>but it still sounds like it's thrashing the disk.

If you are using 3.04, ACT is trying to encourage folks to use gnatbind
and gnatlink separately; I think they'd like to eventually withdraw gnatbl.
as documented in (where else?) the new gnatinfo.txt. Generally
running gnatbind -x will make the bind step pretty fast. The link step
is another story; it's on the slow side. Again, this is a DJGPP thing -
GNAT is just calling the DJGPP linker. There's a fair amount to search,
so a slow-ish link is not unusual.

I know you use tasking; this cranks a lot of runtime stuff into the
linked executable. That may account for some of the link time.

Mike Feldman




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DOS GNAT questions
  1996-06-02  0:00 tmoran
  1996-06-02  0:00 ` Michael Feldman
@ 1996-06-02  0:00 ` Michael Feldman
  1996-06-02  0:00 ` Michael Feldman
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Feldman @ 1996-06-02  0:00 UTC (permalink / raw)



In article <4ot621$6os@news1.delphi.com>,  <tmoran@bix.com> wrote:
>  How can I access the routines in pc.h?  (I don't run ANSI.SYS and
>want to fix screen.adb so the dining philosophers output is visible.)

You might want to have a look at Jerry Van Dijk's very nice VGA
graphics package (vgapck04.zip) for GNAT. He goes straight to the 
OS where possible.

Among other places to get this, pick it up from any ez2load mirror,
including ftp.gwu.edu/pub/ada/ez2load.

BTW - ez2load fans - stay tuned for a new release, with a revised AdaCAPS,
GNAT 3.04, and other goodies. Tonight or tomorrow, most likely.

Mike Feldman




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DOS GNAT questions
@ 1996-06-03  0:00 tmoran
  0 siblings, 0 replies; 5+ messages in thread
From: tmoran @ 1996-06-03  0:00 UTC (permalink / raw)



Replacing ClearScreen and MoveCursor in ...\examples\screen.adb with:

  procedure ScreenClear;
  pragma Import(C, ScreenClear, external_name=>"ScreenClear");

  procedure ClearScreen renames ScreenClear;

  procedure ScreenSetCursor(row,col:in natural);
  pragma Import(C, ScreenSetCursor, external_name=>"ScreenSetCursor");

  procedure MoveCursor (To: in Position) is
  begin
    ScreenSetCursor(To.Row, To.Column);
  end MoveCursor;

makes the philosophers dine pleasantly on my non-ANSI screen
(though they don't clear the table when done).
Apparently it was the lack of "external_name=>..."s, rather
than a need to explicitly name a C library, that was giving
me troubles.  It appears I'll have to download more than the
minimum djgpp stuff to find answers to my other questions.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1996-06-03  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-03  0:00 DOS GNAT questions tmoran
  -- strict thread matches above, loose matches on Subject: below --
1996-06-02  0:00 tmoran
1996-06-02  0:00 ` Michael Feldman
1996-06-02  0:00 ` Michael Feldman
1996-06-02  0:00 ` Michael Feldman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox