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,920 of 4,675    |
|    wolfgang kern to John    |
|    Re: Look back to "just for the H@ck"    |
|    13 Aug 17 15:43:05    |
      From: nowhere@never.at              Kerr-Mudd,John wrote:       ...       >>> 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)              Let me check... and add comments              > ax=2Bxx       wouldn't ax=30xx fit better ? But I see yet you start at 071.       >       > ->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 ;skip all <2B       > 1625:0041 3D 3D 30 cmp ax,303D       > 1625:0044 74 32 jz 0078 ;return on 3D       > 1625:0046 3D 61 30 cmp ax,3061       > 1625:0049 72 02 jb 004D ;**2C02       > 1625:004B 2C 06 sub al,06 ;**2C06       > 1625:004D 2C 41 sub al,41       > 1625:004F 79 0D jns 005E ;*040D gotnum       > 1625:0051 04 45 add al,45       > 1625:0053 3D 33 30 cmp ax,3033       > 1625:0056 77 06 ja 005E ;*1806 gotnum       > 1625:0058 18 C0 sbb al,al ;*04C0       > 1625:005A 04 41 add al,41       > ; no fixups in the 5A-61 gap!       > 1625:005C 48 dec ax       > 1625:005D 48 dec ax       gotnum:       > 1625:005E 41 inc cx       > 1625:005F 41 inc cx       > 1625:0060 36 98 ss:cbw ;*D398       > 1625:0062 D3 E0 shl ax,cl ;*E0       > 1625:0064 30 25 xor [di],ah ;***25       > 1625:0066 47 inc di       > 1625:0067 AA stosb ;*AA       > 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 ;*03       > start_here:       > 1625:0071 4F dec di       > 1625:0072 50 push ax       > 1625:0073 59 pop cx       > 1625:0074 AC lodsb ;*AC       > 1625:0075 36 36 71 C3 ss:jno 003A ;*C3, corr:jmp=>03C       > ; (jmpback-amount reused as 'ret' trick!)              I see you scrambled your getnum. Well, now only 12 SMC points for B64       (11 for me) and 61 byte instead of the previous 16 points on your short       47 byte decoder this will become one byte less than my 209 byte variant       (+14-5*3 = -1).              >> Ok if just for the fun of doing it, but I still don't understand why       > []       > FSVO "fun"!              very obvious indeed :)       __       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