small IDT kernel, djgpp.
small IDT kernel, djgpp.
Hi!
I've been trying for a month now to get IRQ support to my os (keyboard support), but I can't make it work =/
Now I wonder, does anyone out there have a nice and small 32bit protected mode kernel that does nothing, but IRQ's are working?
I'm using djgpp, and I would be glad if it could compile under djgpp
I've been trying for a month now to get IRQ support to my os (keyboard support), but I can't make it work =/
Now I wonder, does anyone out there have a nice and small 32bit protected mode kernel that does nothing, but IRQ's are working?
I'm using djgpp, and I would be glad if it could compile under djgpp
Re:small IDT kernel, djgpp.
Have you enabled the IRQ's after disabling them when you remapped the PIC?
Try to just print a message on the IRQ 1 just saying that a key was pressed and then work up form there. (Thats how i did it).
Try to just print a message on the IRQ 1 just saying that a key was pressed and then work up form there. (Thats how i did it).
Only Human
Re:small IDT kernel, djgpp.
my.execpc.com/~geezer/osd
Download the kernels. I think the most basic one with IRQs is OSD7
Download the kernels. I think the most basic one with IRQs is OSD7
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:small IDT kernel, djgpp.
agree with pete. Get a working small kernel (geezer's one should be fine for this) and check yours is not missing a crucial point ...
things you must do:
1. remap the PIC so that it does not interfere with any other thing. see the 8259a documentation on OSRC for details
2. install a valid IDT (program the IDTR register with LIDT ... see the Holy Intel Manual for details)
3. install valids descriptors in this IDT. At this point, you should be able to check that the interrupts can be called by software using INT nn instruction
4. unmask the interrupts you need. Make sure you unmasked them properly by reading the mask back and displaying it on screen. People tends to clear only the last interrupt they want to enable rather than accumulating them (check irqCheckEnabled)
5. make the CPU respond to IRQs from the PIC with the STI instruction.
More detailed tutorials should be available on Bona Fide page.
things you must do:
1. remap the PIC so that it does not interfere with any other thing. see the 8259a documentation on OSRC for details
2. install a valid IDT (program the IDTR register with LIDT ... see the Holy Intel Manual for details)
3. install valids descriptors in this IDT. At this point, you should be able to check that the interrupts can be called by software using INT nn instruction
4. unmask the interrupts you need. Make sure you unmasked them properly by reading the mask back and displaying it on screen. People tends to clear only the last interrupt they want to enable rather than accumulating them (check irqCheckEnabled)
5. make the CPU respond to IRQs from the PIC with the STI instruction.
More detailed tutorials should be available on Bona Fide page.
Re:small IDT kernel, djgpp.
I've done all that, and osd is a jungle of files.
I can call my interrupts with the INT opcode.
I can call my interrupts with the INT opcode.
Re:small IDT kernel, djgpp.
You won't find any cleaner code.I've done all that, and osd is a jungle of files.
What's so messy. About 5 kernel source files in OSD7 directory. 12 include files in the INC of which OSD7 only uses a few. A bit more in the LIB directory but not all of that is used. And there's even a makefile in the OSD7 directory for DJGPP or Linux. If your code was much sipler than that then you were probally missing a bit
Cheers
Pete
Re:small IDT kernel, djgpp.
I can't make it compile, because there's only makefiles.
No dos-batch =/
No dos-batch =/
Re:small IDT kernel, djgpp.
Get DJGPP make and other gnu utilities. They should be available from where you got DJGPP.
Re:small IDT kernel, djgpp.
If you're using Windows, better to use Cygwin or Mingw. They will be faster and less hassle to use (i.e. they work out of the box).
Re:small IDT kernel, djgpp.
Okey, I've got make and other stuff now.
$ make d:/kernels/osd/dj.mak
make.exe: Nothing to be done for `d:/kernels/osd/dj.mak'.
Nothing to be done??
$ make d:/kernels/osd/dj.mak
make.exe: Nothing to be done for `d:/kernels/osd/dj.mak'.
Nothing to be done??
Re:small IDT kernel, djgpp.
Rename dj.mak to 'makefile' (no extension) and then go into the directory and from command prompt just type make.
I'd recommend building each kernel sepeerately by the same process. With DJGPP i had to copy th e version.h include from th DJGPP include directory to the OSD/inc/sys folder
I'd recommend building each kernel sepeerately by the same process. With DJGPP i had to copy th e version.h include from th DJGPP include directory to the OSD/inc/sys folder