Assembly Language

Types of computer codes, from more computer-friendly to human-friendly:

  1. Machine code
  2. Assembly language
  3. Source code

Assembly language is sometimes known as assembler language or symbolic machine code, and commonly abbreviated with the acronym ASM.

Early computer programs were written in assembly language, as programming languages did not exist yet.

Assembly language is unique for each processor architecture (x86, ARM, ARM64, etc.). Portability of assembly languages is complicated.

However, some syntax is common to different architectures, such as the AT&T syntax. On the other hand, other syntax are specific to an architecture, such as the Intel syntax for the x86 architecture.

Assembly language is relevant even nowadays in the following computer science fields:

  • Compilers (and related toolchains)
  • Reverse engineering
  • OS kernel development
  • Very low level embedded programs

An assembler is a computer program that translates assembly language to machine language.

Assembly Language and OSs

There are some assembly language calls that are universal for all OSs and other that are OS-specific.

Universal aspects:

  • Registers
  • Basic instructions
  • Math/logic operations

OS-dependent aspects:

  • System Calls: How to print, read files, allocate memory.
  • Direct hardware access: e.g. writing to the video card.
  • Memory/ABI (Calling Conventions): Register usage, stack rules.
  • Executable Structure: Headers, sections, linking.

List of Assembler Programs

Assemblers:

  • MASM
  • TASM
  • NASM
  • fasm
  • YASM
  • GNU Assembler

The one that seems to be more popular is NASM.

MASM

Microsoft Macro Assembler (MASM) was an assembler developed by American company Microsoft. It was first released in 1981.

It is proprietary.

Microsoft Macro Assembler at Wikipedia

The video game Roller Coaster Tycoon was developed in assembly language using MASM.

TASM

Turbo Assembler (TASM) was an assembler for x86 MS-DOS developed by American company Borland. It was first released in 1989.

It is proprietary.

TASM at Wikipedia

NASM

Netwide Assembler or NASM is an assembler used to write assembly language code for various architectures.

It supports the x86 processor with Intel syntax.

It is FOSS.

NASM official website

fasm

Flat Assembler or fasm is a Free Open-Source Software (FOSS) assembler known for its flat memory model and simplicity.

It supports the x86 processor with Intel syntax.

Official website

YASM

YASM supports the x86 architecture with Intel syntax.

GNU Assembler

The GNU Assembler supports the x86 architecture with both the Intel and AT&T syntax.

Assembly Languages for specific Processor Families

Assembly language are very close to the processor architecture. Because of this, an assembly language is aimed to a specific processor family.

In addition, there are many possible assembly languages for a given processor family.

x86 Assembly Language

You can read this post about x86 assembly language.

You might also be interested in…

Leave a Reply

Your email address will not be published. Required fields are marked *