delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/21/02:13:50

Date: Mon, 21 Jun 1999 09:11:16 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Bart Alewijnse <scarfman AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Screen copy
In-Reply-To: <01bebb48$615ee140$d3b2f1c3@scarfboy.tip.nl>
Message-ID: <Pine.SUN.3.91.990621091100.17143G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 20 Jun 1999, Bart Alewijnse wrote:

> How do you copy a double buffer to the screen the fastest?

If the buffer is contiguous, then use library function `dosmemput'
(it's documented in the library reference).  It already uses the
fastest assembly instructions possible.

> Are there any other ways to do this? What's a fast one/the fastest?
> I suppose that for the LFB it'd just be memcpy

`dosmemput' uses essentially the same code as `memcpy', except that it
``wastes'' a single instruction to load _dos_ds into a segment
register before commencing the transfer.

If you are really interested in knowing the innards of library
functions, I suggest to download djlsr202.zip and study their
sources.

- Raw text -


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