Assembling and Running 8051 Program

4 basic steps are needed to be performed to assemble and run an 8051 program

Step 1: To write the program using any editor and save it with extension .asm or .src depending on the assembler one is using.

Step 2: The source file is fed into assembler which converts it to machine code and gives us 2 files one with extension .lst i.e. the list file and other with extension .obj i.e. the object file.

Step 3: Old assemblers required a third step to link all object files to create one absolute file with extension .abs This file is used by 8051 trainers to monitor program.

Step 4: The abs file is fed into a program called “OH” (i.e Object to hex converter) which creates a file with extension .hex that is ready to be burned in the ROM of the controller.

The List file
This is a very important file for programmers as it shows all opcodes and memory address as they will be stored in the controller. This makes error detection of labels and code quite easy.


2 thoughts on “Assembling and Running 8051 Program

    • A hex file looks like this..
      2E 23 45 2D D2 D4 A5 65 77 7F……….
      this goes on and on till the end of file…
      these are hexadecimal numbers thats why the name hex file…
      these hexadecimal numbers are actually the binary form of our command in .asm or .c file made by the compiler .
      This is the last stage of compilation. this file is only made when compiler finds no syntax or fatal errors….

      Say for example MOV A,B command in assembly is converted to something like CD in hexadecimal equivalent. This CD is understood by the processor as to mov b into a…..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s