Language - Assembly (asm)

> Procedural Languages > Language - Assembly (asm)

1 - About

Assembly language is a low-level programming language. It's a the second generation of language just above machine language.

This language is a much more readable language than machine language because it assign names to:

  • operations (e.g.,add) called mnemonic
  • operands (e.g., $t0).
  • addresses (branches and jumps) called label

Hardware-specific features require writing assembly code.

The assembly code is compiled into a instructions (object code) by a program called an assembler.

Advertising

3 - Example

  • The instruction 000000101 will become the mnemonic hlt and will stop (halt) a computer.
  • On the Zilog Z80 processor, the instruction machine code 00000101, which causes the CPU to decrements the B processor register, would be represented in assembly language as DEC B.

More See Assembly - Grammar (Syntax)

4 - Why learning assembly ?

Learning assembly gives you a particular insight into how programmable device (and particularly a computer) works.

Assembly language is also the only tool, for implementing low-level component, such as:

  • and low-level kernel components. Example:
    • enabling and disabling interrupts,
    • enabling protected mode,
    • accessing the Control Registers,
    • creating a Global Descriptor Table

5 - Documentation / Reference

Advertising
lang/assembly/assembly.txt · Last modified: 2019/01/05 13:25 by gerardnico