Tuesday, March 22, 2016

8051 Assembling a Program

Following are the steps to create an executable assembly program

Editor: It is to create source (myfile.asm) file with extension asm or src. The asm extension for the source file is used by an assembler.

Assembler: It converts the assembly language instructions into machine code. The assembler will produce an object file (.obj) and a list file (.lst). List file lists all the opcodes, addresses and errors, if detected, in program

Linker: It takes one or more object files and produces an absolute object file with the extension abs

OH: It is an object to hex converter. It creates a file with extension hex that is ready to burn into ROM

8051 Assembling a Program

List File:
It lists all the opcodes and addresses as well as errors that the assembler detected. The programmer uses the list file to find syntax errors. It is only after fixing all the errors indicated in the lst file that the obj file is ready to be input to the linker program.
AddressMachine LanguageAssembly Language
0000ORG 0H
00007D13MOV R5, #13H
00027F23MOV R7, #23H
00047400MOV A, #0
00062DADD A, R5
00072FADD A, R7
00082412ADD A, #12H

Related topics:
8051 Assembly Programming   |   8051 Assembly Template   |   8051 Simulator   |   8051 Data Types and Directives   |   8051 Instruction Set Overview   |   8051 Instruction Set Summary

List of topics: 8051

No comments:

Post a Comment