Saturday, July 23, 2011

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.

No comments:

Post a Comment