0% found this document useful (0 votes)
77 views85 pages

8086 Microprocessor Kit User Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views85 pages

8086 Microprocessor Kit User Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

WS_8086_V1.

3KITUSER AND TECHNICAL REFERENCE MANUAL

WIZAARD SYSTEM

8086 MICROPROCESSOR-V1.5
KIT USER MANUAL
Revised: V1-5; 15-8-2024

(LCD & USB/PS2 keyboard)

Industrial Products & Student Projects developed by:

► Embedded System ►Communication ► VLSI System ► DSP

► PLC ► Appln. Software ► Lab VIEW ► RTOS

► Mechanical ► Robotics ►Multi-layer PCB design

Designed by,
Wizaard System
199-2 V.R.Complex, Siva Sakthi Colony,
Ganapathy,Coimbatore-641 006,
Phone : 0422-4380105
Cell : 9843060303
E-Mail :[email protected]
Website : www.wizaardsystem.in

www.wizaardsystem.in 1
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

TABLE OF CONTENTS
1 INTRODUCTION 5

1.1 WS-8086_V1.2KIT INTRODUCTION 5

1.2 WS-8086_V1.2KIT OVERVIEW 6

1.3 WS-8086_V1.2KIT SPECIFICATIONS 7

2 SYSTEM DESCRIPTION 8

2.1 HARDWARE 8

2.2 DEVICE MAPPING 9

2.3 CONNECTOR DETAILS 9

2.3.1 26 PIN FRC CONNECTOR 10

2.3.1 50 PIN FRC CONNECTOR 11

2.3.2 DB9 CONNECTOR 12

3 GUIDELINES FOR OPERATION 13

3.1 POWER ON 13

3.2 RESET BUTTON 13

3.3 ‘C’ (COMMAND MENU) 13

3.3.1 A (ASSEMBLE ENTRY) 14

3.3.2 B (BAUD RATE) 15

3.3.3 D (DISASSEMBLY ENTRY) 16

3.3.4 E (EXAMINE/DUMP MEMORY) 16

3.3.5 G (EXECUTE) 17

3.3.6 H (HELP LIST) 17

3.3.7 I(INSERT MNEMONIC/DATA) 17

www.wizaardsystem.in 2
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

3.3.8 L (DOWNLOAD) 18

3.3.9 M(MODIFY MEMORY) 18

3.3.10 N (NORMAL MODE) 19

3.3.11 Q (QUIT) 19

3.3.12 R (REGISTER DISPLAY) 19

.3.3.13S (SERIAL MODE) 20

3.3.14 T (BLOCK TRANSFER) 20

3.3.15U (UPLOAD) 21

3.3.16 X (DELETE) 21

3.3.17 ? (NOTES LIST) 21

4 PROGRAMMING DETAILS 22

4.1 INTRODUCTION 22

4.2 REGISTERS 22

4.3 PROGRAMMING THE WS-8086 KIT 22

5 MICROPROCESSOR PROGRAMMING USING 8086 KIT 31

5.1 ADDITION PROGRAM 31

5.1.1 ADDITION OF TWO 8 BIT NUMBERS 31

5.1.2ADDITION OF TWO 16 BIT NUMBERS 33

5.2 SUBTRACTION PROGRAM 35

5.2.1 SUBTRACTIONOF TWO 8 BIT NUMBERS 35

5.2.2SUBTRACTIONOF TWO 16 BIT NUMBERS 37

5.3 MULTIPLICATION PROGRAM 39

5.3.1 MULTIPLICATION OF TWO 8 BIT NUMBERS 39

5.3.2 MULTIPLICATION OF TWO 16 BIT NUMBERS 41

5.4 DIVISION PROGRAM 43


www.wizaardsystem.in 3
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.4.1 DIVISIONOF TWO 8 BIT NUMBERS 43

5.4.2 DIVISIONOF TWO 16 BIT NUMBERS 45

5.5 PROGRAM TO INCREMENT NUMBER 47

5.6 PROGRAM TO DECREMENT NUMBER 49

5.7 PROGRAM TO FINDINGMAXIMUM VALUE 51

5.8 PROGRAM TO FINDINGMINIMUMVALUE 54

5.9 PROGRAMS TO ARRANGE NUMBERS IN ASCENDING


ORDER 57

5.10 PROGRAMS TO ARRANGE NUMBERS IN DECENDING


ORDER 60

5.11 PROGRAM TO ROTATE INSTRUCTIONS 63

5.12 PROGRAM TO CONVERT BCD TO HEX 65

5.13 PROGRAM TO CONVERT BCD TO ASCII 67

5.14 PROGRAM TO CONVERT HEX TO BCD 69

5.15 PROGRAM TO CONVERT HEX TO ASCII 71

5.16 PROGRAM TO CONVERT ASCII TO HEX 73

5.17 PROGRAM TO CONVERT ASCII TO BCD 75

5.18 TIMER SQUARE WAVE GENERATION 77

5.19 SERIAL COMMUNICATION WITH TWO KITS 80

www.wizaardsystem.in 4
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

CHAPTER 1
INTRODUCTION
1.1 8086MICROPROCESSOR_V1.2KIT INTRODUCTION

WS-8086Microprocessor Development Board is an exclusive general-

purpose development board forthe 8086 family. It is a basic kit for anyone

who wants to fully understand the microprocessor working and develop

products. The intention of the design is to endorse the engineers andstudents

to exercise and explore the capabilitiesof8086microprocessors with many

communication protocol ease.

Our kit supports 8086microprocessors from various providers. This unit has

been carefully engineered and tested to provide superior performance. This

board is easy-to-use, with the help of keyboard operation.

This board is designed for studying the microprocessor hardware

and instruction coding. We can enter HEX code directly to the code memory

and test the code with single step running, check the result of the operation

with user registers. The kit also provides more devices interfacing, e.g.

ADC, EEPROM, Programmable Port, serial port RS232, etc.

Our 8086Microprocessor Development Board gives clear hardware design

idea about microprocessor interfaces. This kit can also be used for 8086

based microprocessor projects, without purchasing any other special

equipment, such as IC programmers or emulators.

www.wizaardsystem.in 5
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

1.2 WS-8086_V1.2KIT (WITH LCD TYPE) OVERVIEW


POWER BATTERY 16x2 TIMER USART +12v
LED 3.6V LCD (8253) (8251) CONNECTOR

POWER
RS232
CARD
CONNECTOR
PS- 2
NAND
KEYBOARD
GATE
RESET MAX
BUTTON 232
USB NOT
KEYBOARD GATE
CRYSTAL
(6.144MHZ)
BUS OR
TRANSIVER- IC GATE

PORT EXTERNAL
IC-1 26 PIN FRC
CONNECTOR
EXTERNAL
PORT
26 PIN FRC
IC-2
CONNECTOR

EXTERNAL
50 PIN FRC
CONNECTOR

EPROM 8086 RAM LATCH DECODER EPROM


IC2 MP IC IC IC IC1

www.wizaardsystem.in 6
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

1.3WS-8086_V1.2KIT SPECIFICATIONS
The WS – 8086 board has the following hardware features:

 8086Microprocessor operating at 18.432MHZ.

 Two 64KB on chip Flash memory in W27C512 EPROM (partially used

by Firmware).

 Two 32Kx8 Static RAM, CMOS for optimum speed/power with Battery

backup.

 2x16 LCD with backlight.

 50 pin FRC connector for user interface.

 Two 26 pin FRC connector for user interface from 8255.

 9 pin D type connector for RS 232 interface.

 Six different selectable baud rates from 150 to 9600.

 USB/PS-2 keyboard for entering user address/data and for commands.

 Built in line by line Assemble and Disassemble.

 Facility to connect to PC.

 Build in SMPS power supply,+12v supply is available for external use.

 Easy to interface with other peripherals.

www.wizaardsystem.in 7
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

