Computer architectureLesson 1 of 2 in the course Instruction set architectures

Assembly Language: Instructions, Translation, and Practical Uses

5 flashcards · 5 quiz questions · 5 match pairs · 2 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Assembly language provides a readable, symbolic way to write instructions that closely correspond to a processor’s machine code. This lesson introduces its role between binary instructions and higher-level programming languages.

A processor executes machine code: numeric instruction patterns that specify operations and, where needed, data or locations. Assembly language represents many of these patterns with mnemonics, short symbolic names such as MOV or ADD.

All flashcards

Forward reference
A use of a symbol that appears before the symbol’s definition in source code.
Symbol table
An assembler’s record of symbols and their associated values or addresses.
Pseudoinstruction
An assembler-provided operation that may expand into one or more machine instructions.
Cross assembler
An assembler that runs on one system and generates code for a different target system.
Inline assembly
Assembly code embedded within a program written in a higher-level language.

Quiz questions

  1. How does an assembly directive differ from an ordinary processor instruction?Answer: The assembler processes a directive; the processor executes an instruction.
  2. A branch refers to a label defined later in the source. How can a multi-pass assembler handle this forward reference?Answer: It can record symbol values in an earlier pass and use them when generating code later.
  3. What generally happens when an assembler expands a macro invocation?Answer: The macro body is substituted into the source and its statements are assembled.
  4. What is a defining feature of a cross assembler?Answer: It runs on a host system and generates code for a different target system.
  5. When might an x86 assembler replace a long jump with a shorter relative jump?Answer: When the target is close enough for the shorter encoding to reach it.

Based on the Wikipedia article Assembly language, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Computer architecture lessons