cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/02/19:07:00

Sender: nate AT cartsys DOT com
Message-ID: <3665D4D9.8A24AEB@cartsys.com>
Date: Wed, 02 Dec 1998 16:01:29 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: which is the fastest way to clear the screen i mode13h?
References: <199812011754 DOT RAA25002 AT remus DOT clara DOT net>
Reply-To: djgpp AT delorie DOT com

Arthur wrote:
> 
> Does PC ASM have a MOVEM command? On the M68k MOVEM shoved the contents of
> any or all (of 16) 32-bit registers to an area of memory. One technique was
> to clear as many registers as possible, and dump the contents to the screen.
> If you could clear as many as 15 registers, then that would be a whole 60
> bytes cleared in the same number of cycles as it would take about 5 move.l
> instructions (32-bit move).
> 
> Is this not possible on the PC? It seems like a very basic command to me.

Nope.  Closest thing is PUSHA, which pushes all the registers to the
stack.  Since the stack pointer is one of the registers so pushed, I
don't think you could use this to fill arbitrary blocks of memory.  It's
not so fast either; it took 18 cycles on a 386, and probably not many
less on newer chips.  We're stuck with the "string" instructions.

The 386 is not the best possible architecture, granted.  8
"general-purpose" registers, one or two of which are reserved... really
now.  Let's hope Intel will get it right with Merced.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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