[comp.unix.xenix] CGA video memory access

turtle@sdsu.UUCP (Andrew Scherpbier) (02/20/88)

I have been trying to get direct access to the CGA video memory on my
Zenith-386 running Xenix V.
In the manual entry for screen(HW) it is described how to change the
video mode of the console, and also how to get a pointer to the start
of the video memory.
However, the sample they use use the macro `sotofar()' which is declared
in sys/sysmacro.h  This declaration looked fine (I found the name of the
include file with `grep sotofar /usr/include/sys/*h') and I proceeded
to write a little test program.  The compiler complained that sotofar
was not declared, so I looked in sys/sysmacros.h and found that sotofar
is only defined for non 386 machines; it has `#ifndef M_I386' in front
of the declaration.

Now what do I do?  Does anybody have a sample program which writes
directly to the CGA video memory?

-Andrew Scherpbier
ihnp4!jack!sdsu!turtle