comp.lang.ada
 help / color / mirror / Atom feed
From: Alain Senjean <senjean@club-internet.fr>
Subject: Help: accessing Bios param from Ada
Date: 1999/04/13
Date: 1999-04-13T21:05:06+00:00	[thread overview]
Message-ID: <3713B162.55EA70F7@club-internet.fr> (raw)

Hello,

I am using AdaObjet 7.1.2 under Win98 and i want to develop an application
software using the LPT port for managing an external HW equipment.

I need to identify the port base address and then use registers of the I/O
controller.

I know How, I have a working model of the port driver in Borland C++ (C
language under dos window) using inportb, outportb.

1) identification
   --------------
   I just need to read four 'words' at address 0000:0408 providing LPT ports
base address.
   I am used to target cross developments using motorola memory model but
not to PC memory organisation (segment, offset).
   So, I have tried something simple:

      type T_Lpt_Bios_Table is array (T_Lpt_Port) of Basic_Types.Word;
      Lpt_Bios_Table : T_Lpt_Bios_Table;
      for Lpt_Bios_Table use at Basic_Types.Int_To_Addr(16#0000_0408#);

      -- memory image
      Lpt_Table : T_Lpt_Bios_Table := Lpt_Bios_Table;

      where : Word: 0 .. 2**16,   T_Lpt_Port: Lpt1 .. Lpt4

   very optimistic I think because AdaObject is blocked upon previous line
execution and sometimes the PC itself!

   I there any standard service to access Bios segment and retrieve
parameters.
   I know this is system specific but It should be something available to
interface with low-level without using C langage (I hope).
   Typically I want to avoid introducing a second language just for two or
three services.

2) management
   ----------
   After, I want to manage this port using the base address found in the
previous BIOS table.
   Again, first idea, simply by mapping at this address a three fields
volatile record (too simple I think).
   Is there any defined service with parameters like (segment, offset, size,
value) for accessing HW ports like inportb, outportb in C ?


   Please help me.




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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-13  0:00 Alain Senjean [this message]
1999-04-14  0:00 ` Help: accessing Bios param from Ada 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
replies disabled

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