From: Jeffrey Carter <spam@spam.com>
Subject: Re: Low Level Ada
Date: Wed, 19 Nov 2003 18:40:54 GMT
Date: 2003-11-19T18:40:54+00:00 [thread overview]
Message-ID: <WOOub.6029$sb4.2364@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: <ysKub.36397$hB5.217@nwrdny02.gnilink.net>
Stephane Richard wrote:
> 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).
>
> Could I take an array of Characters, and "move it" to address $B800 ? or
> something like it?
Assuming you're talking about an OS such as DOS, where I've done this
kind of thing in Turbo Pascal and Ada 83, sure. The basic premise is
something like
type Screen_Image is array (...) of ...; -- char/attr pairs, or whatever
Screen_Memory : Screen_Image;
for Screen_Memory'address use ...;
Work_Space : Screen_Image;
...
-- Mess around with Work_Space
Screen_Memory := Work_Space;
This was fast enough, on a 16 MHz 386, that you didn't see any flicker,
and I was working in graphics mode, with a lot more bytes than character
mode.
In Turbo Pascal I had to use pointers, and set one pointer to point to
the screen memory. Then I did something like
Screen^ := Work^;
(equivalent to Screen.all := Work.all;)
HTH.
--
Jeff Carter
"I wave my private parts at your aunties."
Monty Python & the Holy Grail
13
next prev parent reply other threads:[~2003-11-19 18:40 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 [this message]
2003-11-19 18:47 ` Jim Rogers
2003-11-19 18:56 ` tmoran
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