Skip to content

NTBBloodbath/nasm-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nasm exercises

This repository contains miscellaneous Assembly programs I wrote for learning Assembly that can be assembled using NASM.

All programs found in this repository are specific to Linux (maybe they can also work in MacOS, but I can't test it) and the x86_64 architecture.

Directories structure

  • src/ - The Assembly programs source files.
  • bin/ - Where the assembled and linked programs will reside.

Building

Requirements

  1. As you can see above, you need a Unix system (e.g. Linux) to run these ASM programs.

  2. Since the programs needs NASM you will need to install it. You can find installation instructions in the homepage.

  3. GCC Compiler tools (for ld).


Once you have all the requirements, you can proceed to assemble the programs.

# Example, for building and running hello world program

# -f    Output file format, elf64: Linux x86_64
# -g    Generate debugging information
# -F    Debugging format (output format dependent)
nasm -f elf64 -g -F DWARF ./src/hello.asm

# -e    Set start address
# -o    Set output file name
ld -e main -o ./bin/hello ./src/hello.o

./bin/hello

NOTE: this example will change in the future.

Resources

The resources and tutorials I'm using to learn Assembly.

X64


License

All the programs found in this repository are licensed under MIT license.

About

Some NASM exercises I'm writing to learn ASM because I don't care about my mental health

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published