From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,24bc3b66cdc3b8dd,start X-Google-Attributes: gid103376,public From: Alain Senjean Subject: Help: accessing Bios param from Ada Date: 1999/04/13 Message-ID: <3713B162.55EA70F7@club-internet.fr>#1/1 X-Deja-AN: 466033067 Content-Transfer-Encoding: 7bit X-Accept-Language: fr,en Content-Type: text/plain; charset=us-ascii X-Trace: front7.grolier.fr 924037506 23789 195.36.142.250 (13 Apr 1999 21:05:06 GMT) Organization: Club-Internet (France) Mime-Version: 1.0 NNTP-Posting-Date: 13 Apr 1999 21:05:06 GMT Newsgroups: comp.lang.ada Date: 1999-04-13T21:05:06+00:00 List-Id: 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.