www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/08/09:31:22

Xref: news2.mv.net comp.os.msdos.djgpp:6957
From: John Meilleur <meilleuj AT cadvision DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: buffer -> screen transfers
Date: Mon, 05 Aug 1996 13:12:35 -0600
Organization: CADVision
Lines: 21
Message-ID: <320647A3.5827@cadvision.com>
NNTP-Posting-Host: agtd108.cadvision.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Can anyone help me speed up this bit of code.  I'm writing some hi-res graphics routines and would like to know
how i can speed up clearing the screen buffer and the buffer transfer.  I know I should be able to do 32-bit
transfering but I've had no luck with it sofar.  The "video_ds" is the selector to video memory and starts at
offset 0.  Can any show me how to speed this up alot? TIA 

char *screen = malloc(640*480);
while (!kbhit()) 
{
  for (i=0;i<640*480;i++)
    screen[i]=0;
	
  drawstuff(screen);

  _farsetsel(video_ds);
  for (i=0;i<640*480;i++)
    _farnspokeb(i,screen[i]);	

}

										-John Meilleur
										 meilleuj AT cadvision DOT com

- Raw text -


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