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. Advertising

  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. Advertising

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. John J Lee
    Replies:
    3
    Views:
    470
    bruno at modulix
    Dec 1, 2005
  2. Edward Loper
    Replies:
    0
    Views:
    457
    Edward Loper
    Aug 7, 2007
  3. John J Lee
    Replies:
    0
    Views:
    511
    John J Lee
    Aug 7, 2007
  4. Edward Loper

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

    Edward Loper, Aug 9, 2007, in forum: Python
    Replies:
    0
    Views:
    425
    Edward Loper
    Aug 9, 2007
  5. Neal Becker
    Replies:
    0
    Views:
    376
    Neal Becker
    Aug 9, 2007
Loading...

Share This Page