Bona Fide OS Development
http://forums.osdever.net/

Unix Style Inerrupts
http://forums.osdever.net/viewtopic.php?f=15&t=365
Page 1 of 1

Author:  Primis [ Tue Jul 06, 2010 11:50 am ]
Post subject:  Unix Style Inerrupts

I was reading a tutorial about interrupt that use the registers as the passing arguments, and I am aware of the inefficiencies that may come from this (take a look at the linux print function). So I was wondering if it is possible to have unix style interrupts where the arguments were passed to the stack. I was thinking about it, but I'm not sure how it would be done, considering that you can mess up the stack because the callback memory location is stored there. Any help would be nice.

Author:  brenden [ Mon Mar 07, 2011 5:34 am ]
Post subject:  Re: Unix Style Inerrupts

I've not done it myself, bu t in theory it is similar to a context switch as done with threads.

You would save the state of the CPU and its registers and especially the stack pointer. Then you would point the stack to your interrupt code's stack and reload the CPU state that was saved before and continue where you left off. Does that make sense?

PS - what's up with your signature banner?

Author:  Primis [ Mon Mar 07, 2011 7:15 pm ]
Post subject:  Re: Unix Style Inerrupts

Wow, Really fast on that reply. As for reading them, I found out its just a matter of using the stack pointer appropriately. On the other side of things my signature is two parts: part one is a binary joke (you see, 10 in binary is 2) and the other part is a meter of how many people have given me an internet, its like a props meter, feel free to give me one. Its free, easy, and doesn't require any type of registration.

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/