delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/03/17:15:05

Sender: nate AT cartsys DOT com
Message-ID: <3756EF5B.3184FEAE@cartsys.com>
Date: Thu, 03 Jun 1999 14:10:51 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.5 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: DJGPP+NASM favour
References: <3755C659 DOT 2E6FD149 AT swipnet DOT se>
Reply-To: djgpp AT delorie DOT com

Mattias Eklöf wrote:
> 
> I'm wondering if someone could type out two really minor asm functions
> that'd work with DJGPP+NASM for me. I want speed at the same time as my
> asm knowledge is very limited, and I don't feel like digging too deep
> into it just for the sake of two functions either.
> 
> Anyway, what I need is:
> * a function something like void memcpy(char* to, char* from) that'd
> copy 64000 bytes of memory from (char*)from to (char*)to.
> * a function like void putmem(char* from) that'd copy 64000 bytes of
> memory from (char*) onto the screen (0xA000).

I don't think anybody can write functions that will be significantly
faster than the existing memcpy and dosmemput.

A few small optimizations, maybe, but they'd save maybe a cycle or two
over the whole copy.  No point.

Some CPU-specific optimizations are possible, but these are less than
trivial and involve a lot of research.  And besides, you didn't say what
kind of CPU you have.

In short, use what exists, and be happy.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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