Skip to content

Instantly share code, notes, and snippets.

@circlePulse
circlePulse / x86_64_on_apple_silicon.md
Last active September 8, 2025 09:06
Running x86_64 Assembly on Apple Silicon Machines

Running x86_64 Assembly on Apple Silicon Machines

By Omar Hboubati

Introduction

This is a tutorial for running x86_64 on a Mac with Apple Silicon. These instructions work for me on a MacBook Pro M1 with Visual Studio Code, but there's no guarantee they will work on every machine. What we're doing is converting a .asm file to an x86_64 machine code file on our machine using nasm and x86_64-elf-gcc. Then, we copy that file to a Docker Ubuntu container, where we run the file.

Installations

Docker