
Member-only story
Writing an X86–64 Assembly Language Program
Part I: Getting Started Writing Assembly Language
This guide is part one of a series
- Part two: Getting Started Writing Assembly Language
- Part three: Printing Command Line Arguments
- Part four: Sending Function Arguments and Receiving a Return Value
- Part five: Conditionals, Jumping, and Looping
- Part six: How to Determine String Length
- Part seven: Quick Reference
This is a guide to setting up a low friction development environment to simplify writing and debugging assembly language programs.
Why Learn Assembly Language
He who hasn’t hacked assembly language as a youth has no heart
Learning assembly language improves one's foundational understanding of software. With improved fundamentals, you can judge the utility of upcoming technologies more accurately which I think is a super important skill set. Making the right bets on which technologies come to dominate means you can more optimally invest your time and even money. For example, it’s well known that those with a fundamental understanding of the cryptocurrency space immediately understood the value of blockchain and literally made millions of dollars with nearly no additional effort.
Also, assembly language it’s close to the hardware, and that’s fun.

Some Background
To run an assembly language program, first, the compiler creates an object code file (.obj). Next, the object code file must be linked into an executable. Linking can be done with the compiler or a separate linker process.
Preparation
Getting prepared to write assembly language can be a bit confusing. There are a number of tools that can compile and link assembly. It may not be obvious which tools work on a given operating system, which supports compiling to a machine binary that is compatible with a…