OSventures, part 2 
Since last blog post a lot has happened. First off, I was really busy for the few last months writing my master's thesis, so I haven't progressed on my OS or other projects at all. But finally, I got everything worked out and I graduated as M.Sc. in electrical engineering on 2013-12-04. After that, I have picked up the OS book again to continue the challenge.

So, last time I was trying to use GNU tools only for the projects in the book. After the break I felt that I was going nowhere with that and decided to go with the tools provided with the book for now. That way I could learn about programming OSses and could learn how to compile it on more general tools later (since compiling is the boring part anyways).

To use the precompiled tools, I only had to do some adjustments to the Makefile of the project, to use wine and replace some copy commands with GNU/Linux alternatives. Then I readily went onwards to do some graphics using the basic VGA, 8-bit 320x200 mode. (the book goes for the graphics first, since, well, it's fun to see the results on the screen and learn the smaller details on the way).

After setting up the palette, I made some simple line and square drawing. One of the interesting things there was how to draw lines, so I headed to wikipedia and found an usable algorithm, called the Bresenham's line algorithm, and it was easy to understand and implement in C by looking at the pseudocode.

Here's a screenshot of the program drawing the Finnish national flag, paying respect to the indepence day on 6th December:


[ add comment ] ( 1582 views )   |  permalink  |  print article  |   ( 3 / 2510 )

<Back | 1 | 2 | 3 | Next> Last>>