Message-ID: <38B7B9D8.EEF32B26@bigfoot.com> From: JP Morris Organization: Aircraft Liberation Front X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.14 i586) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Fastest bitblt? References: <38B73FC4 DOT 82FCECB8 AT videotron DOT ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 42 Date: Sat, 26 Feb 2000 11:32:40 +0000 NNTP-Posting-Host: 212.56.119.112 X-Complaints-To: abuse AT plus DOT net DOT uk X-Trace: stones 951564647 212.56.119.112 (Sat, 26 Feb 2000 11:30:47 GMT) NNTP-Posting-Date: Sat, 26 Feb 2000 11:30:47 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Trancelucid wrote: > > 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? How about writing a little assembly to do the blit using rep movsd? Then you can set ES to the video segment and away you go. > > TIA, > .(Trancelucid). > . Jaune . -- JP Morris - aka DOUG the Eagle (Dragon) -=UDIC=- DOUG-15 AT bigfoot DOT com Fun things to do with the Ultima games (http://ithe.cjb.net) Developing a U6/U7 clone (http://fly.to/ire) d+++ e+ N+ T++ Om U1234!56!7'!8!KA u++ uC+++ uF+++ uG---- uLB---- uA--- nC+ nR---- nH+++ nP++ nI nPT nS nT wM- wC- y a(YEAR - 1976)