• Small(est?) Hexdump/reconstruction DOS programs

    From Kerr-Mudd, John@21:1/5 to All on Wed Jun 12 20:22:36 2024
    XPost: alt.lang.asm

    [not getting through to clax, so dropping xpost there]

    HexDump file format as seen i.e. '0xHH,0xHH'; crlf
    and '-' ignored.

    both use DOS int 3F/40 for stdio.

    Usage bin2hex<bin2hex.com>bin2hexN.hex
    (assumes bx=0 at start)

    bin2hex.hex 0xB4,0x3F,0xB5,0x29,0xBA,0x0F,0x02,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3 0x2C,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x43,0xD4,0x10,0x86,0xE0,0xF8,0x27,0x04,0xF0 0x14,0x40,0xAA,0x80,0xF7,0x01,0x75,0xF2,0xB0,0x2C,0xAA,0x20,0xD3,0x75,0x05,0x4F 0xB8,0x0D,0x0A,0xAB,0xE2,0xDC,0x4F,0x5A,0xB3,0x01,0x89,0xF9,0x29,0xD1,0xB4,0x40 0xCD,0x21,0x4B,0xEB,0xBB


    Reconstruction:
    Usage: hex2bin<hex2bin.hex>hex2binN.com
    (assumes ax=bx=0 at start)

    hex2bin.hex

    0x95,0xBA,0x48,0x01,0xB4,0x3F,0xB5,0xD2,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF 0xC3,0xD4,0x57,0x89,0xE8,0x88,0xC4,0xAC,0x3C,0x30,0x72,0x1D,0x3D,0x78,0x30,0x74 0x15,0x09,0xED,0x74,0x13,0x95,0x24,0x4F,0xD4,0x37,0x88,0xC6,0x95,0x24,0x4F,0xD4 0x37,0x88,0xF4,0xD5,0x10,0xAA,0x31,0xC0,0x95,0xE2,0xD8,0x43,0x5A,0x89,0xF9,0x29 0xD1,0xB4,0x40,0xCD,0x21,0x4B,0xEB,0xB9

    Not tested on files larger than 64k but I think they should handle it.

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to John" on Thu Jun 13 11:45:00 2024
    XPost: alt.lang.asm

    On Wed, 12 Jun 2024 20:22:36 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:


    [not getting through to clax, so dropping xpost there]


    Slightly smaller versions:

    HexDump file format as seen i.e. '0xHH,0xHH'; crlf every 16 bytes

    both use DOS int 3F/40 for stdio.

    Usage example: bin2hex <bin2hex.com >bin2hex.hex
    (assumes bx=0 at start)

    bin2hex.hex

    0xB4,0x3F,0xB5,0x29,0xBA,0x4F,0x01,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3 0x2B,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x43,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14 0x40,0xAA,0x30,0xF7,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xD3,0x75,0x05,0x4F,0xB8,0x0D 0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0xB3,0x01,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21 0x4B,0xEB,0xBD




    Reconstruction:
    Usage example: hex2bin <bin2hex.hex >bin2hex.com
    (assumes ax=bx=0 at start)
    ignores any input <'0' so skips '-' ,cr, lf

    hex2bin.hex

    0x95,0xBA,0x47,0x01,0xB4,0x3F,0xB5,0xD2,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF 0xC3,0xD4,0x57,0x89,0xE8,0x88,0xC4,0xAC,0x3C,0x30,0x72,0x1C,0x3D,0x78,0x30,0x74 0x14,0x09,0xED,0x74,0x12,0x88,0xC2,0x95,0x24,0x4F,0xD4,0x37,0x30,0xF7,0x75,0xF5 0x88,0xD4,0xD5,0x10,0xAA,0x31,0xC0,0x95,0xE2,0xD9,0x43,0x5A,0x89,0xF9,0x29,0xD1 0xB4,0x40,0xCD,0x21,0x4B,0xEB,0xBA

    Not tested on files larger than 64k but I think they should handle it.


    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to John on Fri Jun 14 08:06:03 2024
    XPost: alt.lang.asm

    On 13/06/2024 12:45, Kerr-Mudd, John wrote:
    On Wed, 12 Jun 2024 20:22:36 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:


    [not getting through to clax, so dropping xpost there]


    Slightly smaller versions:

    HexDump file format as seen i.e. '0xHH,0xHH'; crlf every 16 bytes

    both use DOS int 3F/40 for stdio.

    Usage example: bin2hex <bin2hex.com >bin2hex.hex
    (assumes bx=0 at start)

    bin2hex.hex

    0xB4,0x3F,0xB5,0x29,0xBA,0x4F,0x01,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3
    0x2B,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x43,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14
    0x40,0xAA,0x30,0xF7,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xD3,0x75,0x05,0x4F,0xB8,0x0D
    0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0xB3,0x01,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21
    0x4B,0xEB,0xBD




    Reconstruction:
    Usage example: hex2bin <bin2hex.hex >bin2hex.com
    (assumes ax=bx=0 at start)
    ignores any input <'0' so skips '-' ,cr, lf

    hex2bin.hex

    0x95,0xBA,0x47,0x01,0xB4,0x3F,0xB5,0xD2,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF
    0xC3,0xD4,0x57,0x89,0xE8,0x88,0xC4,0xAC,0x3C,0x30,0x72,0x1C,0x3D,0x78,0x30,0x74
    0x14,0x09,0xED,0x74,0x12,0x88,0xC2,0x95,0x24,0x4F,0xD4,0x37,0x30,0xF7,0x75,0xF5
    0x88,0xD4,0xD5,0x10,0xAA,0x31,0xC0,0x95,0xE2,0xD9,0x43,0x5A,0x89,0xF9,0x29,0xD1
    0xB4,0x40,0xCD,0x21,0x4B,0xEB,0xBA

    Not tested on files larger than 64k but I think they should handle it.

    I'll check on this later today. but I haven't any DOS so only the theory.
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to All on Fri Jun 14 11:09:11 2024
    XPost: alt.lang.asm

    hex2bin:
    95 swap ax,bp
    BA 47 01 dx=0147
    B4 3F ah=3F
    B5 D2 ch=D2
    CD 21 int21
    91 swap ax.cx
    E3 03 jcxz+3 ;ret
    89 D6 si=dx
    BF di=d4c3
    C3 ret
    ??? it may not come here ,0xD4,0x57,0x89,0xE8,0x88,0xC4,0xAC,0x3C,0x30,0x72,0x1C,0x3D,0x78,0x30,0x74 0x14,0x09,0xED,0x74,0x12,0x88,0xC2,0x95,0x24,0x4F,0xD4,0x37,0x30,0xF7,0x75,0xF5 0x88,0xD4,0xD5,0x10,0xAA,0x31,0xC0,0x95,0xE2,0xD9,0x43,0x5A,0x89,0xF9,0x29,0xD1 0xB4,0x40,0xCD,0x21,0x4B,0xEB,0xBA

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to All on Fri Jun 14 11:16:47 2024
    XPost: alt.lang.asm

    bin2hex:

    B4 3F ah=3f
    B5 29 ch=29
    BA 4F 01 dx=014f
    CD 21 int21
    91 swap ax,cx
    E3 03 jcxz +3 ;ret
    89 D6 si=dx
    BF di=2bc3
    C3 ret

    ??? end of story :) 0x2B,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x43,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14 0x40,0xAA,0x30,0xF7,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xD3,0x75,0x05,0x4F,0xB8,0x0D 0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0xB3,0x01,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21 0x4B,0xEB,0xBD

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to All on Sat Jun 15 09:14:10 2024
    XPost: alt.lang.asm

    I hope it works as desired :)
    hex2bin:
    0100 95       swap ax,bp
    0101*BA 47 01 dx=0147
    0104 B4 3F    ah=3F
    0106 B5 D2    ch=D2
    0108 CD 21    int21
    010a 91       swap ax,cx
    010b E3 03    jcxz+3   ;ret
    010d 89 D6    si=dx
    010f BF       di=d4c3
    *C3       ret
    D4 dummy
    0112 57 push di ;d4c3

    0113*89 E8 ax=bp
    0115 88 C4 ah=al ;initial AL
    0117 AC lodsb
    0118 3C 30 cmp al,30
    011a 72 1C jc +1c ;0138
    011c 3D 78 30 cmp ax,"0x"
    011f 74 14 jz +14 ;0135
    0121 09 ED or bp.bp0123 74 12 jz +12 ;0135
    0125*88 C2 dl=al
    0127 95 swap ax,bp
    0128 24 4F and al,4f
    012a D4 37 DIVMOD 37012c 30 F7 xor bh,dh
    012e 75 F5 jnz -0a ;0125
    0130 88 D4 ah=dl
    0132 D5 10 MULADD 010
    0134 AA stosb0135*31 C0 ax-0
    0137 95 swap ax,bp
    0138 E2 D9 loop 0113

    013a 43 inc bx
    013b 5A pop dx
    013c 89 F9 cx=di
    013e 29 D1 sub cx,dx
    0140 84 40 ah=040
    0142 CD 21 int 21
    0144 4B dec bx
    0145 EB BA jmp 0101

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to All on Sat Jun 15 10:09:37 2024
    XPost: alt.lang.asm

    bin2hex:

    0100 B4 3F     ah=3f
    0102 B5 29     ch=29
    0104 BA 4F 01  dx=014f
    0107 CD 21     int21
    0109 91        swap ax,cx
    010a E3 03     jcxz +3    ;ret
    010c 89 D6     si=dx
    010e BF        di=2bc3
    C3        ret
    2B dummy
    0111 57 push di

    0112* B8 30 78 ax="0x"
    0115 AB stosw
    0116 AC lodsb0117 43 inc bx
    0118 D4 10 MULADD 010
    011a 86 E0 swap al,ah011c 27 DAA
    011d 04 F0 add al,F0
    011f 14 40 adc al,40
    0121 AA stosb
    0122 30 F7 xor bh,dh
    0124 75 F4 jnz 011a
    0126 B0 2C al=2c
    0128 AA stosb
    0129 20 D3 and bl,dl
    012b 75 05 jnz 0132
    012d 4F dec di
    012e B8 0D 0A ax=CRLF
    0131 AB stosw
    0132* E2 DE loop 0112

    0134 4F dec di
    0135 5A pop dx
    0136 B3 01 bl=01
    0138 89 F9 cx=di
    013a 29 D1 sub cx,dx
    013c B4 40 ah=40
    013e CD 21 int21
    0140 4B dec bx
    0141 EB BD jmp 0100

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to All on Sat Jun 15 10:23:32 2024
    XPost: alt.lang.asm

    you attempts seems to be shortest available.
    But my routines are much smaller and use lesser image byte count,
    but of course they wont work under DOS and use 32 bit features :)
    And MY hex format use the old DEBUG standard: (no 0x no h)

    01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "optional ASCII"

    and depending on options line end with only CR or CR+LF.

    are you interested in 32 bit code which could run in DOS environment ?
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to wolfgang kern on Sat Jun 15 15:20:07 2024
    XPost: alt.lang.asm

    On Fri, 14 Jun 2024 11:09:11 +0200, wolfgang kern wrote:
    hex2bin:
    95 swap ax,bp
    BA 47 01 dx=0147
    B4 3F ah=3F
    B5 D2 ch=D2
    CD 21 int21
    91 swap ax.cx
    E3 03 jcxz+3 ;ret
    89 D6 si=dx
    BF di=d4c3
    C3 ret
    ??? it may not come here ,0xD4,0x57,0x89,0xE8,0x88,0xC4,0xAC,0x3C,0x30,0x72,0x1C,0x3D,0x78,0x30,0x74 0x14,0x09,0xED,0x74,0x12,0x88,0xC2,0x95,0x24,0x4F,0xD4,0x37,0x30,0xF7,0x75,0xF5
    0x88,0xD4,0xD5,0x10,0xAA,0x31,0xC0,0x95,0xE2,0xD9,0x43,0x5A,0x89,0xF9,0x29,0xD1
    0xB4,0x40,0xCD,0x21,0x4B,0xEB,0xBA

    That `xchg ax,bp` intro and the `si=dx` & `di=d4c3` outro codes, may be problematic, since they may rely on specific DOS vendor in order to work properly.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to All on Sat Jun 15 10:30:38 2024
    XPost: alt.lang.asm

    On 15/06/2024 10:20, JJ wrote:
    On Fri, 14 Jun 2024 11:09:11 +0200,I wrote:
    hex2bin:
    95 swap ax,bp
    BA 47 01 dx=0147
    B4 3F ah=3F
    B5 D2 ch=D2
    CD 21 int21
    91 swap ax.cx
    E3 03 jcxz+3 ;ret
    89 D6 si=dx
    BF di=d4c3
    C3 ret
    ??? it may not come here
    ,0xD4,0x57,0x89,0xE8,0x88,0xC4,0xAC,0x3C,0x30,0x72,0x1C,0x3D,0x78,0x30,0x74 >> 0x14,0x09,0xED,0x74,0x12,0x88,0xC2,0x95,0x24,0x4F,0xD4,0x37,0x30,0xF7,0x75,0xF5
    0x88,0xD4,0xD5,0x10,0xAA,0x31,0xC0,0x95,0xE2,0xD9,0x43,0x5A,0x89,0xF9,0x29,0xD1
    0xB4,0x40,0xCD,0x21,0x4B,0xEB,0xBA

    That `xchg ax,bp` intro and the `si=dx` & `di=d4c3` outro codes, may be problematic, since they may rely on specific DOS vendor in order to work properly.

    I think John writes for M$ DOS only, so no vendor issues
    as you may have missed this di=d4c3 is a fall through dummy which
    contains a return.
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to wolfgang kern on Sun Jun 16 21:07:44 2024
    XPost: alt.lang.asm

    On Sat, 15 Jun 2024 10:23:32 +0200
    wolfgang kern <nowhere@never.at> wrote:

    you attempts seems to be shortest available.
    But my routines are much smaller and use lesser image byte count,
    but of course they wont work under DOS and use 32 bit features :)
    And MY hex format use the old DEBUG standard: (no 0x no h)

    01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "optional ASCII"

    and depending on options line end with only CR or CR+LF.

    are you interested in 32 bit code which could run in DOS environment ?

    Nah, 16bit max in my retro-land!

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to wolfgang kern on Sun Jun 16 21:20:04 2024
    XPost: alt.lang.asm

    On Sat, 15 Jun 2024 09:14:10 +0200
    wolfgang kern <nowhere@never.at> wrote:

    I hope it works as desired :)

    Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start.

    hex2bin:
    0100 95       swap ax,bp
    0101*BA 47 01 dx=0147
    0104 B4 3F    ah=3F
    0106 B5 D2    ch=D2
    0108 CD 21    int21
    010a 91       swap ax,cx
    010b E3 03    jcxz+3   ;ret
    010d 89 D6    si=dx
    010f BF       di=d4c3
    *C3       ret
    D4 dummy
    0112 57 push di ;d4c3

    0113*89 E8 ax=bp
    0115 88 C4 ah=al ;initial AL ; 1st byte- (hinybble)
    0117 AC lodsb
    0118 3C 30 cmp al,30
    011a 72 1C jc +1c ;0138 ; invalid, ignore
    011c 3D 78 30 cmp ax,"0x" ; reset bp if prefix
    011f 74 14 jz +14 ;0135
    0121 09 ED or bp.bp ; if no saved chr, go save it
    0123 74 12 jz +12 ;**0135**no -- it's jz 137
    0125*88 C2 dl=al ; save (hi) nybble
    0127 95 swap ax,bp
    0128 24 4F and al,4f
    012a D4 37 DIVMOD 37
    012c 30 F7 xor bh,dh ; toggle to redo for 2nd byte
    012e 75 F5 jnz -0a ;0125
    0130 88 D4 ah=dl
    0132 D5 10 MULADD 010 ; combine nybbles
    0134 AA stosb ; store
    0135*31 C0 ax-0
    0137 95 swap ax,bp
    0138 E2 D9 loop 0113

    013a 43 inc bx
    013b 5A pop dx
    013c 89 F9 cx=di
    013e 29 D1 sub cx,dx
    0140 84 40 ah=040
    0142 CD 21 int 21
    0144 4B dec bx
    0145 EB BA jmp 0101



    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to wolfgang kern on Sun Jun 16 21:32:03 2024
    XPost: alt.lang.asm

    On Sat, 15 Jun 2024 10:23:32 +0200
    wolfgang kern <nowhere@never.at> wrote:

    you attempts seems to be shortest available.
    But my routines are much smaller and use lesser image byte count,
    but of course they wont work under DOS and use 32 bit features :)
    And MY hex format use the old DEBUG standard: (no 0x no h)


    Yeah, sorry, I already have those pared down. I was allowing the
    '0xAB,0xCD' format.



    I was out walking to a waterfall on Friday and thought how to save 1
    more byte:

    hexdump, I mean bin2hex:

    0xB4,0x3F,0xB5,0x26,0xBA,0x00,0x0F,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3 0x36,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x42,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14 0x40,0xAA,0x31,0xF3,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xF2,0x75,0x05,0x4F,0xB8,0x0D 0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0x43,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21,0x4B 0xEB,0xBE




    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to John on Mon Jun 17 11:13:58 2024
    XPost: alt.lang.asm

    On 16/06/2024 22:32, Kerr-Mudd, John wrote:
    On Sat, 15 Jun 2024 10:23:32 +0200
    wolfgang kern <nowhere@never.at> wrote:

    you attempts seems to be shortest available.
    But my routines are much smaller and use lesser image byte count,
    but of course they wont work under DOS and use 32 bit features :)
    And MY hex format use the old DEBUG standard: (no 0x no h)


    Yeah, sorry, I already have those pared down. I was allowing the
    '0xAB,0xCD' format.



    I was out walking to a waterfall on Friday and thought how to save 1
    more byte:

    hexdump, I mean bin2hex:

    0xB4,0x3F,0xB5,0x26,0xBA,0x00,0x0F,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3
    0x36,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x42,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14
    0x40,0xAA,0x31,0xF3,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xF2,0x75,0x05,0x4F,0xB8,0x0D
    0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0x43,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21,0x4B
    0xEB,0xBE

    can't detect on a first glimpse with my single 30% eye where you saved it :)
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to wolfgang kern on Mon Jun 17 20:57:07 2024
    XPost: alt.lang.asm

    On Mon, 17 Jun 2024 11:13:58 +0200
    wolfgang kern <nowhere@never.at> wrote:

    On 16/06/2024 22:32, Kerr-Mudd, John wrote:
    On Sat, 15 Jun 2024 10:23:32 +0200
    wolfgang kern <nowhere@never.at> wrote:

    you attempts seems to be shortest available.
    But my routines are much smaller and use lesser image byte count,
    but of course they wont work under DOS and use 32 bit features :)
    And MY hex format use the old DEBUG standard: (no 0x no h)


    Yeah, sorry, I already have those pared down. I was allowing the '0xAB,0xCD' format.



    I was out walking to a waterfall on Friday and thought how to save 1
    more byte:

    hexdump, I mean bin2hex:

    0xB4,0x3F,0xB5,0x26,0xBA,0x00,0x0F,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3
    0x36,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x42,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14
    0x40,0xAA,0x31,0xF3,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xF2,0x75,0x05,0x4F,0xB8,0x0D
    0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0x43,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21,0x4B
    0xEB,0xBE

    can't detect on a first glimpse with my single 30% eye where you saved it :)

    I use 'xor bx,si', to toggle, so ensuring bx is 0 after 2nd toggle - this allows 'inc bx' to set bl to 1 using a 1 byte instruction, rather than
    'mov bl,1'; for int 0x21 to write to StdOut.

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to John on Tue Jun 18 04:58:55 2024
    XPost: alt.lang.asm

    On 17/06/2024 21:57, Kerr-Mudd, John wrote:
    ...
    I was out walking to a waterfall on Friday and thought how to save 1
    more byte:

    hexdump, I mean bin2hex:

    0xB4,0x3F,0xB5,0x26,0xBA,0x00,0x0F,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3
    0x36,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x42,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14
    0x40,0xAA,0x31,0xF3,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xF2,0x75,0x05,0x4F,0xB8,0x0D
    0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0x43,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21,0x4B
    0xEB,0xBE

    can't detect on a first glimpse with my single 30% eye where you saved it :)

    I use 'xor bx,si', to toggle, so ensuring bx is 0 after 2nd toggle - this allows 'inc bx' to set bl to 1 using a 1 byte instruction, rather than
    'mov bl,1'; for int 0x21 to write to StdOut.

    clever move :) is that magic waterfall near Stonehenge ?
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to John" on Tue Jun 18 22:38:26 2024
    XPost: alt.lang.asm

    On Sun, 16 Jun 2024 21:20:04 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Sat, 15 Jun 2024 09:14:10 +0200
    wolfgang kern <nowhere@never.at> wrote:

    I hope it works as desired :)

    Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start.

    hex2bin:
    0100 95       swap ax,bp ; 0 flag
    0101*BA 47 01 dx=0147
    0104 B4 3F    ah=3F
    0106 B5 D2    ch=D2
    0108 CD 21    int21 ; Read (assumes bx=0 for Input)
    010a 91       swap ax,cx ; put lth read in cx
    010b E3 03    jcxz+3   ;ret ; nothing left
    010d 89 D6    si=dx ; IBuff
    010f BF       di=d4c3 ; OBuff
    *C3       ret
    D4 dummy
    0112 57 push di ;d4c3

    0113*89 E8 ax=bp ; get 1st byte
    0115 88 C4 ah=al ; ah=1st byte- (hinybble) - for 0x test
    0117 AC lodsb
    0118 3C 30 cmp al,30
    011a 72 1C jc +1c ;0138 ; invalid, ignore
    011c 3D 78 30 cmp ax,"0x" ; reset bp if prefix
    011f 74 14 jz +14 ;0135
    0121 09 ED or bp.bp ; if no saved chr, go save it
    0123 74 12 jz +12 ;0137
    0125*88 C2 dl=al ; save (hi) nybble
    0127 95 swap ax,bp
    0128 24 4F and al,4f ; hex2nyb
    012a D4 37 DIVMOD 37 ; in 4 bytes!
    012c 30 F7 xor bh,dh ; toggle to redo for 2nd byte
    012e 75 F5 jnz -0a ;0125
    0130 88 D4 ah=dl ; get hinyb, al is lonyb
    0132 D5 10 MULADD 010 ; combine nybbles
    0134 AA stosb ; add byte to output
    0135*31 C0 ax-0 ; clear stored byte flag
    0137 95 swap ax,bp ; store hinyb char
    0138 E2 D9 loop 0113

    013a 43 inc bx ; Output
    013b 5A pop dx ; pt to OBuff
    013c 89 F9 cx=di
    013e 29 D1 sub cx,dx ; calc lth
    0140 84 40 ah=040
    0142 CD 21 int 21 ; Write
    0144 4B dec bx
    0145 EB BA jmp 0101


    I'm disappointed no-ones asked what all the 'bp' juggling's for.

    (It's to save the first byte encountwered to survive a subsequent read, to allow for the case where a hex pair are split by the read amt.)



    --
    Bah, and indeed Humbug.


    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to John on Wed Jun 19 07:23:49 2024
    XPost: alt.lang.asm

    On 18/06/2024 23:38, Kerr-Mudd, John wrote:
    On Sun, 16 Jun 2024 21:20:04 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Sat, 15 Jun 2024 09:14:10 +0200
    wolfgang kern <nowhere@never.at> wrote:

    I hope it works as desired :)

    Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start. >>
    hex2bin:
    0100 95       swap ax,bp ; 0 flag
    0101*BA 47 01 dx=0147
    0104 B4 3F    ah=3F
    0106 B5 D2    ch=D2
    0108 CD 21    int21 ; Read (assumes bx=0 for Input)
    010a 91       swap ax,cx ; put lth read in cx
    010b E3 03    jcxz+3   ;ret ; nothing left
    010d 89 D6    si=dx ; IBuff
    010f BF       di=d4c3 ; OBuff
    *C3       ret
    D4 dummy
    0112 57 push di ;d4c3

    0113*89 E8 ax=bp ; get 1st byte
    0115 88 C4 ah=al ; ah=1st byte- (hinybble) - for 0x test
    0117 AC lodsb
    0118 3C 30 cmp al,30
    011a 72 1C jc +1c ;0138 ; invalid, ignore
    011c 3D 78 30 cmp ax,"0x" ; reset bp if prefix
    011f 74 14 jz +14 ;0135
    0121 09 ED or bp.bp ; if no saved chr, go save it
    0123 74 12 jz +12 ;0137
    0125*88 C2 dl=al ; save (hi) nybble
    0127 95 swap ax,bp
    0128 24 4F and al,4f ; hex2nyb
    012a D4 37 DIVMOD 37 ; in 4 bytes!
    012c 30 F7 xor bh,dh ; toggle to redo for 2nd byte
    012e 75 F5 jnz -0a ;0125
    0130 88 D4 ah=dl ; get hinyb, al is lonyb
    0132 D5 10 MULADD 010 ; combine nybbles
    0134 AA stosb ; add byte to output
    0135*31 C0 ax-0 ; clear stored byte flag
    0137 95 swap ax,bp ; store hinyb char
    0138 E2 D9 loop 0113

    013a 43 inc bx ; Output
    013b 5A pop dx ; pt to OBuff
    013c 89 F9 cx=di
    013e 29 D1 sub cx,dx ; calc lth
    0140 84 40 ah=040
    0142 CD 21 int 21 ; Write
    0144 4B dec bx
    0145 EB BA jmp 0101

    I'm disappointed no-ones asked what all the 'bp' juggling's for.

    (It's to save the first byte encountered to survive a subsequent read, to allow for the case where a hex pair are split by the read amt.)

    I didn't ask because I saw it in use for initial AL and later as a temp storage.
    but I weren't sure where your loop count joined in, assumed it returned
    by DOS call.
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to wolfgang kern on Wed Jun 19 09:21:42 2024
    XPost: alt.lang.asm

    On Wed, 19 Jun 2024 07:23:49 +0200
    wolfgang kern <nowhere@never.at> wrote:

    On 18/06/2024 23:38, Kerr-Mudd, John wrote:
    On Sun, 16 Jun 2024 21:20:04 +0100
    "Kerr-Mudd, John" <admin@127.0.0.1> wrote:

    On Sat, 15 Jun 2024 09:14:10 +0200
    wolfgang kern <nowhere@never.at> wrote:

    I hope it works as desired :)

    Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start. >>
    hex2bin:
    0100 95       swap ax,bp ; 0 flag
    0101*BA 47 01 dx=0147
    0104 B4 3F    ah=3F
    0106 B5 D2    ch=D2
    0108 CD 21    int21 ; Read (assumes bx=0 for Input)
    010a 91       swap ax,cx ; put lth read in cx
    010b E3 03    jcxz+3   ;ret ; nothing left
    010d 89 D6    si=dx ; IBuff
    010f BF       di=d4c3 ; OBuff
    *C3       ret
    D4 dummy
    0112 57 push di ;d4c3

    0113*89 E8 ax=bp ; get 1st byte
    0115 88 C4 ah=al ; ah=1st byte- (hinybble) - for 0x test >>> 0117 AC lodsb
    0118 3C 30 cmp al,30
    011a 72 1C jc +1c ;0138 ; invalid, ignore
    011c 3D 78 30 cmp ax,"0x" ; reset bp if prefix
    011f 74 14 jz +14 ;0135
    0121 09 ED or bp.bp ; if no saved chr, go save it
    0123 74 12 jz +12 ;0137
    0125*88 C2 dl=al ; save (hi) nybble
    0127 95 swap ax,bp ; get other chr (hi 1st, then lo)
    0128 24 4F and al,4f ; hex2nyb
    012a D4 37 DIVMOD 37 ; in 4 bytes!
    012c 30 F7 xor bh,dh ; toggle to redo for 2nd (lo) byte
    012e 75 F5 jnz -0a ;0125
    0130 88 D4 ah=dl ; get hinyb, al is lonyb
    0132 D5 10 MULADD 010 ; combine nybbles
    0134 AA stosb ; add byte to output
    0135*31 C0 ax-0 ; clear stored byte flag
    0137 95 swap ax,bp ; store hinyb char
    0138 E2 D9 loop 0113

    013a 43 inc bx ; Output
    013b 5A pop dx ; pt to OBuff
    013c 89 F9 cx=di
    013e 29 D1 sub cx,dx ; calc lth
    0140 84 40 ah=040
    0142 CD 21 int 21 ; Write
    0144 4B dec bx
    0145 EB BA jmp 0101

    I'm disappointed no-ones asked what all the 'bp' juggling's for.

    (It's to save the first byte encountered to survive a subsequent read, to allow for the case where a hex pair are split by the read amt.)

    I didn't ask because I saw it in use for initial AL and later as a temp storage.
    but I weren't sure where your loop count joined in, assumed it returned
    by DOS call.

    Yup, dos int 21 fn 3F, bx=0 cx=BufferSize reads up to cx bytes putting
    input text in Buffer pointed to by dx, returns actual amount read in ax. (YCLTU)
    I swap it to cx for the loop to process it.

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to wolfgang kern on Mon Jul 1 11:37:50 2024
    XPost: alt.lang.asm

    On Tue, 18 Jun 2024 03:58:55 +0100, wolfgang kern <nowhere@never.at> wrote:

    On 17/06/2024 21:57, Kerr-Mudd, John wrote:
    ...
    I was out walking to a waterfall on Friday and thought how to save 1
    more byte:

    hexdump, I mean bin2hex:

    0xB4,0x3F,0xB5,0x26,0xBA,0x00,0x0F,0xCD,0x21,0x91,0xE3,0x03,0x89,0xD6,0xBF,0xC3
    0x36,0x57,0xB8,0x30,0x78,0xAB,0xAC,0x42,0xD4,0x10,0x86,0xE0,0x27,0x04,0xF0,0x14
    0x40,0xAA,0x31,0xF3,0x75,0xF4,0xB0,0x2C,0xAA,0x20,0xF2,0x75,0x05,0x4F,0xB8,0x0D
    0x0A,0xAB,0xE2,0xDE,0x4F,0x5A,0x43,0x89,0xF9,0x29,0xD1,0xB4,0x40,0xCD,0x21,0x4B
    0xEB,0xBE

    can't detect on a first glimpse with my single 30% eye where you saved
    it :)

    I use 'xor bx,si', to toggle, so ensuring bx is 0 after 2nd toggle -
    this
    allows 'inc bx' to set bl to 1 using a 1 byte instruction, rather than
    'mov bl,1'; for int 0x21 to write to StdOut.

    clever move :) is that magic waterfall near Stonehenge ?

    No magic.


    Have you looked at pouet.net (clever DemoScene coders; there's a recent^w
    Feb entry for a (display of course) that uses a VM (forth like); it's
    something that hits my buttons.

    https://www.pouet.net/prod.php?which=96107

    I don't understand it yet; but the concept looks intriguing; use a select
    - I'm thinking 4 bit for 16, they use 3, so only 8 instructions; set of
    Virtual OP codes to erm do something.


    --
    Bah, and indeed, Humbug

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to John on Mon Jul 1 17:40:32 2024
    XPost: alt.lang.asm

    On 01/07/2024 12:37, Kerr-Mudd, John wrote:
    ...
    clever move :) is that magic waterfall near Stonehenge ?
    No magic.

    Have you looked at pouet.net (clever DemoScene coders; there's a
    recent^w Feb entry for a (display of course) that uses a VM (forth
    like); it's something that hits my buttons.

    https://www.pouet.net/prod.php?which=96107

    lovebyte solution is interesting indeed.

    I don't understand it yet; but the concept looks intriguing; use a
    select - I'm thinking 4 bit for 16, they use 3, so only 8 instructions;
    set of Virtual OP codes to erm do something.

    I long ago once created similar patterns as demo for my math routines.
    but I cheated a bit with legal FPU opcodes rather than virtual ones :)
    and yes, playing with math loops on colors produce astonishing effects.
    __
    wolfgang

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to wolfgang kern on Mon Jul 1 18:42:41 2024
    XPost: alt.lang.asm

    On 01.07.2024 17:40, wolfgang kern wrote:
    On 01/07/2024 12:37, Kerr-Mudd, John wrote:

    https://www.pouet.net/prod.php?which=96107

    lovebyte solution is interesting indeed.


    30 years ago a tiny program called mars.exe was posted in
    usenet which I found so fascinating that I disassembled it,
    added some colors and did some optimization. I can't run
    DOS programs any more, but the Windows version (not as small
    as the DOS version) still works in Win10. Execute the batch
    below to generate the exe and just move the mouse. Press any
    key to exit.

    DOS and Windows source in:
    https://www.onlib.de/pub/assembler/erde.zip

    @echo off
    certutil -f -decode %~f0 erde.exe>nul

    erde.exe
    goto :eof

    -----BEGIN CERTIFICATE----- TVpgAQEAAAAEAAAA//8AAGABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAoAAAAA4fug4AtAnNIbgBTM0hTmljZSB0byBtZWV0IHNvbWVi b2R5IHdobyBpcyBzdGlsbCB1c2luZyBET1MsDQpidXQgaGlzIHByb2dyYW0gcmVx dWlyZXMgV2luMzIuDQokAFBFAABMAQEAUHmlNgAAAAAAAAAA4AAPAQsBBQwADAAA AAAAAAAAAABUEwAAABAAAAAwAwAAAEAAABAAAAACAAAEAAAAAAAAAAQAAAAAAAAA ADADAAACAAAAAAAAAgAAAAAAEAAAEAAAAAAQAAAQAAAAAAAAEAAAAAAAAAAAAAAA dBAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAB0AAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALnRleHQAAAAYGAMAABAAAAAMAAAAAgAA AAAAAAAAAAAAAAAAIAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiEAAABhEAAPIQA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AAAxwWsH0MAAAAAAIsNeBtAAMHhDMHmBynxix18 G0AAZgH7ZsHjBDH2Aw2wH0MAicjB6BCIw/7DD7aDqB9BAP7LD7aTqB9BACnQD7fp D6/FwfgIhtYB0P80tbQjQwCJBLW0I0MA/sMPtoOoH0AA/ssPtpOoH0AAKdAPt+kP r8XB+AiG1gHQ9y2sH0MAwegQixWoH0MAKcKLLLW0H0MAiRS1tB9DAFiB/cgAAAAP jYEAAAA7LLW0H0MAD410AAAAUFUrBLW0I0MAmSsstbQfQwD3/V1aUVNFOyy1tB9D AH9RAcIJ7Xjwgf3HAAAAf0NmgcoAwDstuCdDAH4SZoHi/787LbQnQwB+BWaB8gDA ieuG3wHzjRxbAx2cG0AAD7bOiwyNqBtAAGaJC8HpCIhrAuulW1lGgf4AAQAAD4Lp /v//g+8QD4U8/v//aCAAzABqAGoA/zWUG0AAaMgAAABoAAEAAKGIG0AALcgAAADR 6FChhBtAAC0AAQAA0ehQ/zWQG0AA/xVoEEAAwxAAAABgICAABAQEACAAAADgoKAA AQICABAAAAD/4OAA/v39AEAAAAAAQAAAAQIBAEAAAAAAAEAAAQICAEAAAACAgIAA AgICAAAAAAABAAAAAwAAAAABAAAAAwAAAP///wD9///+//////8AAOgDAADoAwAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
    -----END CERTIFICATE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From wolfgang kern@21:1/5 to Herbert Kleebauer on Tue Jul 2 11:16:10 2024
    XPost: alt.lang.asm

    On 01/07/2024 18:42, Herbert Kleebauer wrote:
    On 01.07.2024 17:40, wolfgang kern wrote:
    On 01/07/2024 12:37, Kerr-Mudd, John wrote:

    https://www.pouet.net/prod.php?which=96107

    lovebyte solution is interesting indeed.


    30 years ago a tiny program called mars.exe was posted in
    usenet which I found so fascinating that I disassembled it,
    added some colors and did some optimization. I can't run
    DOS programs any more, but the Windows version (not as small
    as the DOS version) still works in Win10. Execute the batch
    below to generate the exe and just move the mouse. Press any
    key to exit.

    DOS and Windows source in:
    https://www.onlib.de/pub/assembler/erde.zip

    copied.
    I think to have seen it before...
    yeah, we know each other for more than two decades :)

    but certutil doesn't work on my machines anymore.
    __
    wolfgang

    @echo off
    certutil -f -decode %~f0 erde.exe>nul

    erde.exe
    goto :eof

    -----BEGIN CERTIFICATE----- TVpgAQEAAAAEAAAA//8AAGABAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAoAAAAA4fug4AtAnNIbgBTM0hTmljZSB0byBtZWV0IHNvbWVi b2R5IHdobyBpcyBzdGlsbCB1c2luZyBET1MsDQpidXQgaGlzIHByb2dyYW0gcmVx dWlyZXMgV2luMzIuDQokAFBFAABMAQEAUHmlNgAAAAAAAAAA4AAPAQsBBQwADAAA AAAAAAAAAABUEwAAABAAAAAwAwAAAEAAABAAAAACAAAEAAAAAAAAAAQAAAAAAAAA ADADAAACAAAAAAAAAgAAAAAAEAAAEAAAAAAQAAAQAAAAAAAAEAAAAAAAAAAAAAAA dBAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAB0AAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALnRleHQAAAAYGAMAABAAAAAMAAAAAgAA AAAAAAAAAAAAAAAAIAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiEAAABhEAAPIQAAAAAAAA yBEAAAASAAAOEgAAIBIA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hDMHmBynxix18 G0AAZgH7ZsHjBDH2Aw2wH0MAicjB6BCIw/7DD7aDqB9BAP7LD7aTqB9BACnQD7fp D6/FwfgIhtYB0P80tbQjQwCJBLW0I0MA/sMPtoOoH0AA/ssPtpOoH0AAKdAPt+kP r8XB+AiG1gHQ9y2sH0MAwegQixWoH0MAKcKLLLW0H0MAiRS1tB9DAFiB/cgAAAAP jYEAAAA7LLW0H0MAD410AAAAUFUrBLW0I0MAmSsstbQfQwD3/V1aUVNFOyy1tB9D AH9RAcIJ7Xjwgf3HAAAAf0NmgcoAwDstuCdDAH4SZoHi/787LbQnQwB+BWaB8gDA ieuG3wHzjRxbAx2cG0AAD7bOiwyNqBtAAGaJC8HpCIhrAuulW1lGgf4AAQAAD4Lp /v//g+8QD4U8/v//aCAAzABqAGoA/zWUG0AAaMgAAABoAAEAAKGIG0AALcgAAADR 6FChhBtAAC0AAQAA0ehQ/zWQG0AA/xVoEEAAwxAAAABgICAABAQEACAAAADgoKAA AQICABAAAAD/4OAA/v39AEAAAAAAQAAAAQIBAEAAAAAAAEAAAQICAEAAAACAgIAA AgICAAAAAAABAAAAAwAAAAABAAAAAwAAAP///wD9///+//////8AAOgDAADoAwAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
    -----END CERTIFICATE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johanne Fairchild@21:1/5 to Phil Carmody on Wed Jul 31 19:04:58 2024
    XPost: alt.lang.asm

    Phil Carmody <pc+usenet@asdf.org> writes:

    Herbert Kleebauer <klee@unibwm.de> writes:
    30 years ago a tiny program called mars.exe was posted in
    usenet which I found so fascinating that I disassembled it,
    added some colors and did some optimization.

    Who didn't!? Those were the fun days.

    Is this the program?

    https://www.youtube.com/watch?v=_zSjpIyMt0k

    Does anyone know who wrote it - and does he know that we're still
    talking about him and his demo?

    The video above claims it's by Tim Clarke. YouTube commenter says

    @Myndale (8 years ago). This was mind-blowing when it was first
    released. As soon as it came out I released a TSR with hot-keys to
    change the palette so I could see how well it looked on other planets
    (notably Earth). I also spent weeks pouring over the asm in order to understand exactly how he did it. That work formed the early groundwork
    for much of the work I did over the next 16 years working in the game
    industry. Years later I would write my own version of this demo, figure
    out how to add rotation and then port it to several architectures along
    the way including DS and even Javascript (see http://www.ppl-pilot.com/demo.aspx). But Tim did it first! :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Herbert Kleebauer@21:1/5 to Phil Carmody on Thu Aug 1 00:06:45 2024
    XPost: alt.lang.asm

    On 31.07.2024 21:56, Phil Carmody wrote:
    Herbert Kleebauer <klee@unibwm.de> writes:
    30 years ago a tiny program called mars.exe was posted in
    usenet which I found so fascinating that I disassembled it,
    added some colors and did some optimization.

    Who didn't!? Those were the fun days.
    Does anyone know who wrote it - and does he know that we're still
    talking about him and his demo?

    http://groups.google.com/groups?selm=2kvceb%24rjr%40tukki.cc.jyu.fi&output=gplain

    https://www.pouet.net/prod_nfo.php?which=4662

    https://archive.kontek.net/republic.strategyplanet.gamespy.com/teaminfo2.shtml

    | He wrote the famous Mars Demo in 1993. As a result was headhunted
    | by NASA, and spent a summer working in Washington D.C. on the real
    | time rendering of planet terrain Single-handedly wrote a successful
    | 3D spaceship shoot-em-up game for Apogee Software, Texas, in under
    | a year, inspiring Apogee to release the game Terminal Velocity. At
    | Elixir since the beginning.


    https://archive.kontek.net/republic.strategyplanet.gamespy.com/elixir.shtml

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Phil Carmody@21:1/5 to Herbert Kleebauer on Wed Jul 31 22:56:43 2024
    XPost: alt.lang.asm

    Herbert Kleebauer <klee@unibwm.de> writes:
    30 years ago a tiny program called mars.exe was posted in
    usenet which I found so fascinating that I disassembled it,
    added some colors and did some optimization.

    Who didn't!? Those were the fun days.
    Does anyone know who wrote it - and does he know that we're still
    talking about him and his demo?

    Phil
    --
    We are no longer hunters and nomads. No longer awed and frightened, as we have gained some understanding of the world in which we live. As such, we can cast aside childish remnants from the dawn of our civilization.
    -- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)