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.7 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI autolearn=no 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 11:26:02 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Access types and classwide programming Date: Sun, 16 Sep 2001 13:24:56 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <09Oo7.12082$mj6.1852826@news6-win.server.ntlworld.com> <3BA4447B.66842AB0@acm.org> <3BA4D81D.E899280D@acm.org> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1000664760 38297 137.194.161.2 (16 Sep 2001 18:26:00 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Sun, 16 Sep 2001 18:26:00 +0000 (UTC) Cc: "Jeffrey Carter" , To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:13108 Date: 2001-09-16T13:24:56-05:00 Address clauses apply only to an object, program unit, or label -- not to a type. ----- Original Message ----- From: "Jeffrey Carter" Newsgroups: comp.lang.ada To: Sent: September 16, 2001 11:49 AM Subject: Re: Access types and classwide programming "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 _______________________________________________ comp.lang.ada mailing list comp.lang.ada@ada.eu.org http://ada.eu.org/mailman/listinfo/comp.lang.ada