Posts

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.

Why is "0x55aa" the name of this blog?

Why is this the name of this blog? What does it mean? Today we are going to be answering those questions. 55aa is the "boot signature" for the bootsector. This can be confusing. A boot sector is the part of a persistent data storage device(ex. a hard disk) which contains machine code to be loaded to the RAM(Random Access Memory) and then executed. But how does the computer know that it is a bootsector? That's where the boot signature comes in. The computer only checks the first 512 bytes of the storage, and if it ends in "55aa", it recognizes it as a boot sector, so it moves it to the RAM and executes it. But why  "55aa" and not any other number? Well, the answer is very simple. "55aa" is an hexadecimal number(that's why we write "0x" at the start, to tell the computer that we are writing a number in hex), and in decimal it is 21 930. And in binary it's 0101 0101 1010 1010(again, before that we must put 0b, so the computer r...

Chat-GPT vs Bard: Which is better?

Right now we are living a very quick evolution of AIs.With the recent release of Chat-GPT 4 and the announcement of Bard, Google's AI counterpart. But which one is better? One of the main differences is that Bard is meant to be implemented into the Google search engine, so the answers have to be simple and concise Another difference is that Chat-GPT knows more languages than English, while Bard only knows English right now, Another thing is that some people want to stop Chat GPT 5's development, which may benefit Bard and other Artificial Inteligences. In conclusion, I think Chat-GPT is better, but Bard  seems to focus more on speed rather than quality and it hasn't released officially, so it's hard to tell which one is going to be better.     

Why are computer "bugs" called that way?

Have you ever wondered why computer bugs are called that way? Some of you may already know it, but it turns out that it was an actual bug! In 1947, some computer scientists on Harvard opened the Mark II computer when it was delivering consistent errors.When they opened it, they found a moth inside that had broken some components of the computer.  One of the computer scientists was Grace Hopper, who made the incident famous and was one of the first computer programmers. Since then, when there was something wrong with a computer, we say it has a "bug".

First post!

Hi! In this blog I'm going to talk about programming in general. I plan on talking about webpages, AIs, Operating Systems, history of computers, etc.