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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.96.42 with SMTP id dp10mr7748866obb.2.1374522618236; Mon, 22 Jul 2013 12:50:18 -0700 (PDT) X-Received: by 10.49.127.177 with SMTP id nh17mr70866qeb.30.1374522618094; Mon, 22 Jul 2013 12:50:18 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!cb17no18944qab.0!news-out.google.com!dk8ni1201qab.0!nntp.google.com!cb17no18938qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 22 Jul 2013 12:50:18 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=20.132.68.148; posting-account=71T85QoAAACdj14SLDEMBv_3HCGzGIoF NNTP-Posting-Host: 20.132.68.148 References: <54f7f0d4-29ef-4de0-94d8-8320e8df24e2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: .h header file in ObjectAda 8.2.2 source code? From: dd24fan Injection-Date: Mon, 22 Jul 2013 19:50:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Original-Bytes: 3717 Xref: number.nntp.dca.giganews.com comp.lang.ada:182640 Date: 2013-07-22T12:50:18-07:00 List-Id: Thanks for the insight. My latest debugging efforts have pointed me to the Initialization of the device. I do have a compare of what the C code is doing because the vendor has software in a analyzer/simulator that i was able to run. Here is the snippet of the C code: ============== . . . S16BIT s16Result = 0x0000; S16BIT s16DevNum = LOGICAL_DEVICE_NUMBER; . . /* Initialize device */ s16Result = Initialize(s16DevNum, ACCESS_CARD, MODE, 0, 0, 0); . . ============== ACCESS_CARD is defined as S16BIT MODE is U16BIT The last 3 parameters are defined U32BIT so in my latest ada code i have this: ============== . . function Initialize (DevNum : S16Bit_Type; wAccess: S16Bit_Type; Mode : U16Bit_Type; Mem_Wrd_Size : U32Bit_Type; Reg_Addr : U32Bit_Type; Mem_Addr : U32Bit_Type ) return S16Bit_Type; pragma Import (Stdcall, Initialize, "Initialize"); . . procedure Open (Device_Num : in S16Bit_Type; Is_Open : in out Boolean; Good : out Boolean) is Result : S16Bit_Type; ACCESS_CARD : S16Bit_Type := 0; MODE : U16Bit_Type := 16#0001#; . . begin Good := False; Results := Gb.Msgbox(Text => "procedure Open begin", Caption => "procedure Open begin", Style => 4, Handle => Gb.Handle(Form)); -- Initialize device Result := Initialize (S16Bit_Type (Device_Num), ACCESS_CARD, MODE, 16#00000000#, 16#00000000#, 16#00000000#); Print (Device_Num, "Initialize => ", Result); Results := Gb.Msgbox(Text => "Initialized?", Caption => "Initialized?", Style => 4, Handle => Gb.Handle(Form)); . . . ============== Some notes: Device_Num is originally defined as an integer elsewhere in the code so I type cast it.