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,177 of 4,675   
   James Van Buskirk to Bartc   
   Re: asm improvements?   
   16 Dec 17 10:40:05   
   
   From: not_valid@nospicedham.comcast.net   
      
   "Bartc"  wrote in message news:zCaZB.23469$YE3.12688@fx06.am4...   
      
   > On 27/08/2017 09:49, wolfgang kern wrote:   
      
   > > [...about register names]   
      
   > > you are free to decide and may rename all registers after girls,   
   > > but I heavy daubt that this make your source better readable.   
      
   > I've used alternate names via macros using Nasm.   
      
   > I'm also in the middle of writing an x64 assembler designed for working   
   > with the output of code generators, and there I use a similar scheme.   
      
   > Here's why: the names in my scheme are completely consistent, unlike the   
   > Intel-style 'official' register names shown in brackets:   
      
   > 64-bit        32-bit        16-bit        8-bit         Generic   
      
   > D0  (rax)     A0  (eax)     W0  (ax)      B0  (al)      R0   
   > D1  (rbx      A1  (ebx)     W1  (bx)      B1  (bl)      R1   
   > D2  (rsi)     A2  (esi)     W2  (si)      B2  (sil)     R2   
   > D3  (rdi)     A3  (edi)     W3  (di)      B3  (dil)     R3   
   > D4  (r10)     A4  (r10d)    W4  (r10w)    B4  (r10l)    R4   
   > D5  (r11)     A5  (r11d)    W5  (r11w)    B5  (r11l)    R5   
   > D6  (r12)     A6  (r12d)    W6  (r12w)    B6  (r12l)    R6   
   > D7  (r13)     A7  (r13d)    W7  (r13w)    B7  (r13l)    R7   
   > D8  (r14)     A8  (r14d)    W8  (r14w)    B8  (r14l)    R8   
   > D9  (r15)     A9  (r15d)    W9  (r15w)    B9  (r15l)    R9   
   > D10 (rcx)     A10 (ecx)     W10 (cx)      B10 (cl)      R10   
   > D11 (rdx)     A11 (edx)     W11 (dx)      B11 (dl)      R11   
   > D12 (r8)      A12 (r8d)     W12 (r8w)     B12 (r8l)     R12   
   > D13 (r9)      A13 (r9d)     W13 (r9w)     B13 (r9l)     R13   
   > D14 (rbp)     A14 (ebp)     W14 (bp)      B14 (bpl)     R14   
   > D15 (rsp)     A15 (esp)     W15 (sp)      B15 (spl)     R15   
      
   Why is it preferable to use anything other than the architected   
   register numbers? The above numbering doesn't reflect the   
   overlap between RBP and R13 or RSP and R12.   
      
   --- 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