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.
redoyk20 wrote:But,i don't know how to fix 12th and 15th problems.
Learning more about NASM macros might help you figure out the 12th problem.
Learning more about the interrupt descriptor table might help you figure out the 15th problem. Take a close look at the difference between interrupt gates and trap gates.
It's important to understand the code you're writing when you're developing an OS.
redoyk20 wrote:But,i don't know how to fix 12th and 15th problems.
Learning more about NASM macros might help you figure out the 12th problem.
Learning more about the interrupt descriptor table might help you figure out the 15th problem. Take a close look at the difference between interrupt gates and trap gates.
It's important to understand the code you're writing when you're developing an OS.
Hello again,
I have some changes about 12th and 15th problems.Can you review it?Is those correct?
irq.s:20: You know you can just "push ds", right?
irq.s:31: You are not handing the registers over as arguments... oh, you apparently haven't fixed problem 11 yet. Suffice it to say, you should push the base address of the structure before calling and remove it from stack afterwards ("push esp" beforehand and "add esp, 4" afterwards) and change irq_handler() to take as first argument a reg_t* instead of a plain reg_t.
isr.s: I am having major deja vu right now. Is that the same file as irq.s, only with a few things changed? That is copy-shake-paste, which is a horrible way of writing any code. You should probably refactor that with some macros, at least.
In general: Why did you remove the macros in favor of expanding them? It makes your code less readable. Your previous version only had four bytes wrong ("ISR_NOERRCODE" instead of "ISR_ERRCODE" for ISR 17 and 30). But your code appears to be correct now.
nullplan wrote:irq.s:20: You know you can just "push ds", right?
irq.s:31: You are not handing the registers over as arguments... oh, you apparently haven't fixed problem 11 yet. Suffice it to say, you should push the base address of the structure before calling and remove it from stack afterwards ("push esp" beforehand and "add esp, 4" afterwards) and change irq_handler() to take as first argument a reg_t* instead of a plain reg_t.
isr.s: I am having major deja vu right now. Is that the same file as irq.s, only with a few things changed? That is copy-shake-paste, which is a horrible way of writing any code. You should probably refactor that with some macros, at least.
In general: Why did you remove the macros in favor of expanding them? It makes your code less readable. Your previous version only had four bytes wrong ("ISR_NOERRCODE" instead of "ISR_ERRCODE" for ISR 17 and 30). But your code appears to be correct now.
Hello null plan,
I have overlooked the 11 th problem. I tried to be different from James molloy so I removed the macros and wrote them separately for each irq and isr, adding comment lines. I sent a pr based on what he said.Thank you! https://github.com/jupiteer/JupiteerOS/ ... 18fe0ceb8e
I'm an amateur programmer trying to write OS. I would be glad if you can report any other problems and errors that attract your attention. Have a nice day!