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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e91f674b5db5e2b2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-16 09:49:40 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!paloalto-snh1.gtei.net!news.gtei.net!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3BA4D81D.E899280D@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Access types and classwide programming References: <09Oo7.12082$mj6.1852826@news6-win.server.ntlworld.com> <3BA4447B.66842AB0@acm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 16 Sep 2001 16:49:41 GMT NNTP-Posting-Host: 63.178.187.206 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1000658981 63.178.187.206 (Sun, 16 Sep 2001 09:49:41 PDT) NNTP-Posting-Date: Sun, 16 Sep 2001 09:49:41 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sun, 16 Sep 2001 09:46:23 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:13107 Date: 2001-09-16T16:49:41+00:00 List-Id: "chris.danx" wrote: > > "Jeffrey Carter" wrote in message > news:3BA4447B.66842AB0@acm.org... > > > > Frequently, address clauses are a better approach to hardware > > programming than address to access conversions. > > Do you mean > > type X is something; > For x'address use blah; Yes, that is an address clause for X. > > I'm afraid I'm quite new to Ada hardware programming, having never done any, > but hoping to do some soon. Perhaps there is something I can program to > gain minimal familiarity with it. Any suggestions? (PC with Win9x) Hardware programming for Win32 is somewhat complicated. A better approach would be to start with a simple OS, such as DOS; it might be possible to simulate this using a DOS compiler and running in a DOS box under Win32. Something I did once involved direct access to the text screen memory. Having defined a type for the screen memory, I could do things such as Display : Screen_Memory; for Display'Address use ...; Buffer : Screen_Memory; -- Create desired image in Buffer Display := Buffer; or Buffer := Display; -- Save current screen image -- Output to screen Display := Buffer; -- Restore saved image This was the sort of thing I did for an overlapping text-windowing system, in which I kept a stack of screen images and associated information. Before a window was created, I would make a copy of the screen and push it on the stack. When the current window was closed, I would pop the top image off the stack and copy it to the screen. I have also used address clauses to directly manipulate a VGA card to do color graphics under DOS. Now we can use things like GtkAda to achieve the same thing more portably. -- Jeff Carter "Sons of a silly person." Monty Python & the Holy Grail