Solved

int 21,3A

Posted on 1998-10-01
4
257 Views
Last Modified: 2010-04-16
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)?
0
Comment
Question by:zoranc
  • 2
4 Comments
 
LVL 2

Expert Comment

by:kellyjj
ID: 1215723
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
 
LVL 3

Accepted Solution

by:
daitt earned 50 total points
ID: 1215724
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
 
LVL 3

Expert Comment

by:daitt
ID: 1215725
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
 

Author Comment

by:zoranc
ID: 1215726
my e-mail address is  : nade@mol.com.mk
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tstream to hex 1 1,695
Get pixel color of a jpg in a TImage 1 2,647
How do you get the IP address of a network? 12 278
add combobox item based on numbers 9 141
An article on effective troubleshooting
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question