Discussion:
duplicates
(too old to reply)
Kerr-Mudd,John
2019-04-24 15:52:48 UTC
Permalink
Uses DOS for IO, sorry Wolfgang, my Easter puzzle is a bit late!

BD098D31DBBA0A0D89D6B9FF7FB43FCD2191E379813E82002F6475014055B00A
89F75651F2AE7550B0204E4638347428380474F7F3AEE3404F413834741A3804
74E8A6E1F5E31980FC80741BB47F595FB00AF2AE89FEEBC6F3AEE3044FA775E7
80FC0078E9B481595E87FDA43814E0FBA449740F87FDEBA6595E87FD80FC0079
02F2A4435A89F929D1B440CD21C3
--
Bah, and indeed, Humbug.
wolfgang kern
2019-04-24 20:30:58 UTC
Permalink
Post by Kerr-Mudd,John
Uses DOS for IO, sorry Wolfgang, my Easter puzzle is a bit late!
:) I got a bad cold ... so I better don't work on sensible code.

can't see where an I/O is accessed. I think to have seen this before,
it looks like an OPEN/CLOSE file by name story from DOS 3.3 ....

BD098D31DBBA0A0D
89D6
B9FF7F
B43F
CD21
91
E379
813E82002F
647501
40
55
B00A
89F7
56
51
F2AE
7550
B020
4E
46
3834
7428
3804
74F7
F3AE
E340
4F
41
3834
741A
3804
74E8
A6
E1F5
E319
80FC80741B
B47F
59
5F
B00A
F2AE
89FE
EBC6
F3AE
E304
4F
A7
75E7
80FC00
78E9
B481
59
5E
87FD
A4
3814
E0FB
A4
49
740F
87FD
EBA6
59
5E
87FD
80FC00
7902
F2A4
43
5A
89F9
29D1
B440
CD21
C3
__
wolfgang
return into my bed yet.
Kerr-Mudd,John
2019-04-24 20:51:48 UTC
Permalink
On Wed, 24 Apr 2019 20:30:58 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
Uses DOS for IO, sorry Wolfgang, my Easter puzzle is a bit late!
:) I got a bad cold ... so I better don't work on sensible code.
can't see where an I/O is accessed. I think to have seen this before,
it looks like an OPEN/CLOSE file by name story from DOS 3.3 ....
BD098D31DBBA0A0D
89D6
B9FF7F
B43F
CD21 DOS STDIO read
91
E379
813E82002F
647501
40
55
B00A
89F7
56
51
F2AE
7550
B020
4E
46
3834
7428
3804
74F7
F3AE
E340
4F
41
3834
741A
3804
74E8
A6
E1F5
E319
80FC80741B
B47F
59
5F
B00A
F2AE
89FE
EBC6
F3AE
E304
4F
A7
75E7
80FC00
78E9
B481
59
5E
87FD
A4
3814
E0FB
A4
49
740F
87FD
EBA6
59
5E
87FD
80FC00
7902
F2A4
43
5A
89F9
29D1
B440
CD21 DOS STDIO write
C3
__
wolfgang
return into my bed yet.
Oh dear. Get Well Soon!
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-04-26 16:16:24 UTC
Permalink
On Wed, 24 Apr 2019 20:51:48 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 24 Apr 2019 20:30:58 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
Uses DOS for IO, sorry Wolfgang, my Easter puzzle is a bit late!
:) I got a bad cold ... so I better don't work on sensible code.
can't see where an I/O is accessed. I think to have seen this before,
it looks like an OPEN/CLOSE file by name story from DOS 3.3 ....
BD098D31DBBA0A0D
89D6
B9FF7F
B43F
CD21 DOS STDIO read
91
E379
813E82002F
647501
40
55
B00A
89F7
56
51
F2AE
7550
B020
4E
46
3834
7428
3804
74F7
F3AE
E340
4F
41
3834
741A
3804
74E8
A6
E1F5
E319
80FC80
741B
Post by Kerr-Mudd,John
Post by wolfgang kern
B47F
59
5F
B00A
F2AE
89FE
EBC6
F3AE
E304
4F
A7
75E7
80FC00
78E9
B481
59
5E
87FD
A4
3814
E0FB
A4
49
740F
87FD
EBA6
59
5E
87FD
80FC00
;;>> 7902
7802 ; sorry.
Post by Kerr-Mudd,John
Post by wolfgang kern
F2A4
43
5A
89F9
29D1
B440
CD21 DOS STDIO write
C3
__
wolfgang
return into my bed yet.
Oh dear. Get Well Soon!
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-04-26 17:12:33 UTC
Permalink
On Fri, 26 Apr 2019 16:16:24 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
;;>> 7902
7802 ; sorry.
No, that doesn't fix it.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-04-26 18:31:36 UTC
Permalink
On Fri, 26 Apr 2019 16:16:24 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 24 Apr 2019 20:51:48 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 24 Apr 2019 20:30:58 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
Uses DOS for IO, sorry Wolfgang, my Easter puzzle is a bit late!
:) I got a bad cold ... so I better don't work on sensible code.
can't see where an I/O is accessed. I think to have seen this before,
it looks like an OPEN/CLOSE file by name story from DOS 3.3 ....
BD098D31DBBA0A0D
89D6
B9FF7F
B43F
CD21 DOS STDIO read
91
E379
813E82002F
647501
40
55
B00A
89F7
56
51
F2AE
7550
B020
4E
46
3834
7428
3804
74F7
F3AE
E340
4F
41
3834
741A
3804
74E8
A6
E1F5
E319
80FC80
741B
Post by Kerr-Mudd,John
Post by wolfgang kern
B47F
59
5F
B00A
F2AE
89FE
EBC6
F3AE
E304
4F
A7
75E7
80FC00
78E9
B481
59
5E
87FD
A4
3814
E0FB
A4
49
740F
87FD
EBA6
59
5E
87FD
scrap this: -
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
Post by wolfgang kern
80FC00
;;>> 7902
7802 ; sorry.
make it:
80FC81
7402
Post by Kerr-Mudd,John
Post by Kerr-Mudd,John
Post by wolfgang kern
F2A4
43
5A
89F9
29D1
B440
CD21 DOS STDIO write
C3
__
wolfgang
return into my bed yet.
Oh dear. Get Well Soon!
Should be better
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-04-27 17:04:05 UTC
Permalink
On Fri, 26 Apr 2019 18:31:36 GMT, "Kerr-Mudd,John"
<***@nospicedham.invalid.org> wrote:

