Re: Masm32 Installation



Jim Carlock wrote:
> "Herbert Kleebauer" <klee@xxxxxxxxx> wrote:

> File corruptions occur mostly when your downloading a file. So the
> checksum for the download applies there. Or you can do what I
> do and download the file twice and use the command line tool,
> fc /b file1.zip file2.zip.

This test isn't very useful. If you download a binary file in
ASCII mode with ftp twice, you will get two identical (but
nevertheless corrupted) files. To test for a download error
you need no md5 checksum, the zip format itself has a
checksum so you will get an unzip error if the zip file
is corrupted. The md5 checksum is to verify that the file
was not modified. This way you can download the file from
any (also insecure) server and then compare the md5 checksum
of the downloaded file with the md5 checksum of the original
file (which you have to retrieve from a trusted server). As
far as I remember, there are servers which collect the md5
checksum of many public available programs.

> File corruptions occur during file copying procedures as well, but
> not quite as often as they do during a download.

Yes, but only back in the old days where we used floppies
instead of hard disks.

> While installing Windows 98 on computers there were
> two ways of copying the files.
>
> xcopy D:\i386\*.* /s /e C:\i386\*.* /s
> and
> xcopy D:\i386\*.* /s /e C:\i386\*.* /s /v
>
> The second line does a verification to indicate that the copying
> worked well.

Are you sure that xcopy really does a true verify. The /v switch
from copy only verified that the sectors where the file is stored
are readable (correct CRC) but didn't compare the content of the
file with the content of original file. And even if xcopy does a
compare, it most probably will only compare the data in the disk
cache and not on the HD.

> The first command line, 1 out of 5 installations carried a noticeable
> defect in the install.

Sorry, but if you copy about 200 Mbyte and in 20% there is a
copy error, then such a computer is completely unusable.


> The second command line, with the /v switch applied, 1 out of 50
> installations carried a noticeable defect. The difference was great,

