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.
character-stats— stats of different sizes added together withmovzx/movsx; functions return their result inEAX.comparisons—maxOf,minOf, and boolean comparisons (isEqual,isGreater, ...) built withcmpand conditional jumps.loops—sumTo,factorial,countEven,power, built with a label and ajmpback up.call-stack—addSquaresandcubecallingsquare, withcall, the stack,push/pop, andexternbetween files.
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 /cassembles the.asminto an.objclcompiles the C++ and links it with the.obj- the last line runs the program
- MASM (
ml64) and MSVC (cl), from Visual Studio - Windows x64