Assembly - The Netwide Assembler (nasm)

Card Puncher Data Processing

About

nasm is an assembler that will compile assembly code in machine instruction.

Syntax

Assembly - Grammar (Syntax).

; Instruction Destination, Source
; example
mov ax, 9
; move/load the decimal value 9 into the ax register

More see https://en.wikibooks.org/wiki/X86_Assembly/NASM_Syntax

Utility

nasm -f format script.asm -o script

where:

  • -f option specifies the file format of the final output file. The value can be:
    • bin: pure machine code without any metadata such as in ELF

Script

bits 32

Documentation / Reference





Discover More
Card Puncher Data Processing
Assembler

A program called an assembler translates the text file with assembler code into binary strings that a device can understand See also the reverse action: An s may also support many pseudo-instructions....
Card Puncher Data Processing
Assembly - (Pseudo|Synthetic) Instruction

Pseudo-instructions are not real machine instructions. They are extended mnemonics that are not available in the original instruction set and are implemented by the assembler Many CPU's do not have...
Card Puncher Data Processing
Assembly - Getting Started

An Assembly language script is the input expected by an assembler (compiler). The assembler defines then the precise syntax of the script but every assembler share a common set of syntax rule. In...
Card Puncher Data Processing
Assembly - Grammar (Syntax)

in Assembly. An Assembly language script is the input expected by an assembler (compiler). The assembler defines then the precise syntax of an assembler script. Every assembler shares a common set...
Card Puncher Data Processing
Assembly - Text Section

Code segment (CS) (“text segment”, executable code) It defines an area in memory that stores the instruction codes. This is a fixed area. Nasm syntax: The declaration global _start defines the...
Cpu Moore Law Transistor
Bit - Binary Data (Structure)

Binary Data is a computer file that contains binary data (0 or 1) Binary data may be described: at the bit level (base 2) at the byte level (base 2 - 8 bit) at the hexadecimal level (base 16)...
Instruction Format Intel64 Ia32
Intel Instruction Interpretation

This section is based on the section 3-1 - interpreting the instruction pages reference of the intel documentation and used the jmp mnemonic as example. Definition: The jmp mnemonic transfers program...



Share this page:
Follow us:
Task Runner