www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/19/06:14:53

Date: Thu, 19 Jul 2001 13:14:11 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Sterten AT aol DOT com
cc: djgpp AT delorie DOT com
Subject: Re: pokeb peekb
In-Reply-To: <69.18173d29.2887d6db@aol.com>
Message-ID: <Pine.SUN.3.91.1010719130809.98B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 19 Jul 2001 Sterten AT aol DOT com wrote:

> 1) what's the shortest complete program that pokes a face (ascii 1)
>    into the exact middle of the screen and exits to DOS ?

_farpokeb (_dos_ds, ScreenPrimary + 12*160 + 80, 1);

(This is not a complete program, but the rest is easy to add.)

> 2) what , if it has to be fast (~50 cycles)

The above line of code expands into 2 instructions of inline assembly.  
How much faster can you ask it to be?

> 3) what , if it is required to compile on a large variety of compilers ?

Forget it: the glyph which will be displayed when you put ASCII 001 to 
the screen is not the same on each system, and the way to print directly 
to the screen memory is different on every OS and each compiler.

- Raw text -


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