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 2,845 of 4,675   
   wolfgang kern to Terje Mathisen   
   Re: Look back to "just for the H@ck"   
   18 Jul 17 19:24:15   
   
   From: nowhere@never.at   
      
   Terje Mathisen wrote:   
   ...   
   >>> My first ascii executable used both POP BX and Base91. :-)   
   >> was it much shorter then ?   
      
   > It didn't need the Base64 decoder, but handling 16-bytes to 13 isn't   
   > free either. This was more than 20 years ago so I don't remember the   
   > details, like what I did if the input wasn't a multiple of 13 bytes long?   
      
   > I believe I just encoded enough pairs (of 13 bits each) so that I   
   > covered the input, then the decoder could just grab whatever garbage   
   > happened to reside past the end.   
      
   > Something like this?   
   >   
   >   bits =-8; buffer = 0;   
   >   do {   
   >     pair = (*src++ - 33) + (*src++ - 33) * 91; // 0 to 4095   
   >     buffer = (buffer << 13) + pair;   
   >     bits += 13;   
   >     do {   
   >       *dst++ = buffer & 255;   
   >       buffer >>= 8;   
   >       bits -= 8;   
   >     } while (bits >= 0);   
   >   } while (src < src_end);   
   >   
   > with lots of opportunities for nice asm trickery to shorten it. :-)   
      
   Sorry for I have no idea what the above C-source may compile to.   
   __   
   wolfgang   
      
   --- 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