Discussion:
Small(est?) Hexdump/reconstruction DOS programs
(too old to reply)
Kerr-Mudd, John
2024-06-12 19:22:36 UTC
Permalink
[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.
Kerr-Mudd, John
2024-06-13 10:45:00 UTC
Permalink
On Wed, 12 Jun 2024 20:22:36 +0100
Post by Kerr-Mudd, John
[not getting through to clax, so dropping xpost there]
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
Post by Kerr-Mudd, John
(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
Usage example: hex2bin <bin2hex.hex >bin2hex.com
Post by Kerr-Mudd, John
(assumes ax=bx=0 at start)
ignores any input <'0' so skips '-' ,cr, lf
Post by Kerr-Mudd, John
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
Post by Kerr-Mudd, John
Not tested on files larger than 64k but I think they should handle it.
--
Bah, and indeed Humbug.
wolfgang kern
2024-06-14 06:06:03 UTC
Permalink
Post by Kerr-Mudd, John
On Wed, 12 Jun 2024 20:22:36 +0100
Post by Kerr-Mudd, John
[not getting through to clax, so dropping xpost there]
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
Post by Kerr-Mudd, John
(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
Usage example: hex2bin <bin2hex.hex >bin2hex.com
Post by Kerr-Mudd, John
(assumes ax=bx=0 at start)
ignores any input <'0' so skips '-' ,cr, lf
Post by Kerr-Mudd, John
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
Post by Kerr-Mudd, John
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
wolfgang kern
2024-06-14 09:09:11 UTC
Permalink
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
wolfgang kern
2024-06-15 07:14:10 UTC
Permalink
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
Kerr-Mudd, John
2024-06-16 20:20:04 UTC
Permalink
On Sat, 15 Jun 2024 09:14:10 +0200
Post by wolfgang kern
I hope it works as desired :)
Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start.
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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.
Kerr-Mudd, John
2024-06-18 21:38:26 UTC
Permalink
On Sun, 16 Jun 2024 21:20:04 +0100
Post by Kerr-Mudd, John
On Sat, 15 Jun 2024 09:14:10 +0200
Post by wolfgang kern
I hope it works as desired :)
Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start.
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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.)
Post by Kerr-Mudd, John
--
Bah, and indeed Humbug.
--
Bah, and indeed Humbug.
wolfgang kern
2024-06-19 05:23:49 UTC
Permalink
Post by Kerr-Mudd, John
On Sun, 16 Jun 2024 21:20:04 +0100
Post by Kerr-Mudd, John
On Sat, 15 Jun 2024 09:14:10 +0200
Post by wolfgang kern
I hope it works as desired :)
Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start.
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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
Kerr-Mudd, John
2024-06-19 08:21:42 UTC
Permalink
On Wed, 19 Jun 2024 07:23:49 +0200
Post by wolfgang kern
Post by Kerr-Mudd, John
On Sun, 16 Jun 2024 21:20:04 +0100
Post by Kerr-Mudd, John
On Sat, 15 Jun 2024 09:14:10 +0200
Post by wolfgang kern
I hope it works as desired :)
Well, I had tested it! And, JJ, I did state that it assumed ax=0 at start.
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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
Post by wolfgang kern
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.
JJ
2024-06-15 08:20:07 UTC
Permalink
Post by wolfgang kern
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.
wolfgang kern
2024-06-15 08:30:38 UTC
Permalink
Post by JJ
Post by wolfgang kern
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
wolfgang kern
2024-06-14 09:16:47 UTC
Permalink
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
wolfgang kern
2024-06-15 08:09:37 UTC
Permalink
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
wolfgang kern
2024-06-15 08:23:32 UTC
Permalink
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
Kerr-Mudd, John
2024-06-16 20:07:44 UTC
Permalink
On Sat, 15 Jun 2024 10:23:32 +0200
Post by wolfgang kern
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.
Kerr-Mudd, John
2024-06-16 20:32:03 UTC
Permalink
On Sat, 15 Jun 2024 10:23:32 +0200
Post by wolfgang kern
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.
wolfgang kern
2024-06-17 09:13:58 UTC
Permalink
Post by Kerr-Mudd, John
On Sat, 15 Jun 2024 10:23:32 +0200
Post by wolfgang kern
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
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
Kerr-Mudd, John
2024-06-17 19:57:07 UTC
Permalink
On Mon, 17 Jun 2024 11:13:58 +0200
Post by wolfgang kern
Post by Kerr-Mudd, John
On Sat, 15 Jun 2024 10:23:32 +0200
Post by wolfgang kern
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
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.
wolfgang kern
2024-06-18 02:58:55 UTC
Permalink
On 17/06/2024 21:57, Kerr-Mudd, John wrote:
...
Post by Kerr-Mudd, John
Post by wolfgang kern
Post by Kerr-Mudd, John
I was out walking to a waterfall on Friday and thought how to save 1
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
Kerr-Mudd, John
2024-07-01 10:37:50 UTC
Permalink
Post by wolfgang kern
...
Post by Kerr-Mudd, John
Post by wolfgang kern
Post by Kerr-Mudd, John
I was out walking to a waterfall on Friday and thought how to save 1
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
wolfgang kern
2024-07-01 15:40:32 UTC
Permalink
On 01/07/2024 12:37, Kerr-Mudd, John wrote:
...
Post by Kerr-Mudd, John
Post by wolfgang kern
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.
Post by Kerr-Mudd, John
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
Herbert Kleebauer
2024-07-01 16:42:41 UTC
Permalink
Post by wolfgang kern
Post by Kerr-Mudd, John
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
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiEAAABhEAAPIQAAAAAAAA
yBEAAAASAAAOEgAAIBIAACwSAAA6EgAA2hEAAO4RAADAEQAAsBEAAKIRAACUEQAA
gBEAAGwRAABgEQAAAAAAAHoSAACGEgAAlhIAAKoSAAC6EgAAzhIAAOQSAADu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AP7LD7aTqB9BACnQD7fp
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-----
wolfgang kern
2024-07-02 09:16:10 UTC
Permalink
Post by Herbert Kleebauer
Post by wolfgang kern
Post by Kerr-Mudd, John
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.
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
Post by Herbert Kleebauer
@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
yBEAAAASAAAOEgAAIBIAACwSAAA6EgAA2hEAAO4RAADAEQAAsBEAAKIRAACUEQAA
gBEAAGwRAABgEQAAAAAAAHoSAACGEgAAlhIAAKoSAAC6EgAAzhIAAOQSAADuEgAA
AAAAANIQAAAAAAAAAAAAAMQQAAAAEAAAIBEAAAAAAAAAAAAAFBEAABAQAABWEgAA
AAAAAAAAAABMEgAAUBAAAAAAAAAAAAAAAAA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H0MAwegQixWoH0MAKcKLLLW0H0MAiRS1tB9DAFiB/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-----
Phil Carmody
2024-07-31 19:56:43 UTC
Permalink
Post by Herbert Kleebauer
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/
Johanne Fairchild
2024-07-31 22:04:58 UTC
Permalink
Post by Phil Carmody
Post by Herbert Kleebauer
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?


