Skip to content

ZeroDayArcade/x86-64-assembly-macos-hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x86-64-assembly-macos-hello-world

A "Hello World" example in x86-64 assembly for macOS

Follow along the full tutorial: Learn x86-64 Assembly for macOS: Hello World

The full tutorial includes core concepts in assembly and a line-by-line code explanation. You'll need to understand what the code means in order to write your own assembly code or to use your knowledge for reverse engineering. To simply assemble and run the program, open Terminal and follow the steps below:

Get the code

Clone this project:

git clone https://github.com/ZeroDayArcade/x86-64-assembly-macos-hello-world.git

cd into the project directory:

cd x86-64-assembly-macos-hello-world

Assemble the program

Assemble the code into an object (.o) file:

as hello_assembly.s -o hello_assembly.o

Create a UNIX executable with the object file using gcc:

gcc -o hello_assembly hello_assembly.o -nostdlib -static

Run the program

./hello_assembly

You should now see "Hello World" printed in the Terminal.


More Zero Day Arcade Tutorials:

🎓 zerodayarcade.com/tutorials