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,345 of 4,675   
   Terje Mathisen to Robert Prins   
   Re: ITOA in 65 bytes   
   16 May 21 15:09:31   
   
   From: terje.mathisen@nospicedham.tmsw.no   
      
   Robert Prins wrote:   
   > On 2021-05-16 08:25, R.Wieser wrote:   
   >>> Is it possible to fit the conversion of a 16 bit signed integer to   
   >>> left-aligned   
   >>> ASCII without leading zeroes in just 65 bytes?   
   >>   
   >> As no specifications have been posted, I do have some code that outputs a   
   >> signed number using just 25 bytes.   
   >>   
   >> The trick ?    Filling the buffer backwards (putting the sign at the   
   >> end).   
   >   
   > The code is replacement code for the itoa routine in the Borland TP3   
   > compiler, so it has to give the same result.   
      
   Why didn't you state so?   
      
   The key here is that this function returns a TP string, right?   
      
   This means that the space for it has to be allocated, but I don't   
   remember anymore if that is done by the caller or callee in that   
   environment?   
      
   Terje   
      
   --   
   -    
   "almost all programming can be viewed as an exercise in caching"   
      
   --- 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