Hook HW interrupt in flat memory mode

Discussion in 'C Programming' started by liaoo, Jul 24, 2012.

  1. liaoo

    liaoo Guest

    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 ?
     
    liaoo, Jul 24, 2012
    #1
    1. Advertisements

  2. liaoo

    Paul N Guest

    On Jul 24, 4:15 am, liaoo <> wrote:
    > 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.
     
    Paul N, Jul 24, 2012
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave
    Replies:
    0
    Views:
    807
  2. =?Utf-8?B?TWF4?=
    Replies:
    0
    Views:
    564
    =?Utf-8?B?TWF4?=
    Feb 11, 2006
  3. Alex
    Replies:
    1
    Views:
    417
    Peter Hansen
    Sep 9, 2005
  4. Anthony Liu
    Replies:
    1
    Views:
    463
    Piet van Oostrum
    Nov 27, 2005
  5. John J Lee
    Replies:
    3
    Views:
    765
    bruno at modulix
    Dec 1, 2005
  6. Jerry
    Replies:
    3
    Views:
    631
    Jerry
    Aug 29, 2006
  7. Dhanvi
    Replies:
    2
    Views:
    650
    Alan Johnson
    Jul 23, 2005
  8. Edward Loper

    mmm-mode, python-mode and doctest-mode?

    Edward Loper, Aug 9, 2007, in forum: Python
    Replies:
    0
    Views:
    629
    Edward Loper
    Aug 9, 2007
Loading...