x86-64 Assembly: Local Variables, Stack Frames & Alignment Explained

x86-64 Assembly: Local Variables, Stack Frames & Alignment Explained

Learn how local variables are allocated on the stack in x86-64 assembly using YASM. See exactly how to reserve space, address variables with offsets, understand downward stack growth, and fix mysterious printf segfaults caused by 16-byte stack misalignment. Includes two alignment solutions and a complete working example with a local integer array.
x86-64 Assembly While Loops Explained Step by Step in YASM – From Concept to Working Program

x86-64 Assembly While Loops Explained Step by Step in YASM – From Concept to Working Program

This video teaches how to implement a classic while loop structure in x86-64 assembly language using YASM. We cover the conceptual mapping from C-style while(condition) { body } to assembly labels (while_top, while_body, while_done), conditional jumps (jne, je, etc.), and the unconditional jump back to the top of the loop. A complete runnable example repeatedly reads integers from the user and echoes them until 99 is entered.