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,825 of 4,675   
   Kerr Mudd-John to wolfgang kern   
   Re: BASE64 again   
   17 Jul 17 09:35:49   
   
   From: notsaying@nospicedham.invalid.org   
      
   "wolfgang kern"  wrote in   
   news:okdbps$1hi6$1@gioia.aioe.org:   
      
   > Kerr Mudd-John wrote:   
   > ...   
      
   >   
   >> An alternative (I don't know if it's better or worse for your fixups)   
   >> 2C 06          sub          al,06   
   >> 98             cbw   
   >> 41             inc          cx   
   >> 41             inc          cx   
   >> D3 E0          shl          ax,cl   
   >> 08 25          or           [di],ah   
   >> 47             inc          di   
   >> 83 E1 06       and          cx,0006   
   >> 88 05          mov          [di],al   
   >> 75 01          jnz          0137   
   >> 4F             dec          di   
   >> AC             lodsb   
   >> EB d5       jmp top+2   
   >>   
   >> 9806 e0d3 08 e183 8806 05 01 AC D5EB   
   >> 9 maybe not.   
   >   
   > easy to check: 9806+7862=1068 so not pairable by sub. Only values   
   > between a9xx..05xx and xxbf..xx1c will be pairable with my current   
   > DX=7862 subs. So I use the coincidental given AH=A1 to cover 80..a8   
   > singles.   
      
   Another alternative: (needs cl=7 at start and 7 on the stack).   
      
   123 98             cbw   
   124 49             dec          cx   
   125 D3 C8          ror          ax,cl   
   127 08 05          or           [di],al   
   129 47             inc          di   
   12A 88 25          mov          [di],ah   
   12C 49             dec          cx   
   12D 79 03          jns          0132   
   12F 4F             dec          di   
   130 59             pop          cx        ; OR push dx   
   131 51             push         cx        ;    pop cx   
   132 AC             lodsb   
   133 3C 3D          cmp          al,3D   
   135 75 D4          jnz          010B   
   137 59             pop          cx       ; tidy stack on exit   
      
   or could set dl=7 and "push dx/pop cx" to save the extra 2 stack ops?   
      
   --- 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