[]
Simpler flag for only printing 1 duplicate:
(141 bytes)

BD0A8D31DBBA0A0D89D6B90080B43FCD2191E378813E82002F6474019855B00A
89F75651F2AE754FB0204E4638347427380474F7F3AEE33F4F41383474193804
74E8A6E1F5E31880FC80741A98595FB00AF2AE89FEEBC7F3AEE3044FA775E880
FC0075E9B401595E87FDA43814E0FBA449740F87FDEBA7595E87FD80FC017402
F2A4435A89F929D1B440CD21C3
--
Bah, and indeed, Humbug.
wolfgang kern
2019-04-29 12:01:59 UTC
Permalink
On 27.04.2019 19:04, Kerr-Mudd,John wrote:

ok, fever makes the mind elastic...
not fully recovered yet, but I give it a try.

I'm always confused by M$'s I/O.
For me IO mean hardware connected to the IO-bus.
Seems they use that term for READ/WRITE and getkey/display.
So I have no clue what it shall do nor why at all ... :)
__
wolfgang

BD0A8D mov BP,8D0A ;where is this ?
31DB xor BX
BA0A0D mov DX,0D0A
89D6 mov SI,DX
B90080 mov CX,8000
B43F mov AH,3F
CD21 INT21
91 swap ax,cx
E378 jcxz +78
813E82002F64 cmp[0082],642F ;"/d"
7401 skip next if equal
98 cbw
55 push BP
B00A89 OR [BP+SI],89
F75651 NOT[BP+51]
F2AE REPNZ SCASB
754F JNZ +4F
B020 mov AL,20
4E dec SI

