delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/25/22:15:17

Message-ID: <38B73FC4.82FCECB8@videotron.ca>
From: Trancelucid <trancelucid AT videotron DOT ca>
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Fastest bitblt?
Lines: 29
Date: Fri, 25 Feb 2000 21:51:48 -0500
NNTP-Posting-Host: 24.201.20.12
X-Complaints-To: abuse AT videotron DOT net
X-Trace: weber.videotron.net 951533136 24.201.20.12 (Fri, 25 Feb 2000 21:45:36 EST)
NNTP-Posting-Date: Fri, 25 Feb 2000 21:45:36 EST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi there,
	I'm porting some source of mine (from Watcom and TC) to DJGPP, and the
main problem I'm having right now is accessing 0xA0000. I read the libc
reference, and a few tutorials on the net, and the most popular
buffer-to-video functions seem to be memcpy() and _farpokeb().. I have
some unanswered questions, and I'd like your opinion on the matter.

It may be off-topic, but just for curiosity... Why can you access
0xA0000 in Watcom and not in DJGPP? Both are 32bit compilers, so why
would you need to disable protection to access video memory in DJGPP?

How (un)safe is it to disable protection to access video memory with
memcpy()?

As for _farpokeb(), is there a way to make it faster? Right now I use it
in a for loop:

for(i=0;i<64000;i++) 
   _farpokeb(_dos_ds,0xA0000,+i,buffer[i]);

Also, when I use optimization parameters (-O3), both seem the same
speed.. Are they the same code when optimized? And how can I look if
they use the same asm instructions?

Is there any faster way than those 2?

TIA,
	.(Trancelucid).
	  .  Jaune  .

- Raw text -


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