1 / 13

Assemblers

Assemblers. By: Zoe Williams and Sean Sandy Presented: March 16th, 2006. Your Feature Presentation:. What is an Assembler? Assembly Language Mnemonics Alternatively, Disassemblers Why bother with Assembly Language? Let us tell you! Some Examples. What is an Assembler?.

mickey
Download Presentation

Assemblers

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assemblers By: Zoe Williams and Sean Sandy Presented: March 16th, 2006

  2. Your Feature Presentation: • What is an Assembler? • Assembly Language • Mnemonics • Alternatively, Disassemblers • Why bother with Assembly Language? • Let us tell you! • Some Examples

  3. What is an Assembler? • An assembler is a computer program that translates source instructions, using mnemonics, into machine language. • Like R2 D2

  4. Assembly Language • People talk to the Assembler with Assembly Language. • Assembly, or asm, is a "close to English" notation for the machine language that a specific computer architecture uses. • Machine language is made readable by using symbols to replace values, this is called mnemonics.

  5. Assembly Language • For example, a computer with the appropriate processor will understand this x86/IA-32 machine language (dialect) : • 10110000 01100001 • This is very difficult for a programmer to understand.

  6. Assembly Language • The Assembly Language Equivilant is: • mov al, 061h • mov is an Assembly Language Mnemonic

  7. Assembly Language Mnemonics • A mnemonic is usually from 1 to 5 letters, and represents an opcode. • Opcodes are the machine codes or numbers representing the required operations • Number memorization is very inefficient. • Takes a lot of time and effort • Mistakes introduce compilation errors or computer bugs • With mnemonics, each opcode is represented by an alphabetic code.

  8. Mnemonics Con'd • Although mnemonics differ between different CPU designs some are common, ie: • "sub" (subtract) • "div" (divide) • "add" (add) • "mul" (multiply) • Mnemonics mean we can avoid memorizing numbers and instead use contracted English words. Yipee!

  9. Disassemblers • As you may have guessed, Disassemblers perform the opposite task of an Assembler. • There are two kinds of Disassemblers • Automated Disassemblers • Interactive Disassemblers • Interactive Disassemblers are better, as they are more accurate. • These are useful in Reverse Engineering.

  10. Assembly Language is Dated • With the current advanced state of programming and languages, it is possible to write entire program without once considering the Assemblers, or assembly language.

  11. But people should still learn it! • Assembly Language is the most intimate form of communication that you can have with your computer. • After a program has been compiled, it's hard to 'decompile' it, but you CAN look at it in Assembly Language. • Ofter debuggers show errors in Assembly Code • With less overhear, programs written with Assembly code run much more quickly. • It is often the only way to make programs that speak directly to the CPU for new and unsupported features.

  12. Example This is an example written for an “8086” or DOS Doesn't it look nicer than: 010101110101011101111010110101011011010101110101010101010010010100010001001001000100000101101010111110100000000111110101000010100100010101100101110110100100010000000011011011011011101111110110010000001101111100100100111011011000000001000101111110111011101100000000011111111000010010101001010100010101100100101010101000101011110100010110100001010101010111010101110111101011010101101101010111010101010101001001010001000100100100010000010110101011111010000000011111010100001010010001010110010111011010010001000000001101101101101110111111011001000000110111110010010011101101100000000100010111111011101110110000000001111111100001001010100101010001010110010010101010100010101111010001011010000101010101011101010111011110101101010110110101011101010101010100100101000100010010010001000001011010101111101000000001111101010000101001000101011001011101101001000100000000110110110110111011111101100100000011011111001001001110110110000000010001011111101110111011000000000111111110000100101010010101000101011001001010101010001010111101000101101000010101 .model small .stack .data message db "Hello world!!!", "$" .code main proc mov ax,seg message mov ds,ax mov ah,09 lea dx,message int 21h mov ax,4c00h int 21h main endp end main

  13. References • For our example:http://www.xs4all.nl/~smit/asm01001.htm • Almost Everything Else:http://www.davidsalomon.name/assem.advertis/asl.pdf • Some other stuff:http://en.wikibooks.org/wiki/X86_Assembly/Introduction • The R2D2 Picture:http://cas.bellarmine.edu/tietjen/Research/other_robots.htm

More Related