How do you create custom interrupts?

Topics: Developing Cosmos (Working on Cosmos source code directly), Using Cosmos (Developing your own OS, projects, etc)
Developer
Nov 28, 2012 at 11:50 AM

I want to create a custom interrupt that  goes off at a specific time period. How can i do that?

This custom interrupt is for multitasking.

Nov 28, 2012 at 3:09 PM
forest201 wrote:

I want to create a custom interrupt that  goes off at a specific time period. How can i do that?

This custom interrupt is for multitasking.


You have to do that in assembly. Cosmos does not have any effienct ways of writting to the IDT that I am aware of.

Nov 28, 2012 at 8:32 PM

X#

Nov 28, 2012 at 11:59 PM
jpal wrote:

X#

X# is broken in the standard release, (not the dev kit) and it is much easier to write in NASM than x#.

Nov 28, 2012 at 11:59 PM
jpal wrote:

X#

X# is broken in the standard release, (not the dev kit) and it is much easier to write in NASM than x#.

Coordinator
Nov 29, 2012 at 6:33 AM
easier to write but also a lot more easy to goof up..


On Thu, Nov 29, 2012 at 2:00 AM, GruntXProductions <notifications@codeplex.com> wrote:

From: GruntXProductions

jpal wrote:

X#

X# is broken in the standard release, (not the dev kit) and it is much easier to write in NASM than x#.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Nov 30, 2012 at 12:13 PM

What about IRQ0? I would like to use it instead of the custom interrupt. I would like it to send a interrupt let's say every 100ms? how can i do that?

Nov 30, 2012 at 10:19 PM
forest201 wrote:

What about IRQ0? I would like to use it instead of the custom interrupt. I would like it to send a interrupt let's say every 100ms? how can i do that?

IRQ0 is an interrupt, IRQ stands for interrupt request, just a regular interrupt that is triggered by hardware instead of software. Believe me, I did it, but its only possible through assembly hacks (and X#, but IDK how to use that...)

Coordinator
Dec 1, 2012 at 7:13 AM
IRQ0 is handled by c# code by default. I think it should be possible (it used to be) to implement additional interrupt handlers using c# as well..


On Sat, Dec 1, 2012 at 12:19 AM, GruntXProductions <notifications@codeplex.com> wrote:

From: GruntXProductions

forest201 wrote:

What about IRQ0? I would like to use it instead of the custom interrupt. I would like it to send a interrupt let's say every 100ms? how can i do that?

IRQ0 is an interrupt, IRQ stands for interrupt request, just a regular interrupt that is triggered by hardware instead of software. Believe me, I did it, but its only possible through assembly hacks (and X#, but IDK how to use that...)

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Dec 3, 2012 at 12:12 PM
mterwoord wrote:
IRQ0 is handled by c# code by default. I think it should be possible (it used to be) to implement additional interrupt handlers using c# as well..

  IRQ0(PIC1) is not enabled in PIC by default. IRQ2 is the one that is enabled which is PIC2. When i try to enable IRQ0 and any other interrupts, keyboard and any other  interrupts will stop working! To enable IRQ0 the mask for master PIC should be  0xF8 not 0xF9. PIC1 IRQ0 enable bit is "bit 0".

Coordinator
Dec 3, 2012 at 1:02 PM
that's because you override the default handlers then..


On Mon, Dec 3, 2012 at 2:12 PM, forest201 <notifications@codeplex.com> wrote:

From: forest201

mterwoord wrote:
IRQ0 is handled by c# code by default. I think it should be possible (it used to be) to implement additional interrupt handlers using c# as well..

IRQ0(PIC1) is not enabled in PIC by default. IRQ2 is the one that is enabled which is PIC2. When i try to enable IRQ0 and any other interrupts, keyboard and any other interrupts will stop working! To enable IRQ0 the mask for master PIC should be 0xF8 not 0xF9. PIC1 IRQ0 enable bit is "bit 0".

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Developer
Dec 6, 2012 at 11:42 AM

I got IRQ0 to work now after a few days of trial and error. NOW I just need a way to get the memory address of method in C#, then my preemptive multitasking will work.

Do you have any ideas how to get the memory address  of C# method?