Mail Archives: djgpp/1997/06/15/19:33:37
acebear AT pukopn1 DOT puk DOT ac DOT za wrote in article
<33A083D9 DOT 11AC AT pukopn1 DOT puk DOT ac DOT za>...
> How would you write a NASM generated COFF .o that will make it possible
> to directly access VGA memory (320x200) under DJGPP directly from an
> external, NASM coded asm prog without the usual slew of segment
> violation errors?
>
Well, since you're going to be in protected mode, technically, you can't
access
video RAM. But before you say "Everyone else does!", let me say that
there are
workarounds.
Workaround one is to turn off protection. This is described in the FAQ,
and the
actual functions to do so are in the file SYS/NEARPTR.H. This is very
dangerous.
A better way, is to use the SYS/FARPTR.H functions. These essentially use
the
FS register to access video RAM.
I'd suggest reading the FAQ, and tinkering with the FARPTR functions to
see if
you can find a suitable workaround.
Another good place to look would be at Brennan's DJGPP + Games page,
there's
a doc there describing the various ways you can get at video mem directly,
and
safely. (You can get there from www.delorie.com )
- Raw text -