46 inc SI
3834 cmp [SI],DH
7427 jz +27
3804 cmp [SI],AL
74F7 jz -09
F3AE REPZ SCASB
E33F JCXZ +3f
4F dec DI
41 inc CX
3834 cmp [SI],DH
7419 jz +19
3804 cmp [SI],AL
74E8 jz -18
A6 CMPSB
E1F5 LOOPZ -0B
E318 JCXZ +18
80FC80 cmp AH,80
741A jz +1a
98 cbw
59 pop cx ;where you pushed this two ?
5F pop di
B00A mov AL,0A
F2AE REPNZ SCASB
89FE mov SI,DI
EBC7 jmp -39

F3AE REPZ SCASB
E304 JCXZ +04
4F dec DI
A7 CMPSW
75E8 jnz -18
80FC00 cmp AH,00 ;08 E4 OR AH,AH
75E9 jnz -17
B401 mov AH,01
59 pop CX
5E pop DI
87FD swap BP,DI
A4 MOVSB
3814 cmp [SI],DL
E0FB LOOPNZ -5
A4 MOVSB
49 dec CX
740F jz +0F
87FD swap BP,DI
EBA7 jmp -59

59 pop CX
5E pop DI
87FD swap BP,DI
80FC01 cmp AH,01
7402 jz +02
F2A4 REP MOVSB
43 inc BX
5A pop DX
89F9 mov CX,DI
29D1 sub CX,DX
B440 mov AH,40
CD21 int21
C3 ret

eof
Kerr-Mudd,John
2019-04-29 20:52:14 UTC
Permalink
On Mon, 29 Apr 2019 12:01:59 GMT, wolfgang kern
Post by wolfgang kern
ok, fever makes the mind elastic...
not fully recovered yet, but I give it a try.
I'm always confused by M$'s I/O.
For me IO mean hardware connected to the IO-bus.
Seems they use that term for READ/WRITE and getkey/display.
So I have no clue what it shall do nor why at all ... :)
__
wolfgang
BD0A8D mov BP,8D0A ;where is this ?
31DB xor BX
BA0A0D mov DX,0D0A
89D6 mov SI,DX
B90080 mov CX,8000
B43F mov AH,3F
CD21 INT21
91 swap ax,cx
E378 jcxz +78
813E82002F64 cmp[0082],642F ;"/d"
7401 skip next if equal
98 cbw
55 push BP
oops; this ain't right!
Post by wolfgang kern
B00A89 OR [BP+SI],89
F75651 NOT[BP+51]
B00A mov al,lf ; srch for lf
89F7 mov di,si
56 push si ; need to come back if no match
51 push cx
Post by wolfgang kern
F2AE REPNZ SCASB
754F JNZ +4F
B020 mov AL,20
4E dec SI
46 inc SI
3834 cmp [SI],DH
7427 jz +27
3804 cmp [SI],AL
74F7 jz -09
F3AE REPZ SCASB
E33F JCXZ +3f
4F dec DI
41 inc CX
3834 cmp [SI],DH
7419 jz +19
3804 cmp [SI],AL
74E8 jz -18
A6 CMPSB
E1F5 LOOPZ -0B
E318 JCXZ +18
80FC80 cmp AH,80
741A jz +1a
98 cbw
59 pop cx ;where you pushed this two ?
5F pop di
B00A mov AL,0A
F2AE REPNZ SCASB
89FE mov SI,DI
EBC7 jmp -39
F3AE REPZ SCASB
E304 JCXZ +04
4F dec DI
A7 CMPSW
75E8 jnz -18
80FC00 cmp AH,00 ;08 E4 OR AH,AH
smaller; thanks ; this is the flag
Post by wolfgang kern
75E9 jnz -17
B401 mov AH,01
59 pop CX
5E pop DI
87FD swap BP,DI
A4 MOVSB
3814 cmp [SI],DL
E0FB LOOPNZ -5
A4 MOVSB
49 dec CX
740F jz +0F
87FD swap BP,DI
EBA7 jmp -59
59 pop CX
5E pop DI
87FD swap BP,DI
80FC01 cmp AH,01
7402 jz +02
F2A4 REP MOVSB
43 inc BX
5A pop DX
89F9 mov CX,DI
29D1 sub CX,DX
B440 mov AH,40
CD21 int21
C3 ret
eof
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-04-29 21:00:48 UTC
Permalink
On Mon, 29 Apr 2019 12:01:59 GMT, wolfgang kern
Post by wolfgang kern
ok, fever makes the mind elastic...
not fully recovered yet, but I give it a try.
I'm always confused by M$'s I/O.
For me IO mean hardware connected to the IO-bus.
Seems they use that term for READ/WRITE and getkey/display.
So I have no clue what it shall do nor why at all ... :)
__
wolfgang
BD0A8D mov BP,8D0A ;where is this ?
;; just halfway; not important
Post by wolfgang kern
31DB xor BX
BA0A0D mov DX,0D0A
89D6 mov SI,DX
B90080 mov CX,8000
B43F mov AH,3F
CD21 INT21
DOS read [bx=0], to DX, lth cx, rtn actual read lth in ax, cy clr if ok
read.
Post by wolfgang kern
91 swap ax,cx
; amt read lth to cx
Post by wolfgang kern
E378 jcxz +78
; if nothing bail out.
Post by wolfgang kern
813E82002F64 cmp[0082],642F ;"/d"
7401 skip next if equal
98 cbw
;parameter test - /d delete duplicates, else show duplicates
Post by wolfgang kern
55 push BP
become "write from" at end
Post by wolfgang kern
B00A89 OR [BP+SI],89
F75651 NOT[BP+51]
mov al,0x0D
mov di,si
push si
push cx
Post by wolfgang kern
F2AE REPNZ SCASB
754F JNZ +4F
srch for linefeed

enough clues for now!
Post by wolfgang kern
B020 mov AL,20
4E dec SI
46 inc SI
3834 cmp [SI],DH
7427 jz +27
3804 cmp [SI],AL
74F7 jz -09
F3AE REPZ SCASB
E33F JCXZ +3f
4F dec DI
41 inc CX
3834 cmp [SI],DH
7419 jz +19
3804 cmp [SI],AL
74E8 jz -18
A6 CMPSB
E1F5 LOOPZ -0B
E318 JCXZ +18
80FC80 cmp AH,80
741A jz +1a
98 cbw
59 pop cx ;where you pushed this two ?
see above
Post by wolfgang kern
5F pop di
B00A mov AL,0A
F2AE REPNZ SCASB
89FE mov SI,DI
EBC7 jmp -39
F3AE REPZ SCASB
E304 JCXZ +04
4F dec DI
A7 CMPSW
75E8 jnz -18
80FC00 cmp AH,00 ;08 E4 OR AH,AH
cheers
Post by wolfgang kern
75E9 jnz -17
B401 mov AH,01
59 pop CX
5E pop DI
87FD swap BP,DI
A4 MOVSB
3814 cmp [SI],DL
E0FB LOOPNZ -5
A4 MOVSB
49 dec CX
740F jz +0F
87FD swap BP,DI
EBA7 jmp -59
59 pop CX
5E pop DI
87FD swap BP,DI
80FC01 cmp AH,01
7402 jz +02
F2A4 REP MOVSB
write resulting strings [bx=1 for output], lth cx from dx & quit
Post by wolfgang kern
43 inc BX
5A pop DX
89F9 mov CX,DI
29D1 sub CX,DX
B440 mov AH,40
CD21 int21
C3 ret
eof
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-04-29 21:01:20 UTC
Permalink
On Mon, 29 Apr 2019 12:01:59 GMT, wolfgang kern
Post by wolfgang kern
ok, fever makes the mind elastic...
not fully recovered yet, but I give it a try.
I'm always confused by M$'s I/O.
For me IO mean hardware connected to the IO-bus.
Seems they use that term for READ/WRITE and getkey/display.
So I have no clue what it shall do nor why at all ... :)
__
wolfgang
BD0A8D mov BP,8D0A ;where is this ?
;; just halfway; not important
Post by wolfgang kern
31DB xor BX
BA0A0D mov DX,0D0A
89D6 mov SI,DX
B90080 mov CX,8000
B43F mov AH,3F
CD21 INT21
DOS read [bx=0], to DX, lth cx, rtn actual read lth in ax, cy clr if ok
read.
Post by wolfgang kern
91 swap ax,cx
; amt read lth to cx
Post by wolfgang kern
E378 jcxz +78
; if nothing bail out.
Post by wolfgang kern
813E82002F64 cmp[0082],642F ;"/d"
7401 skip next if equal
98 cbw
;parameter test - /d delete duplicates, else show duplicates
Post by wolfgang kern
55 push BP
become "write from" at end
Post by wolfgang kern
B00A89 OR [BP+SI],89
F75651 NOT[BP+51]
mov al,0x0D
mov di,si
push si
push cx
Post by wolfgang kern
F2AE REPNZ SCASB
754F JNZ +4F
srch for linefeed

enough clues for now!
Post by wolfgang kern
B020 mov AL,20
4E dec SI
46 inc SI
3834 cmp [SI],DH
7427 jz +27
3804 cmp [SI],AL
74F7 jz -09
F3AE REPZ SCASB
E33F JCXZ +3f
4F dec DI
41 inc CX
3834 cmp [SI],DH
7419 jz +19
3804 cmp [SI],AL
74E8 jz -18
A6 CMPSB
E1F5 LOOPZ -0B
E318 JCXZ +18
80FC80 cmp AH,80
741A jz +1a
98 cbw
59 pop cx ;where you pushed this two ?
see above
Post by wolfgang kern
5F pop di
B00A mov AL,0A
F2AE REPNZ SCASB
89FE mov SI,DI
EBC7 jmp -39
F3AE REPZ SCASB
E304 JCXZ +04
4F dec DI
A7 CMPSW
75E8 jnz -18
80FC00 cmp AH,00 ;08 E4 OR AH,AH
cheers
Post by wolfgang kern
75E9 jnz -17
B401 mov AH,01
59 pop CX
5E pop DI
87FD swap BP,DI
A4 MOVSB
3814 cmp [SI],DL
E0FB LOOPNZ -5
A4 MOVSB
49 dec CX
740F jz +0F
87FD swap BP,DI
EBA7 jmp -59
59 pop CX
5E pop DI
87FD swap BP,DI
80FC01 cmp AH,01
7402 jz +02
F2A4 REP MOVSB
write resulting strings [bx=1 for output], lth cx from dx & quit
Post by wolfgang kern
43 inc BX
5A pop DX
89F9 mov CX,DI
29D1 sub CX,DX
B440 mov AH,40
CD21 int21
C3 ret
eof
--
Bah, and indeed, Humbug.
wolfgang kern
2019-05-01 08:02:45 UTC
Permalink
On 29.04.2019 23:01, Kerr-Mudd,John wrote:
...
Post by Kerr-Mudd,John
Post by wolfgang kern
B00A89 OR [BP+SI],89
F75651 NOT[BP+51]
mov al,0x0D
0x0A ?
Post by Kerr-Mudd,John
mov di,si
push si
push cx
I see now, my worn eyes read 80 instead of B0 here.
Post by Kerr-Mudd,John
enough clues for now!
:)
what I think it's supposed to work on a text list within a given file ?
...
Post by Kerr-Mudd,John
Post by wolfgang kern
80FC80 cmp AH,80
741A jz +1a
perhaps also here possible ? OR AH,AH JS +1a
__
wolfgang
Kerr-Mudd,John
2019-05-01 09:22:00 UTC
Permalink
On Wed, 01 May 2019 08:02:45 GMT, wolfgang kern
Post by wolfgang kern
...
Post by Kerr-Mudd,John
Post by wolfgang kern
B00A89 OR [BP+SI],89
F75651 NOT[BP+51]
mov al,0x0D
0x0A ?
oops!
Post by wolfgang kern
Post by Kerr-Mudd,John
mov di,si
push si
push cx
I see now, my worn eyes read 80 instead of B0 here.
Post by Kerr-Mudd,John
enough clues for now!
:)
what I think it's supposed to work on a text list within a given file ?
Ah sorry, I should have made that more explicit: It's to remove/display
duplicate lines from a sorted file.
Post by wolfgang kern
...
Post by Kerr-Mudd,John
Post by wolfgang kern
80FC80 cmp AH,80
741A jz +1a
perhaps also here possible ? OR AH,AH JS +1a
Yes.
Post by wolfgang kern
__
wolfgang
I've reordered it and changed it to print just the *last* duplicate now.
(and some edge cases corrected for!)
(140 bytes)

