From: "Peter Remmers" Newsgroups: comp.os.msdos.djgpp Subject: Re: VESA and more generally using dpmi to access VIDEO Memory Date: Fri, 27 Nov 1998 19:26:09 +0100 Organization: TFH-Berlin (Berlin, Germany) Lines: 30 Message-ID: <73mqsq$t5f$1@idy05.tfh-berlin.de> References: NNTP-Posting-Host: ip099167.tfh-berlin.de X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com >this works : VideoSelector=__dpmi_segment_to_descriptor(0xa000); > >this doesn't work : >__dpmi_meminfo LFB; > >VideoSelector=__dpmi_allocate_ldt_descriptors(1); >LFB.size=0xffff; >LFB.address=0xa0000000l; >__dpmi_physical_address_mapping(&LFB); >__dpmi_set_segment_base_address(VideoSelector, LFB.address); >__dpmi_set_segment_limit(VideoSelector, LFB.size); > >What have i forgotten ?? The physical address of the video memory should not be hardcoded, but rather obtained from VESA >= 2.0 or something, or else this will indeed only run on YOUR computer - but I guess this is only supposed to be an example... The only difference I can see to code I have written is the call for the segment limit: __dpmi_set_segment_limit(VideoSelector, LFB.size-1); The size must be 1 less. Then it should work. Peter Remmers