home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,189 of 4,675   
   Bartc to James Van Buskirk   
   Re: asm improvements?   
   21 Dec 17 13:41:06   
   
   From: bc@nospicedham.freeuk.com   
      
   On 21/12/2017 06:14, James Van Buskirk wrote:   
   > "Bartc"  wrote in message news:fxdZB.23554$4O3.2385@fx15.am4...   
   >   
   >> On 16/12/2017 17:40, James Van Buskirk wrote:   
   >   
   >> > The above numbering doesn't reflect the   
   >> > overlap between RBP and R13 or RSP and R12.   
   >   
   >> What overlap is that: that the bottom 3 bits of the register code? And   
   >> why is it important, as all bottom 8 registers will 'overlap' with the   
   >> top 8?   
   >   
   > I refer you to 325462.pdf, Vol. 2A p. 2-11, table 2-5.  An SIB byte is   
   > required for R12-based addressing and R13 can't be used without   
   > displacement, although the displacement can be zero.   
   >   
   > Whatever numbering you choose for the registers, different ABIs   
   > will use them for different purposes, so ordering them to match   
   > one ABI doesn't make all that much sense to me.  Look at Agner   
   > Fog's PDF on calling conventions.   
   >   
   > I emphasize that I have no objection to replacing all the register   
   > names with numbers (6 for 2 for free for all and all that) but do   
   > believe that using a numbering scheme other than the one already   
   > hard-coded into the processor family is counterproductive.   
      
   The standard set of registers already is different from what is hardcoded:   
      
   Internal code    Register name   
      0               AX   
      1               CX   
      2               DX   
      3               BX   
      4               SP   
      5               BP   
      6               SI   
      7               DI   
      
   Why aren't they named AX,BX,CX,DX instead of AX,CX,DX,BX?   
      
   Why is the stack pointer in the middle? (Usually it's at or near the top.)   
      
   So the internal hard-coding is irrelevant.   
      
      
   --   
   bartc   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca