From: notsaying@nospicedham.invalid.org   
      
   "wolfgang kern" wrote in   
   news:ommhs4$1t5l$1@gioia.aioe.org:   
      
   > Kerr-Mudd,John wrote:   
   > ...   
   >>>> I'm still here; still struggling with a pure B64 char with fixups   
   >>>> that's similar to WK's shortest B64 decoder. (initial setup, main   
   >>>> loop enclosing fixups, then decoder routine [moved to early PSP]).   
   >   
   >>>> It's tantalisingly close to doable!   
   >   
   >>>:) it's sure possible to get rid of all the filler bytes, even with   
   >>> B64.   
   >   
   >> I now have something that works, but I haven't "newline"-proofed it.   
   >> 213 bytes of pure B64 (if you allow crlfs). Quite a struggle to get   
   >> the fixups working; that and avoiding invalid fixup addresses (e.g.   
   >> the 5A to 61 gap). If/when I overcome that last problem I'll post it   
   >> here.   
   >   
   > Perhaps less struggle if you'd had my hex-editable disass/dump-tool :)   
   >   
   Hah it's a heap of equates to keep it "simple".   
      
   Here's the B64 decoder (after fixups)   
      
   ax=2Bxx   
      
   ->u3c l3d   
   3C is 3D-1; 3D is longest code size <64 chars   
   1625:003C 3D 2B 30 cmp ax,302B   
   1625:003F 72 33 jb 0074   
   1625:0041 3D 3D 30 cmp ax,303D   
   1625:0044 74 32 jz 0078   
   1625:0046 3D 61 30 cmp ax,3061   
   1625:0049 72 02 jb 004D   
   1625:004B 2C 06 sub al,06   
   1625:004D 2C 41 sub al,41   
   1625:004F 79 0D jns 005E   
   1625:0051 04 45 add al,45   
   1625:0053 3D 33 30 cmp ax,3033   
   1625:0056 77 06 ja 005E   
   1625:0058 18 C0 sbb al,al   
   1625:005A 04 41 add al,41   
   no fixups in the 5A-61 gap!   
   1625:005C 48 dec ax   
   1625:005D 48 dec ax   
   1625:005E 41 inc cx   
   1625:005F 41 inc cx   
   1625:0060 36 98 ss:cbw   
   1625:0062 D3 E0 shl ax,cl   
   1625:0064 30 25 xor [di],ah   
   1625:0066 47 inc di   
   1625:0067 AA stosb   
   1625:0068 4F dec di   
   test if cl has reached 8, if so reset to 0; "and cl,6" is too many FUs.   
   1625:0069 51 push cx   
   1625:006A 58 pop ax   
   1625:006B 34 30 xor al,30   
   1625:006D 34 38 xor al,38   
   1625:006F 75 03 jnz 0074   
   start_here:   
   1625:0071 4F dec di   
   1625:0072 50 push ax   
   1625:0073 59 pop cx   
   1625:0074 AC lodsb   
   1625:0075 36 36 71 C3 ss:jno 003A   
   (jmpback-amount reused as 'ret' trick!)   
      
   > Ok if just for the fun of doing it, but I still don't understand why   
   []   
   FSVO "fun"!   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|