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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,be5ce9f41ac56f51 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.154.133 with SMTP id o5mr1989688bkw.0.1338810907297; Mon, 04 Jun 2012 04:55:07 -0700 (PDT) MIME-Version: 1.0 Path: e27ni12281bkw.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: Low_Level_IO, what is it? Date: Mon, 4 Jun 2012 11:55:03 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: anon@anon.org NNTP-Posting-Host: MYfHOuvXSURQgdo+yax8oQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Date: 2012-06-04T11:55:03+00:00 List-Id: The Low_Level_IO (Ada 83) package was Ada to device package that was removed in "Ada 95" for a number of reason. One is that very few Ada's used the package because it is easier to use existing libraries for most I/O and just bind that routine to Ada. This was due perhaps because most Ada's in the 1980's and even today are not design for barebone operations. So, today most programmers just use In-line assembly to access Low_Level_IO devices. A barebone version of "Send_Control" routine for Low_Level_IO could be easy as procedure SEND_CONTROL ( DEVICE : device_type; DATA : in out data_type ) ; begin if DEVICE = KEYBOARD then ... -- output data to keyboard elsif DEVICE = VIDEO then ... -- output data to video elsif DEVICE = DISK then ... -- output data to disk elsif DEVICE = UART then ... -- output data to uart elsif DEVICE = ... then ... -- output data to ... else raise IO_Error ; -- or some other exception end if ; end SEND_CONTROL ; And a simple of "Send_Control" routine for Low_Level_IO or OS could look something like procedure SEND_CONTROL ( DEVICE : device_type; DATA : in out data_type ) ; begin if DEVICE = KEYBOARD then ... -- get access rights to keyboard ... -- call OS library to output data to keyboard elsif DEVICE = VIDEO then ... -- get access rights to video ... -- call OS, library to output data to video elsif DEVICE = DISK then ... -- get access rights to disk ... -- call OS library to output data to disk elsif DEVICE = UART then ... -- get access rights to uart ... -- call OS library to output data to uart elsif DEVICE = ... then ... -- get access rights to ... ... -- call OS library to output data to ... else raise IO_Error ; -- or some other exception end if ; ... -- release access rights to device exception -- handle routine for access rights not granted when Denied_Error => ... end SEND_CONTROL ; In , heresy-me@hotmail.com writes: >Low_Level_IO, a Ada package name that I saw in some older Ada book.But >I cannot found it in Ada12 Reference. >What is Low_Level_IO?