www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/30/02:18:37

Date: Fri, 30 Oct 1998 09:18:15 +0200 (EET)
From: Toni Rasanen <torasane AT mail DOT student DOT oulu DOT fi>
X-Sender: torasane AT paju DOT oulu DOT fi
To: djgpp AT delorie DOT com
Subject: Re: ::: FAR keyword ??? :::
In-Reply-To: <36390e85.17077268@news.uqam.ca>
Message-ID: <Pine.SGI.3.95.981030091404.21041A-100000@paju.oulu.fi>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Fri, 30 Oct 1998, woudiver wrote:

> ( I want to access video memory. )

And you've been using rmode-compiler until now?

Well, it's a bit more complicated. This is the method I use;

When mode is set, I allocate a local descriptor
(dpmi_allocate_local_descriptors or something, see docs, I don't have my
sources handy right now). Then I set it to point at physical address
0xA0000 (or, in case of LFB the adx I ask from VBE driver), and set it's
size to 65536 (I don't remember the commands, so browse docs, I presume
dpmi_set_selector_address and dpmi_set_selector_limit or something.)

Now, we have a selector that is pointing to physical memory of 
video memory.

Then, we use a some handy routine, like farpokeb (selector, offset, color)
to plot pixels. Or, load the selector in a segment (or should I say
selector?) register, and use it in assembler as in rmode; fs:[di].

This may sound a bit complicated, and so it is, but it will become
clear --- eventually.

 ///           Toni Räsänen
///       torasane AT mail DOT student DOT oulu DOT fi

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019