The assembly materials in this repo used to be taught in 32-bit assembly. This is not used anymore (we use 64-bit), but it is included here for historical purposes.
- 32 bit materials: 32 bit assembly slides
- The x86 book chapters on x86 and the C calling convention as the reading
- Source code
- The generated assembly was generated using
make asm
, which uses gcc/g++; to generate it using clang/clang++, use the 'asmclang' target - Makefile (src)
- Absolute value example: test_abs.cpp (src), test_abs_c.c (src), test_abs.s (src), test_abs_c.s (src), test_abs-non-intel.s (src)
- Fibonacci example: test_fib.cpp (src), test_fib.s (src)
- Max example: test_max.cpp (src), test_max.s (src), test_max-O2.s (src), test_max-noextern.s (src)
- String compare example: test_string_compare.cpp (src), test_string_compare.s (src)
- The generated assembly was generated using
- The tutorial for lab 8 (md)
- Tutorial 8 is nasm, which consists of two PDF book chapters that are contained in this repository: x86 Assembly and The x86 C Calling Convention; the contain more examples of assembly code
- You can skip a few of the sections (feel free to look at them if interested, but they are not needed): Floating Point Instructions, SIMD Parallelism, Saturated Arithmetic, and Graphics.