Mail Archives: djgpp/1998/12/02/19:07:00
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 -