Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Combuster wrote:Rdos just defined adding or removing code as being no change.
GTFO.
Could you please learn to read.
When adding a new handler, which is when I add more code, I only append the new handler at the end, and setup a new code selector. This also does not change the code. The code (as in instructions) is not modified in any way.
In a flat memory model, there is no position independence
Lies. GTFO.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
So your argument is invalid. GTFO.
So YOU can't read. GTFO.
I can keep doing this for an eternity.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
AJ wrote:This all seems a bit hackish - why not just use a macro to define your interrupt stubs (as suggested above?).
This is a speed optimization. You create the content of the stub depending on what it would do. Instead of letting the stub push the interrupt vector (or possibly global interrupt number if you have dynamic IDT setup), you let the stub directly call the handler. It works best in a segmented memory model as it reduces segment register loads, but it might very well work better in a flat memory model as well, but then there will be different tuning aspects. One thing that must be solved is position independence. You could patch the code itself to fix that. For instance:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]