Date: Mon, 1 Mar 1999 11:24:14 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: XtReMe cc: djgpp AT delorie DOT com Subject: Re: Linear frame buffer size In-Reply-To: <920221317.3421.0.rover.d4ee0fa5@news.demon.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.