Kevin wrote:
I seem to remember that James once gave a very permissive license for all of his tutorial code, but I don't remember the details. I don't know about the other tutorial.
I have sent JamesM a PM asking about the license, waiting for a reply.
Kevin wrote:
In any case, it's better to understand what needs to be done and write the code to do it all by yourself.
For simple things like printing colored text, that's not so difficult, and even I could do it on my own.
However when it gets to loading the GDT and IDT and generating the code for IRQ's and ISR's, that's suddenly nasty. And it feels like reinventing the wheel, together with small things like the
linker.ld script. So honestly I just copy-pasted those parts.
sortie wrote:
It would defeat the purpose if you couldn't use the tutorial code as your own.
Indeed, it would. However the tutorial code should have a license to clarify how it can be reused.
sortie wrote:
In these cases, please completely disregard those tutorials. The code isn't that good. They are old and do not contain any of the experience the community has learned over the past years, they'll give you trouble and bad advise. I suggest you read
http://wiki.osdev.org/Bran%27s_Known_Bugs and
http://wiki.osdev.org/James_Molloy%27s_Tutorial_Known_Bugs to undo the damage that may have occurred.
Thank you for the links.
Regarding possible bugs, I had to fix the
linker.ld script to prevent Grub from giving Error 13, but I'm not sure if that's a bug in the original Molloy tutorial or in an early Grub which I was using (pre 0.97). If nobody else had this problem then it's probably just me.
sortie wrote:
The osdev wiki may not be a complete replacement for those tutorials, if that is the case, please notify me what you would like to see, and I'll write a wiki article on the matter.
I will just say that setting up the GDT and IDT feels like homework more than anything else.
There's a discussion to be had about why (not) to use bit fields in the GDT, but for actually loading it it's better to just copy-paste somebody else's tested code, IMO.