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.224.36.15 with SMTP id r15mr40726443qad.8.1374519968638; Mon, 22 Jul 2013 12:06:08 -0700 (PDT) X-Received: by 10.49.101.78 with SMTP id fe14mr1137328qeb.13.1374519968621; Mon, 22 Jul 2013 12:06:08 -0700 (PDT) Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cb17no14543qab.0!news-out.google.com!dk8ni1201qab.0!nntp.google.com!cb17no14538qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 22 Jul 2013 12:06:08 -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: <932e538e-bfe4-48e9-8d5b-a506eae365fc@googlegroups.com> Subject: Re: .h header file in ObjectAda 8.2.2 source code? From: dd24fan Injection-Date: Mon, 22 Jul 2013 19:06:08 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Original-Bytes: 3720 Xref: number.nntp.dca.giganews.com comp.lang.ada:182634 Date: 2013-07-22T12:06:08-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 16BIT 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 : U16Bit_Type := 16#0000#; MODE : 16Bit_Type := 1; . . 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.