BD0A8D31DBBA0A0D89D6B90080B43FCD2191E377813E82002F6474019855B00A
89F75651F2AE754FB0204E463834742F380474F7F3AEE33F4F41383474213804
74E8A6E1F5E32008E47803742098595E87FDA43814E0FBA449742687FDEBBFF3
AEE3044FA775E008E47502B401595FB00AF2AE89FEEBA7595E87FD08E47402F2
A4435A89F929D1B440CD21C3

I could put up the source code; but where's the fun in that?
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-05-08 15:04:14 UTC
Permalink
On Wed, 01 May 2019 09:22:00 GMT, "Kerr-Mudd,John"
<***@nospicedham.invalid.org> wrote:

[]
Post by Kerr-Mudd,John
BD0A8D31DBBA0A0D89D6B90080B43FCD2191E377813E82002F6474019855B00A
89F75651F2AE754FB0204E463834742F380474F7F3AEE33F4F41383474213804
74E8A6E1F5E32008E47803742098595E87FDA43814E0FBA449742687FDEBBFF3
AEE3044FA775E008E47502B401595FB00AF2AE89FEEBA7595E87FD08E47402F2
A4435A89F929D1B440CD21C3
I could put up the source code; but where's the fun in that?
Ok; here it's in a kinder nasm format:
org 0x100
mov bp,0x8D0A
xor bx,bx
mov dx,0x0D0A
mov si,dx
mov cx,0x8000
mov ah,0x3F
int 0x21
xchg ax,cx
jcxz l18B
cmp word [0x0082],0x642F
jz l11D
cbw
l11D: push bp
l11E: mov al,0x0A
mov di,si
push si
push cx
repnz scasb
jnz l177
mov al,0x20
l12A: dec si
l12B: inc si
cmp [si],dh
jz l15F
cmp [si],al
jz l12B
repz scasb
jcxz l177
dec di
inc cx
l13A: cmp [si],dh
jz l15F
cmp [si],al
jz l12A
cmpsb
loopz l13A
jcxz l167
l147: or ah,ah
js l14E
jz l16D
cbw
l14E: pop cx
pop si
xchg di,bp
l152: movsb
cmp [si],dl
loopnz l152
movsb
dec cx
jz l181
xchg di,bp
jmp l11E
l15F: repz scasb
jcxz l167
dec di
cmpsw
jnz l147
l167: or ah,ah
jnz l16D
mov ah,01
l16D: pop cx
pop di
mov al,0x0A
repnz scasb
mov si,di
jmp l11E
l177: pop cx
pop si
xchg di,bp
or ah,ah
jz l181
repnz movsb
l181: inc bx
pop dx
mov cx,di
sub cx,dx
mov ah,0x40
int 0x21
l18B: ret
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-05-13 15:32:59 UTC
Permalink
On Wed, 08 May 2019 15:04:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 01 May 2019 09:22:00 GMT, "Kerr-Mudd,John"
[]
Never mind the code; are you OK?
--
Bah, and indeed, Humbug.
wolfgang kern
2019-05-13 19:27:02 UTC
Permalink
Post by Kerr-Mudd,John
On Wed, 08 May 2019 15:04:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 01 May 2019 09:22:00 GMT, "Kerr-Mudd,John"
[]
Never mind the code; are you OK?
I'm still alive, but weak and tired.
appologize for not responding in time.
__
wolfgang
src153
2019-05-13 21:49:31 UTC
Permalink
Post by wolfgang kern
Post by Kerr-Mudd,John
Never mind the code; are you OK?
I'm still alive, but weak and tired.
appologize for not responding in time.
Hope you get better.

