Content-Transfer-Encoding:
8bit
Date:
Tue, 9 Apr 2002 14:17:31 +0200
Content-Type:
text/plain; charset=iso-8859-1
MIME-Version:
1.0
|
Hi,
I get a exception while running the program. The
compilations is OK.
I attach the source and the .exe.
I'm not sure if Ada can manage devices over the
Windows Layer.
Anybody can take a look to it?
Carlos
PS: Tested on Pentium, 32Mb RAM, Windows 98 SE
4.10.2222A
compiled with GNAT 3.13p
------- Here starts the source -----
--with Text_Io;
--use Text_Io;
with Ada.Integer_Text_Io;
use Ada.Integer_Text_Io;
with System;
use System;
procedure Prueba is
type Flags is mod 2**24; -- 3 bytes for control,
data , status
F : Flags;
type Recurso is
record
Estado : Flags;
end record;
Device : Recurso;
Direccion : System.Address := System'To_Address
(16#378#);
-- LPT1 configured as standard bidi.
for Device'Address use Direccion;
-- pragma Atomic (device);
-- pragma Import (Ada, device);
begin
F:=Device.Estado;
-- PROGRAM_ERROR: EXCEPTION_ACCESS_VIOLATION
--Put (Integer (F));
null;
--exception
-- when others =>
-- Put (Integer (device.Estado));
end Prueba;
_______________________________________________________________
Do You Yahoo!?
Yahoo! Messenger
Comunicación instantánea gratis con tu gente.
http://messenger.yahoo.es
|
|
|