ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/06/22:08:36

Xref: news2.mv.net comp.os.msdos.djgpp:3521
From: brennan AT mack DOT rt66 DOT com (Brennan "Mr. Wacko" Underwood)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Nearptrs not quicker?
Date: 6 May 1996 17:33:58 -0600
Organization: None, eh?
Lines: 32
Message-ID: <4mm296$dnb@mack.rt66.com>
References: <8hYRtBARuejxEwB6 AT johnhamp DOT demon DOT co DOT uk>
NNTP-Posting-Host: mack.rt66.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <8hYRtBARuejxEwB6 AT johnhamp DOT demon DOT co DOT uk>,
David Hampson  <David AT johnhamp DOT demon DOT co DOT uk> wrote:
>Am I doing something hideously wrong? (Is my CopyLongs routine okay?)
>
>Here are some fragments of my C code:
>
>#include "daves.h"
>#include <stdio.h>
>#include <stdlib.h>
>#include <sys\movedata.h> /* For dosmemput() */
>#include <sys\nearptr.h> /* For Fat DS */
>
>int BlastScreen(char *ScrArea,int Page);
>int FatDSBlastScreen(char *ScrArea,int Page);
>
>...
>    /* Draw the screen on DrawPage here */
>    if (!__djgpp_nearptr_enable())  
>    {
>      FatDSBlastScreen(MyScr,DrawPage);
>      __djgpp_nearptr_disable();
>    }  

D'oh! __djgpp_nearptr_enable/disable() are super-slow! Only call them once
per program invokation, if possible.

There might be more, but that's gonna slow you down a lot right there.


--brennan
-- 
brennan AT rt66 DOT com  |  fsck /u

- Raw text -


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