Post by Phil Carmody
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! :)
Herbert Kleebauer
2024-07-31 22:06:45 UTC
Permalink
Post by Phil Carmody
Post by Herbert Kleebauer
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
Kerr-Mudd, John
2024-09-08 20:41:09 UTC
Permalink
On Mon, 01 Jul 2024 11:37:50 +0100
...
[]
[]

hex 223 bytes;
now can produce 5 spaced formats for dump, also does hex2bin, and
contains (a minimal) usage help text.

C:\TEMP>hex -d 0 <hex.com
A083003C68747831EDB43FB53CBADF01CD2191E30389D6BFC33F57A083003C6
753DA0850083E00F4888C67502B2EFAC43D41086E02704F01440AA30CF75F48
F37503B020AA20D375054FB80D0AABE2DE5AB30189F929D1B440CD214BEBAAA
3C30721709ED741288C695244FD43730CF75F588F4D510AA31C095E2E2EBD2B
09BA8A01CD21C30D0A0A55736167652069733A0D0A686578202D64205B73705
3C666E2E636F6D0D0A2073703D7B302C312C322C342C387D0D0A6F720D0A686
78202D723C666E2E6865783E666E2E636F6D0D0A47504C204D4A3230323424
C:\TEMP>hex -h
Usage is:
hex -d [sp]<fn.com
sp={0,1,2,4,8}
or
hex -r<fn.hex>fn.com
GPL MJ2024
Kerr-Mudd, John
2024-09-09 08:32:20 UTC
Permalink
On Sun, 8 Sep 2024 21:41:09 +0100
Post by Kerr-Mudd, John
On Mon, 01 Jul 2024 11:37:50 +0100
...
[]
[]
hex 223 bytes;
now can produce 5 spaced formats for dump, also does hex2bin, and
contains (a minimal) usage help text.
C:\TEMP>hex -d 0 <hex.com
A083003C68747831EDB43FB53CBADF01CD2191E30389D6BFC33F57A083003C6
Argh! Last character on line is dropped!
More Work Needed.
--
Bah, and indeed Humbug.
Kerr-Mudd, John
2024-09-10 19:19:29 UTC
Permalink
On Mon, 9 Sep 2024 09:32:20 +0100
Post by Kerr-Mudd, John
On Sun, 8 Sep 2024 21:41:09 +0100
Post by Kerr-Mudd, John
On Mon, 01 Jul 2024 11:37:50 +0100
...
[]
[]
hex 223 bytes;
now can produce 5 spaced formats for dump, also does hex2bin, and
contains (a minimal) usage help text.
C:\TEMP>hex -d 0 <hex.com
A083003C68747831EDB43FB53CBADF01CD2191E30389D6BFC33F57A083003C6
Argh! Last character on line is dropped!
More Work Needed.
Had to trim the text at the end to add code to not delete last char on
line (ususally a trailing blank) if parm was 0

