Mail Archives: djgpp/1999/03/01/07:09:45

Date: Mon, 1 Mar 1999 11:24:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: XtReMe <xtreme AT x-project DOT demon DOT nl>
cc: djgpp AT delorie DOT com
Subject: Re: Linear frame buffer size
In-Reply-To: <>
Message-ID: <Pine.SUN.3.91.990301112349.2578G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Sun, 28 Feb 1999, XtReMe wrote:

>     if (!__dpmi_set_segment_limit (VESASelector, VESAPhysical.size))
>         return 5;
>     return 0;
> }
> It all works fine, except for __dpmi_set_segment_limit (). When the
> frame buffer gets real big, like 640 * 480 * 24 bpp or 1024 * 786 * 16,
> I get __dpmi_error 8, which is the DOS error : Not enough memory.
> But I have a 4 MB video card and it sets the mode correctly without any

First, the limit should be size-1, not size.  Second, for sizes larger
than 1MB the size must be a multiple of 4KB (this is not your case,
but your code doesn't test for this at all).

This is all explained in section 18.7 of the FAQ, btw.

- Raw text -

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