Xref: news2.mv.net comp.os.msdos.djgpp:2962 From: latorre AT ix DOT netcom DOT com Newsgroups: comp.os.msdos.djgpp Subject: Subject: [pleh] djgfx linear VBE2 example code problems Date: Sun, 21 Apr 1996 10:20:57 -0700 Organization: Netcom Lines: 26 Message-ID: <317A6E79.28D4@ix.netcom.com> NNTP-Posting-Host: frd-md1-01.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I'm totaly new to protected mode and was trying to work through the example code from the DJGFX doc but keep getting GPF's. I think the problem is with the code for copy_buffer2: void copy_buffer2(void) { movedata( _my_ds(), doublebuffer, our_global_selector, videoptr, width*height ); } doublebuffer == malloc(width*height) videoptr == (unsigned char *)0x0 // I tried the linear_address too I set up our_global_selector thusly: short our_global_selector = __dpmi_allocate_ldt_descriptors(1); __dpmi_set_segment_base_address( our_global_selector, linear_address); What needs to change ? What am I doing wrong ? Thanks, mlarch AT fred DOT net