As an extension to previous part intel x86 16bit OS boot loader, the second stage was to push what I had created into a 32bit system. Furthermore this meant pushing into low level C programming up from assembly. I was challenged by the fact that our lecturer gave us the task to appropriately manage kernel memory separately, and create access violations if we did not correctly send interrupts to the kernel from ring 3 to ring 0. This basically means the user level should not be able to directly play with the kernel level.
I ended up directly injecting assembler code from C to create a system API and a VGA API. This took care of how the registers saved passed parameters on the stack before calling the appropriate interrupt handlers. I have a demo of my work here.
To note, my lecturer is called Wayne - I had a little fun with my VGA driver and it's features!
As you can see, I took everything I had learned from my graphics programming experience and applied them here. The VGA driver implemented features to draw and fill polygons and circles with different lines and patterns. This meant using algorithms such as Bresenham line drawing, Scanline and even Flood Fill. Additionally I took it upon myself to give a go at implementing a 256 colour palette with the ability to Lerp colours.
Needless to say, my project was a success and really showed me how to manipulate computers down to the bare levels of the operating system with assembly code.
If you are interested further, the source for the project is on my github page and I am happy to answer any questions via email.
Comments