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,8fde36cb1870c22 X-Google-Attributes: gid103376,public From: "David Boman" Subject: Re: Reading/writing LPT1 Date: 2000/08/21 Message-ID: <8nqkbn$dia$1@nyheter.chalmers.se>#1/1 X-Deja-AN: 660623454 References: <8npkbf$bhd$1@nyheter.chalmers.se> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Complaints-To: abuse@chalmers.se X-Trace: nyheter.chalmers.se 966841527 13898 129.16.194.25 (21 Aug 2000 07:05:27 GMT) Organization: Chalmers University of Technology X-MSMail-Priority: Normal NNTP-Posting-Date: 21 Aug 2000 07:05:27 GMT Newsgroups: comp.lang.ada Date: 2000-08-21T07:05:27+00:00 List-Id: > I presume you are running under DOS or perhaps Windows xx or OS/2 or > Linux on an Intel box? So we will assume your hardware is the standard I'm running Windows2000 on Intel. > sort of LPT port for such a box, and your OS allows you direct IO > operations to the port, as opposed to, say, a machine running the flight > controls on a jet. Since IO is so widely varied across different I don't know if Windows2000 allows direct IO, I've heard that WinNT/Win2000 is quite strict with this but I'm not sure. > systems, it's not included in the Ada standard. Your compiler vendor, > however, almost surely supplies a library that will do hardware level IO > on your target platform. If that's not the case, then you can a) link > in appropriate subroutines written in asm or C or perhaps even Basic and > call them from your Ada program, or b) use your compiler's > implementation of standard package System.Machine_Code. For handling > the bits in, eg, the status result, either use a record representation > clause to give names to individual bits or bit fields, or (more error > prone) use type "mod 256" and do "and"s and "or"s. This seems resonable, but will I not have the same problem here? Does Windows2000 allow me to write Assemblercode thats messes around with the hardware? /Boman