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,814 of 4,675   
   wolfgang kern to All   
   Re: BASE64 again   
   14 Jul 17 21:07:22   
   
   From: nowhere@never.at   
      
   I answered Kerr Mudd-John:   
   ...   
   >>>  could cmp al,0 or cmp cl,8 here & put the "and" at top but this   
   >>>  costs 4 in 2:1 v 3 to clear cx.   
      
   > if it works: cmp al,00 instead of and cl,06 sound good to me,   
   > push bp/pop cx are only 2 bytes for me.   
      
   unfortunately it wont work with cmp al,0 (it could be an "A")   
      
   >> think of adopting your much shorter decoder and direct SMC it. :)   
   > You can reduce the fixup count further for 1 byte extra:   
      
   btw: Congrats to your improvement!   
      
   let me check on what can be paired and what need a single yet:   
      
   putnum:                   ; need cl=*0* on 1st run   
   41          inc cx   
   41          inc cx        ; need cl=8 for last; 'and' later   
   4F          dec di   
   98          cbw           ;clr ah reqd   
   D3 E0       shl ax,cl     ;2,4,6,8   
   08 25       or  [di],ah   
   47          inc di   
   80 E1 06    and cl,0x06   ; 8->0. 2,4,6 ok   
   AC          lodsb   
   EB d5       jmp top+2     ; may change a bit   
   3C 3D       cmp al,3D    ;done ahead with jnz+1 RET (C301)   
   75 D5       jnz  0d5   
      
   98,E0D3,08,80,06e1,ac,d5EB seem to fit well, so even only three pairs   
   we have only seven modify points in this part yet. That's good!   
      
   I could pair E180 with a two bytes addon SUB and perhaps also D398   
   and AC06 anyway, so with 2 bytes more in the modifier chain it may   
   become: d398,08e0,e180,ac06,d5eb (five instead of seven = -6 byte).   
      
   I think it's now time to go for it :)   
   __   
   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