17-12-2012, 01:27 PM
2- PASS ASSEMBLER
1PASS ASSEMBLER.doc (Size: 42.5 KB / Downloads: 30)
INTRODUCTION TO ASSEMBLER
An assembly language is a low-level way to instruct a computer to carry out a task. Computers do not inherently understand instructions from people. At the most basic level, computers understand instructions in binary language, that is, sequences of zeroes and ones. Binary language or machine language is extremely cumbersome to program in, however. Assembly language was invented as a symbolic representation of the underlying sequences of zeroes and ones. An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture. This representation is usually defined by the hardware manufacturer, and is based on mnemonics that symbolize processing steps (instructions), processor registers, memory locations, and other language Typically a modern assembler creates object code by translating assembly instruction mnemonics into opcodes, and by resolving symbolic names for memory locations and other entities. The use of symbolic references is a key feature of assemblers, saving tedious calculations and manual address updates after program modifications. Most assemblers also include macro facilities for performing textual substitution—e.g., to generate common short sequences of instruction inline ,instead of called subroutines .
8086 ASSEMBLER:
There are many evolutions of microprocessor design. In 1978, Intel came out with 8086. The Intel 8086 is 16- bit microprocessor, implemented in N-channel, depletion load Silicon gate technology (HMOS), and packaged in 40 pin dual line package.
Features
First and foremost, source code is not case sensitive.
It is two pass assembler
It provides macro facility, but does not support nested macros.
It support the assembler directive like db(define byte), dw(define word) and equ-(equal)
It supports both decimal and hexadecimal numbers
A utility program called an assembler is used to translate assembly language statements into the target computer's machine code. The assembler performs a more or less isomorphic translation (a one-to-one mapping) from mnemonic statements into machine instructions and data. This is in contrast with high-level languages, in which a single statement generally results in many machine instructions.
• Command, 0101 1100 0000 0101, first four numbers indicate the operation ADD, the next four indicate the register RA, and the last eight indicate the number 5. where the Originally computers had to be coded this way; machine language is slow, error-prone, and it can be very hard for one person to understand what another person is trying to code. So computer programmers created assembly language in which the operations, locations, numbers, etc., can be better understood.
• First, the fact that the language doesn't have to be maintained separately means that the user does not need to develop or use any language compiler or developer tools. The user can simply take advantage of the existing development infrastructure.
• In this hypothetical example, mnemonics are used for the ADD operation and the register RA, and the number 5 is written in digits. A program called an assembler converts assembly language code into the underlying machine language. In earlier days, even this conversion used up expensive computing resources, so the operation codes, opcodes in short, such as Subtract were abbreviated as SUB, Copy-Move was abbreviated as MOV and in some cases even ADD was abbreviated to A.