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,200 of 4,675   
   Rod Pemberton to Bartc   
   Re: asm improvements?   
   22 Dec 17 04:46:17   
   
   From: EmailNullFile@nospicedham.voenflacbe.cpm   
      
   On Thu, 21 Dec 2017 17:58:03 +0000   
   Bartc  wrote:   
      
   > On 21/12/2017 14:33, Terje Mathisen wrote:   
   > > Bartc wrote:     
   > >> On 21/12/2017 06:14, James Van Buskirk wrote:   
      
   > >> 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?     
   > >    
   > > This is quite obvious:   
   > >    
   > > By putting them in this order, all the registers that were capable   
   > > of memory ops were located in one group, i.e. 3-7.     
   >    
   > I don't know if that makes any more sense. It's not as though the   
   > memory group is just the top half.    
      
   For 16-bit x86 code, memory addressing modes are limited to using bx,   
   bp, si, and di.  I.e., ax, cx, dx can't be encoded.  Also, sp is used   
   for stack memory access.  So, those are the "upper" 16-bit registers:   
   ax, cx, dx, bx, sp, bp, si, di.   
      
   For 32-bit mode, eax, ecx, edx, ebx, ebp, esi, edi are all used for   
   memory accessing modes, and esp is used for stack memory access.   
      
   Etc.   
      
   I.e., the x86 wasn't orthogonal originally in it's instruction encoding.   
      
      
   Rod Pemberton   
   --    
   The only hope for Jerusalem is for it to be shared by all the faithful.   
   It must stand as it's own territory separate from Christain, Muslim,   
   and Jewish lands.   
      
   --- 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