Javatpoint Logo
Javatpoint Logo

Assembly Language

Assembly language is introduced for providing mnemonics or symbols for the machine level code instructions. Assembly language program is consisting of mnemonics that is translated into machine code. A program that is used for this conversion is known as assembler.

Assembly language is also called as low-level language because it directly works with the internal structure of CPU. For programming in assembly language, a programmer must have the knowledge of all the registers in a CPU.

Different programming languages like C, C++, Java and various other languages are called as high-level languages because they are not dealing with the internal details of CPU.

Assembling and Running of 8051 Program

Let's see the steps for creating, assembling and running an assembly language program are as follows:

Assembly Language
  • Editor Program : At first, we use an editor for type in a program. Editors like MS-DOS program that comes with all Microsoft operating systems can be used for creating or edit a program. The editor produces an ASCII file. The ?asm? extension for a source file is used by an assembler during next step.
  • Assembler Program: The "asm" source file contain the code created in Step 1. It is transferred to an 8051 assembler. The assembler is used for converting the assembly language instructions into machine code instructions and it produced the .obj file (object file) and .lst file (list file). It is also called as source file because some assembler requires that this file must have "src" extension.
  • Linker Program: The linker program is used for generating one or more object files and produces an absolute object file with an extension "abs".
  • OH Program: The OH program fetches the "abs" file and fed it to a program called "OH". OH is called as object to hex converter it creates a file with an extension "hex" that is ready for burn in to the ROM.

Labels in assembly Language

All labels used in assembly language follow the certain rules as given below:

  • Each label name should be unique. The name used as label in assembly language programming consist of alphabetic letters in both lowercase and uppercase, numbers from 0 to 9, and special characters such as at the rate (@), question mark (?), underscore(_), and dollar ($) etc.
  • Reserved words are not allowed to be used as a label in the program. For example, MOV and ADD words are reserved words.
  • The first character must be an alphabetical character, it cannot be a number.

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials

B.Tech / MCA