MCS-51 Assembly Language Programming Workshop
Objectives:
(a) To learn MCS-51 assembly language programming using EdSim51 simulator.
(b) To use EdSim51 to debug and simulate MCS-51 assembly language programs.
(b) To use EdSim51 to debug and simulate MCS-51 assembly language programs.
Requirement:
(a) Personal Computer.
(b) Java 2 Runtime.
(c) EdSim51 Simulator.
(b) Java 2 Runtime.
(c) EdSim51 Simulator.
A. Introduction
Assembly Language is a computer language lying between the extremes of machine language and high-level language. In this workshop, we will focus on assembly language programming using the MCS-51™ instruction set, which is the instruction set for the 8051 family of microcontroller. As 8051 is an 8-bit microcontroller, its instruction set consists of 8-bit opcodes. Some instructions have one or two additional bytes for operand (data or addresses). In all, there are 255 instructions, of which 139 are 1-byte instructions, 92 2-byte instruction, and 24 3-byte instruction. The way in which data and addresses are specified (either as source or destination) in the instruction is determined by the addressing mode. In MCS-51, 8 addressing modes are available. These addressing modes are register, direct, indirect, immediate, relative, absolute, long and indexed.
Numerous programs are available to facilitate software development for the 8051 microcontroller. In this context, a cross assembler is used to translate the assembly instructions to machine language binary codes on a host computer with a CPU other than the 8051. The source codes may be written using any text editor or a specific IDE. Nonetheless, the assembled machine codes cannot be executed directly on the host computer if its CPU is not an 8051. Execution of the machine codes requires either hardware emulation or software simulation of the 8051. An example of such tools is EdSim51, which allows software simulation of an 8051 on a computer system.