A083003C68747D31EDB43FB53CBADF01CD2191E30389D6BFC33F57A083003C64
7542A0850083E00F4888C67502B2EFAC43D41086E02704F01440AA30CF75F484
F37503B020AA20D3750AF6C68075014FB80D0AABE2D95AB30189F929D1B440CD
214BEBA5AC3C30721709ED741288C695244FD43730CF75F588F4D510AA31C095
E2E2EBD2B409BA8C01CD21C355736167652069733A0D0A686578202D64205B73
705D3C666E2E636F6D0D0A2073703D7B302C312C322C342C387D0D0A6F720D0A
686578202D723C666E2E6865783E666E2E636F6D0D0A2447504C204D4A3234
--
Bah, and indeed Humbug.
Kerr-Mudd, John
2024-09-11 15:37:50 UTC
Permalink
On Tue, 10 Sep 2024 20:19:29 +0100
Post by Kerr-Mudd, John
On Mon, 9 Sep 2024 09:32:20 +0100
Post by Kerr-Mudd, John
On Sun, 8 Sep 2024 21:41:09 +0100
Post by Kerr-Mudd, John
On Mon, 01 Jul 2024 11:37:50 +0100
...
[]
[]
hex 223 bytes;
now can produce 5 spaced formats for dump, also does hex2bin, and
contains (a minimal) usage help text.
C:\TEMP>hex -d 0 <hex.com
A083003C68747831EDB43FB53CBADF01CD2191E30389D6BFC33F57A083003C6
Argh! Last character on line is dropped!
More Work Needed.
Had to trim the text at the end to add code to not delete last char on
line (ususally a trailing blank) if parm was 0
Better to just prt crlf and skip the space test at linewidth.