But Usenet is not a web forum where they lock threads. Anytime is a good
time.

Locking threads is like saying you can't prove Fermat's last theorem
because it's been a long time.

Web forums are run by monkeys. And they're devolving. So much for the
theory of evolution.
Kerr-Mudd,John
2019-05-14 08:04:38 UTC
Permalink
On Mon, 13 May 2019 21:49:31 GMT, src153 <src153
Post by src153
Post by wolfgang kern
Post by Kerr-Mudd,John
Never mind the code; are you OK?
I'm still alive, but weak and tired.
appologize for not responding in time.
Hope you get better.
But Usenet is not a web forum where they lock threads. Anytime is a good
time.
Quite. Unless you're a drive-by google user.
Post by src153
Locking threads is like saying you can't prove Fermat's last theorem
because it's been a long time.
All you need is a big enough margin!
Post by src153
Web forums are run by monkeys. And they're devolving. So much for the
theory of evolution.
OT.
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-05-14 08:02:31 UTC
Permalink
On Mon, 13 May 2019 19:27:02 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
On Wed, 08 May 2019 15:04:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 01 May 2019 09:22:00 GMT, "Kerr-Mudd,John"
[]
Never mind the code; are you OK?
I'm still alive, but weak and tired.
appologize for not responding in time.
No apology needed; hope you recover soon.
There's no code deadline here!
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-05-29 15:59:08 UTC
Permalink
On Tue, 14 May 2019 08:02:31 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Mon, 13 May 2019 19:27:02 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
On Wed, 08 May 2019 15:04:14 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Wed, 01 May 2019 09:22:00 GMT, "Kerr-Mudd,John"
[]
Never mind the code; are you OK?
I'm still alive, but weak and tired.
appologize for not responding in time.
No apology needed; hope you recover soon.
There's no code deadline here!
On the mend, I hope? Anyone in contact with Wolfgang?
--
Bah, and indeed, Humbug.
wolfgang kern
2019-06-25 16:48:44 UTC
Permalink
Post by Kerr-Mudd,John
On the mend, I hope? Anyone in contact with Wolfgang?
Took me a while to resurrect my worn body. and with the help
of a some scientists I'm almost new reborn yet. Today I left
hospital and I'm still a bit tired because filled with drugs
for some more days.
At least I'm back and ready to continue soon.
__
wolfgang
wolfgang kern
2019-06-27 05:35:40 UTC
Permalink
ready to continue...

what I see so far is:
* neat trick with SI,BP,DX on start, but wouldn't max.BP+CX segfault ?
* it works on 0A 0D terminated text-strings of variable size.
[no intention to work on OD 0A or single byte end marks too?]
* trailing spaces were ignored.
* cant see where/how a duplicate string goes to screen.