CHAPTER 2
SYSTEM DESCRIPTION
2.1 HARDWARE
WS-8086Microprocessor board is ideal for learning about Microprocessor. The
WS-8086 board is based on Intel 8086Microprocessor which operates at
18.432MHZ crystal frequency. This is a single board computer that uses the
8086microprocessor as the CPU. The board provides a 32kB RAM (code
memory) for user program and a 64KB ROM for monitor program.
We can operate this kit using different types of keyboard(i) USB type
keyboard (ii) PS/2 type keyboard. This keyboard is supplied along with the
trainer kit. 2 lines by 16 character LCD display also provided with this kit.
WS-8086 kit is equipped with powerful software in 27C512
EPROM. This board has 32KB CMOS static RAM (type 62256).
Generallymicroprocessor has multiplexed address lines. In order to separate the
address lines from the data lines specific latch IC’s are used.
For different types of chip selection decoder IC is used. To
interface this 8086 kit with other devices we use 26 pin and 50 pin FRC
connectors. This board contains two separate port IC 8255. This board supports
RS232 interface, serial communication is also possible from this kit.WS-8086
kit works on +5v DC at 2 Amps.
Timer IC is used for generating the baud clock. IC Max 232 convert TTL
transmit and receive signals to RS 232 levels. These signals are brought to a
DB9 connector (female). 8086 has following interrupt:
(i) External Maskable Interrupt (INTR)
(ii) Non Makable Interrupt (NMI)

www.wizaardsystem.in 8
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

2.2 DEVICE MAPPING

DEVICE ADDRESS
0000-FFFFH (Segment: F000H)
EPROM
0000-FFFFH (Segment: 0000H)
RAM
FF20H, FF22H, FF24H, FF26H
8255-1
FF30H, FF32H, FF34H, FF36H
8255-2
FF10H, FF12H
8251
FF40H-COMMAND
LCD FF42H -DATA

2.3CONNECTOR DETAILS
In WS-8086 kit different types of connecters are used. The connectors are,
 26 pin FRC connectors
 50 pin FRC connector
 DB 9 connector
 USB connector
 PS/2 connector

The details of the connectors are discussed one by one given following,

www.wizaardsystem.in 9
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

2.3.126 PIN FRC CONNECTOR


The two 26 Pin FRC connector is used to interconnect the Interface cardslike
ADC,DAC, STEPPER MOTOR, etc. Pin details are given below,

FRC PIN NO. SIGNAL FRC PIN NO. SIGNAL


1 PC3 14 PB6
2 PB0 15 PC7
3 PC2 16 PB7
4 PB1 17 VCC
5 PC1 18 GND
6 PB2 19 PA0
7 PC0 20 PA7
8 PB3 21 PA1
9 PC4 22 PA6
10 PB4 23 PA2
11 PC5 24 PA5
12 PB5 25 PA3
13 PC6 26 PA4

www.wizaardsystem.in 10
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

PIN DESCRIPTION:

2.3.2 50 PIN FRC CONNECTOR


The 50 Pin FRC connector is used to interconnect the Interface cards like
USART, 8279, 8259,Timer(8253)etc. Pin details are given below

FRC PIN NO. SIGNAL FRC PIN NO. SIGNAL


1 A0 2 CS_9
3 A1 4 CS_10
5 A2 6 CS_11
7 A3 8 DEN/
9 A4 10 GND
11 A5 12 VCC
13 A6 14 D8
15 A7 16 D9
17 A8 18 D10
19 A9 20 D11
21 A10 22 D12
23 A11 24 D13
25 A12 26 D14
27 A13 28 D15
29 A14 30 NMI
31 A15 32 ALE
33 A16 34 D7
35 A17 36 D6
37 A18 38 D5
39 A19 40 D4
41 INTA 42 D3
43 INTR 44 D2
45 WR 46 D1
47 RD 48 D0
49 CLK_OUT 50 RST

www.wizaardsystem.in 11
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

2.3.3 DB9 CONNECTOR

PIN DESCRIPTION

PIN NO. SIGNAL

1 NC
2 TXD FROM MP
3 RXD TO MP
4 NC
5 GND
6 NC
7 GND
8 GND
9 GND

KEYBOARD DETAILS

PC type keyboard is interfaced to Microprocessor through its port


pin. Communication between keyboard and Microprocessor takes place using 2
wires one for serial clock and another one for serial data. We used PS-2/USB
keyboard.

www.wizaardsystem.in 12
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

CHAPTER 3
GUIDELINES FOR OPERATION

3.1 POWER ON
Connect the WS–8086 board to the power. Switch on the power supply after
ensuring the correct voltages. Following message will appear on the LCD
display.

The prompt character ‘_’ is displayed in the nextline informing the user, that the
board is ready to accept the commands.
3.2 RESET BUTTON
This key is located in the main WS-8086 board. On pressing this
key the program starts executing from the beginning i.e. at reset address 0000.
On power on reset, the display shows WIZZARD --8086 KitV1.2as a sign on
message.
3.3 ‘H’ (Help Menu)

This key is used in WS–8086 board to get into help menu. Pressing the key
’H’will display the following help. Keys are not case sensitive. By pressing the
<space> key we can scroll the display. If you press <enter >key it will terminate
the display.

www.wizaardsystem.in 13
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

KEY COMMANDS

A<Starting address> Assembly lang


B Baud rate setting
D Disassembled
E Dump memory
G<Starting address> Execute
H Help List
I<Startaddr> Insertion Mnemonics or Opcode
L<offset addr><enter> Download
M< address>< enter> Modify External Memory
N Normal mode
R Display Register Content
S Serial mode
T Block transfer
U Upload to PC
X Delete no of Data or opcode
? Important Notes about KIT

3.3.1 A (Assemble Entry)


WS–8086 is ready to accept the command after power on or after reset.
Commands can be entered in the second line of display. Pressing the key ‘A’
will permits the user to enter the program directly using mnemonics.
STEP:
A<Addr><enter>

www.wizaardsystem.in 14
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

STEPS TO ENTER THE PROGRAM IN ASSEMBLY


STEP 1: EXAMPLE
Type A<starting address> A1100
STEP 2: EXAMPLE
Press <enter> It displays the address at the 1 st line
and wait for a string
STEP 3: EXAMPLE
Now Enter the mnemonics MOV AX,3333H
STEP 4: EXAMPLE
Press <ENTER> Now thenext address is
automatically displayed.
If you want to terminate the process press <enter> twice, otherwise press space
bar for continue by entering the next mnemonics,.
3.3.2B (Baud Rate)
This command used for set the different type of Baud Rate. The
default baud rate is 2400. In this trainer kit following baud rates is
available: 150, 300, 600, 1200,2400,2400,4800 and 9600.
STEPS:
<Press > B
Now current baudrate& baud rate list will display. Like below,

To continue press <space bar> and next baud rate will display. Which
one you want press<enter> the corresponding Baud rate will choose.

www.wizaardsystem.in 15
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

3.3.3 D (Disassemble Entry)


Disassemble converts the hex byte stored in the memory into equivalent
mnemonics. To enter into disassemble mode, type ‘D’ in the command mode
followed by the memory address.
EXAMPLE

ADDRESS HEX CODE MNEMONICS


1100 B8 22 22 MOV AX, 2222H
1103 BB 33 33 MOV BX, 3333H

To disassemble the above data, type D1100<enter>


This will display the address and opcodes on the first line and the
mnemonics on the second line of the LCD.

To see the next line press space bar key. Display is,

If you want to terminate the disassemble press <enter> else continue by pressing
the <space> key.

3.3.4E (Examine / Dump Memory)


This command used in only serial mode. This allows viewing the
content of RAM/EPROM memory.
STEPS:
<enter E>

www.wizaardsystem.in 16
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

3.3.5 G (EXECUTE)
This command allows the user to execute the program from the specified
address.

STEPS EXAMPLE
G<starting address><enter> G<1100><enter>

3.3.6H (Help List)


This command used for display the Help list (working method) about
8086-kit.
STEPS:
? <enter>
Example:

If you want see next help, press<space bar>.


3.3.7I (Insert Mnemonic/Data)
This command used for insert the Opcode or Mnemonics in specific
memory location. If you want see another commands, press<space bar>.
STEPS:
I<enter >
Example:

3.3.8L
(Download)

www.wizaardsystem.in 17
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

In command used for download the opcode files (hex extension) from
the PC. For this method you have to connect the kit to pc through the RS232
cable and then you have to execute the program terminal software at the pc.
STEP
L<enter>
This will ask you to enter the file name on the PC monitor.

3.3.9M (Modify External Memory)


This key allows the user to modify the contents of external memory
address. And also used for enter program opcode.
EXAMPLE
EXTERNAL
ADDRESS VALUE
1100 B8
1101 33
1102 33

STEP 1 EXAMPLE

M<address><enter> M<1100><enter>

STEP 2:

