• B64 in 256

    From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer on Wed Sep 3 09:26:42 2025
    From Newsgroup: alt.lang.asm

    an 8086 asm coded Base 64 encoder/decoder for DOS in <256 bytes (actually
    166)

    uses DOS INT 21 for StdIO.

    Decode:
    B64 -d <b64file.txt >decoded.fil
    chars below '+' (eg. cr,lf tab etc) are skipped, but otherwise not vetted.

    Encode: (no parm or any without a 'd' as second char)
    B64 [-e] <plain.fil >b64file.txt

    Encoded file has crlf every 72 output chars, last shortfall of a multiple
    of 3 is padded with '='.

    Here it is, in b64 format, encoded by itself:

    tD+5xmy6wwHNIZHj+YnWic2/bG5XgD6DAGR0VIkauhIAMclOiiRGigRBQdPoJD88GnIQPDRy Cjw+cgSwL3UGLEsEBgRBqoDhBnXZSnUGuA0Kq7ISg+0DdAp5xgHvKemwPfKqWkOJ+SnRtEDN IUvrkMYCPTHJrDwrciIsQXMKBEU8M3cKsEUcADwacgIsBphBQdPgMGX/gOEGdAGqrDw9ddXj wE/rvQ==


    or in dump format
    d 100 lA6
    16AD:0100 B4 3F B9 C6-6C BA C3 01-CD 21 91 E3-F9 89 D6 89 .?..l....!...... 16AD:0110 CD BF 6C 6E-57 80 3E 83-00 64 74 54-89 1A BA 12 ..lnW.>..dtT.... 16AD:0120 00 31 C9 4E-8A 24 46 8A-04 41 41 D3-E8 24 3F 3C .1.N.$F..AA..$?< 16AD:0130 1A 72 10 3C-34 72 0A 3C-3E 72 04 B0-2F 75 06 2C .r.<4r.<>r../u., 16AD:0140 4B 04 06 04-41 AA 80 E1-06 75 D9 4A-75 06 B8 0D K...A....u.Ju... 16AD:0150 0A AB B2 12-83 ED 03 74-0A 79 C6 01-EF 29 E9 B0 .......t.y...).. 16AD:0160 3D F2 AA 5A-43 89 F9 29-D1 B4 40 CD-21 4B EB 90 =..ZC..)..@.!K.. 16AD:0170 C6 02 3D 31-C9 AC 3C 2B-72 22 2C 41-73 0A 04 45 ..=1..<+r",As..E 16AD:0180 3C 33 77 0A-B0 45 1C 00-3C 1A 72 02-2C 06 98 41 <3w..E..<.r.,..A 16AD:0190 41 D3 E0 30-65 FF 80 E1-06 74 01 AA-AC 3C 3D 75 A..0e....t...<=u 16AD:01A0 D5 E3-C0 4F EB BD ...O..
    q

    plain hex:
    B43FB9C66CBAC301CD2191E3F989D689CDBF6C6E57803E8300647454891ABA12 0031C94E8A24468A044141D3E8243F3C1A72103C34720A3C3E7204B02F75062C 4B04060441AA80E10675D94A7506B80D0AABB21283ED03740A79C601EF29E9B0 3DF2AA5A4389F929D1B440CD214BEB90C6023D31C9AC3C2B72222C41730A0445 3C33770AB0451C003C1A72022C06984141D3E03065FF80E1067401AAAC3C3D75
    D5E3C04FEBBD
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer on Thu Sep 4 22:07:21 2025
    From Newsgroup: alt.lang.asm

    On Wed, 3 Sep 2025 09:26:42 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    an 8086 asm coded Base 64 encoder/decoder for DOS in <256 bytes

    uses DOS INT 21 for StdIO and string display

    Decode:
    B64 -d <b64file.txt >decoded.fil
    chars below '+' (eg. cr,lf tab etc) are skipped, but input not otherwise vetted.

    Encode: (no parm or any without a 'd' or 'h' as second char)
    B64 [-e] <plain.fil >b64file.txt


    Added 'B64 -h' to show usage as above, corrected an error in padding if
    when encoding a file the result ends in a full line (the pad removal code trampled on the crlf!)


    Encoded file has crlf every 72 output chars, last shortfall of a multiple
    of 3 is padded with '='.


    Here it is, in b64 format, encoded by itself:


    urUBoIMAPGh1BbQJzSHDULQ/ufBszSGRWOPzic2J1r+nblc8ZHRYiRq6EgAxyU6KJEaKBEFB 0+gkPzwachA8NHIKPD5yBLAvdQYsSwQGBEGqgOEGddlKdQuyErgNCoP9AnYBq4PtA3fDxwM9 PTwNdQGrWkOJ+SnRtEDNIUvrgcYCPTHJrDwrciIsQXMKBEU8M3cKsEUcADwacgIsBphBQdPg MGX/gOEGdAGqrDw9ddXjwE/rvUI2NCAtZTxwbGFpbi5maWw+YjY0LnR4dA0KQjY0IC1kPGI2 NC50eHQ+ZGVjb2RlZC5maWwNCgpHUEwgTUoyMDI1JA==

    in hex format:

    BAB501A083003C687505B409CD21C350B43FB9F06CCD219158E3F389CD89D6BF A76E573C647458891ABA120031C94E8A24468A044141D3E8243F3C1A72103C34 720A3C3E7204B02F75062C4B04060441AA80E10675D94A750BB212B80D0A83FD 027601AB83ED0377C3C7033D3D3C0D7501AB5A4389F929D1B440CD214BEB81C6 023D31C9AC3C2B72222C41730A04453C33770AB0451C003C1A72022C06984141 D3E03065FF80E1067401AAAC3C3D75D5E3C04FEBBD423634202D653C706C6169 6E2E66696C3E6236342E7478740D0A423634202D643C6236342E7478743E6465 636F6465642E66696C0D0A0A47504C204D4A3230323524



    --
    Bah, and indeed Humbug.
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer on Sun Sep 7 14:26:27 2025
    From Newsgroup: alt.lang.asm

    On Wed, 3 Sep 2025 09:26:42 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    an 8086 asm coded Base 64 encoder/decoder for DOS in <256 bytes (actually 166)

    Now trimmed to 160


    uses DOS INT 21 for StdIO.

    Decode:
    B64 -d <b64file.txt >decoded.fil
    chars below '+' (eg. cr,lf tab etc) are skipped, but otherwise not vetted.

    Encode: (no parm or any without a 'd' as second char)
    B64 [-e] <plain.fil >b64file.txt

    Encoded file has crlf every 72 output chars, last shortfall of a multiple
    of 3 is padded with '='.


    d 100 la0
    1634:0100 B4 3F BA C3-01 B9 00 6C-CD 21 95 09-ED 74 F4 89 .?.....l.!...t.. 1634:0110 D6 BF C5 6D-57 BA 12 06-A0 83 00 3C-64 74 4E 89 ...mW......<dtN. 1634:0120 1A 4E AD 86-E0 4E 41 41-D3 E8 24 3F-3C 1A 72 10 .N...NAA..$?<.r. 1634:0130 3C 34 72 0A-3C 3E 72 04-B0 2F 75 06-2C 4B 04 06 <4r.<>r../u.,K.. 1634:0140 04 41 AA 20-F1 75 DB B8-0D 0A FE CA-75 08 B2 12 .A. .u......u... 1634:0150 83 FD 02 76-01 AB 83 ED-03 77 C6 C7-03 3D 3D AB ...v.....w...==. 1634:0160 5A 43 89 F9-29 D1 B4 40-CD 21 4B EB-93 C6 02 3D ZC..)..@.!K....= 1634:0170 AC 3C 2B 72-21 2C 41 73-0A 04 45 3C-33 77 0A B0 .<+r!,As..E<3w.. 1634:0180 45 1C 00 3C-1A 72 02 2C-06 98 41 41-D3 E0 30 65 E..<.r.,..AA..0e 1634:0190 FF 20 F1 74-01 AA AC 3C-3D 75 D6 E3-C3 4F EB C0 . .t...<=u...O..
    q

    B43FBAC301B9006CCD219509ED74F489D6BFC56D57BA1206A083003C64744E89 1A4EAD86E04E4141D3E8243F3C1A72103C34720A3C3E7204B02F75062C4B0406 0441AA20F175DBB80D0AFECA7508B21283FD027601AB83ED0377C6C7033D3DAB 5A4389F929D1B440CD214BEB93C6023DAC3C2B72212C41730A04453C33770AB0 451C003C1A72022C06984141D3E03065FF20F17401AAAC3C3D75D6E3C34FEBC0


    tD+6wwG5AGzNIZUJ7XT0ida/xW1XuhIGoIMAPGR0TokaTq2G4E5BQdPoJD88GnIQPDRyCjw+ cgSwL3UGLEsEBgRBqiDxddu4DQr+ynUIshKD/QJ2AauD7QN3xscDPT2rWkOJ+SnRtEDNIUvr k8YCPaw8K3IhLEFzCgRFPDN3CrBFHAA8GnICLAaYQUHT4DBl/yDxdAGqrDw9ddbjw0/rwA==
    --
    Bah, and indeed Humbug.
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to alt.lang.asm,comp.os.msdos.programmer on Tue Sep 9 15:47:14 2025
    From Newsgroup: alt.lang.asm

    On Sun, 7 Sep 2025 14:26:27 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Wed, 3 Sep 2025 09:26:42 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    an 8086 asm coded Base 64 encoder/decoder for DOS in <256 bytes (actually 166)

    Now trimmed to 160

    I've now pared off another 2. I think that's it.
    --
    Bah, and indeed, Humbug
    --- Synchronet 3.21a-Linux NewsLink 1.2