www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/03/03:39:04

Date: Sun, 3 Jan 1999 10:36:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: François Poirier <fpoirier AT aei DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: Selector and linear frame buffer
In-Reply-To: <368BCC31.BBD0F6C1@aei.ca>
Message-ID: <Pine.SUN.3.91.990103103540.12860A-100000@is>
MIME-Version: 1.0
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id DAA23880
Reply-To: djgpp AT delorie DOT com

On Thu, 31 Dec 1998, François Poirier wrote:

>  tried to make a selector like this:
> and it dosen't work? And how do I access it am I correct?

There are several working examples in section 18.4 of the FAQ, aren't
they enough to get you started?

>   __dpmi_set_segment_limit(video_selector, 2000000L);   /* 2 Megs */

The limit should be 1 less than the size.  Also, 2000000 is NOT
2MBytes.

Why do you need a 2MB-large segment for video?  Also, you never say
what base address did you use for the segment.

And last, don't forget to check the errors reported by these
functions!

> For accessing it:
> _farpokeb(video_selector, (int)rand()%639 * Max_X + (int)rand()%479,
> (char)rand()%255);

This is correct (though you probably mean 640 and 480, not 639 and
479).

What problems did you see?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019