After <enter> it will display the current value of that location and
waits for a new byte.

www.wizaardsystem.in 18
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

If you don’t want to change the current value press <space bar>to go for next
address. If you want to change the current value go to step 3.

STEP 3
Now Enter the value B8H

STEP 4

If you want to terminate the process press <enter> else press the <space>key
to enter next data.

3.3.10 N (Normal Mode)


If you work in serial mode, this command allows come back to Normal
mode.

STEPS

<Press>”N” key

3.3.11 Q (Quit)
If you want quit the system, press Q. if you want again write program
press reset switch.
STEPS
<Press>”Q” key

3.3.12 R (Display Register Content)


This key allows the user to view and modify the register contents.

FORMAT: R<Press enter> EXAMPLE: (View AX value)

www.wizaardsystem.in 19
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

STEPS: EXAMPLES

R<space> (i) Accumulator value (AX)

Note: In this command use can see Acc, B reg, C reg, D reg, SI, DI,stack
pointer, BP, ES,CS, DS, SS, IP,
FL.

If you don’t want to change the current value of the register press
<space> to go for next address. If you want to terminate the process press
<enter>.

3.3.13 S (Serial Mode)


In mode user will allow to work with the PC. In PC, terminal software
has to run. All commands similar to the local mode.

STEPS
<Press>”S” key

3.3.14 T (Block Transfer)


This key permits the user to transfer the block of data from one
location to another.
EXAMPLE:
T<enter>
Example:

command format:

www.wizaardsystem.in 20
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

3.3.15 U(upload)
In command used for store the bytes of the memory into a file in Intel
hex format. For this method you have to connect the kit to pc through the
RS232 cable and then you have to execute the program terminal software at the
pc.
STEPS:

3.3.16X (Delete)
This command used for delete the set of commands in program.
STEPS: X <enter >

3.3.17? (Notes List)


This command used for display the all important notes list about
8086-kit.
STEPS:
? <enter>
Example:

If you want see next note, press<space bar>.

www.wizaardsystem.in 21
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

CHAPTER 4
PROGRAMMING DETAILS
4.1 INTRODUCTION
This chapter describes the technique for developing program in
WS–8086 board. For the development of program it is essential to getfamiliar
with the machine code of 8086Microprocessor or mnemonics of instruction set.
4.2 REGISTERS
From the programmer’s point of view 8086 has the following register:
 AX REG (ACCUMULATOR)
 BX REGISTER
 CX REGISTER
 DX REGISTER
4.3PROGRAMMING THE WS-8086 KIT
There are two procedures to enter the program in WS-8086 trainer kit
 Mnemonics Method
 Opcode Method

EXAMPLE PROGRAM:

ADDRESS OPCODE MNEMONICS COMMENTS

1100 B8 22 22 MOV AX,2222H ACC22H

1103 BB 33 33 MOV BX,3333H B REG33H

1106 01 D8 ADD AX,BX ADD ACC WITH BREG

1108 CC INT3 END

RESULT:
AX5555H

www.wizaardsystem.in 22
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

PROCEDURE 1: Enter ThePrograms In MnemonicsMethod

 Initially connect the 5V AND 12V Power Supply to the board.


 Switch ON the WS-8086kit.
 “WIZAARD --8086” will be displayed on the LCD.

 Connect the keyboard to the USB/ PS-2 connector.


 Now press <Esc> key. Press H for help will display on the LCD.

 Type A<starting address of the program > In our example program


starting address is 1100 so type A1100

 Press <Enter>key. The starting address will wait for the mnemonics to
enter

 Now type the mnemonics MOV AX,2222H


 Press <Enter> key. It automatically goes to next address and wait for the
next mnemonics to enter

www.wizaardsystem.in 23
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

 Now type the next mnemonics MOVBX, 3333HFor 2nd data stored at B-
register.

 Press <Enter> key. It automatically goes to next address and wait for the
next mnemonics to enter
 Now type the next mnemonics ADD AX, BX for ADD AX and BX
register value(3333h+2222h=5555h)

 Press <Enter> key. It automatically goes to next address and wait for the
next mnemonics to enter
 Now type the next mnemonics INT3for end of program.

 Now press the <Enter> keytwo times. This cursor will appear on LCD.

 Now press the <ESC> key. It waits for c-commands.

 If we want to verify the entered code press D<starting address> for our
program type D1100

www.wizaardsystem.in 24
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

 Press <Enter> key. This will display the address and opcodes on the
first line and mnemonics on the second line of the LCD.

 Press <space bar>to verify the next instructions and opcodes.

 Press <space bar>to verify the next instructions and opcodes.

 Press <space bar>to verify the next instructions and opcodes.

 Now press the <Enter> key two times.It waits for c-commands.
 To execute the program press G< staring address>that is press G1100.

 Now Press <Enter> key. Output value stored in accumulator is


displayed

www.wizaardsystem.in 25
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

 Press <Esc> key to go for c-command display

 Above method is Enter the Programs in Mnemonics Method.

***************************************************************

www.wizaardsystem.in 26
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

PROCEDURE 2: Enter the Programs In OpcodeMethod

 Initially connect the 5V AND 12V Power Supply to the board.


 Switch ON the WS-8086kit.
 “WIZAARD SYSTEM” will be displayed on the LCD.

 Connect the keyboard to the USB/ PS-2 connector.


 Now press <Esc> key. Press c-command will display on the LCD.

 Type m<starting address of the program > In our example program


starting address is 1100 so type M1100

 Press <Enter>it will display the current value of that location and waits
for a new byte.

 Enter the opcodeB8Hin address1100

www.wizaardsystem.in 27
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

 Press <Space bar> to view next address.


 Enter the opcode22 in address 1101

 Press <Space bar> to view next address.


 Enter the opcode22in address 1102

 Press <Space bar> to view next address.


 Enter the opcode BB in address 1103

 Press <Space bar> to view next address.


 Enter the opcode33in address 1104

 Press <Space bar> to view next address.


 Enter the opcode33in address 1105

 Press <Space bar> to view next address.


 Enter the opcode01in address 1106.

www.wizaardsystem.in 28
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

 Press <Space bar> to view next address.


 Enter the opcodeD8in address1107.

 Press <Space bar> to view next address.


 Enter the opcode CC in address1108.

 Press <ENTER> to END PROGRAM.


 If we want to verify the entered code press D<starting address> for our
program type D1100.

 Press <Enter> key. This will display the address and opcodes on the first
line and mnemonics on the second line of the LCD.

 Press <space bar>to verify the next instructions and opcodes.

 Press <space bar>to verify the next instructions and opcodes.

www.wizaardsystem.in 29
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

 Press <space bar>to verify the next instructions and opcodes.

 Now press the <Enter> key two times.It waits for H-for help.

 To execute the program press g< staring address>that is press g1100.

 Now Press <Enter> key again. Output value stored in accumulator is


displayed

 Press <Esc> key to go for H-for help display

 These are the basic procedures to enter the program in both the
methods. Likewise, we can enter all other programs in our kit.

www.wizaardsystem.in 30
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

CHAPTER 5
Microprocessor Programming Using 8086 Kit
5.1. ADDITION
5.1.1. ADDITION OF TWO 8 BIT NUMBERS WITH CARRY
Objective
To write the assembly program for add two 8 bit numbers with carry by
loading directly and store the result in the address 1100H.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
Two numbers can be added in microprocessor by keeping one number in
an accumulator and the other number in a register. Then the content of an
accumulator is added with the content of a B register using the instruction
ADCAX,BX. The result is stored at accumulator (AX).
Flow Chart

Start

Set CARRY bit

Give input data into


Accumulator A

Give next input data Into


Register B

Add Accumulator A with


Register B with carry bit

End

