assembly language l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Assembly Language PowerPoint Presentation
Download Presentation
Assembly Language

Loading in 2 Seconds...

play fullscreen
1 / 11

Assembly Language - PowerPoint PPT Presentation


  • 461 Views
  • Uploaded on

Assembly Language. part 1. Some terminology. Assembly language: a low-level language that is a little more human-friendly than machine language assembler: a program that translates assembly language source code into executable form object code: machine language program (assembler output).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Assembly Language' - Thomas


Download Now 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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
some terminology
Some terminology
  • Assembly language: a low-level language that is a little more human-friendly than machine language
  • assembler: a program that translates assembly language source code into executable form
  • object code: machine language program (assembler output)
types of assemblers
Types of assemblers
  • Resident assembler: an assembler written for its own platform, using the native instruction set
  • Cross assembler: assemble run on one platform to produce object code for another
  • Disassembler: program that attempts to recover source code from object code (not 100% successful)
assembly language instructions
Assembly language instructions
  • Mnemonics: abbreviated words used instead of machine language hex code;
    • have one-to-one correspondence with underlying instruction
    • always possible to determine underlying machine language statement from assembly language mnemonic, but not vice-versa
  • Pseudo-ops: assembly language statements used mostly for data declaration; do not correspond to specific machine language instructions
pep 8 assembly language
Pep/8 assembly language
  • General syntax notes:
    • one instruction per line of code
    • comments start with semicolon, continue until end of line
    • not case-sensitive
    • Spacing:
      • at least one space required after each instruction (mnemonic or pseudo-op)
      • otherwise doesn’t matter
    • last line of program must be .END pseudo-op
pep 8 assembly language6
Pep/8 Assembly Language
  • Mnemonic instruction format:
    • 2-6 letter instruction specifier (most or 3-4 letters)
    • operand specifier, usually followed by a comma and
    • 1-3 letter address mode specifier (most are 1)
  • Examples:

LDA 0x0014,i ; load hex value 14 to A

LDX 0x1110,d ; load data at address 1110 into x

  • Entire Pep/8 assembly language instruction set is printed on the inside front cover (and on page 191) of your textbook
pep 8 assembly language7
Pep/8 Assembly Language
  • Addressing mode specifiers:
    • i: immediate
    • d: direct
    • n: indirect
    • s: stack-relative
    • sf: stack-relative deferred
    • x: indexed
    • sx: stack-indexed
    • sxf: stack-indexed deferred
pep 8 assembly language8
Pep/8 Assembly Language
  • Unimplemented opcodes
    • instructions available at assembly language level, even though they are not (directly) available at the machine language level
    • represent operations handled by the operating system
  • They include:
    • NOPn: unary no operation trap
    • NOP: non-unary NOP
    • DECI: decimal input trap
    • DECO: decimal output trap
    • STRO: string output trap
pseudo ops
Pseudo-ops
  • .ADDRSS: used to crate labeled jump destinations
  • .ASCII: specifies char string
  • .BLOCK: allocates specified # of bytes, initializes whole set to zero
  • .BURN: used for OS configuration
  • .BYTE: allocates one byte; can specify hex or decimal content
  • .END: stop code
  • .EQUATE: equate symbol with literal value; like # define in C/C++
  • .WORD: allocates one word of memory
example program 1
Example program 1

Comment

; Program example 1

CHARO 0x0010 ,d

CHARO 0x0011 ,d

CHARO 0x0012 ,d

CHARO 0x0013 ,d

CHARO 0X0014 ,d

STOP

.ASCII "Arrr!"

.END

Instructions: each outputs one

character; starting address of program

is 0000, and each instruction (except

STOP) is 3 bytes long; STOP is one

byte

Data