Even 2% are completely unacceptable. Because the /v switch only
reports (but doesn't silently correct) a copy error you should
have seen a xcopy error message every 5th computer. Can't believe
this.

> although my numbers might be a little warped. I took notice of it
> and one job I had was installing Windows 98 on 10 computers a
> day for six months. The owner of the company said the comebacks
> (people bringing their computers back for fixing) dropped 1000%.

Nothing can drop more than 100% (it's already zero then).

> It doesn't mean people stopped bringing computers back, it just
> means if 9 out of 10 brought their computer back previous to me
> arriving, 1 out of 50 now brought their system back due to some
> glitch in the installation of the operating system.

Let's assume we have a PC with a probability of 20% that there is a copy
error if you copy 200 Mbyte (I386 folder). Now, if you compare the
copied files with the original files and do a recopy if there was
an error doesn't "repair" the PC. Even if you mange to correctly
install the OS on such a PC, you will immediately get it back from
the user, because he still gets copy errors (the 20% probability
is still the same).


> Even though the files were copied to the hard disk drive that in
> itself doesn't guarantee anything. Every single installation of XP
> today has some corruption in it. I want to stress that.

This corruption was introduced by the programmers of XP and not
by file copying.

> Danke Schön, Herbert. Wenn ich verstand, was Sie schreiben...
>
> ; This code sequence exists at 01FD
> inc bp
> inc si
> dec si
> inc bp
> inc si
>
> Am I reading that correctly? If so, what's the purpose for inc, dec,
> inc upon the si register?

Only the first two echo lines are executable code (the decoding routine for
the remaining lines which are the ASCII encoded md5 program).

Here the source for md5.com (it is size optimized and very slow):


@=$100
move.l #$67452301,a
move.l #$efcdab89,b
move.l #$98badcfe,c
move.l #$10325476,d

eor.l r4,r4 ; low bit count
eor.l r5,r5 ; high bit count
_10: move.b #$3f,m0
move.w #buf,r1
move.w #64,r2
eor.w r3,r3
trap #$21
bcs.b _100
cmp.w #64,r0
bne.b _20
bsr.w md5
addq.l #64,r4
addcq.l #0,r5
br.b _10

_20: ext.l r0 ; clear high word
add.l r0,r4
addcq.l #0,r5
dsl.l #3,r5<r4
lsl.l #3,r4

move.w #buf,r6
add.w r0,r6
move.b #$80,(r6.w)
_30: inc.w r6
move.b #0,(r6.w)
cmp.w #buf+63,r6
blo.b _30

cmp.w #56,r0
blo.b _40
bsr.w md5
eor.w r0,r0
move.w #buf-1,r6
br.b _30

_40: move.l r4,buf+56
move.l r5,buf+60
bsr.w md5

move.w #a,r5
move.w #buf,r6
move.w #16,r2
_60: move.b (r5.w),r0
lsr.b #4,r0
bsr.w _70
move.b (r5.w),r0
inc.w r5
and.b #$0f,r0
bsr.w _70
dbf.w r2,_60
move.b #$40,m0
move.w #buf,r1
move.w #32,r2
move.b #1,r3
trap #$21
_100: rts.w

_70: add.b #'0',r0
cmp.b #'9',r0
bls.b _50
add.b #'a'-'9'-1,r0
_50: move.b r0,(r6.w)
inc.w r6
rts.w


md5: ; see RFC 1321
move.l r5,-(sp) ; don't modify r4 and r5

move.l a,r0
move.l r0,a0
move.l r0,-(sp)
move.l b,r0
move.l r0,b0
move.l r0,-(sp)
move.l c,r0
move.l r0,c0
move.l r0,-(sp)
move.l d,r0
move.l r0,d0
move.l r0,-(sp)

move.l #a,r5
eor.l r3,r3
_10: cmp.b #15,r3
bhi.b _20
move.l 4.b(r5),r0
move.l r0,r1
and.l 8.b(r5),r1
not.l r0
and.l 12.b(r5),r0
or.l r1,r0
br.b _50

_20: cmp.b #31,r3
bhi.b _30
move.l 12.b(r5),r0
move.l r0,r1
and.l 4.b(r5),r1
not.l r0
and.l 8.b(r5),r0
or.l r1,r0
br.b _50

_30: cmp.b #47,r3
bhi.b _40
move.l 4.b(r5),r0
eor.l 8.b(r5),r0
eor.l 12.b(r5),r0
br.b _50

_40: move.l 12.b(r5),r0
not.l r0
or.l 4.b(r5),r0
eor.l 8.b(r5),r0

_50: add.l (r5),r0
movu.bl index(r3),r6
add.l buf(r6*4),r0
add.l sin(r3*4),r0
move.b shift(r3),r2
rol.l r2,r0

add.l 4.b(r5),r0
move.l r0,(r5)
move.l r0,16.b(r5)
subq.l #4,r5
cmp.l #b0,r5
bhs.b _60
addq.l #16,r5
_60: inc.b r3
cmp.b #64,r3
blo.w _10

move.l (sp)+,r0
add.l r0,d
move.l (sp)+,r0
add.l r0,c
move.l (sp)+,r0
add.l r0,b
move.l (sp)+,r0
add.l r0,a
move.l (sp)+,r5
rts.w

even 4
index: dc.b 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15
dc.b 1, 6,11, 0, 5,10,15, 4, 9,14, 3, 8,13, 2, 7,12
dc.b 5, 8,11,14, 1, 4, 7,10,13, 0, 3, 6, 9,12,15, 2
dc.b 0, 7,14, 5,12, 3,10, 1, 8,15, 6,13, 4,11, 2, 9

shift: dc.b 7,12,17,22, 7,12,17,22, 7,12,17,22, 7,12,17,22
dc.b 5, 9,14,20, 5, 9,14,20, 5, 9,14,20, 5, 9,14,20
dc.b 4,11,16,23, 4,11,16,23, 4,11,16,23, 4,11,16,23
dc.b 6,10,15,21, 6,10,15,21, 6,10,15,21, 6,10,15,21

sin:
dc.l $d76aa478, $e8c7b756, $242070db, $c1bdceee, $f57c0faf, $4787c62a
dc.l $a8304613, $fd469501, $698098d8, $8b44f7af, $ffff5bb1, $895cd7be
dc.l $6b901122, $fd987193, $a679438e, $49b40821, $f61e2562, $c040b340
dc.l $265e5a51, $e9b6c7aa, $d62f105d, $02441453, $d8a1e681, $e7d3fbc8
dc.l $21e1cde6, $c33707d6, $f4d50d87, $455a14ed, $a9e3e905, $fcefa3f8
dc.l $676f02d9, $8d2a4c8a, $fffa3942, $8771f681, $6d9d6122, $fde5380c
dc.l $a4beea44, $4bdecfa9, $f6bb4b60, $bebfbc70, $289b7ec6, $eaa127fa
dc.l $d4ef3085, $04881d05, $d9d4d039, $e6db99e5, $1fa27cf8, $c4ac5665
dc.l $f4292244, $432aff97, $ab9423a7, $fc93a039, $655b59c3, $8f0ccc92
dc.l $ffeff47d, $85845dd1, $6fa87e4f, $fe2ce6e0, $a3014314, $4e0811a1
dc.l $f7537e82, $bd3af235, $2ad7d2bb, $eb86d391


blk.b 1024 ; because of trace cache P4

b0: blk.l 1
c0: blk.l 1
d0: blk.l 1
a: blk.l 1
b: blk.l 1
c: blk.l 1
d: blk.l 1
a0: blk.l 1

buf:
.



Relevant Pages

  • Re: CheckUDP problem
    ... It might not be the network hardware, ... download successfully to board A, ... !CheckUDP: UDP header checksum failure messages before the system ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CheckUDP problem
    ... download successfully to board A, ... but my platform keeps giving ... !CheckUDP: UDP header checksum failure messages before the system ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CheckUDP problem
    ... I seem to recall some download ... !CheckUDP: UDP header checksum failure messages before the system 'hangs'. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CheckUDP problem
    ... but my platform keeps giving CheckUDP ... I seem to recall some download ... !CheckUDP: UDP header checksum failure messages before the system 'hangs'. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Masm32 Installation
    ... File corruptions occur mostly when your downloading a file. ... checksum for the download applies there. ... While installing Windows 98 on computers there were ... glitch in the installation of the operating system. ...
    (alt.lang.asm)