Mail Archives: djgpp/1999/07/17/15:58:10

Sender: nate AT cartsys DOT com
Message-ID: <>
Date: Sat, 17 Jul 1999 12:58:21 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
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>
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

- Raw text -

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