Sender: nate AT cartsys DOT com Message-ID: <3790E05D.2F0F6F98@cartsys.com> Date: Sat, 17 Jul 1999 12:58:21 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: double buffering prob. in 13h mode. References: <3 DOT 0 DOT 1 DOT 32 DOT 19990717221624 DOT 0069d798 AT apiitkl DOT edu DOT my> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Mark wrote: > > Hello, > > I got this snippet from the DJGPP FAQ using short screen = > __dpmi_segment_to_descriptor(0xa000) and the movedata() function. > > I tried to implement it in a simple program. But it gives me garbage on the > screen. A sreen full of ramdom colored pixels while it suppose to put just > a single vertical red line on the screen. > Can anyone help me out here ? > (See below for the source) Your malloced buffer is filled with random bytes when you first allocate it. You probably want to do memset(double_buffer, 0, 320 * 200); before drawing. -- Nate Eldredge nate AT cartsys DOT com