methink the sense of such code is to test sort-routines.
I had to check my multi pass sort manually because I am/be much too lazy
to write a complicated seven pass tool for it :)
__
wolfgang
Kerr-Mudd,John
2019-06-27 09:35:22 UTC
Permalink
On Thu, 27 Jun 2019 05:35:40 GMT, wolfgang kern
Post by wolfgang kern
ready to continue...
* neat trick with SI,BP,DX on start, but wouldn't max.BP+CX segfault ?
Oh dear, I've not tried it on a big file.
Post by wolfgang kern
* it works on 0A 0D terminated text-strings of variable size.
It should be 0D 0A, I must have coded it the wrong way about, as the
either the assembler swaps them or I'd assumed it did.
Post by wolfgang kern
[no intention to work on OD 0A or single byte end marks too?]
Hmm, no, not yet. I think currently the code relies on having both.
Post by wolfgang kern
* trailing spaces were ignored.
and leading, I hope.
Post by wolfgang kern
* cant see where/how a duplicate string goes to screen.
I'll have to review my code; I haven't looked at it for a month or so!
I've been drawing a flashing box on the screen. (88 bytes best so far).
Post by wolfgang kern
methink the sense of such code is to test sort-routines.
I never thought it'd be much use, I did it for the challenge.
Post by wolfgang kern
I had to check my multi pass sort manually because I am/be much too lazy
to write a complicated seven pass tool for it :)
--
Bah, and indeed, Humbug.
Kerr-Mudd,John
2019-06-27 10:19:25 UTC
Permalink
On Thu, 27 Jun 2019 09:35:22 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Thu, 27 Jun 2019 05:35:40 GMT, wolfgang kern
Post by wolfgang kern
ready to continue...
[]
Post by Kerr-Mudd,John
Post by wolfgang kern
* cant see where/how a duplicate string goes to screen.
It should *either* (default) print dupes, or, if /d passed
('/deleteduplicates'), print non-dupes. The output buffer is written at the
end (DOS int 21 fn x40).
--
Bah, and indeed, Humbug.
wolfgang kern
2019-06-28 04:25:58 UTC
Permalink
Post by Kerr-Mudd,John
[]
Post by wolfgang kern
* cant see where/how a duplicate string goes to screen.
It should *either* (default) print dupes, or, if /d passed
('/deleteduplicates'), print non-dupes. The output buffer is written at the
end (DOS int 21 fn x40).
Ok, I thought it writes the corrected buffer back to where it came from.
it's about forty years ago when I last programmed DOS-apps...
__
wolfgang
Terje Mathisen
2019-06-28 07:49:35 UTC
Permalink
Post by Kerr-Mudd,John
On Thu, 27 Jun 2019 09:35:22 GMT, "Kerr-Mudd,John"
Post by Kerr-Mudd,John
On Thu, 27 Jun 2019 05:35:40 GMT, wolfgang kern
Post by wolfgang kern
ready to continue...
[]
Post by Kerr-Mudd,John
Post by wolfgang kern
* cant see where/how a duplicate string goes to screen.
It should *either* (default) print dupes, or, if /d passed
('/deleteduplicates'), print non-dupes. The output buffer is written at the
end (DOS int 21 fn x40).
This is more or less the standard unix uniq tool I believe?

I.e. this will also either remove all duplicates from a previously
sorted array of lines, or output the dup'ed lines.

I have written one like this in Pascal, the interesting part happens
when you make the "is equal" requirement less strict:

I.e. ignore case, ignore trailing (and leading?) white space?

Collapse all strings of white space (space/tab) into a single space?

In order to do it efficiently you need to double your input line buffer,
so that after reading a line you immediately collapse it into the
generic form, then you compare this with the similarly processed version
of the previous line.

When you need to output something, you should of course always use the
original version of the line!

BTW, if there is to be an exact match, no conversion, the conversion
function can be one that simply returns the input pointer instead of
allocating/using a separate buffer.

You create one conversion function for each basic piece of
pre-processing to be done, then you have aggregate functions that simply
call down to multiple of these to cover combinations.

At runtime a function pointer directs processing to the currently
selected path, so no test/branch anywhere before the final line-vs-line
compare results are known.

Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Kerr-Mudd,John
2019-06-27 13:35:35 UTC
Permalink
On Tue, 25 Jun 2019 16:48:44 GMT, wolfgang kern
Post by wolfgang kern
Post by Kerr-Mudd,John
On the mend, I hope? Anyone in contact with Wolfgang?
Took me a while to resurrect my worn body. and with the help
of a some scientists I'm almost new reborn yet. Today I left
hospital and I'm still a bit tired because filled with drugs
for some more days.
At least I'm back and ready to continue soon.
__
wolfgang
Welcome Back! (I though I'd posted something before looking at code, but
it went missing)
--
Bah, and indeed, Humbug.
Loading...