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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME 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: "Jerry van Dijk" Subject: Re: question re Ada equivalent of C function Date: 1998/02/21 Message-ID: <01bd3f1d$44728800$582c5c8b@aptiva>#1/1 X-Deja-AN: 327372016 References: <34EEFF9C.1D01FA5D@stellar1.com> Organization: Ordina Finance Newsgroups: comp.lang.ada Date: 1998-02-21T00:00:00+00:00 List-Id: > > What are the Ada equivalents of the C functions, inp and outp, used to > > read a byte from or send one to a memory address? > Mem_Addr : constant Address := To_Address(16#CAFEBABE#); > Mem_Mapped_Char : Character; > for Mem_Mapped_Char'Address use Mem_Addr; Careful, that would depend on the processor. On a x86 the I/O ports are not in the regular address space, that's why C compilers for PC's often have a separate library functions to access them. If the original question was indeed refering to a PC environment, then the answer will depend on the specific compiler and OS used. Jerry,