Code a C-language program that shall include your own Interrupt Service Routine (ISR) who’s various services shall perform different mathematical operations as stated below:
- User shall select service no. via AH register as we do in other interrupts and setting different values of AH means choosing different mathematical operation e.g.
AH=1 means we want to perform Addition
AH=2 means we want to perform Subtraction
AH=3 means we want to perform Multiplication
AH=4 means we want to perform Division
(Here we restrict ourselves to only these four basic operations)
- Operands shall be passed to interrupt via Register BX and CX e.g. If want to multiply 5 and 6 then we may set BX=5 and CX=6 in our main program and after invoking your Interrupt, you have to collect and display the result in main(). Do write some sample piece of code in your main program to test these various operations.
- Choose an unused Interrupt no. for your interrupt service routine in Interrupt Vector Table.
Just an Idea
Lecture 04 page 26.
just remove the line keep(0, 1000);DOWNLOAD SOLUTION HERE