Mail Archives: djgpp/1998/10/30/02:18:37
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 -