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 X-Google-Thread: 103376,d93c0e2dca0aac57,start X-Google-Attributes: gid103376,public From: gisle@apal.ii.uib.no (Gisle S�lensminde) Subject: Re: [Q] com port function or procedure Date: 2000/03/20 Message-ID: #1/1 X-Deja-AN: 599994445 Content-Transfer-Encoding: 8bit References: Organization: University of Bergen, Norway Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-20T00:00:00+00:00 List-Id: In article , Hee wrote: >Hi, I'm working in Korea. > >C language have com port function such as "outportb" and "inportb". >Do Ada language have any com port function or procedure? If you search on www.deja.com for questions on com/parallel/serial ports, you will see that this question has been asked several times before in this group. You will also find several answers. Well, C does in fact _not_ have these functions. These functions probably comes with your operating system, and is not a part of C. If you move code using these functions to a different OS, your C code will no longer work. If you want to use these functions from Ada, you must write an interface to them. The package standard Ada95 package interfaces.C and pragma import/export do that. In addition you must link with the library containing these functions. How to do that depent on operating system. The issue of accessing hardware like this is generally dependent on the operating system. Maybe someone recognize the function names and can give you a more precise answer. P.S: shouldn's this one be in the FAQ? Maybe I should try to submit an answer to the FAQ. (or someone else) -- -- Gisle S�lensminde ( gisle@ii.uib.no ) ln -s /dev/null ~/.netscape/cookies