Micro 1
Micro 1
Micro 1
Lab Report
Department of Electrical & Electronic Engineering
Experiment No.: 01
Experiment No.: 01
Experiment Name.: Introduction to Assembly Language Programming and Kit Mode of MDA
8086 Trainer Board
Objectives:
Requirements:
1. MDA 8086 kit.
2. Emu-8086 application.
3. PC/Laptop.
Theory: Assembly programming is used to read processor instructions and alter the hardware in
low-level embedded system architecture. It is a very basic machine-level programming language that
is designed to create efficient code that uses fewer clock cycles and memory than high-level
programming languages. It's a comprehensive hardware-oriented programming language that
requires the programmer to understand embedded hardware to develop a program. The fundamentals
of assembly-level programming for the 8086 are presented here.
The 8086 is a processor that represents all peripheral devices that are externally attached to the CPU
via a system bus, such as serial buses, RAM and ROM, I/O devices, and so on. The 8086
microprocessor features a CISC architecture with 32 I/O, serial communication, memory, and
counters/timers as peripherals. To accomplish the actions that necessitate memory for reading and
saving functions, the microprocessor requires a program.
The assembly level programming of the 8086 makes use of memory registers. A register is a
memory-based component that allows data to be captured and stored more quickly in
microprocessors and controllers. The 8086 is the first CPU in the Intel series. All of the registers of
the 8086 are 16 bits. General Purpose, Index, Status & Control, and Segment are the four categories
they fall into.
General Purpose Registers: The four general-purpose registers are the AX, BX, CX, and DX
registers.
AX - accumulator, and preferred for most operations.
BX - base register, typically used to hold the address of a procedure or variable.
CX - count register, typically used for looping.
DX - data register, typically used for multiplication and division.
All of the general-purpose registers can be treated as a 16-bit quantity or as two 8-bit quantities. The
high byte is referenced by replacing the X with H. The low byte is referenced by replacing the X
with L: AX (15-0) = AH (15-8) + AL (7-0) For example, putting 5102H into AX is the same as
putting 51 into AH, and then 02 into AL. We can reference DX in terms of DH, DL, CX in terms of
CH, CL, and BX in terms of BH, BL as well.
Page |3
Segment Registers: The CPU contains four segment registers, used as base locations for program
instructions, data, or the stack. All references to memory on the IBM PC involve a segment register
as a base location. The registers are:
CS – Code Segment, base location of program code
DS – Data Segment, base location for variables
SS – Stack Segment. The base location of the stack
ES – Extra Segment. The additional base location for variables in memory.
Index Registers: The index registers to hold offsets from a segment register containing the data
we're looking for. There are four index registers in the system:
BP – Base Pointer, offset from SS register to locate variables on the stack
SP – Stack Pointer, offset from SS register as to the location of the stack’s top
SI – Source Index, used for copying strings, segment register varies ➢ DI – Destination Index,
used as a destination for copying strings
In this program, MOV AX, 0A256H; moves the numeric value 0A256H into AX and MOV BX,
035B3H; moves the numeric value 035B3H into BX. ADD AX, BX would add the contents of BX
into the contents of AX leaving AX with the new result (destroying its old contents.)
The function of ICs in Fig. 1.1:
CPU (Central processing unit): Using Intel 8086, Using 14.7456 MHz
ROM (Read Only Memory): It has the program to control the user's key input, LCD, user's
program. 64K Byte, has a data communication program. The range of ROM Addresses is
F0000H~FFFFFH.
SRAM (Static Random Access Memory): Input the user's program & data. The address of
memory is 00000H~0FFFFH, a total of 64K Byte.
DISPLAY: Text LCD Module, 16(Characters)×2(Lines)
KEYBOARD: It's a device that allows you to type in machine language. There are 8 function
keys and 16 hexadecimal keys.
SPEAKER: Sound test.
RS-232C: Serial communication with IBM compatible PC.
DOT MATRIX LED: To comprehend and test the display's dot matrix structure and theory. It
is interfaced to 8255A(PPI).
A/D CONVERTER: ADC0804 to convert the analog signal to digital signal.
D/A CONVERTER: DAC0800 (8-bits D/A converter) to convert the digital signal to the
analog signal and to control the level meter.
STEPPING MOTOR INTERFACE: Stepping motor driver circuit is designed.
POWER: AC 110~220V, DC +5V 3A, +12V 1A, -12V 0.5A SMPS.
Page |4
The 8086's 20-bit address allows for 1M byte (1024 K bytes) of memory space with the address
range 00000-FFFFF.
A memory map is a method of memory allocation.
Page |6
The function of Keys: A 64K-byte monitor software is included with MDA-Win8086. It's made to
be simple to operate. The monitor software starts after the power is turned on. The monitor has a
memory checking method in addition to all of its other features. The following is a quick rundown
of the most important functions.
Page |7
For Addition:
MOV AX, 0A256H ; A Move operation
MOV BX, 035B3H ; A Move operation
ADD AX, BX ; A Addition operation
Output:
Discussion: In this experiment how to use the MDA-8086 microprocessor kit and the emu8086
software was studied. The functions of several elements of this kit were demonstrated, and their
operations were practiced. STP is used for single-step execution, while GO is used for full
execution. Two Hexadecimals values were added in this experiment. The addition was performed on
a computer program that was executed using the emu8086 software, and then the machine code for
this program was sent to the MDA-8086 kit, yielding the ultimate desired result, which was the
program output. The program code for addition was shown in Figures 1.6, while the result was
shown in Figures 1.7. After all, this experiment was performed successfully.