In Assembly Language we have the DOS interrupt INT 21h, which is not a hardware interrupt.
I was wondering if it was possible to write my own interrupt and call it.
If possible, please suggest links or methods.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can create your own interrput handler and call it whenever you want.
You will need to set up the interrupt vector (which starts at address 0000:0000) to point to your own interrupt handler.
The pointer to each handler consumes 4 bytes (offset and segment) so if for example you want to setup your interrupt handler for INT 22h you would update the interrput vector at location 0000:0088h to point to your handler.
Check Ralph Brown’s interrupt list to check an unused interrupt number (at least one that is not used by a hardware interrput).
Here goes an example of how to set up a handler for interrupt 22h: