TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tecnosistemi BCN <[log in to unmask]>
Reply To:
Tecnosistemi BCN <[log in to unmask]>
Date:
Tue, 9 Apr 2002 14:17:31 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 lines)
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

ATOM RSS1 RSS2