delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/04/20:36:43

From: "Particle" <quark AT webspan DOT net>
Newsgroups: comp.os.msdos.djgpp,rec.games.programmer
Subject: Re: 32 bit Memory Operations
Date: 4 Jun 1997 17:42:38 EDT
Organization: WebSpan Inc., New Jersey
Lines: 42
Message-ID: <01bc712f$d980cdb0$6f589ace@particle>
References: <865393956 DOT 26276 AT dejanews DOT com>
NNTP-Posting-Host: usr1-01.bay.ny.webspan.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I think you do need to use assembly...

but memcpy is not 8 bit... it's 16 bit most times... 

Render_Buffer_32 PROC FAR C
.386
push ds
cld
lds si, double_buffer
les di, video_buffer
mov cx,16000
rep movsd
pop ds
ret
Render_Buffer_32 ENDP 

That would work for real mode code... 

you can find the complete source on my site.

ps: I've just ran the program using this... and to my 
surprise, it runs under windows NT... everything works 
fine... the graphics... low level keyboard...etc.... 
I am still stunned by this... 

hope it helps...

-- 
quark(particle)
quark AT webspan DOT net
http://www.webspan.net/~quark
C/C++/ASM/Java/JavaScript/HTML/Perl

voss AT msn DOT com wrote in article <865393956 DOT 26276 AT dejanews DOT com>...
> I'd like to know if I can use 32 bit versions of memcpy and memset. I'm
> writing to video memory and would like to do this instead of slow 8 bit
> writes. I have a PCI bus and card, so it shouldnt be a problem. Does
> anyone know how to do this, or do I have to use assembly? Thanks
> 
> -------------------==== Posted via Deja News ====-----------------------
>       http://www.dejanews.com/     Search, Read, Post to Usenet
> 

- Raw text -


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