comp.lang.ada
 help / color / mirror / Atom feed
From: Alain Senjean <senjean@club-internet.fr>
Subject: Re: Help: accessing Bios param from Ada
Date: 1999/04/17
Date: 1999-04-16T22:15:00+00:00	[thread overview]
Message-ID: <3717B647.A288471@club-internet.fr> (raw)
In-Reply-To: FA7J0G.Cv@jvdsys.stuyts.nl

Jerry van Dijk wrote:
> 
> It seems you are confusing a Win32 console (text) mode application with a DOS application.
It's very likely because I am not used to this environment.
 
> Since you are using a Windows compiler, the console applications it generates
> are running in the Win32 environment. To get a DOS console application you
> need to use a DOS compiler (either the DOS port of GNAT or buy the Pharlap
> DOS extender for OA).
> 
You are right but it is not my real problem.

In fact, I want two things:
1) access parallel port registers in order to implement a nibble mode
protocol (details don't matter)
   It's done with info from Ed Falis in this group (Machine_Code_386
package) using just some pseudo-assembler lines:
   
   function In_Port8
      (Port : in Basic_Types.Int_16)
      return Basic_Types.Byte is
   Offset : constant Basic_Types.Int_16 := Port; 
   Data   : Basic_Types.Byte;
   begin
      -- save used regsiters
      ...
      -- Retrieve Offset Parameter
      Mov(Dx,Ptr_On_Int_16(Offset));
      -- Get current port value as 8 bits
      I_In(Al,Dx);
      -- Copy port value to local data
      Mov(Ptr_On_Byte(Data),Al);
      -- Restore used registers
      ...
      -- return port value      
      return Data;
   end In_Port8;

2) Access a four word table located at address (0000:0408) in BIOS and
giving LPT ports base address.
   To do this job, I don't care about the environment.
   But, in fact I'm looking for the assembler/Ada synthax (as I found no
service) to access this table.
   Of course, restrictions can differ between Dos and Windows but I can't
imagine a system restricting (read) access to its own configuration. It
would be against potability between machines.




      reply	other threads:[~1999-04-17  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-13  0:00 Help: accessing Bios param from Ada Alain Senjean
1999-04-14  0:00 ` Jerry van Dijk
1999-04-14  0:00   ` Alain Senjean
1999-04-14  0:00     ` Tom Moran
1999-04-15  0:00       ` Alain Senjean
1999-04-15  0:00         ` Ed Falis
1999-04-16  0:00           ` Alain Senjean
1999-04-15  0:00     ` Jerry van Dijk
1999-04-17  0:00       ` Alain Senjean [this message]
replies disabled

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