-> d 100 lDE
16B1:0100 A0 83 00 3C-68 74 79 31-ED B4 3F B5-3C BA DF 01 ...<hty1..?.<...
16B1:0110 CD 21 91 E3-03 89 D6 BF-C3 3F 57 A0-83 00 3C 64 .!.......?W...<d
16B1:0120 75 3E A0 85-00 83 E0 0F-48 88 C6 75-02 B2 EF AC u>......H..u....
16B1:0130 43 D4 10 86-E0 27 04 F0-14 40 AA 30-CF 75 F4 20 C....'***@.0.u.
16B1:0140 D3 75 06 B8-0D 0A AB EB-07 84 F3 75-03 B0 20 AA .u.........u.. .
16B1:0150 E2 DD 5A B3-01 89 F9 29-D1 B4 40 CD-21 4B EB A9 ..Z....)***@.!K..
16B1:0160 AC 3C 30 72-17 09 ED 74-12 88 C6 95-24 4F D4 37 .<0r...t....$O.7
16B1:0170 30 CF 75 F5-88 F4 D5 10-AA 31 C0 95-E2 E2 EB D2 0.u......1......
16B1:0180 B4 09 BA 88-01 CD 21 C3-55 73 61 67-65 20 69 73 ......!.Usage is
16B1:0190 3A 0D 0A 68-65 78 20 2D-64 20 5B 73-70 5D 3C 66 :..hex -d [sp]<f
16B1:01A0 6E 2E 63 6F-6D 0D 0A 20-73 70 3D 7B-30 2C 31 2C n.com.. sp={0,1,
16B1:01B0 32 2C 34 2C-38 7D 0D 0A-6F 72 0D 0A-68 65 78 20 2,4,8}..or..hex
16B1:01C0 2D 72 3C 66-6E 2E 68 65-78 3E 66 6E-2E 63 6F 6D -r<fn.hex>fn.com
16B1:01D0 0D 0A-24 47 50 4C-20 4D 4A 20-32 30 32 34 ..$GPL MJ 2024
-> q
wolfgang kern
2024-09-13 14:58:17 UTC
Permalink
On 12/09/2024 21:08, Kerr-Mudd, John wrote:

...
A083003C68747931EDB43FB53CBADF01 CD2191E30389D6BFC33F57A083003C64
753EA085002D303C4888C67502B2EFAC 43D41086E02704F01440AA30CF75F420
D37506B80D0AABEB0784F37503B020AA E2DD5AB30189F929D1B440CD214BEBA9
AC3C30721709ED741288C695244FD437 30CF75F588F4D510AA31C095E2E2EBD2
B409BA8B01CD21C30D0A0A5573616765 2069733A0D0A686578202D64205B7370
5D3C666E2E636F6D0D0A2073703D7B30 2C312C322C342C382C407D0D0A6F720D
0A686578202D723C666E2E6865783E66 6E2E636F6D0D0A2447504C204D4A3234
-> d 100 lE0
16B1:0100 A0 83 00 3C-68 74 79 31-ED B4 3F B5-3C BA DF 01 ...<hty1..?.<...
16B1:0110 CD 21 91 E3-03 89 D6 BF-C3 3F 57 A0-83 00 3C 64 .!.......?W...<d
16B1:0120 75 3E A0 85-00 2D 30 3C-48 88 C6 75-02 B2 EF AC u>...-0<H..u....
16B1:0140 D3 75 06 B8-0D 0A AB EB-07 84 F3 75-03 B0 20 AA .u.........u.. .
16B1:0160 AC 3C 30 72-17 09 ED 74-12 88 C6 95-24 4F D4 37 .<0r...t....$O.7
16B1:0170 30 CF 75 F5-88 F4 D5 10-AA 31 C0 95-E2 E2 EB D2 0.u......1......
16B1:0180 B4 09 BA 8B-01 CD 21 C3-0D 0A 0A 55-73 61 67 65 ......!....Usage
16B1:0190 20 69 73 3A-0D 0A 68 65-78 20 2D 64-20 5B 73 70 is:..hex -d [sp
16B1:01A0 5D 3C 66 6E-2E 63 6F 6D-0D 0A 20 73-70 3D 7B 30 ]<fn.com.. sp={0
16B1:01C0 0A 68 65 78-20 2D 72 3C-66 6E 2E 68-65 78 3E 66 .hex -r<fn.hex>f
16B1:01D0 6E 2E 63 6F-6D 0D 0A 24-47 50 4C 20-4D 4A 32 34 n.com..$GPL MJ24
-> q
while to first may be better readable for machines, my eyes prefer the
latter variant :)

