Assembler A short Overview
Content <ul><li>Language Levels </li></ul><ul><ul><li>High Level    micro code </li></ul></ul><ul><ul><li>Machinecode lan...
Language Levels High Level Language Assembler Language Machine Language Micro -programming Hardware „ Firmware“ Normally d...
High Level    Micro Code <ul><li>High Level language </li></ul><ul><ul><li>Formulating program for certain application ar...
High Level    Micro Code <ul><li>Machine code: </li></ul><ul><ul><li>Set of commands directly executable via CPU </li></u...
High Level    Micro Code <ul><li>Micro programming: </li></ul><ul><ul><li>Implementing of executing of machine commands (...
Machinecode language <ul><li>Machinecode command: </li></ul><ul><ul><li>Binary word (fix length, causes elementary operati...
Machinecode language <ul><li>Structure: </li></ul><ul><ul><li>Operationcode </li></ul></ul><ul><ul><ul><li>Defining execut...
Machinecode language <ul><li>Data transport commands </li></ul><ul><li>Arithmetic and logical commands </li></ul><ul><li>P...
Assembler languages <ul><li>Translated into machinecode language(Interpreter) </li></ul><ul><li>Each operation code(opcode...
Assembler languages <ul><li>Usage of pseudo commands </li></ul><ul><ul><li>Commands for assembler </li></ul></ul><ul><ul><...
Assembler languages-structure <ul><li>Label </li></ul><ul><ul><li>symbolic labeling of an assembler address (command addre...
Assembler Languages  - Machine Instructions <ul><li>Bitpatterns are created, executed as commands by CPU </li></ul><ul><li...
Assembler – Assembler Instructiuons (Pseudo Commands) <ul><li>Instructions to assembler </li></ul><ul><ul><li>Controlling ...
<ul><li>Arithmetic example: </li></ul><ul><ul><li>Source and Destination Data width has to euqal </li></ul></ul><ul><ul><l...
Assembler – Special Register <ul><li>Unless to all-purpose registers </li></ul><ul><ul><li>Special register(SS, DS, CS, ES...
Assembler – Flag Register Overflow  Direction Interrupt enable Trap Sign Zero Auxiliary carry Parity Carry O D I T S Z A P C
Assembler – Flag Register <ul><li>FLAG-Bits: </li></ul><ul><ul><li>C   Carry  Area crossing of unsigned numbers </li></ul>...
Assembler – Flag Register <ul><li>Missing flags: </li></ul><ul><ul><ul><li>V: Two’s complement overflow indicator </li></u...
Assembler – Jump Operations <ul><li>Un-/conditioned jumps </li></ul><ul><ul><li>Example: </li></ul></ul><ul><ul><ul><ul><l...
Sources <ul><li>http://www.informatik.ku-eichstaett.de /studium/skripte/ws0203/einf2/Vorlesung12.ppt </li></ul><ul><li>htt...
Thanks 4 ur Attention <ul><li>Any further </li></ul><ul><li>questions </li></ul><ul><li>?? </li></ul>
Upcoming SlideShare
Loading in...5
×

Assembler

583

Published on

Assembly language in brief

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
583
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
56
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Assembler

  1. 1. Assembler A short Overview
  2. 2. Content <ul><li>Language Levels </li></ul><ul><ul><li>High Level  micro code </li></ul></ul><ul><ul><li>Machinecode language </li></ul></ul><ul><li>Assembler languages </li></ul><ul><ul><li>Structure </li></ul></ul><ul><ul><li>Commands </li></ul></ul>
  3. 3. Language Levels High Level Language Assembler Language Machine Language Micro -programming Hardware „ Firmware“ Normally deepest free accessible Level
  4. 4. High Level  Micro Code <ul><li>High Level language </li></ul><ul><ul><li>Formulating program for certain application areas </li></ul></ul><ul><ul><li>Hardware independent </li></ul></ul><ul><li>Assembler languages </li></ul><ul><ul><li>Machine oriented language </li></ul></ul><ul><ul><li>Programs orient on special hardware properties </li></ul></ul><ul><ul><li>More comfortable than machine code </li></ul></ul><ul><ul><li>(e.g. by using symbolic notations) </li></ul></ul>
  5. 5. High Level  Micro Code <ul><li>Machine code: </li></ul><ul><ul><li>Set of commands directly executable via CPU </li></ul></ul><ul><ul><li>Commands in numeric code </li></ul></ul><ul><ul><li>Lowest semantic level </li></ul></ul><ul><ul><li>Generally 2 executing oportunities: </li></ul></ul><ul><ul><ul><li>Interpretiv via micro code </li></ul></ul></ul><ul><ul><ul><li>Directly processing via hardware </li></ul></ul></ul>
  6. 6. High Level  Micro Code <ul><li>Micro programming: </li></ul><ul><ul><li>Implementing of executing of machine commands (Control unit - controller) </li></ul></ul><ul><ul><li>Machine command executed/shown as sequence of micro code commands </li></ul></ul><ul><ul><li>Micro code commands: </li></ul></ul><ul><ul><ul><li>Simpliest process controlling </li></ul></ul></ul><ul><ul><ul><ul><li>Moving of data </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Opening of grids </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Tests </li></ul></ul></ul></ul>
  7. 7. Machinecode language <ul><li>Machinecode command: </li></ul><ul><ul><li>Binary word (fix length, causes elementary operations within CPU) </li></ul></ul><ul><li>Machinecode program </li></ul><ul><ul><li>sequence of machinecode commands </li></ul></ul>
  8. 8. Machinecode language <ul><li>Structure: </li></ul><ul><ul><li>Operationcode </li></ul></ul><ul><ul><ul><li>Defining executable operation </li></ul></ul></ul><ul><ul><li>Operandaddress </li></ul></ul><ul><ul><ul><li>Spezification of operands </li></ul></ul></ul><ul><ul><ul><ul><li>Constants/register addresses/storage addresses </li></ul></ul></ul></ul><ul><ul><li>Difference between 1/2/3 address machines </li></ul></ul>OpCode OpAddress
  9. 9. Machinecode language <ul><li>Data transport commands </li></ul><ul><li>Arithmetic and logical commands </li></ul><ul><li>Process controlling commands </li></ul><ul><li>In-/output commands </li></ul><ul><li>Special commands </li></ul><ul><li>Disadvantage: </li></ul><ul><ul><li>Difficultly readable </li></ul></ul><ul><ul><li>No symbolic names(Mnemomics) </li></ul></ul>
  10. 10. Assembler languages <ul><li>Translated into machinecode language(Interpreter) </li></ul><ul><li>Each operation code(opcode) owns one symbolic command </li></ul><ul><li>Assignments of operand addresses are possible </li></ul><ul><li>Labels for command addresses </li></ul>
  11. 11. Assembler languages <ul><li>Usage of pseudo commands </li></ul><ul><ul><li>Commands for assembler </li></ul></ul><ul><ul><li>Assigment of values/addresses(variables) </li></ul></ul><ul><ul><li>Definition of the programstart addresses </li></ul></ul><ul><ul><li>Allocating of memory for variables </li></ul></ul>
  12. 12. Assembler languages-structure <ul><li>Label </li></ul><ul><ul><li>symbolic labeling of an assembler address (command address at Machine level) </li></ul></ul><ul><li>Mnemomic </li></ul><ul><ul><li>Symbolic description of an operation </li></ul></ul><ul><li>Operands </li></ul><ul><ul><li>Contains of variables or addresse if necessary </li></ul></ul><ul><li>Comments </li></ul><Mnemomic> <Operand> Comments <Label>
  13. 13. Assembler Languages - Machine Instructions <ul><li>Bitpatterns are created, executed as commands by CPU </li></ul><ul><li>Classes: </li></ul><ul><ul><li>Arithmetic/logical Operations(ADD,SUB,XOR, administrative commands - EQU, shifting&rotation commands) </li></ul></ul><ul><ul><li>Data transfer(load/save operations, speicher<>register, register<>register) </li></ul></ul><ul><ul><li>Control commands(jump op. [un-]conditional /relativ,control op. – STOP) </li></ul></ul><ul><ul><li>In-/output commands </li></ul></ul>
  14. 14. Assembler – Assembler Instructiuons (Pseudo Commands) <ul><li>Instructions to assembler </li></ul><ul><ul><li>Controlling translation process </li></ul></ul><ul><ul><li>No creation of machine code </li></ul></ul><ul><ul><li>Affect creation of machine instructions </li></ul></ul><ul><li>Types : </li></ul><ul><ul><li>Program organisation </li></ul></ul><ul><ul><li>equations and symbolic Addresses </li></ul></ul><ul><ul><li>Definition of Constants and Memory </li></ul></ul><ul><ul><li>Addressing </li></ul></ul>
  15. 15. <ul><li>Arithmetic example: </li></ul><ul><ul><li>Source and Destination Data width has to euqal </li></ul></ul><ul><ul><li>AX , BX, CX, DX, SI, DI, BP, SP </li></ul></ul><ul><ul><li>; arithmetic operations </li></ul></ul><ul><ul><li>ADD AX, BX ; AX := AX+BX </li></ul></ul><ul><ul><li>SUB AH,AL ; AH := AH - AL </li></ul></ul><ul><ul><li>MOV AL, CL ; AL := CL </li></ul></ul><ul><ul><li>INC CX ; CX := CX+1 </li></ul></ul><ul><ul><li>DEC CL ; CL := CL-1 </li></ul></ul><ul><ul><li>NEG CX ; CX := -CX </li></ul></ul>Assembler – All purpose Register CX BX AX All purpose Register AH AL BH BL CL CH
  16. 16. Assembler – Special Register <ul><li>Unless to all-purpose registers </li></ul><ul><ul><li>Special register(SS, DS, CS, ES, IP) </li></ul></ul><ul><ul><ul><li>Never ever are </li></ul></ul></ul><ul><ul><ul><ul><li>Destination/Source of a „mov“ command </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Destination of arithmetic operations </li></ul></ul></ul></ul>
  17. 17. Assembler – Flag Register Overflow Direction Interrupt enable Trap Sign Zero Auxiliary carry Parity Carry O D I T S Z A P C
  18. 18. Assembler – Flag Register <ul><li>FLAG-Bits: </li></ul><ul><ul><li>C Carry Area crossing of unsigned numbers </li></ul></ul><ul><ul><li>A Aux. Carry Area crossing at BCD-design </li></ul></ul><ul><ul><li>O Overflow Area crossing at arithmetic operation with signed numbers </li></ul></ul><ul><ul><li>S Sign True if result = negativ </li></ul></ul><ul><ul><li>Z Zero Result = Null </li></ul></ul><ul><ul><li>P Parity Result has an even number of 1 Bits </li></ul></ul><ul><ul><li>D Direction flag Defines direction of string- commands </li></ul></ul><ul><ul><li>I Interrupt Global Interrupt Enable/Disable Flag </li></ul></ul><ul><ul><li>T Trap Flag Used by debugger, allows single-step- modus </li></ul></ul>
  19. 19. Assembler – Flag Register <ul><li>Missing flags: </li></ul><ul><ul><ul><li>V: Two’s complement overflow indicator </li></ul></ul></ul><ul><ul><ul><li>H: Half Carry Flag </li></ul></ul></ul><ul><li>Operations and flags </li></ul><ul><ul><li>ADD, SUB, NEG affects O, S, Z, A, P, C </li></ul></ul><ul><ul><li>INC, DEC -“- O, S, Z, A, P </li></ul></ul><ul><ul><li>MUL, DIV -“- O, C </li></ul></ul><ul><ul><li>AND, OR , XOR -“- S, Z, P, C </li></ul></ul>
  20. 20. Assembler – Jump Operations <ul><li>Un-/conditioned jumps </li></ul><ul><ul><li>Example: </li></ul></ul><ul><ul><ul><ul><li>Mov AX, 0 </li></ul></ul></ul></ul><ul><ul><ul><ul><li>CMP CX, 0 </li></ul></ul></ul></ul><ul><ul><li>again: JZ end (jumpzero, conditioned j.) </li></ul></ul><ul><ul><li>ADD AX, CX </li></ul></ul><ul><ul><li>DEC CX </li></ul></ul><ul><ul><li>JMP again (unconditioned jumped) </li></ul></ul><ul><ul><li>end: NOP </li></ul></ul>
  21. 21. Sources <ul><li>http://www.informatik.ku-eichstaett.de /studium/skripte/ws0203/einf2/Vorlesung12.ppt </li></ul><ul><li>http://www-ist.massey.ac.nz </li></ul><ul><li>/GMoretti/159704/Lectures/1-Languages-Translation-&-Assemblers.pdf </li></ul><ul><li>http://www.mathematik.uni-marburg.de </li></ul><ul><li>/~priebe/lehre/ws0001/ti1/Skript/TechInf1Lo08.ppt </li></ul><ul><li>E:temp4.SemesterIntro into Dig.ComputingDokuBefehlssatz.pdf </li></ul>
  22. 22. Thanks 4 ur Attention <ul><li>Any further </li></ul><ul><li>questions </li></ul><ul><li>?? </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×