www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/06/02:52:50

Date: Tue, 6 Jun 1995 08:13:31 +0300
From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
To: jimh AT minerva DOT cis DOT yale DOT edu
Subject: Re: Graphics
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> 	Am I correct to then assume that I can not fill a screen using an 
> assembly routine that directly stores data in it (rather than calling 
> some other routine for each pixel/line/etc?  That would probably be too 
> slow for what I am doing.

No, it won't.  These ``slow'' routines are written in inline assembly and
expand into the minimal two machine instructions necessary to access a
far pointer in protected mode.  The extra instruction you pay to do it in
a way that preserves memory protection are seldom large enough punishment
to go for tricks which were recently described in the ``Fat DS'' thread.
If you have to update many pixels in a loop, there is a version of the
above farptr functions which load the segment register only once, so you
only have a single instruction (albeit with a segment override) inside the
loop.

Still think this is too slow?

Btw, this isssue is discussed in the DJGPP FAQ list, Chapter 10.  The FAQ is
available as faq101.zip from the same place you got DJGPP.

- Raw text -


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