Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Assembler Question

Author: Eugene Nalimov

Date: 22:32:28 01/26/99

Go up one level in this thread


On January 26, 1999 at 22:38:37, James Robertson wrote:

>Once again I show my absolute ignorance of assembly with these two questions:
>I am trying to acces the 3rd [+ 4th] byte of a register. How? E.g., what is next
>after al, ah, ?
>How do I pop something off the stack without moving the stack pointer?
>
>Thanks,
>James

1. Use shift instruction. E.g.
        shr     eax, 16
        mov     byte ptr [esi], al
   You can also use rotate instruction (it'll not destruct
   other bytes):
        ror     eax, 16
        mov     byte ptr [esi], al
        ror     eax, 16
   But if I remember it correctly, rotate is worse than shift
   (cannot be executed in parallel) on both Pentium and P6 family.
2. mov reg32, dword ptr [esp]

Eugene



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.