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 4,352 of 4,675   
   Kerr-Mudd, John to Robert Prins   
   Re: Fwd: ITOA in 65 bytes   
   16 May 21 21:01:05   
   
   From: admin@nospicedham.127.0.0.1   
      
   On Sun, 16 May 2021 21:43:10 +0000   
   Robert Prins  wrote:   
      
   []   
   >   
   > Anyway, this is the original TP3 RTL code, which uses repeated subtractions,   
   as   
   > disassembled by Hex-Rays' IDA Pro   
      
   I guess on the original PCs 8088 the subtractions *were* faster?   
      
      
   > I've done a check, and found that a multiply of eax by 0x1999_999a works over   
   > the full 16 bit range to divide by 10 without requiring additional shifts. Of   
   > course it needs a back-multiply and subtraction to actually get the digit.   
   > However, even the above code using a divide will quite likely be   
   (significantly)   
   > faster than the multiple subtraction loops in the original RTL. (And having   
   > mentioned multiplying eax, it should be clear that I don't really care about   
   > keeping the RTL compatible with the 8086/286, and given that replacing   
   > Int21h/AX=2C with "RDTSC" is also an option...)   
   >   
   []   
      
   --   
   Bah, and indeed Humbug.   
      
   --- 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