| www.delorie.com/archives/browse.cgi | search |
| Date: | Thu, 15 Dec 94 13:38:43 -0500 |
| From: | dj AT stealth DOT ctron DOT com (DJ Delorie) |
| To: | davis AT amy DOT tch DOT harvard DOT edu |
| Cc: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Subject: | Re: seeking advice |
Use <sys/farptr.h>. The framebuffer is available in all modes.
read_from_fg(x,y)
{
_farsetsel(_go32_info_block.selector_for_linear_memory);
_farnspeekb(0xd4400 + y);
return _farnspeekb(0xd4000 + x);
}
Using _farsetsel outside the loop and _farnspeekb inside the loop is
very efficient, but you can't expect the _farsetsel to last across any
system calls or anything.
For one-off calls, you can use _farpeekb(sel, ofs) directly.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |