delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/05/18:47:30

Xref: news2.mv.net comp.os.msdos.djgpp:5690
From: Pin.f.Sun
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is the quickiest way to clear memory?
Date: 5 Jul 1996 09:59:48 -0700
Organization: Zippo
Lines: 18
Message-ID: <4rjhm4$c81@clark.zippo.com>
References: <4rgv14$7ae AT clark DOT zippo DOT com> <4rinnt$gqt AT nemesis DOT eo DOT lu>
NNTP-Posting-Host: wport.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <4rinnt$gqt AT nemesis DOT eo DOT lu>, dmcneill AT pne DOT co DOT uk says...
>
>Pin F. Sun wrote:
>
>>I am trying to find out a quick way to clear memory.  I used memset or 
>>bzero function, but they are way too slow.  I am trying to use assembly
>>language, but Gas doesn't recognize 'les' and 'reps ', can anybody help
>>me?
>
>memset() uses rep stosd.  you don't get much quickier than that!
>
I just wrote a routine using rep stosd myself, and that came out to be true,
but I still have to say it's slow!  I used rep stosw in real mode(TC 3.0)
to do the same task, I tested it to clear a virtual screen of size 64000, and 
it came out to be 250 fps, but I used memset in protected mode,  it came out 
100 fps! where does the extra time goes?  Sorry if this is a stupid question, 
I am new to protected mode programming.

- Raw text -


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