Posts

Showing posts from May, 2023

Practical guide on making a bootloader

 Two posts ago I explained why 0x55aa is the boot signature. But how do we actually create a bootloader? Well, we can do it in only 3 lines. We are going to be using Assembly x86. Assembly is the most basic language before machine code. First, we jump(jmp) to the current address(represented by a dollar sign): jmp $ Then we are going to fill the rest 510 bytes with 0. We will do this using two dollar signs($$), which means the start of the section,which would be the start of the code. As we saw in the other post, we need to fill the 510 bytes using db(define byte) and reserve the last two to fill with 0x55aa. Our code would look like this: jmp $ times 510-($-$$) db 0 Lastly, we fill the last two bytes with 0x55aa jmp $ times 510-($-$$) db 0 db 0x55, 0xaa If we compile this with the NASM and use an emulator like QEMU to run it, we will see that it loads perfectly. But that isn't very interesting, is it? In the next post, we will print something to the screen.

Simplified history of Open GL

 In the 1990s, writing computer graphis could be a real challenge for developers. That's why a lot of companies wrote their own graphics libraries and worked with them as long as possible, for example, Nintendo had their own for every one of their consoles. Before creating Open GL, Silicon Graphics(the company that created Open GL) had also made IRIS GL, but their competitors pressured them into making Open GL, an open source version of IRIS GL, in an attempt to make them more relevant in the market. In 1995, Microsoft launched Direct3D which was and still is Open GL's main competitor. In 2015, Khronos Group, the current Open GL owner, launched Vulkan, a direct successor to Open GL. However, Open GL is still the most used API to everything in computer graphics, used in things like Unreal Engine and Unity. In my opinion, Open GL is great, but I also think Vulkan is starting to be a better approach to computer graphics.