Mail Archives: djgpp/1995/08/28/07:17:12
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:1785
|
Path: | news-dnh.mv.net!mv!news.NH.Destek.Net!news2.net99.net!uunet!in2.uu.net!news.sprintlink.net!nwfocus1.wa.com!nwfocus.wa.com!news.telebyte.com!usenet
|
From: | jhunter AT kendaco DOT telebyte DOT com (Joel Hunter)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: GPF when accessing video memory directly
|
Date: | Sat, 19 Aug 1995 01:09:09 GMT
|
Organization: | Telebyte North West Silverdale, Wa
|
Lines: | 32
|
References: | <DDMG1t DOT Bwr AT jade DOT mv DOT net>
|
Nntp-Posting-Host: | kendaco.telebyte.com
|
To: | djgpp AT sun DOT soe DOT clarkson DOT edu
|
Dj-Gateway: | from newsgroup comp.os.msdos.djgpp
|
taps AT cyberstore DOT ca (Tapio Vocadlo) wrote:
>Using the _farpokeb and related functions in sys/farptr.h
>compiles fine, but then GPFs with a 'unsupported int 0x0D'
>message when run. All I'm doing is
>#include <sys/farptr.h>
>unsigned char gc=65;
>_farpokeb(0xb800,0,gc);
>I'm obviously doing something wrong, since far mem i/o
>has to work, but what..?
A _selector_ isn't the same thing as a segment. You need to either
use a linear memory selector
(_go32_info_block.selector_for_linear_memory) and use 0xB8000 as an
offset, or create a custom selector for your video memory, which you
can do using the
__dpmi_segment_to_descriptor(). Like this:
unsigned short videoSelector;
unsigned char gc=65;
videoSelector=__dpmi_segment_to_selector(0xB800);
_farpokeb(videoSelector,0,gc);
- Raw text -