David Kreitzer and Max Domeika
Assembly Language is a representation of the machine language that executes on a given architecture. Reading and understanding IA-32 and Intel® 64 architecture assembly languages are difficult tasks. Embedded software engineers are daunted by the sheer longevity of the instruction set and breadth that includes:
• 8-bit, 16-bit, 32-bit, and 64-bit general purpose register sets
• Variable length instructions
• Multiple instructions that perform the same action
• Aggressive compiler optimization
• New instructions and register sets
• x87 floating point
Regardless, there are times when an embedded software engineer needs to look at the disassembly of an application binary or the source code compiled into assembly to perform debugging or performance tuning. This paper equips the reader with the competence necessary to perform these actions.
First, architecture basics are detailed with information on the register sets, data types, and memory and instruction formats. Next, instruction set extensions are detailed, which include Intel® Streaming SIMD Extensions (Intel® SSE) and Intel® Advanced Vector Extensions (Intel® AVX). The third section shows how to effectively generate and read assembly language. The final section provides an analysis of a small C program compiled to assembly language.