C++ and Assembler

Assembler is low-level programming language that can be used with C/C++ for several reasons, for example:

  • to see exactly how program was compiled so you can improve performance
  • to fix difficult to explain compilation errors (see UB) with disassembled code
  • to build parts of code in inline assembler - for performance or low-level programming

You don't have to know all the details associated with ASM when working inside C++ program, some basic knowledge is enough. Just note that ASM syntax can be different between CPU platforms and between different compilers.

Resources

Introductory materials

Inline assembly

Mixing C++ and assembly modules

Optimization

Share

follow