fl2mex / ASM-Test

Learning x86 assembly, specifically for Systems Engineering

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASM-Test

Using this repo to learn my way around (x86 ftw) assembly, specifically in Systems Engineering.

Progress & Learning

Latest progress: Clean looking boot, refactored print, with a new hex print function!
Latest thing I learned: How to use macros, and using the stack.
Previous milestones:

  • Clean looking boot, refactored print, with a new hex print function! (Hey! That's this milestone!)
  • Abstraction of functions, print is now a seperate file!
  • Bootloader that prints Hello, World!
  • Bootloader that boots into Text mode!

An image from my latest milestone:
Bootloader that prints Hello, World!

Abandon Hope All Ye Who Enter Here

Assembly, especially for operating systems and systems eng. usually is looked down upon for beginners.
But alas, I, a beginner in ASM, am taking on this boring but fulfilling challenge. (emphasis on challenge!)
I think that setting a big, big project to complete over many months/years is a great idea, as long as you have other similar projects to bounce off of, so why not learn how to make an operating system at the same time as I learn how to program in ASM? I don't plan on becoming the next Linus Torvalds, but I do plan on learning a lot of assembly from this.

Software I'm using

I'm using NASM to compile my assembly code.
I'm using QEMU to run/emulate my code.

Building & Running

To build and run these programs, Make sure you have NASM and QEMU installed.
Then, you need to clone this repo, and run this command to build:
nasm -f bin -o boot.bin boot.asm
Then, to run the bootloader in qemu, run:
qemu-system-x86_64 boot.bin
If you're using VSCode, I have a build task set up for you, just press Ctrl+Shift+B and it will build and run the bootloader.
And off to the races you go! (other than changing boot to your desired file name, of course)

Resources to bounce off of when I get stuck

If this wasn't obvious already, these resources are not mine, and I do not take credit for them, nor can I guarantee that they are correct or safe.
To learn ASM, I found a tutorial playlist on YouTube, and The first link on google.
I have been using OSDev and This Russian site I found on Google and a lot of Wikipedia.
Another resource is This book and This git repo that has short step-by-step instructions.
Found another nice interrupt list here, I've actually been using this one a lot.
A cool blog I found, and a friendly discord server.

Another note

I'm using windows, which was my first mistake here, as QEMU doesn't play well, or at least the binaries that were given on the website. I tried compiling, and after a while, figured out that the DLLs were a bit funky. After a while of tinkering and getting close to caving in and downloading sketchy DLL files off the internet, I figured out that the version I downloaded was missing a DLL, and rightly stated so in the changelog. I downloaded the latest version, and it worked! I'm just going to leave this here in case anyone else has this problem.
Please, please use Linux if you're up to this task, it will make your life so much easier, from running the binaries, to compiling with other tools. I'm avoiding it for the time being until i'm happily proficient with Arch.

One more note

You should never, ever copy and paste code from anywhere, these resources are just to help you write your implementation. You should be writing your own code, even if it's uncanny how similar it is to these guides. You'll learn a lot from these guides, but you'll learn even more from experimenting and playing around with it!
Also safety blah blah blah never copy code unsafe blah blah blah

License

This repo, just like most of my other repos, is licensed under the GPL License.

About

Learning x86 assembly, specifically for Systems Engineering

License:GNU General Public License v3.0


Languages

Language:Assembly 100.0%