int 21,3A

How can i substitute int 21,3A with my own int?
And how can i see what dir is beeng removed when the user uses int 21,3A (rmdir)?
zorancAsked:
Who is Participating?
 
daittCommented:
INT 21h is an interrupt handled by DOS. 3Ah is the function number (specified by AH) within INT 21h. So you can replace INT 21h only (by GETINTVEC and SETINTVEC):

type myproc=procedure;
var oldint:pointer;
begin
   GetIntVec($21,oldint);
   SetIntVec($21,@myFunc);
{ do something }
   keep(0);
end.

then build a function to handle INT21, only process AH=3Ah function, every other AH will be pass to oldint(a pointer to old INT21h):
procedure myFunc(AH:byte);interrupt;
begin
   if AH=$3A then
      begin
   {do something}
      end
   else
       begin
         {Jump to oldint}
      end;
end.

About the way to get the name of the directory being removed, I'll answer later. Try the code above (maybe you will have to write some assembler codes)

0
 
kellyjjCommented:
you can intercept the intr, and then process it with your own proc.  This very similar to what you would do with the tick timer.
0
 
daittCommented:
I'm sorry I'm so busy. Please give me your E-Mail address to finish my promise (about the way to get directory name).
Daitt@yahoo.com
0
 
zorancAuthor Commented:
my e-mail address is  : nade@mol.com.mk
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.