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,c98ef1b54f5d0ee6,start X-Google-Attributes: gid103376,public From: drwholto@dcsun3.comp.brad.ac.uk (DRW HOLTON) Subject: porting from Meridian Ada to Gnat Date: 1996/07/11 Message-ID: #1/1 X-Deja-AN: 167813067 distribution: world organization: University of Bradford newsgroups: comp.lang.ada Date: 1996-07-11T00:00:00+00:00 List-Id: I'm porting a DOS program from Meridian Open Ada (ver. 4.1.4) to Gnat and have come up against a minor problem. The program uses the Port package from the DOS Environment Library to access the 80x86 I/O ports. For example the specification of the in_bye function is: function in_word (port_number : integer) return integer; I would like re-write this package for Gnat (unless someone has already done so, in which case please let me know!), which should be really simple since there is a close correspondence between the subprograms in the package and 80x86 assembly language instructions (e.g. in_word is just a variant of the IN instruction). However I don't know how best to go about doing this - should I write small assembly language (or even C) modules and import them? Can I inline the assembly language directly in the Ada package? I would prefer the latter option since it is more self contained, but don't know how to do it or even if it is possible. (In case it's important, I'm using the ez2load distribution of gnat 3.05.) I'd be grateful for any pointers or help. Please cc me any answers since news isn't always reliable here. TIA, Rob