comp.lang.ada
 help / color / mirror / Atom feed
From: pvanbell@mhv.net (Paul Van Bellinghen)
Subject: Mixing C with Apex Ada
Date: 1997/06/28
Date: 1997-06-28T12:25:30+00:00	[thread overview]
Message-ID: <33b501f8.84697524@news.mhv.net> (raw)


From:                 Self <Single-user mode>
To:               support@rational.com
Subject:          515702
Send reply to:    pvanbell@mhv.net
Date sent:        Thu, 26 Jun 1997 19:09:04

I am trying to interface a mix of C and Ada (83) code in a (Rational)
Apex  RCI view (we're using Apex 2.0.8c and 2.2.2.  for Sun SPARC 2) I
The question I have is:


The RCI view is modelled for (Verdix) VADScross Ada 6.2.5c for Mips II
class RISC cpu (R4700). I have both an Ada and C compiler  for 
Vadscross which makes interfacing the 2 languages a breeze in a VADS 
library. However, I am unable to compile and link in the Apex RCI 
view as I do not have an Apex Duo license. Also, the Vads_C 
package is obviously not compatible with Apex C interface 
packages. The Ada  Interface package is shown below:

--
----------------------------------------------------------------------
--
---
 -- Name:   vmemsupp.adb 
--
 -- Function: To provide service procedures for performing
 --              EEPROM  writing.
----------------------------------------------------------------------
--
--
 with V_I_Bits;
 with Vads_C;

package body Eeprom_Interface is

-----------------10/2/96 11:19AM------------------
-- eeprom write - write a buffer of data into eeprom
--
--------------------------------------------------
    procedure Eeprom_Write (Src_Addr : Internal_Address;
       Dest_Addr : Internal_Address;  Length : Natural);            
    pragma Interface (C, Eeprom_Write);

-----------------10/2/96 11:19AM------------------
-- SRAM_DEST - return TRUE if destination is
--             SRAM
--------------------------------------------------
    function Sram_Dest (Destination : Internal_Address) return Boolean
    is

 Sram_Test : Integer;
    begin
 Sram_Test := V_I_Bits.Bit_And (Integer (Destination),
 Eeprom_Indicator);

 if Sram_Test > 0 then
     return False;
 else
     return True;
 end if;

    end Sram_Dest;


end Eeprom_Interface;







             reply	other threads:[~1997-06-28  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-28  0:00 Paul Van Bellinghen [this message]
1997-07-02  0:00 ` Mixing C with Apex Ada Brett Kettering
replies disabled

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