Page 2 of 2
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 12:16 pm
by jrfritz
How can you load 0x10000 if the last 0 is over the size of bx can hold?
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 12:17 pm
by hanoi
es = 0x1000
bx = 0x0000
real mode to physical address:
segment * 0x10 + offset
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:09 pm
by hanoi
Could you please help me?
It's really annoying not to be able to write more when some stupid things do not work.
thanks
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:13 pm
by jrfritz
Try making a 2nd stage loader and make a IRQ0 stub in a NASM 2nd stage loader...
C still adds stuff even in your asm(...) function....right?
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:14 pm
by hanoi
I've tested it with an external asm file.
This didn't work.
afaik gcc doesn't add something to asm functions added with asm()
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:32 pm
by Slasher
hi,
your frquency is too high!!!
its suppose to be 0x1234DD = 1193181 NOT 1193182 = 1234de!
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:40 pm
by hanoi
i changed that.
it still doesn't work

Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:48 pm
by Slasher
then its 2 things
either the pic reprogramming is not correct
or the set timer frequency function is not correct
paste the code (put them all in a file and attach it) that involves the pic reprogramming,set timer and idt setup codes. thats how we can help
Re:timer(IRQ 0)
Posted: Thu Jan 02, 2003 2:51 pm
by hanoi
:DDDDD
It works now.
I am _really_ stupid.
I thought i had to send 0 to port 0x20 to allow interrupts from all IRQs.
It was 0x21 :/
sorry that i have wasted a thread.
thanks for supprt/help.