Hook HW interrupt in flat memory mode

L

liaoo

Dear all,
I have a question about how to hook HW interrupt in flat memory mode...Maybe you can give me some directions...

@ about my application...
- created by combining Watcom C and DOS32/A.
- written for running on DOS mode( not on OS mode )
- with DOS32/A now I can access >1M memory and allocate large memory to use...(running in flat memory mode !!!)

@ current issue...
- I want to write an ISR(interrupt service routine) for one PCI card. Thus I need to "hook" the HW interrupt to test...
- For example, the PCI card's interrupt line(0x3C) = 0xE in DOS mode. That means this device will issue interrupt via 8259's IRQ 14.

But... I did not how to achieve my goal to hook this interrupt in "flat mode" ?

@ reference I found...
- in watcom C's library doc, there is one sample using _dos_getvect, _dos_setvect, and _chain_intr to hook INT 0x1C...I tested this code and found OK.

But when I apply it to my case: INT76 ( where IRQ 14 is "INT 0x76" due to (14-8) + 0x70 )then nothing happened...

* I have checked HW interrupt is truly generated but my own ISR did NOT invoked...

Do I lose something ? or are there any functions I can use (in DOS32/A) to achieve my goal ?
 
P

Paul N

Dear all,
I have a question about how to hook HW interrupt in flat memory mode...Maybe you can give me some directions...

@ about my application...
- created by combining Watcom C and DOS32/A.
- written for running on DOS mode( not on OS mode )
- with DOS32/A now I can access >1M memory and allocate large memory to use...(running in flat memory mode !!!)

@ current issue...
- I want to write an ISR(interrupt service routine) for one PCI card. Thus I need to "hook" the HW interrupt to test...
- For example, the PCI card's interrupt line(0x3C) = 0xE in DOS mode. That means this device will issue interrupt via 8259's IRQ 14.

But... I did not how to achieve my goal to hook this interrupt in "flat mode" ?

@ reference I found...
- in watcom C's library doc, there is one sample using _dos_getvect, _dos_setvect, and _chain_intr to hook INT 0x1C...I tested this code and found OK.

But when I apply it to my case: INT76 ( where IRQ 14 is "INT 0x76" due to(14-8) + 0x70 )then nothing happened...

* I have checked HW interrupt is truly generated but my own ISR did NOT invoked...

Do I lose something ? or are there any functions I can use (in DOS32/A) to achieve my goal ?

You may get better results asking in comp.os.msdos.programmer. It
doesn't seem to be entirely dead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top