AL=[0083] CMP "h" JZ 0107+79 ;aka 0180
how about 80 36 83 00 68 CMP byte [0083],68 ;same size but keeps AL
AH=3F CH=3C DX=01DF (34 ?) INT21 swap AX,CX JCXZ RET
SI=DX DI=3FC3 push DI CMP[0083],"d" JNZ 0122+3E aka 0160
AL=[0085] SUB AX,3C30 DEC AX DH=AL JNZ 012D+2 aka 012F (skip next)
BL=EF
LODSB INC BX DIVMOD 10
SWAP AL,AH DAA ADD AL,F0 ADC AL,40 STOSB XOR BH,CL JNZ 0133 <<

I need to think about this last two lines ...
to be continued
__
wolfgang
Kerr-Mudd, John
2024-09-13 20:31:40 UTC
Permalink
On Fri, 13 Sep 2024 16:58:17 +0200
Post by wolfgang kern
...
A083003C68747931EDB43FB53CBADF01 CD2191E30389D6BFC33F57A083003C64
753EA085002D303C4888C67502B2EFAC 43D41086E02704F01440AA30CF75F420
D37506B80D0AABEB0784F37503B020AA E2DD5AB30189F929D1B440CD214BEBA9
AC3C30721709ED741288C695244FD437 30CF75F588F4D510AA31C095E2E2EBD2
B409BA8B01CD21C30D0A0A5573616765 2069733A0D0A686578202D64205B7370
5D3C666E2E636F6D0D0A2073703D7B30 2C312C322C342C382C407D0D0A6F720D
0A686578202D723C666E2E6865783E66 6E2E636F6D0D0A2447504C204D4A3234
-> d 100 lE0
16B1:0100 A0 83 00 3C-68 74 79 31-ED B4 3F B5-3C BA DF 01 ...<hty1..?.<...
16B1:0110 CD 21 91 E3-03 89 D6 BF-C3 3F 57 A0-83 00 3C 64 .!.......?W...<d
16B1:0120 75 3E A0 85-00 2D 30 3C-48 88 C6 75-02 B2 EF AC u>...-0<H..u....
16B1:0140 D3 75 06 B8-0D 0A AB EB-07 84 F3 75-03 B0 20 AA .u.........u.. .
16B1:0160 AC 3C 30 72-17 09 ED 74-12 88 C6 95-24 4F D4 37 .<0r...t....$O.7
16B1:0170 30 CF 75 F5-88 F4 D5 10-AA 31 C0 95-E2 E2 EB D2 0.u......1......
16B1:0180 B4 09 BA 8B-01 CD 21 C3-0D 0A 0A 55-73 61 67 65 ......!....Usage
16B1:0190 20 69 73 3A-0D 0A 68 65-78 20 2D 64-20 5B 73 70 is:..hex -d [sp
16B1:01A0 5D 3C 66 6E-2E 63 6F 6D-0D 0A 20 73-70 3D 7B 30 ]<fn.com.. sp={0
16B1:01C0 0A 68 65 78-20 2D 72 3C-66 6E 2E 68-65 78 3E 66 .hex -r<fn.hex>f
16B1:01D0 6E 2E 63 6F-6D 0D 0A 24-47 50 4C 20-4D 4A 32 34 n.com..$GPL MJ24
-> q
while to first may be better readable for machines, my eyes prefer the
latter variant :)
AL=[0083] CMP "h" JZ 0107+79 ;aka 0180
how about 80 36 83 00 68 CMP byte [0083],68 ;same size but keeps AL
maybe, but AL is lost by the Read: ; it was an 'addon' to allow a '-help'
option. 126 bytes (now, see below) for main code.
Post by wolfgang kern
AH=3F CH=3C DX=01DF (34 ?) INT21 swap AX,CX JCXZ RET
SI=DX DI=3FC3 push DI CMP[0083],"d" JNZ 0122+3E aka 0160
must reload byte at [83] to test after re-read, if source file >15k
Post by wolfgang kern
AL=[0085] SUB AX,3C30 DEC AX DH=AL JNZ 012D+2 aka 012F (skip next)
Oops!------->^----this bit-----^ is definitely suboptimal!
change to 'sub al,0x31; instead. (again, same lth if using DH directly)
Post by wolfgang kern
BL=EF -- shorter linelth for printing when 1 space between each hex pair.
LODSB INC BX DIVMOD 10
SWAP AL,AH DAA ADD AL,F0 ADC AL,40 STOSB XOR BH,CL JNZ 0133 <<
I need to think about this last two lines ...
It's just a 'do twice', BH=0 at start, and end, BL is input char count.
CL is any constant for the redo.
(wraps at eol, so BH untouched)
Post by wolfgang kern
to be continued
Thanks
--
Bah, and indeed Humbug.
Kerr-Mudd, John
2024-09-13 21:06:21 UTC
Permalink
On Fri, 13 Sep 2024 21:31:40 +0100
Post by Kerr-Mudd, John
On Fri, 13 Sep 2024 16:58:17 +0200
Post by wolfgang kern
AL=[0085] SUB AX,3C30 DEC AX DH=AL JNZ 012D+2 aka 012F (skip next)
Oops!------->^----this bit-----^ is definitely suboptimal!
change to 'sub al,0x31; instead. (again, same lth if using DH directly)
program 2 shorter; (so I can put the full year in the copyright text)

-> d 100 lE0
16B1:0100 A0 83 00 3C-68 74 77 31-ED B4 3F B5-3C BA DF 01 ...<htw1..?.<...
16B1:0110 CD 21 91 E3-03 89 D6 BF-C3 3F 57 A0-83 00 3C 64 .!.......?W...<d
16B1:0120 75 3C 8A 36-85 00 80 EE-31 75 02 B2-EF AC 43 D4 u<.6....1u....C.
16B1:0130 10 86 E0 27-04 F0 14 40-AA 30 CF 75-F4 20 D3 75 ...'***@.0.u. .u
16B1:0140 06 B8 0D 0A-AB EB 07 84-F3 75 03 B0-20 AA E2 DD .........u.. ...
16B1:0150 5A B3 01 89-F9 29 D1 B4-40 CD 21 4B-EB AB AC 3C Z....)***@.!K...<
16B1:0160 30 72 17 09-ED 74 12 88-C6 95 24 4F-D4 37 30 CF 0r...t....$O.70.
16B1:0170 75 F5 88 F4-D5 10 AA 31-C0 95 E2 E2-EB D2 B4 09 u......1........
16B1:0180 BA 89 01 CD-21 C3 0D 0A-0A 55 73 61-67 65 20 69 ....!....Usage i
16B1:0190 73 3A 0D 0A-68 65 78 20-2D 64 20 5B-73 70 5D 3C s:..hex -d [sp]<
16B1:01A0 66 6E 2E 63-6F 6D 0D 0A-20 73 70 3D-7B 30 2C 31 fn.com.. sp={0,1
16B1:01B0 2C 32 2C 34-2C 38 2C 40-7D 0D 0A 6F-72 0D 0A 68 ,2,4,8,@}..or..h
16B1:01C0 65 78 20 2D-72 3C 66 6E-2E 68 65 78-3E 66 6E 2E ex -r<fn.hex>fn.
16B1:01D0 63 6F 6D 0D-0A 24 47 50-4C 20 4D 4A-32 30 32 34 com..$GPL MJ2024
--
Bah, and indeed Humbug.
Kerr-Mudd, John
2024-09-12 19:08:08 UTC
Permalink
On Wed, 11 Sep 2024 16:37:50 +0100
Post by Kerr-Mudd, John
On Tue, 10 Sep 2024 20:19:29 +0100
Post by Kerr-Mudd, John
On Mon, 9 Sep 2024 09:32:20 +0100
Post by Kerr-Mudd, John
On Sun, 8 Sep 2024 21:41:09 +0100
Post by Kerr-Mudd, John
On Mon, 01 Jul 2024 11:37:50 +0100
...
[]
[]
hex 223 bytes;
now can produce 5 spaced formats for dump, also does hex2bin, and
contains (a minimal) usage help text.
now with '@' for single break per hexdump line.

