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-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-02  0:00 DOS GNAT questions tmoran
1996-06-02  0:00 ` Michael Feldman
1996-06-02  0:00 ` Michael Feldman
1996-06-02  0:00 ` Michael Feldman
  -- strict thread matches above, loose matches on Subject: below --
1996-06-03  0:00 tmoran

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