An assembly language programming (ALP) is a type of low-level programming that is intended to communicate directly with a computer’s hardware. ALP needs assembler.
Assembly Language Programming
- An assembly language is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture’s machine code instructions.
- Unlike machine language, which consists of binary and hexadecimal characters, assembly languages are designed to be readable by humans.
- Each assembly language is specific to a particular computer architecture, in contrast to most high-level programming languages, which are generally portable across multiple architectures, but require interpreting or compiling.
- Assembly language is converted into executable machine code by a utility program referred to as an assembler; the conversion process is referred to as assembly, or assembling the code.
- Assembly language uses a mnemonic to represent each low-level machine operation or opcode.
- Some opcodes require one or more operands as part of the instruction, and most assemblers can take labels and symbols as operands to represent addresses and constants, instead of hard coding them into the program.
What is an Assembler?
- An assembler is a software tool or a program designed to simplify the task of writing computer programs.
- The Assembler is a Software that converts an assembly language code to machine code.
- It takes basic Computer commands and converts them into Binary Code that Computer’s Processor can use to perform its Basic Operations.
- If you have ever written a computer program directly in a machine-recognizable form such as binary or hexadecimal code, you will appreciate the advantages of programming in a symbolic assembly language.
- Assembly language operation codes (opcodes) are easily remembered (MOV for move instructions, JMP for jump). You can also symbolically express addresses and values referenced in the operand field of instructions.
- Since you assign these names, you can make them as meaningful as the mnemonics for the instructions. For example, if your program manipulates a date as data, you can assign it the symbolic name DATE.
- If your program contains a set of instructions used as a timing loop (a set of instructions executed repeatedly until a specific amount of time has passed), you can name the instruction group TIMER.
Function of an Assembler
- To use the assembler, you first need a source program. The source program consists of programmer written assembly language instructions. These instructions are written using mnemonic opcodes and labels.
- Assembly language source programs must be in a machine-readable form when passed to the assembler.
- Some assemblers include a text editor that will help you maintain source programs as paper tape files or diskette files.
- You can then pass the resulting source program file to the assembler. The assembler program performs the clerical task of translating symbolic code into object code which can be executed by the 8080 and 8085 microprocessors.
Assembler output consists of three possible files:
- The object file: containing your program translated into object code.
- The list file: printout of your source code, the assemble generated object code, and the symbol table.
- The symbol-crass-reference file: a listing of the symbol-cross reference records.