Assembler: A Short Overview
Assembler: A Short Overview
A short Overview
Content
Language Levels
High
Assembler languages
Structure
Commands
Language Levels
High Level Language
Assembler Language
Machine Language
Micro
-programming
Hardware
Firmware
areas
Hardware independent
Assembler languages
Machine
oriented language
Programs orient on special hardware properties
More comfortable than machine code
(e.g. by using symbolic notations)
4
Machine code:
Set
Micro programming:
Implementing
of executing of machine
commands (Control unit - controller)
Machine command executed/shown as
sequence of micro code commands
Micro code commands:
Simpliest process controlling
Moving of data
Opening of grids
Tests
6
Machinecode language
Machinecode command:
Binary
Machinecode program
sequence
of machinecode commands
Machinecode language
Structure:
OpCode
OpAddress
Operationcode
Spezification of operands
Constants/register addresses/storage
addresses
Difference
machines
8
Machinecode language
Data transport commands
Arithmetic and logical commands
Process controlling commands
In-/output commands
Special commands
Disadvantage:
Difficultly
readable
No symbolic names(Mnemomics)
9
Assembler languages
10
Assembler languages
for assembler
Assigment of values/addresses(variables)
Definition of the programstart addresses
Allocating of memory for variables
11
Assembler languages-structure
<Label> <Mnemomic> <Operand> Comments
Label
symbolic
Mnemomic
Symbolic
Operands
Contains
description of an operation
Comments
12
Assembler Languages
- Machine Instructions
Operations(ADD,SUB,XOR,
administrative commands - EQU, shifting&rotation
commands)
Data transfer(load/save operations,
speicher<>register, register<>register)
Control commands(jump op. [un-]conditional
/relativ,control op. STOP)
In-/output commands
13
Instructions to assembler
Controlling
translation process
No creation of machine code
Affect creation of machine instructions
Types:
Program
organisation
equations and symbolic Addresses
Definition of Constants and Memory
Addressing
14
Arithmetic example:
Source
euqal
AX , BX, CX, DX, SI, DI, BP, SP
; arithmetic operations
ADD AX, BX
; AX := AX+BX
SUB AH,AL
; AH := AH - AL
MOV AL, CL
; AL := CL
INC CX
; CX := CX+1
DEC CL
; CL := CL-1
NEG CX
; CX := -CX
15
All purpose
Register
AX
AH
BX
BH
CX CH
AL
BL
CL
16
Zero
Carry
Sign
Trap
Interrupt enable
Direction
Overflow
17
Parity
Auxiliary carry
FLAG-Bits:
18
C Carry
A Aux. Carry
O Overflow
S Sign
Z Zero
P Parity
D Direction flag
I Interrupt
T Trap Flag
Missing flags:
V: Twos complement overflow indicator
H: Half Carry Flag
19
affects
----
O, S, Z, A, P, C
O, S, Z, A, P
O, C
S, Z, P, C
jumps
Example:
Mov AX, 0
CMP CX, 0
again: JZ end
ADD AX, CX
DEC CX
JMP again
end: NOP
20
(unconditioned jumped)
Sources
http://www.informatik.ku-eichstaett.de
/studium/skripte/ws0203/einf2/Vorlesung12.ppt
http://www-ist.massey.ac.nz
/GMoretti/159704/Lectures/1-Languages-Translation-&-Assemblers.pdf
http://www.mathematik.uni-marburg.de
/~priebe/lehre/ws0001/ti1/Skript/TechInf1Lo08.ppt
E:\temp\4.Semester\Intro into Dig.Computing\Doku\Befehlssatz.pdf
21
Thanks 4 ur Attention
Any further
questions
??
22