Questions about this topic? Sign up to ask in the talk tab.

Difference between revisions of "Assembly"

From NetSec
Jump to: navigation, search
(Introduction)
Line 1: Line 1:
 
{{inprog}}{{prereq|[[bitwise math]]}}
 
{{inprog}}{{prereq|[[bitwise math]]}}
 
== Introduction ==  
 
== Introduction ==  
== assembler == An assembler in Assembly language refers to an application that converts assembly instuctions into opcodes to create object code.
+
* assembler
 
* linker
 
* linker
  
Line 7: Line 7:
 
* Link-time: Flat binary of opcode sequence -> executable file format for OS
 
* Link-time: Flat binary of opcode sequence -> executable file format for OS
 
* Runtime: Opcode Sequence -> hardware gates (may interact with ram etc)
 
* Runtime: Opcode Sequence -> hardware gates (may interact with ram etc)
 
  
 
== Binary ==
 
== Binary ==

Revision as of 06:24, 20 May 2012

RPU0j.png
Assembly is currently in-progress. You are viewing an entry that is unfinished.
Assembly requires a basic understanding of bitwise math


Introduction

  • assembler
  • linker
  • Assemble-time: Assembly & operands -> Opcode Sequence
  • Link-time: Flat binary of opcode sequence -> executable file format for OS
  • Runtime: Opcode Sequence -> hardware gates (may interact with ram etc)

Binary

  • counting
  • endianness
  • nybble
  • byte
  • word
  • dword
  • qword


Number handling

  • signed
  • unsigned
  • 2's compliment


Data storage

  • register
  • pointer
  • sub-register
  • cpu flag registers
  • architecture-specific registers


Memory Addressing

  • stack pointer
  • instruction pointer
  • base pointer
  • addressing mode
  • index


Instructions

Syntaxes

  • Intel (dest, src)
  • ATT (src, dest)


Data manipulation basic primitives

  • mov
  • push
  • pop


Basic arithmetic

  • add
  • sub
  • div
  • mul


Bitwise mathematics operators

  • and
  • not
  • or
  • xor

Shifts and rotations

  • shl
  • shr
  • rol
  • ror

Control flow operators

  • cmp
  • jmp
  • call
  • ret

Taking it further

  • kernel interrupt
  • architecture
  • operating system