1 | ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
|
---|
2 | ;
|
---|
3 | ; This file is part of AiR-BOOT
|
---|
4 | ;
|
---|
5 | ; AiR-BOOT is free software: you can redistribute it and/or modify it under
|
---|
6 | ; the terms of the GNU General Public License as published by the Free
|
---|
7 | ; Software Foundation, either version 3 of the License, or (at your option)
|
---|
8 | ; any later version.
|
---|
9 | ;
|
---|
10 | ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
|
---|
11 | ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
12 | ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
---|
13 | ; details.
|
---|
14 | ;
|
---|
15 | ; You should have received a copy of the GNU General Public License along with
|
---|
16 | ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
|
---|
17 | ;
|
---|
18 |
|
---|
19 | ; Bad Test-Virus ;-) - For test of AiR-BOOT ANTIVIR
|
---|
20 |
|
---|
21 | JUMPS
|
---|
22 |
|
---|
23 | ; First all Equs
|
---|
24 |
|
---|
25 | ExecBaseSeg equ 00000h
|
---|
26 | ExecBasePtr equ 07C00h
|
---|
27 | BootBaseSeg equ 8000h
|
---|
28 | BootBasePtr equ 0h ; We put our MBR to this location
|
---|
29 | BootBaseExec equ BootBasePtr+offset MBR_RealStart
|
---|
30 | StackSeg equ 7000h
|
---|
31 |
|
---|
32 | .386p
|
---|
33 | model large, basic
|
---|
34 |
|
---|
35 | code_seg segment public use16
|
---|
36 | assume cs:code_seg, ds:nothing, es:nothing, ss:nothing
|
---|
37 | org 0000h
|
---|
38 |
|
---|
39 |
|
---|
40 | ;---------------------------------------------------------------------------
|
---|
41 | air_boot: cld
|
---|
42 | mov ax, ExecBaseSeg
|
---|
43 | mov ds, ax
|
---|
44 | mov si, ExecBasePtr
|
---|
45 | mov ax, BootBaseSeg
|
---|
46 | mov es, ax
|
---|
47 | mov di, BootBasePtr
|
---|
48 | mov cx, 256
|
---|
49 | rep movsw
|
---|
50 | db 0EAh
|
---|
51 | dw BootBaseExec
|
---|
52 | dw BootBaseSeg
|
---|
53 | ; jmp far ptr BootBaseSeg:BootBaseExec
|
---|
54 |
|
---|
55 | ; In: SI - Pointer to begin of string (EOS is 0)
|
---|
56 | ; Destroyed: SI
|
---|
57 | MBR_Teletype Proc Near Uses ax bx cx
|
---|
58 | mov ah, 0Eh
|
---|
59 | mov bx, 7
|
---|
60 | MBR_Teletype_Loop:
|
---|
61 | lodsb
|
---|
62 | or al, al
|
---|
63 | jz MBR_Teletype_End
|
---|
64 | int 10h
|
---|
65 | jmp MBR_Teletype_Loop
|
---|
66 | MBR_Teletype_End:
|
---|
67 | ret
|
---|
68 | MBR_Teletype EndP
|
---|
69 |
|
---|
70 | MBR_Virus_Message db 'I''m a little MBR non-stealth virus...Come and get me', 13, 10, 0
|
---|
71 | ;---------------------------------------------------------------------------
|
---|
72 | MBR_RealStart: mov ax, StackSeg
|
---|
73 | mov ss, ax
|
---|
74 | mov sp, 7FFFh
|
---|
75 | mov ax, es
|
---|
76 | mov ds, ax ; Set DS to new segment
|
---|
77 | ; Lade den fehlenden Part von der Festplatte
|
---|
78 |
|
---|
79 | mov si, offset MBR_Virus_Message
|
---|
80 | call MBR_Teletype
|
---|
81 |
|
---|
82 | mov ax, 8600h
|
---|
83 | xor cx, 100
|
---|
84 | xor dx, dx
|
---|
85 | int 15h ; Wait to display message
|
---|
86 |
|
---|
87 | mov ax, ExecBaseSeg
|
---|
88 | mov es, ax
|
---|
89 | mov bx, ExecBasePtr
|
---|
90 | mov dx, 0080h ; Erste HD, Sektor 50
|
---|
91 | mov cx, 0032h
|
---|
92 | mov ax, 0201h ; 1 Sektor lesen
|
---|
93 | int 13h
|
---|
94 |
|
---|
95 | db 0EAh
|
---|
96 | dw ExecBasePtr
|
---|
97 | dw ExecBaseSeg
|
---|
98 |
|
---|
99 | code_seg ends
|
---|
100 | end air_boot
|
---|