Page 1 of 1

PIC problems

Posted: Tue May 26, 2009 1:48 pm
by kmtdk
Hi all.
well
this little thing (PIC) has always given me trouble, and still does.
all irq works before i remap, but as soon as i have remaped, and undmasked all int ( enabled), nothing get though.
Just to be sure, i have remapped all IRQ's to some test handlers, witch never gets called..
so why wont the PIC not allow any commands ??


the code is 99% the same as the tutorial (i know, but you cant realy change that), brokenthorn (Neon)

a hint or any clue and i would be so GLad ( last time i tried this pice, it did the same) :|

kmt dk

edit:
i works if i call the IRQs directly,

i have testet it on RHW, and bochs, and both does not like it ..

Re: PIC problems

Posted: Tue May 26, 2009 4:00 pm
by Combuster
Oh god, danish comments..... :shock: :D

I think I traced your bug to the enabling of interrupts - you read the second port and assume its the interrupt mask, however its giving you the interrupt request mask, which is a whole different story.

You should keep a local copy of the interrupt mask, update that, then send it rather than attempting to read its previous value from the PIC

Re: PIC problems

Posted: Wed May 27, 2009 3:27 am
by kmtdk
I think i know the error now ( thanks for the replay ( you could also have said OCW 3 insted :D))

so that is what the tutorial misses( brokenthorn (neon's)) [how could i have overlooked the line "after initalizing, the IRR is set"]

KMT dk