Code Monkey home page Code Monkey logo

asm-test's Introduction

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.

asm-test's People

Contributors

fl2mex avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.