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,839 of 4,675    |
|    wolfgang kern to Kerr Mudd-John    |
|    Re: BASE64 again    |
|    18 Jul 17 12:23:06    |
      From: nowhere@never.at              Kerr Mudd-John wrote:              >>> Another alternative: (needs cl=7 at start and 7 on the stack).       >> cx=0007, not cl       >>       >>> 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       >>       >> or you can start here with cx=0 (still need 0x0007 on the stack)       >>> 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?                     > Yet another one!       > uses 'xor' instead of 'or', so 1 less FU (FixUp);       > 88=mov changed for AA=stosb; 'cmp al' just 1 FU, no need for cbw.       >       > 0127 41 inc cx       > 0128 41 inc cx       > 0129 D3 E0 shl ax,cl       > 012B 30 25 xor [di],ah       > 012D 47 inc di       > 012E AA stosb       > 012F 4F dec di       > 0130 51 push cx       > 0131 58 pop ax       > 0132 3C 08 cmp al,08       > 0134 75 03 jnz 0139       > 0136 4F dec di       > 0137 55 push bp       > 0138 59 pop cx       > 0139 AC lodsb       > 013A 3C 3D cmp al,3D       > 013C 75 D1 jnz 010F              thanks, I'll check if this work. It would make it shorter.       __       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