c:\temp>hex1c8 -d @ <hex1c8.com
A083003C68747931EDB43FB53CBADF01 CD2191E30389D6BFC33F57A083003C64
753EA085002D303C4888C67502B2EFAC 43D41086E02704F01440AA30CF75F420
D37506B80D0AABEB0784F37503B020AA E2DD5AB30189F929D1B440CD214BEBA9
AC3C30721709ED741288C695244FD437 30CF75F588F4D510AA31C095E2E2EBD2
B409BA8B01CD21C30D0A0A5573616765 2069733A0D0A686578202D64205B7370
5D3C666E2E636F6D0D0A2073703D7B30 2C312C322C342C382C407D0D0A6F720D
0A686578202D723C666E2E6865783E66 6E2E636F6D0D0A2447504C204D4A3234

same, just in grdb dump format:

-> d 100 lE0
16B1:0100 A0 83 00 3C-68 74 79 31-ED B4 3F B5-3C BA DF 01 ...<hty1..?.<...
16B1:0110 CD 21 91 E3-03 89 D6 BF-C3 3F 57 A0-83 00 3C 64 .!.......?W...<d
16B1:0120 75 3E A0 85-00 2D 30 3C-48 88 C6 75-02 B2 EF AC u>...-0<H..u....
16B1:0130 43 D4 10 86-E0 27 04 F0-14 40 AA 30-CF 75 F4 20 C....'***@.0.u.
16B1:0140 D3 75 06 B8-0D 0A AB EB-07 84 F3 75-03 B0 20 AA .u.........u.. .
16B1:0150 E2 DD 5A B3-01 89 F9 29-D1 B4 40 CD-21 4B EB A9 ..Z....)***@.!K..
16B1:0160 AC 3C 30 72-17 09 ED 74-12 88 C6 95-24 4F D4 37 .<0r...t....$O.7
16B1:0170 30 CF 75 F5-88 F4 D5 10-AA 31 C0 95-E2 E2 EB D2 0.u......1......
16B1:0180 B4 09 BA 8B-01 CD 21 C3-0D 0A 0A 55-73 61 67 65 ......!....Usage
16B1:0190 20 69 73 3A-0D 0A 68 65-78 20 2D 64-20 5B 73 70 is:..hex -d [sp
16B1:01A0 5D 3C 66 6E-2E 63 6F 6D-0D 0A 20 73-70 3D 7B 30 ]<fn.com.. sp={0
16B1:01B0 2C 31 2C 32-2C 34 2C 38-2C 40 7D 0D-0A 6F 72 0D ,1,2,4,8,@}..or.
16B1:01C0 0A 68 65 78-20 2D 72 3C-66 6E 2E 68-65 78 3E 66 .hex -r<fn.hex>f
16B1:01D0 6E 2E 63 6F-6D 0D 0A 24-47 50 4C 20-4D 4A 32 34 n.com..$GPL MJ24
-> q
--
Bah, and indeed Humbug.
Loading...