Sender: nate AT cartsys DOT com Message-ID: <3665D4D9.8A24AEB@cartsys.com> Date: Wed, 02 Dec 1998 16:01:29 -0800 From: Nate Eldredge 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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