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,af0416252cdfae39,start X-Google-Attributes: gid103376,public From: pvanbell@mhv.net (Paul Van Bellinghen) Subject: Mixing C with Apex Ada Date: 1997/06/28 Message-ID: <33b501f8.84697524@news.mhv.net>#1/1 X-Deja-AN: 253185404 Organization: MHVNet X-Server-Date: 28 Jun 1997 12:25:30 GMT Newsgroups: comp.lang.ada Date: 1997-06-28T12:25:30+00:00 List-Id: From: Self 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;