www.wizaardsystem.in 31
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode+. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.[Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat the experiment for different values.
 The input data locations 1105H &1107H.
Program

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B8 00 00 MOV AX,0000 Initialize acc
2 1103 F9 STC Set Carry bit
3 1104 B0 22 MOV AL,22 Given 1st input data
4 1106 B3 33 MOV BL,33 Given 2nd input data
5 1108 10 D8 ADDAL,BL A= A + B REG
6 110A CC INT 3 END

Result

INPUT OUTPUT
(BEFORE ADDITION) (AFTER ADDITION)

AL= 22H AX=0056H


BL=33H

****************************************************************

www.wizaardsystem.in 32
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.1.2. ADDITION OF TWO 16 BIT NUMBERS WITH CARRY


Objective
To add two 16 bit numbers with carry bit by loading directly and store the
result in Accumulator.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
Two numbers can be added in microprocessor by keeping one number in
an AX register and the other number in a BX register. Then the content of an
AX register is added with the content of aBX registerusing the instruction
ADD AX, BX. The result in an acc is stored in theAccumulator.
Flow Chart
Start

Set Carry flag

Give input data into AX


register

Give 2 nd data to BX register

ADD AX reg & BX reg with


carry flag

Result store in accumulator

End

www.wizaardsystem.in 33
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note:Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note:Refer Chapter 3]
 Verify the result in the accumulator.
 Repeat the experiment for different input values (location= 1105H, 1106H,
1108H, 1109H).

Program

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B8 00 00 MOV AX,0000 Initialize acc
2 1103 F9 STC Set Carry bit
3 1104 B8 44 44 MOV AX,4444 Given 1st input data
4 1107 BB 33 33 MOV BX,3333 Given 2nd input data
5 110A 11 D8 ADD AX,BX A= A + B REG
6 110C CC INT 3 END

Result

INPUT OUTPUT
(BEFORE ADDITION) (AFTER ADDITION)

AX= 4444H AX=7778H


BX=3333H

****************************************************************

www.wizaardsystem.in 34
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.2 SUBTRACTION

5.2.1 SUBTRACTION OF 8 BIT NUMBERS WITH BORROW

Objective
To subtracttwo8 bit numbers by loading directly and store the result in the
Accumulator.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

Two numbers can be subtracted in microprocessor by keeping one number in an


accumulator and the other number in a register. Then the content of an
accumulator is subtracted with the content of a register using the instruction
SUB AL, BL. The result in an accumulator is stored in accumulator.

Flow Chart

Start

Give the input data into


an Accumulator A

Give the next input data


into the Register B

Subtract the content of


Accumulator A by Register B

Store the result in


Accumulator

End

www.wizaardsystem.in 35
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat the experiment for different input values.
 The input data locations are 1105H &1107H.

Program

S.N
ADDRESS OPCODE MNEMONICS COMMENTS
O
1100 B8 00 00 MOV AX,0000 Clear accumulator
1103 F9 STC Set carry flag
1104 B0 34 MOV AL,34 Given 1STinput data
Given 2ND input
1106 B3 32 MOV BL,32
data
ACC=ACC– B
1108 18 D8 SUBAL, BL
REG
110A CC INT3 END

Result

INPUT OUTPUT
(BEFORE SUBTRACTION) (AFTER SUBTRACTION)

AL = 34H AX = 0001H
BL = 32H

****************************************************************

www.wizaardsystem.in 36
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.2.2SUBTRACTION OF TWO 16BIT NUMBERS WITH


BORROW

Objective
To write assembly program for subtract two 16 bit numbers by loading
directly and store the result in an accumulator.
Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

Two numbers can be subtracted in microprocessor by keeping one


number in an accumulator and the other number in a register. Then the content
of an accumulator is subtracted with the content of a register using
theinstructionSBB AX, BX. The result in an accumulator is stored in
accumulator.

Flow Chart

Start

Give the input data into


an Accumulator A

Give the next input data


into the Register B

Subtract the content of


Accumulator A by Register B

Store the result in


Accumulator

End

www.wizaardsystem.in 37
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat experiment for different values (input data location= 1101H,
1102H, 1104H&1105H).

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B8 33 33 MOV AX,3333 Given 1STinput data
2 1103 BB 11 11 MOV BX,1111 Given 2ND input data
3 1106 F9 STC Set carry flag
4 1107 19 D8 SUBAX, BX ACC=ACC– B REG
5 1109 CC INT3 END
Program

Result

INPUT OUTPUT
(BEFORE SUBTRACTION) (AFTER SUBTRACTION)

AX = 3333H AX = 2221H
BX = 1111H

www.wizaardsystem.in 38
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

****************************************************************

5.3 MULTIPLICATION

5.3.1 MULTIPLICATION OF 8 BIT NUMBERS

Objective
To write assembly program for multiply two 8 bit numbers by loading
directly and store the result in accumulator.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

Two numbers can be multiplied in microprocessor by keeping one


number in an accumulator and the other number in a register B. Then the
content of an accumulator is multiplied using instructionMUL AL, BL. The
result in an accumulator is stored in the Accumulator.

Flow Chart
Start

Give the input data into


an Accumulator A

Give the next input data


into the Register B

Multiply the content of


Accumulator A by Register B

Store the result in


Accumulator

End

