comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Low Level Ada
Date: Wed, 19 Nov 2003 18:56:56 GMT
Date: 2003-11-19T18:56:56+00:00	[thread overview]
Message-ID: <Y1Pub.185870$mZ5.1346044@attbi_s54> (raw)
In-Reply-To: ysKub.36397$hB5.217@nwrdny02.gnilink.net

> For instance, let's say I want to create an Array that would hold characters
> with the goal to send it to the video card directly (address $B800).
   You can use an address clause to put an object (eg an array) anywhere
and then just do normal assignment operations.  So if you declare
  type Display_Strings is array(Integer range <>) of Char_Attribute_Pairs;
  Screen : Display_Strings(1 .. 24*80);
  for Screen'address use 16#B800#;
you can
  Screen(1) := ('a',Blinking);
or
  Screen(Start .. Start+Last-1) := Work_Buffer(1 .. Last);
Note of course that if you are running on a Windows machine 16#B800# is
a virtual memory address, not a hardware one.  In that case you would need:
  Video_Memory_Address: constant System.Address := Beg_Of_Windows(16#B800);
  for Screen'address use Video_Memory_Address;



  parent reply	other threads:[~2003-11-19 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-19 13:43 Low Level Ada Stephane Richard
2003-11-19 18:40 ` Jeffrey Carter
2003-11-19 18:47 ` Jim Rogers
2003-11-19 18:56 ` tmoran [this message]
2003-11-20  2:32   ` Stephane Richard
2003-11-20  5:39     ` tmoran
     [not found]     ` <m2vfpfgsnt.fsf@jvdsys.demon.nl>
2003-11-20 12:20       ` Stephane Richard
2003-11-19 23:37 ` Freejack
2003-11-20 13:09 ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox