This was developed following the blog post by Joe Bergeron, which can be found at Joe's Website.
In following this tutorial, I have learned about how to create a simple bootloader. This has included learning about:
-
How to use the free emulation software Bochs (including installation and configuration)
-
How to generate a binary from assembly code, .asm files (through the use of NASM)
-
What a bootloader is and how it is loaded and manipulated in memory by a computer
-
Segment Registers
-
Stack Pointers
-
Writing basic assembly code (such as writing functions, creating variables, pushing and popping a stack)
In completing this tutorial, I had to make a few amendments and overcome some challenges for it to work on my machine:
-
I had to become familiar with MSYS2 UCRT64 (terminal and operations) as I am using a windows machine rather than a UNIX based machine as used in the tutorial
-
This involved understanding which basic libraries my environment would require to run Bochs, such as:
- Essential build tools (granted by running pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain)
- Clang (pacman -S clang) since Bochs is based on C++ it needs to be able to run and compile C/C++ code
- Linux Commands Practice (such as tail, cat, ls, grep, export, which)
-
-
I had installed Bochs directly from the GitHub repository (instead of from the command line as does in the tutorial), following the user guide to configure, make, and make install Bochs onto my machine
-
The Bochs configuration file (bochsrc.txt) had to be edited to comply with file directory structures when downloading it through Git
-
Editing a user's .bashrc file to include a path to the system's VS code such that sourcing the terminal and then running "code ." will launch VS code correctly