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,3cfb384718eb4f7a X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: question re Ada equivalent of C function Date: 1998/02/21 Message-ID: #1/1 X-Deja-AN: 327423151 References: <34EEFF9C.1D01FA5D@stellar1.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 888117468 24959 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada Date: 1998-02-21T00:00:00+00:00 List-Id: David Fisher says <> First there are no such functions in the C language. They are not even standard Unix functions, but rather some idiosyncratic library functions from DOS-like systems. Second, they do not read and write to/from a memory address, but rather they access ports on DOS-like systems that allow such port access (ports are quite different from memory addresses, since they are defined int the IO space of the machine, rather than the memory space). Third, if you are on one of these systems and are writing Ada, and want to do similar highly non-portable target dependent operations, then there are two approaches: 1. Issue the necessary In/Out instructions directly using either package Machine code, or, preferable if your compiler supports them, machine language intrinsics (GNAT supports both styles, see GNAT manual for details of use). 2. Simpler probably, though less efficient, just interface to the inp and outp routines using the usual pragma Import (C, ...) mechanism.