How to prepare for developing an operating system?

First, you must understand all programming languages, such as Pointers, functions (for C++); Secondly, we must have an understanding of assembly language.

What tools do you need to develop an operating system?

  1. Assembler:

The assembler takes assembly code and gives you low-level output, such as objects that contain controls on CPU registers. The assembler used in this article is NASM (Netwide assembler), which can be downloaded from nasm.us.

2. Cross-compilers: To develop an operating system, you must have a cross-compiler because you must compile the kernel against its executable format. Use GCC (gnu compiler collection) here, which you can download from gcc.gnu.org/.

3. Linker: The linker takes your object and links it to the getter, in this case using GNU Binutils, available from gnu.org/software/bi…

4. Virtual Machine: To test the operating system, you must have a VM (virtual machine), but this is not required. Use VirtualBox here, which can be downloaded from virtualbox.org/.

1. When developing an operating system, you cannot use ,,,,,<windows.h>, <unistd.h> and all the platform apis’s, you have to create all these things yourself.

2. You have to be very, very careful. At development time, you are in control, so you can destroy one or some or all of your hardware. In this case, I recommend using a virtual machine to test your operating system rather than multiple restarts.

The boot loader is a stack of code written in assembly language that must be 512 byets (1 sector) and that loads the kernel of your operating system. Let’s skip this section and use GRUB as the bootloader, which you can download from gnu.org/software/gr…

A Simple Kernel We were developing an operating system, so we had to create the functionality ourselves. First, we create a file with boot.asm: code link: cpp.sh/6zu cpp.sh/9uw

Create a file with the following contents: linker.ld

How to compile

Go to the shell (cygwin is required on Windows) and type the following command:

A: congratulations!

Your first operating system compiled successfully!

Now you can create images using GRUb-mkrescue:

Create directory: iso

In that directory, create another directory: boot, and then in the boot directory, create directory: grub, and then in the GRUB directory create a file: grub.cfg that contains the following (do not add curly braces to the new line) :

Then copy your kernel (kern) to the ISO/boot directory and run your shell again:

Switch to the kernel’s home directory and type:

Now you can boot from your first operating system and have fun: a simple kernel with nothing in it.