Demo programs in NASM (Assembly) for MacOS x86_64 (macho64)
- Some pieces of code are based on Assembly Programming Tutorial from Tutorials Point
- It works, but doesn't mean it's under the best practices of performance or styling (at least I tried)
- It's just a public study repository: Don't use my code for production purpose. Don't blame my person, please!
In order to compile this code, you need to:
- Install the latest version of
nasm
:
$ brew install nasm
- Install latest version of
make
:
$ brew install make
To compile code in src/
, just run:
$ make bin/<file_name>
For example:
$ make bin/hello # (without extension)
Your binary will be generated inside bin/
directory. To execute, just run:
$ bin/<binary_name>
in this example:
$ bin/hello
If you wish to report a bug or suggest any code improvement, create a new issue here. You will be very welcome!