www.wizaardsystem.in 39
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.[Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat the experiment for different values (input location= 1101H &
1103H)

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B0 33 MOV AL,33 Given 1STinput data
2 1102 B3 10 MOV BL,10 Given 2ND input data
3 1104 F6 E3 MUL BL AX= AL * BL
4 1106 CC INT3 END
Program

INPUT OUTPUT
Result
(BEFORE MULTIPLY) (AFTER MULTIPLY)

AL = 33H AX = 0330H

BL = 10H

*******************************************************
www.wizaardsystem.in 40
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.3.2 MULTIPLICATION OF 16 BIT NUMBERS

Objective
To write assembly program for multiply two16 bit numbers by loading
from memory and store the result in accumulator.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

Two 16bitnumbers can be multiplied in microprocessor by keeping one


number in an accumulator and the other number in a register B. Then the
content of an accumulator is multiplied using instruction MUL AX, BX. The
result in an accumulator is stored in the Accumulator and DX reg.

Flow Chart

Start

Give the input data into


an Accumulator A

Give the next input data


into the Register B

Multiply the content of


Accumulator A by Register B

Store the result in


Accumulator

End

www.wizaardsystem.in 41
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.[Note: Refer Chapter 3]
 Verify the result in Accumulator and DX reg.
 Repeat experiment for different values (input location=1101H, 1102H,
1104H, &1105H).

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B8 2143 MOV AX,4321 Given 1STinput data
2 1103 BB 00 01 MOV BX,0100 Given 2ND input data
3 1106 F7 E3 MUL BX AX= AL * BL
4 1108 CC INT3 END
Program

Note: after execute programwe can see AX reg, press space bar to see DX reg.

Result

INPUT OUTPUT
(BEFORE MULTIPLY) (AFTER MULTIPLY)

AX = 1234H AX = 2100H

BX = 0100H DX = 0043H

********************************************************

www.wizaardsystem.in 42
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.4 DIVISION
5.4.1. DIVISION OF TWO 8 BIT NUMBERS
Objective
To divide two 8 bit numbers by loading directly and store the result in the
accumulator.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
Thenumbers can be Division in microprocessor by keeping one 16
bitnumber in an accumulator and the other 8 bit number in a register C. Then
the content of an accumulator is dividingusing instructionDIV CL. The result in
an accumulator is stored in the Accumulator.

Flow Chart

Start

Give the input data into


an Accumulator A

Give the next input data


into the Register C

Divide the content of


Accumulator A by Register C

Store the result in


Accumulator

End

www.wizaardsystem.in 43
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.[Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat experiment for different values (input location=1101H, 1102H &
1104H).

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B8 55 05 MOV AX,0555 Given 1STinput data
2 1103 B1 55 MOV CL,55 Given 2ND input data
AL=> Quotient
3 1105 F6 F1 DIV CL
AH=> Reminder
4 1107 CC INT3 END
Program

Result

INPUT OUTPUT
(BEFORE DIVISION) (AFTER DIVISION)

AX = 0555H AX = 0510H
CL = 55H

****************************************************************
www.wizaardsystem.in 44
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.4.2. DIVISION OF TWO 16 BIT NUMBERS

Objective
To write the program for divide two 16 bitnumbers and store the result in
accumulator.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
Two 16bitnumbers can be Division in microprocessor by keeping one
number in an accumulator and the other number in a register B. Then the
content of an accumulator is dividing using instruction DIV CX. The result in
an accumulator is stored in the Accumulator.

Flow Chart

Start

Give the input data into


an Accumulator A

Give the next input data


into the Register C

Divide the content of


Accumulator A by Register C

Store the result in


Accumulator and D Reg

End

www.wizaardsystem.in 45
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note:Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note:Refer Chapter 3]
 Verify the result in Accumulator & DX reg.
 Repeat the experiment for different values (input value locations=1101H,
1102H, 1104H, 1105H, 1107H,1108H).
Program

S.NO ADDRESS OPCODE MNEMONICS COMMENTS


1 1100 B8 AA AA MOV AX,AAAA Dividend lower word
2 1103 BA BB 00 MOV DX,00BB Dividend higher word
3 1106 B9 44 44 MOV CX,4444 divisor
AX=> Quotient
4 1109 F7 F1 DIV CX
DX=> Reminder
5 110B CC INT3 END

Result

INPUT OUTPUT
(BEFORE DIVISION) (AFTER DIVISION)

AX = AAAAH AX = 02BFH
DX = 00BBH DX = 00BBH

****************************************************************

www.wizaardsystem.in 46
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.5. INCREMENT NUMBERS


Objective
To write the assembly program for increment number by given count
value and store the result in the accumulator.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
The input data is directly loaded to ACC. The increment count value
loaded to B register directly. The incremented result move to accumulator and
stored in accumulator.
Flow Chart
Start

Give input data into Accumulator

Give count value Into


Register B

Increment Accumulator

Decrement register B

YES
Jump if No
Zero
NO

Store the Result in ACC.

End

www.wizaardsystem.in 47
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat the experiment for different values.
 The input value location is 1101H, 1102H and count value location is
1104H, 1105H.

Program
ADDRESS OPCODE LABEL MNEMONICS COMMENT
1100 B8 10 00 MOV AX,1110 Get input data to acc.
1103 BB 05 00 MOV BX,0005 get count value
1106 40 LOOP: INC AX increment ACC value
1107 4B DEC BX decrement count value
if count is no zero go to
1108 75 FC JNZLOOP loop(1106H)
110A CC INT 3 store result in ACC &end

Result

INPUT OUTPUT
(BEFORE (AFTER
INCREMENT) INCREMENT)

AX = 1110H AX = 1115H

BX = 0005H

****************************************************************

www.wizaardsystem.in 48
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.6. DECREMENTNUMBERS
Objective
To write the assembly program for add two 8 bit numbers by loading
directly and store the result in accumulator.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
The input data is directly loaded to Acc. The decrement count value
loaded to B register directly. The decremented result move to accumulator and
stored in the accumulator.
Flow Chart

Start

Give input data into Accumulator

Give count value Into


Register B

Decrement Accumulator

Decrement register B

YES
Jump if No
Zero
NO

Store the Result in ACC.

End

www.wizaardsystem.in 49
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Verify the result in an accumulator.
 Repeat the experiment for different values.
 The input value location is 1101H, 1102H and count value location is
1104H, 1105H.

Program
ADDRESS OPCODE LABEL MNEMONICS COMMENT
1100 B8 15 11 MOV AX,1111 Get input data to acc.
1103 BB 05 00 MOV BX,0005 get count value
1106 48 LOOP: DEC AX Decrement ACC value
1107 4B DEC BX decrement count value
if count is no zero go to
1108 75 FC JNZ LOOP loop
110A CC INT 3 store result in ACC &end

Result

INPUT OUTPUT
(BEFORE (AFTER
DECREMENT) DECREMENT)

AX = 1110H AX = 110CH
BX = 0005H

****************************************************************

www.wizaardsystem.in 50
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.7.FINDMAXIMUM VALUE IN ARRAY


Objective
To write the assembly program for Find maximum value in an array and
store the result in the address 9500H.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
In this program can be use find the maximum value in given array. The
input data array is given to 9000H location. Then all data’s compared and find
which maximum value. The result in an accumulator is stored in the address
9500H.
FLOW CHART Start

Get the first data from 9001

Increment the pointer to


next data

Get next data from


memory

YES
Jump if No
Is small
NO

Decrement count

YES
Jump if No
Zero
NO

Store the Result in ACC.

End

www.wizaardsystem.in 51
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Give the input value to 9000H memory location
 Verify the result in the address 9500H and also in an accumulator.
 Repeat the experiment for different values.
 The input value starts from 9001H, and count value location is 9500H.

www.wizaardsystem.in 52
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

ADDRESS OPCODE LABEL MNEMONICS COMMENTS


1100 BE 00 90 MOV SI,9000 Given 1STinput data
1103 8A 0C MOV CL,[SI] Count value
1105 46 INC SI Increase memlocation
1106 8A 04 MOV AL,[SI] Get next data
1108 FE C9 DEC CL Decrement count
110A 46 LOOP2: INC SI Increase memlocation
110B 3A 04 CMP AL,[SI] Compare AL with data
110D 73 02 JNB LOOP1 (1111)
110F 8A 04 MOV AL,[SI] Get next data
1111 FE C9 LOOP1: DEC CL Decrement count
1113 75 F5 JNZ LOOP2 (110A)
1115 BF 00 95 MOV DI,9500 Store the data at 9500
1118 88 05 MOV [DI],AL
111A B4 00 MOV AH,00
111C CC INT3 END

Result
INPUT: OUTPUT:

ADDRESS INPUT VALUES ADDRESS OUTPUT


VALUE
9000 04H
9500 E8H
9001 E8H
AX 00E8H
9002 40H
9003 50H
9004 A0H

****************************************************************

www.wizaardsystem.in 53
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.8.FINDMINIMUM VALUE IN ARRAY


Objective
To write the assembly program for find minimum value in an array and
store the result in the address 9500H.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
In this program can be use find the minimum value in given array. The
input data array is given to 9000H location. Then all data’s compared and find
which minimum value is. The result in an accumulator is stored in the address
9500H.
Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Give the input value to 9000H memory location
 Verify the result in the address 9500H and also in an accumulator.
 Repeat the experiment for different values.
 The input value starts from 9001H, and count value location is 9500H.

www.wizaardsystem.in 54
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Flow Chart

Start

Get the first data from 9001

Increment the pointer to next


data

Get next data from memory

YES
Jump if No
Is large
NO

Decrement count

YES
Jump if No
Zero
NO

Store the Result in ACC.

End

www.wizaardsystem.in 55
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Program

ADDRESS OPCODE LABEL MNEMONICS COMMENTS


1100 BE 00 90 MOV SI,9000 Given 1STinput data
1103 8A 0C MOV CL,[SI] Count value
1105 46 INC SI Increase memloction
1106 8A 04 MOV AL,[SI] Get next data
1108 FE C9 DEC CL Decrement count
110A 46 LOOP2: INC SI Increase memloction
110B 3A 04 CMP AL,[SI] Compare ALwith data
110D 72 02 JNB LOOP1 (1111)
110F 8A 04 MOV AL,[SI] Get next data
1111 FE C9 LOOP1: DEC CL Decrement count
1113 75 F5 JNZ LOOP2 (110A)
1115 BF 00 95 MOV DI,9500 Store the data at 9500
1118 88 05 MOV [DI],AL
111A B4 00 MOV AH,00
111C CC INT3 END

Result
INPUT: OUTPUT:

ADDRESS INPUT VALUES ADDRESS OUTPUT


VALUE
9000 04
8501 40
9001 E8
9002 40
9003 50
9004 A0

****************************************************************

www.wizaardsystem.in 56
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.9. PROGRAM TO ARRANGE THE NUMBERS IN


ASCENDING ORDER
Objective
To write the assembly program for arrange the given numbers in an
ascending order and store the result in the same input address range.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

Some numbers can be arranged in an ascending order using


microprocessor. The count of the numbers should be loaded in 9000H.The first
value and the second value will be loaded into registers. Then compare those
two values and check for the carry. If the zero is found, B reg is larger than Acc
value. So repeated above process and list the Ascending Order of given Array.

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result from the address 9001H till the count.
 Repeat the experiment for different values.
 The input value starts from 9001H, and count value location is 9000H.

www.wizaardsystem.in 57
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Flow Chart
Start

Get the first data from 9001

Get Next data for


comparison

Get next data from memory

NO Store
Comp if AL
Is Small smallest Data

YES

Store greatest Data

Decrement comparisons Data

YES
Jump if No
Is large
NO

Decrement count

YES
Jump if No
Zero
NO

Store the Result in ACC.

End

www.wizaardsystem.in 58
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Program

ADDRESS OPCODE LABEL MNEMONICS COMMENTS


1100 BE 00 90 MOV SI,9000 Given 1ST input data
1103 8A 0C MOV CL,[SI] Get count
1105 BE 00 90 LOOP4: MOV SI,9000
1108 8A 14 MOV DL,[SI] Get compare count
110A 46 INC SI Get first data from 9001
110B 8A 04 MOV AL,[SI] AL<=data
110D 46 LOOP3: INC SI Get next data
110E 8A 1C MOV BL,[SI] BL<=data
1110 38 D8 CMP AL,BL If AL<BL go to loop
1112 73 07 JNB LOOP1 (111B)
1114 4E DEC SI
1115 88 04 MOV [SI],AL Store smallest data
1117 88 D8 MOV AL,BL
1119 EB 03 JMP LOOP2 (111E)
111B 4E LOOP1: DEC SI
111C 88 1C MOV [SI],BL Store largest data
111E 46 LOOP2: INC SI
111F FE CA DEC DL Decrement count
1121 75 EA JNZ LOOP3 (110D)
1123 88 04 MOV [SI],AL Store last data
1125 FE C9 DEC CL Decrement count
1127 75 DC JNZ LOOP4 (1105)
1129 CC INT3 END
Result
No. of input data to be given: 04
INPUT OUTPUT
ADDRESS (BEFORE (AFTER
ARRANGING) ARRANGING)
9000 04 04
9001 E8 40
9002 40 50
9003 50 A0
9004 A0 E8

****************************************************************

www.wizaardsystem.in 59
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.10. PROGRAM TO ARRANGE THE NUMBERS IN


DESCENDING ORDER
Objective
Towrite the assembly program for arrange the given numbers in an
Descending order and store the result in the same input address range.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

Some numbers can be arranged in an ascending order using


microprocessor. The count of the numbers should be loaded in 9000H.The first
value and the second value will be loaded into registers. Then compare those
two values and check for the carry. If the zero is found, B reg is larger than Acc
value. So repeated above process and list the Descending Order of given Array.

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result from the address 9001H till the count.
 Repeat the experiment for different values.
 The input value starts from 9001H, and count value location is 9000H.

www.wizaardsystem.in 60
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Flow Chart

Start

Get the first data from 9001

Get Next data for


comparison

Get next data from memory

NO Store
Comp if AL
Is Large smallest Data

YES

Store greatest Data

Decrement comparisons Data

YES
Jump if No
Is Small
NO

Decrement count

YES
Jump if No
Zero
NO

Store the Result in ACC.

End

www.wizaardsystem.in 61
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Program

ADDRESS OPCODE LABEL MNEMONICS COMMENTS


1100 BE 00 90 MOV SI,9000 Given 1ST input data
1103 8A 0C MOV CL,[SI] Get count
1105 BE 00 90 LOOP4: MOV SI,9000
1108 8A 14 MOV DL,[SI] Get compare count
110A 46 INC SI Get first data from 9001
110B 8A 04 MOV AL,[SI] AL<=data
110D 46 LOOP3: INC SI Get next data
110E 8A 1C MOV BL,[SI] BL<=data
1110 38 D8 CMP AL,BL If AL>BL go to loop
1112 72 07 JB LOOP1 (111B)
1114 4E DEC SI
1115 88 04 MOV [SI],AL Store smallest data
1117 88 D8 MOV AL,BL
1119 EB 03 JMP LOOP2 (111E)
111B 4E LOOP1: DEC SI
111C 88 1C MOV [SI],BL Store largest data
111E 46 LOOP2: INC SI
111F FE CA DEC DL Decrement count
1121 75 EA JNZ LOOP3 (110D)
1123 88 04 MOV [SI],AL Store last data
1125 FE C9 DEC CL Decrement count
1127 75 DC JNZ LOOP4 (1105)
1129 CC INT3 END

Result
No. of input data to be given: 04

ADDRESS INPUT OUTPUT


(BEFORE (AFTER
ARRANGING) ARRANGING)
9000 03 03
9001 E8 E8
9002 40 A0
9003 50 50
9004 A0 40
**************************************************************

www.wizaardsystem.in 62
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.11.ROTATE GIVEN NUMBERS


Objective
To write the assembly program for rotate the given number using rotate
instructions and store the result in the address 9500H& 9502H.
Apparatus Required
 WS-8086Trainers kit V1.2
 Keyboard USB/PS2
Theory
The input data is directly loaded to Accumulator. The given input
number rotate using RRC (Rotate Right with Carry), RLC(Rotate Left with
Carry). The result stored in the address of 9500H&9502H.
Flow Chart

Start

Give input data Accumulator

Acc data 3 times Rotate Right


with carry

Store result in 9500H

Again result 3 times


Rotate left with carry

Store the Acc value in 9502H


Location

End

www.wizaardsystem.in 63
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit and Connect the keyboard.


 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program. [Note: Refer Chapter 3]
 Verify the result in the address 9500H& 9502H. And also in an
accumulator.
 Repeat the experiment for different values (input value location is
1101H&1102, count value location is 1104H).
Program
ADDRESS OPCODE MNEMONICS COMMENT
1100 B8 01 00 MOV AX,0001 give input data to acc
1103 B1 03 MOV CL,03 CL<=03H
1105 D3 C0 ROL AX,CL Rotate Left with carry by
3 times
1107 BF 00 95 MOV DI,9500 store the result in 9500H
110A 89 05 MOV [DI],AX
110C D3 C8 ROR AX,CL Rotate right with carry
by 3 times
110E BF 02 95 MOV DI,9502 store the result in 9502H
1111 89 05 MOV [DI],AX
1113 CC INT3 end program

Result

INPUT OUTPUT OUTPUT


(BEFORE ROTATION) (AFTER LEFT ROTATION) (AFTER RIGHT ROTATION)

AX = 0001H 9500H = 08H 9502H = 01H


CL = 03 9501H= 00H 9503H= 00H

****************************************************************

www.wizaardsystem.in 64
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.12. PROGRAM TO CONVERT BCD TO HEX


Objective
Towrite the assembly program for convert given BCD number into Hex
value and store the result in the 8501H address.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

In microprocessor we can convert BCD value to Hexadecimal value


(HEX), by using simple addition operation and simple Arithmetic operations.
The input is given into the Accumulator A. Separate higher nipple and lower
nipple. Then get the higher nipple in lower nipple position. Multiply by 10.
Then Addition should be done with the content of the register BL and the
content of an accumulator, its result stored in the memory. Finally the result will
be stored inAccumulator.

Flow Chart Start

Give input data Accumulator

Separate the higher & lower


Bits

Rotate right at 4times for swap

Multiply with 0A Data &


ADD with BL data

Store the Results in


Accumulator

End

www.wizaardsystem.in 65
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result in Accumulator.
 Repeat the experiment for different values
 The input value location is 1101H.

Program

ADDRESS OPCODE MNEMONICS COMMENTS


1100 B0 27 MOV AL,27 Given input data
1102 88 C4 MOV AH,AL AH<=AL
1104 80 E4 0F AND AH,0F Acc= AH & 0FH
1107 88 E3 MOV BL,AH BL<=AH
1109 24 F0 AND AL,F0 Acc= AL & F0H
110B B1 04 MOV CL,04 CL<= 04H
110D D2 C8 ROR AL,CL Rotate right ACC
110F B7 0A MOV BH,0A BH<= 0AH
1111 F6 E7 MUL BH Multiply AL &BL
1113 00 D8 ADD AL,BL Acc=AL+BL
1115 CC INT3 END

Result

INPUT (BCD) OUTPUT (HEX)


AL = 27H AX = 001BH

****************************************************************

www.wizaardsystem.in 66
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.13. PROGRAM TO CONVERT BCD TO ASCII


Objective
To write the assembly program for convert given BCD number into
ASCII value and store the result in the 9500H&9501H address.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

In microprocessor we can convert BCD value to Hexadecimal value


(HEX), by using simple OR operation. The input is given into the BX register
and an Accumulator A. The OR should be done with the content of the
Accumulator and data, using instruction OR AX, BX. its result stored in the
memory. Finally the result will be stored in memory 9500H&9501H.

Flow Chart

Start

Give input data Accumulator

Load 3030H data to BX reg

OR operation with AX&BX

Store results in 9500


memory location

End

www.wizaardsystem.in 67
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 8100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result in 9500H, 9501H address.
 Repeat the experiment for different values (input value location is
1101H&1102H).

Program

ADDRESS OPCODE MNEMONICS COMMAND

1100 B8 04 03 MOV AX,0304 Give the input data to acc

1103 BB 30 30 MOV BX,3030 BX<= 3030h data

1106 09 D8 OR AX,BX OR operation performed

1108 BF 00 95 MOV DI,9500 Store location init

110B 89 05 MOV [DI],AX Store data to 9500

110D CC INT3 end

Result

INPUT (BCD) OUTPUT(ASCII)


AX = 0304H 9500H = 34H
9501H = 33H

****************************************************************

www.wizaardsystem.in 68
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.14. PROGRAM TO CONVERT HEX TO BCD


Objective
To write the assembly program convert given Hex number into its
corresponding BCD value and store the result in the 9500H, 9501H&9502H.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

In microprocessor we can convert Hexadecimal value (HEX) into BCD


value, by using logical and Arithmetic operations. The input is given into the
1101H and an Accumulator A. move the input data to Breg also. The
conversion performed using simple division instructions. The BCD result will
store at 9500H, 9501H & 9502H.

Flow Chart
Start

Give input data BL reg

Divide by 64H data

Store the first BCD bit

Again given Data divide


by 10

Store reminder & quotient in


memory locations

End

www.wizaardsystem.in 69
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure
 Switch ON the microprocessor kit.
 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result from in 9500H, 9501H & 9502H.
 Repeat the experiment for different values (input value location is 1101H).
Program

ADDRESS OPCODE LABEL MNEMONICS COMMENTS


1100 B3 0A MOV BL,FF Given 1 ST input data
1102 B1 64 MOV CL,64 CL<= 64H(100D)
1104 E8 13 00 CALL HEX2BCD Divide by 100
1107 BF 00 95 MOV DI,9500 Store location init
110A 88 05 MOV [DI],AL Store data to 9500
110C 88 E3 MOV BL,AH Move reminder to BL
110E B1 0A MOV CL,0A Divisor 10H=> CL
1110 E8 07 00 CALL HEX2BCD Divide by 10
1113 47 INC DI Increment address
1114 88 05 MOV [DI],AL Store quotient
1116 47 INC DI Increment address
1117 88 25 MOV [DI],AH Store reminder
1119 CC INT3 END
111A B8 00 00 HEX2BCD: MOV AX,0000 Acc initialize to 00
111D 88 D8 MOV AL,BL Load data
111F F6 F1 DIV CL Divide by CL
1121 C3 RET return

Result

INPUT (HEX) OUTPUT (BCD)


8500H =FFH 9500H = 02
9501H= 05
9502H= 05

**************************************************************

www.wizaardsystem.in 70
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.15. PROGRAM TO CONVERT HEX TO ASCII


Objective
To write the assembly program for convert given Hex number into its
corresponding ASCII value and store the result in the Accumulator.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

In microprocessor we can convert Hexadecimal value (HEX) into ASCII


value, by using logical and Arithmetic operations. The input is given into an
Accumulator. Then ASCII conversion performed by Adding 07 & 30H data’s.
Finally we get the corresponding ASCII data. Result will store at Accumulator.

Flow Chart
Start

Load the input data to


accumulator

Compare acc with


immediate data 09

yes
If Bit Set= jump to
loop
No
ADD accumulator with
07H

ADD accumulator with


30H

End

www.wizaardsystem.in 71
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result Accumulator.
 Repeat the experiment for different values (Input Value Location Is 1104H).

Program

ADDRESS OPCODE MNEMONICS COMMENTS


1100 B8 00 00 MOV AX,0000 Acc initialize to 00
1103 B0 0A MOV AL,0A Given input data
1105 3C 09 CMP AL,09 Compare AL with09H
1107 74 04 JZ 110D
1109 72 02 JNB 110D Jump on bit
110B 04 07 ADD AL,07 ACC<= AL + 07H
110D 04 30 ADD AL,30 ACC<= AL + 30H
110F CC INT3 END

Result

INPUT (hex) OUTPUT (Ascii)

AL = 0A AX = 0041H

****************************************************************

www.wizaardsystem.in 72
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.16. PROGRAM TO CONVERT ASCII TO HEX


Objective
To write the assembly program for convert given ASCII value into Hex
value and store the result in the Accumulator.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

In microprocessor we can convert ASCII value to Hexadecimal value


(HEX), by using simple Arithmetic operations. The input is given into the
Accumulator A. subtract 30H with AL reg. if data is less than or equal to 16
terminate the program, else subtract 07 from AL. The result stored in the
Accumulator.

Flow Chart

Start

Subtract acc with immediate


data 30H

Compare acc with


immediate data 10

yes
If Bit set=jump to
loop
No
Again Subtract acc with
immediate data 07H

End

www.wizaardsystem.in 73
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result in Accumulator.
 Repeat the experiment for different values (Input location is 1104H).
Program

ADDRESS OPCODE MNEMONICS COMMENTS


1100 B8 00 00 MOV AX,0000 Acc initialize to 00
1103 B0 41 MOV AL,41 Given input data
1105 2C 30 SUB AL,30 ACC<= AL – 30H
1107 3C 10 CMP AL,10 Compare AL with10H
1109 72 04 JNB 110F Jump on bit
110B 74 02 JZ 110F
110D 2C 07 SUB AL,07 ACC<= AL –07H
110F CC INT3 END

Result

INPUT (ascii) OUTPUT (hex)


1101= 41H ACC = 0A

****************************************************************

www.wizaardsystem.in 74
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.17. PROGRAM TO CONVERT ASCII TO BCD


Objective
To write the assembly program for convert given ASCII value into BCD
value and store the result in the accumulator.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
Theory

In microprocessor we can convert ASCII value to BCD value, by using


simple Arithmetic operations. The input is given into the Accumulator A& BL
reg. The input data’s lower bits separated and combine together. After
conversion the result present in accumulator.

Flow Chart
Start

Give input data BL reg & acc

Get the lower bit two i/p


Data’s

Rotate the BL data by 4 bits

And combine the


accumulator and BL data

Store the result in


accumulator

End

www.wizaardsystem.in 75
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 8100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Verify the result in accumulator.
 Repeat the experiment for different values (input value location is
1104H&1106H).

Program

ADDRESS OPCODE MNEMONICS COMMENT


1100 B8 00 00 MOV AX,0000 Acc initialize to 00
1103 B3 35 MOV BL,35H Get first BCD data
1105 B0 39 MOV AL,39H Get 2nd BCD data
1107 80 E3 0F AND BL,0F Get lower bits of BL
110A 24 0F AND AL,0F Get lower bits of AL
110C B1 04 MOV CL,04
110E D2 C3 ROL BL,CL Rotate right (4 times)
1110 08 D8 OR AL,BL Combine AL & BL
1112 CC INT3 END

Result

INPUT OUTPUT
BL = 35H AX = 0059
AL = 39H

****************************************************************

www.wizaardsystem.in 76
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.18. SQUARE WAVE GENERATION USING 8253/54 IC

Objective
To write the assembly program for generate the Square Wave using
8253/54 IC.And see the result in the 10th pin using oscilloscope.

Apparatus Required

 WS-8086Trainers kit V1.2


 Keyboard USB/PS2
 CRO
Theory

IC 8253/54 is software programmable timer/counter designed for


use with microcomputer systems for the generation of accurate time delays
under software control. The objective of using the 8253/54 Programmable
Timer/Counter peripheral IC is, to verify different waveform generations by
using “Three types of Counters in Six Modes”. Each Counter can be
programmed separately for six different Modes. Now we are use the Counter 0
Mode 3 used. The mode 3 used for generate the square wave form. The output
is shown in 8253 IC 10th pin through CRO.

Procedure

 Switch ON the microprocessor kit.


 Connect the keyboard.
 Start entering the program from the memory location 1100H either in
Mnemonics or in Opcode. [Note: Refer Chapter 3]
 Once finished typing, press ENTER button twice.
 Execute the program.
 Switch on oscilloscope. Connect probe.
 See the result on 8253/54 IC 10th pin.
 Repeat this program in different count (count location is 1107H&110DH).

www.wizaardsystem.in 77
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Flowchart

Start

move immediate data to


accumulator(36H)

send the control word to 8253


timer for mode 0 selection

give the LSB data value give


to accumulator

send the LSB value to timer

give the MSB of data to


accumulator

send the MSB to timer

check the output in timer pin 10.

End

Checking output:

8253/54 IC

Output check in
10th pin of IC,
using CRO probe

www.wizaardsystem.in 78
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Program
ADDRESS OPCODE MNEMONICS COMMENTS
1100 B0 37 MOV AL,36 timer initialized with counter 1 in
mode 0
1102 BA 16 FF MOV DX,FF16 control port address in DX
1105 EE OUT DX,AL send the data to the timer
1106 B0 05 MOV AL,05 load LSB count in the al
1108 BA 10 FF MOV DX,FF10 port address in DX
110B EE OUT DX,AL output the al contents to clk1
110C B0 00 MOV AL,00 load MSB count in the al
110E EE OUT DX,AL
110F CC INT3 End

OUTPUT WAVEFORM :( counter 0, mode 3)


Note: Output check in 8253 IC 10 th pin.

Counter 0 & mode 3 Output in CRO

Square
wave o/p

Result

Thus the square wave generation using 8253/54 IC was successfully verified.

****************************************************************

www.wizaardsystem.in 79
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

5.19. SERIAL COMMUNICATION BETWEEN TWO 8086 KITS

Objective
Towrite the assembly program forperform serial communication between
two WS 8086microprocessor kits using RS232 cable.

Apparatus Required

 Two - WS-8086 Trainers kitV1.2


 Keyboard USB/PS2, power card
 RS 232 cable(KIT TO KIT)
Theory

In this program two microprocessor kits are interfaced and the input data is
serially transmitted over it. We used 8251 IC for serial communication.

Procedure

 Switch ON the microprocessor kit &Connect the keyboard.


 Connect the DB9 connector between two 8086kit.
 Start entering the Transmitter program from the memory location 8500H
either in Mnemonics or in Opcode.[Note: Refer Chapter 3 in ws-8086 kit user

manual]in one 8086 kit.


 Enter the Receiver program from memory location 8500H either in
Mnemonics or in Opcode.[Note: Refer Chapter 3 in ws-8086 kit user manual]in

another8086 kit. And also enter the Delay program in the memory
location.
 Once finished typing in both the kit, press ENTER key twice.
 Execute the Receiver program kit first and then Transmitter program kit.
 Output shown in RX kit accumulator & 8600H location.
 Now verify the result in Receiver kit.
 In this program, transmit data= 55H.
 Repeat the program in different data.(input data location = 8501H)

www.wizaardsystem.in 80
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

Block diagram:

8086 8086
8251 &
MICRO MICRO
PROCESSOR – MAX 232 PROCESSOR –
KIT 1 KIT 2

Program

Transmitterprogram (kit 1):


ADDRESS OPCODE LABEL MNEMONICS COMMENTS
2000 B8 78 00 MOV AX,0078H BAUD COUNT
2003 E8 1C 00 CALL 2022 AX CONTAIN TIMER COUNT
2006 B0 55 MOV AL,55 BL – CONTAIN THE BYTE TO
2008 E8 03 00 CALL 200E BE
TX TX
ONE BYTE TO PC
200B EB F9 JMP 2006
200D CC INT 3
200E E8 3D 00 CALL 204E
2011 88 C3 MOV BL,AL SAVE THE BYTE
2013 BA 12 FF MOV DX,FF12 STATUS REG
2016 EC IN AL,DX GET THE STATUS BYTE
2017 24 01 AND AL,01 CHECK THE READY BIT
2019 74 FB JE 2016
201B 88 D8 MOV AL,BL RESTORE THE BYTE TO AL
201D BA 10 FF MOV DX,FF10 MODE REG
2020 EE OUT DX,AL TX THE BYTE
2021 C3 RET
2022 89 C1 MOV CX,AX SAVE THE COUNT IN CX
2024 B0 37 MOV AL,37 COUNTER-0 IS SELECTED
2026 BA 00 FF MOV DX,FF00 FF00 CONTROL REG
2029 EE OUT DX,AL
202A 88 C8 MOV AL,CL COUNT LSB
202C BA 00 FF MOV DX,FF00 COUNTER-0 REG
202F EE OUT DX,AL
2030 88 E8 MOV AL,CH COUNT MSB
2032 EE OUT DX,AL
2033 90 NOP
2034 90 NOP
2035 BA 12 FF MOV DX,FF12 FF12 STATUS REGISTER
2038 B0 00 MOV AL,00 DUMMY MODE WORD
203A EE OUT DX,AL
203B EE OUT DX,AL

www.wizaardsystem.in 81
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

203C EE OUT DX,AL


203D B0 40 MOV AL,40 RESET WORD
203F EE OUT DX,AL
2040 E8 0B 00 CALL 204E
2043 B0 4E MOV AL,4E
2045 EE OUT DX,AL ONE STOP BIT, NO PARITY,
2046 90 NOP 8BITS CHAR
2047 90 NOP
2048 B0 27 MOV AL,27 ENABLE TX
204A EE OUT DX,AL TRANSMIT BIT SENT
204B 90 NOP
204C 90 NOP
204D C3 RET
204E 53 PUSH BX
204F BB FF 04 MOV BX,04FF
2052 90 NOP
2053 90 NOP
2054 4B DEC BX
2055 75 FB JNE 2052
2057 5B POP BX
2058 C3 RET

Receiver program(Type this program in another kit):


ADDRESS OPCODE LABEL MNEMONICS COMMENTS
1000 B8 78 00 MOV AX,0078H BAUD COUNT
1003 E8 11 00 CALL 1017 INITIALIZE THE TIMER AND
1006 E8 01 00 CALL 100A USART
RX ONE BYTE
1009 CC INT 3
100A BA 12 FF MOV DX,FF12 FF12 STATUS REGISTER
100D EC IN AL,DX STATUS READ
100E 24 02 AND AL,02
1010 74 FB JE 100D
1012 BA 10 FF MOV DX,FF10
1015 EC IN AL,DX
1016 C3 RET
1017 89 C1 MOV CX,AX SAVE THE COUNT IN CX
1019 B0 37 MOV AL,37 COUNTER 0 IS SELECTED
101B BA 00 FF MOV DX,FF00 FF00 CONTROL REG
101E EE OUT DX,AL
101F 88 C8 MOV AL,CL COUNT LSB
1021 BA 00 FF MOV DX,FF00 FF00 COUNTER 0 REG
1024 EE OUT DX,AL
1025 88 E8 MOV AL,CH COUNT MSB
1027 EE OUT DX,AL

www.wizaardsystem.in 82
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

1028 90 NOP
1029 90 NOP
102A BA 12FF MOV DX,FF12 FF12 STATUS REGISTER
102D B0 00 MOV AL,00 DUMMY MODE WORD
102F EE OUT DX,AL
1030 EE OUT DX,AL
1031 EE OUT DX,AL
1032 B0 40 MOV AL,40H RESET WORD
1034 EE OUT DX,AL
1035 E8 0B 00 CALL 1043
1038 B0 4E MOV AL,4E 01 00 11 10
103A EE OUT DX,AL ONE STOPBIT,NO
103B 90 NOP PARITY,8BITS CHAR
103C 90 NOP
103D B0 27 MOV AL,27 ENABLE TX
103F EE OUT DX,AL
1040 90 NOP
1041 90 NOP
1042 C3 RET
1043 53 PUSH BX DELAY FUNCTION
1044 BB FF 04 MOV BX,04FFH
1047 90 NOP
1048 90 NOP
1049 4B DEC BX
104A 75 FB JNE 1047
104C 5B POP BX
104D C3 RET

Note:
 Execute the Receiver program kit first and then Transmitter program kit.
 Output seen in receiver kit LCD.

Output in receiver kit:

www.wizaardsystem.in 83
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

RS 232 Cable Connection Detail:


KIT TO KIT Communication RS232 Cable:

KIT TO COMPUTER (PC) Communication Cable:

Result

The given input is serially transmitted from one kit to another kit.
Output seen in receiver kit Accumulator (A=55H).
****************************************************************

www.wizaardsystem.in 84
WS_8086_V1.3KITUSER AND TECHNICAL REFERENCE MANUAL

For Using
Wizaard System 8086 kit

All Business Enquiry Contact:

Designed & Marketed by,

Wizaard System
199-2 V.R.Complex, Siva Sakthi Colony,
Ganapathy, Coimbatore-641012,
Phone: 0422-4380105, Cell: 9843060303
E-Mail:[email protected]
Website:www.wizaardsystem.in

www.wizaardsystem.in 85

You might also like