From: "J. Marshall" <a_revelation@hotmail.com>
Subject: Can someone explain this to me please?
Date: 1999/08/06
Date: 1999-08-06T00:00:00+00:00 [thread overview]
Message-ID: <rqm730dlkur11@corp.supernews.com> (raw)
I am a C programmer, recently assigned to an Ada project due to staff
problems here.
The project, originally built in 1492 using Verdix on a VAX, it is now being
ported to Green Hills AdaMULTI version 1.8.9 running on a SunOS host, for a
VMEbus embedded target running VxWorks.
I've never used Ada before, and am having some difficulty with some portions
of the project, the direct hardware addressing in particular.
Example of some of the "old" code used...
COMMAND_REG_PTR :
COMMAND_REG_PTR_TYPE :=
TO_CMD_PTR( SYSTEM.ADDRESS'ref( BOARD_CONFIGURATION ) );
..to which the compiler responds with
UNRECOGNIZED ATTRIBUTE "ref"
The former Ada guru faxed me the following "fix":
(however, he is generally unavailable for help)
generic
type Object(<>) is limited private;
package System.Address_To_Access_Conversions is
pragma Preelaborate(Address_To_Access_Conversions);
type Object_Pointer is access all Object;
function To_Pointer(Value : Address) return Pbject_Pointer;
function To_Address(Value : Object_Pointer) return Address;
pragma Convention(Intrinsic, To_Pointer);
pragma Convention(Intrinsic, To_Address);
end System.Address_To_Access_Conversions
Can anyone tell me how to implement this into working code?
Thanks very much.
Jim Marshall
next reply other threads:[~1999-08-06 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-06 0:00 J. Marshall [this message]
1999-08-06 0:00 ` Can someone explain this to me please? Ted Dennison
1999-08-07 0:00 ` David Kristola
1999-08-09 0:00 ` J. Marshall
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox