Page fault when returning from IRQ7 dummy

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
McZ

Page fault when returning from IRQ7 dummy

Post by McZ »

I have read in the FAQ that you may need a IRQ7 dummy so I have tried to implement one because I got a few IRQ7 calls recently but now I get a Page fault at 0x27 instead.

This is how I do:

Code: Select all

; 39: IRQ7
_isr39:
    cli
    push byte 0
    push byte 39
    
    push eax

    mov eax, 0x0B
    out 0x20, eax
    in eax, 0x20
    
    or eax, 0x80
    jz NotSet
    pop eax
    ret
    
NotSet:    
    pop eax
    jmp isr_common_stub
my asm skills isn't verry good at the moment, been to lazy ::)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Page fault when returning from IRQ7 dummy

Post by Pype.Clicker »

McZ wrote: now I get a Page fault at 0x27 instead.

Code: Select all

; 39: IRQ7
_isr39:
    cli
    push byte 0
    push byte 39
    
    push eax
    ...
    pop eax
    ret
guess why :P




still clueless ?
1. it's useless to call CLI in an irq handler if your IDT table is set up properly.
2. you push 3 words, and only pop 1
3. you try to exit an interrupt handler with RET instead of IRET
McZ

Re:Page fault when returning from IRQ7 dummy

Post by McZ »

oops :o missed that one.

not a good day to be coding when had a few (read many) drinks yesterday ::)
Post Reply