Skip to content

About

My personal training repo for learning x86-64 assembly language with MASM on Windows.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

learning-masm-x64

My personal training repo for learning x86-64 assembly language with MASM on Windows.

I'm following The Art of 64-Bit Assembly by Randall Hyde. Each folder is a small exercise I wrote to practice what I learned. The assembly functions are called from a short C++ program that prints the results.

Exercises

  • character-stats — stats of different sizes added together with movzx / movsx; functions return their result in EAX.
  • comparisons — maxOf, minOf, and boolean comparisons (isEqual, isGreater, ...) built with cmp and conditional jumps.
  • loops — sumTo, factorial, countEven, power, built with a label and a jmp back up.
  • call-stack — addSquares and cube calling square, with call, the stack, push / pop, and extern between files.

How to build

Open x64 Native Tools Command Prompt for VS, go into an exercise folder, then:

ml64 /c file.asm
cl /EHsc main.cpp file.obj
main
  • ml64 /c assembles the .asm into an .obj
  • cl compiles the C++ and links it with the .obj
  • the last line runs the program

Tools

  • MASM (ml64) and MSVC (cl), from Visual Studio
  • Windows x64

About

My personal training repo for learning x86-64 assembly language with MASM on Windows.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages