Skip to content

Dpbm/learning-assembly

Repository files navigation

matrix

Learning Assembly

Take a look at my assembly apprenticeship.

In this respository I'll seeall my tests during my assembly apprenticeship. If you want to learn it too, take a look at the following references:

also google and chatgpt are some pretty good tools to understand better some commands, registers, etc.

How to run the code

To test these asm codes, I'll need to have installed:

  • nasm (assembler)
  • ld (linker)

Note: I'm using linux here, so maybe you'll need a different compiling and linking command to run this porperly!

For debian based linux distros, you can run:

    sudo apt update
    sudo apt upgrade
    sudo apt install binutils nasm

To install them.

Also, if you use asdf, I made a plugin to install nasm easily, just jump to my repo and follow the instructions.

Finally, if you want to test the riscv part, it's a good idea to upload the source files to this online simulator.


After that, You can use the run bash script as the following:

    chmod +x ./run
    ./run arquivo.asm

Another alternative for it, is using the make command.

case you don't have it installed:

    sudo apt update
    sudo apt upgrade
    sudo apt install build-essential make 

and then run:

    # the filename without the .asm extension
    make filename=filename