8086 Trainer Kit User and Technical Reference Manual PDF
8086 Trainer Kit User and Technical Reference Manual PDF
Member Login
|
About Us
|
Become a Member
|
Contact Us
|
Dealership
Search
Home
Products
Project Kits
Components
Articles
Customers
Forum
Blog
Jobs
Training
Microcontroller Boards
DSP/DSC Boards
Power Electronics and Drives
CPLD/FPGA Boards
Accessory Boards
My cart(0) items
The PS-8086 board which demonstrates the capabilities of the 40-pin 8086 (various families) Sample programs
are provided to demonstrate the unique features of the supported devices.
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
1/71
3/12/2015
The PS 86A board is based on Intel 8086 Microprocessor, which operates at 6.144 MHz using the crystal
of 18.432. The board can operate using the 101/104 PC keyboard supplied along with the trainer kit and 2 Line
by 16-character LCD display or from the PC (using the Terminal Emulation Software).
Microprocessors Address, Data and Control bus pins are brought to the 50 pin FRC connector. PS -86A is
equipped with powerful software monitor in two-27C256 EPROM.
The monitor supports Video terminal RS232C interface, local 101keyboard and LCD display. The board has
64KB CMOS static RAM (type 62256). PS -86A works on +9V DC.
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
2/71
3/12/2015
8086 Specifications
System Description
Hardware
Memory
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
3/71
3/12/2015
Allocation Of Eprom
START ADDRESS
END ADDRESS
SOCKET NO
IC USED
0000
FFFF
U9
U8
27256
27256
START ADDRESS
END ADDRESS
SOCKET NO
IC USED
0000
FFFF
U10
U11
62256
62256
TOTAL CAPACITY
32 K BYTE
32 K BYTE
Allocation Of Ram
TOTAL CAPACITY
32 K BYTE
32 K BYTE
Parallel Interface
SOCKET.NO
U22
FUNCTION
ADDRESS
CONTL REG
PORT A
PORT B
PORT C
FF26
FF20
FF22
FF24
CONNECTOR.NO
J8
GPIO I
J9(GPIO I&GPIOII)
SOCKET.NO
FUNCTION
CONTL REG
ADDRESS
CONNECTOR.NO
FF36
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
4/71
3/12/2015
U16
PORT A
PORT B
PORT C
FF30
FF32
FF34
J6
GPIO II
J9(GPI0 I&GPIOII)
Timer Interface
I/O Address
SOCKET.NO
U12
FUNCTION
CONTL REG
CHENNAL 0
CHENNAL 1
CHANNEL 2
ADDRESS
CONNECTOR.NO
FF06
FF00
FF02
FF04
J2
Connector Details
The 20 Pin FRC connector is used to interconnect with the Interface cards like ADC, DAC, SWITCH/LED,
RELAY buzzer Interfaces etc. Pin details are given below
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
5/71
3/12/2015
The 50 Pin FRC connector is used to interconnect with the Interface cards like 8255, 8279, 8253/8251, 8259,
8257 and the pin details are given below
Keyboard Connector
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
6/71
3/12/2015
Baud Clock
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
7/71
3/12/2015
3.072 MHz
Drivers Used
SOCKET.NO
U15
FUNCTION
8251 CONTL REG
8251 DATA
ADDRESS
FF10
FF12
CONNECTOR.NO
D2(SKT)
LCD Interface
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
8/71
3/12/2015
FUNCTION
LCD COMMAND
LCD DATA
ADDRESS
CONNECTOR.NO
FF40
FF42
----
-----
RESET
This key is located in the main 8086 board. On depressing this key the program starts executing from the
beginning or reset address 0000. On power on reset it. Display PS - 86 in local LCD display.
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
9/71
3/12/2015
PS trainer kit will work at 0 5v (1 amp) from the PS power supply. Provision is made in PS power supply to
bring out on the front panel DC regulated voltage output for interfacing with add-on cards.
+5V
1 amp
POWER SWITCH
Keyboard Details
101 PC type keyboard is interfaced to Microcontroller through its port pin. Communication between keyboard
and Microcontroller takes place using 2 wires one for serial clock and serial data (P1.6 and P1.7).
Reset
This key is located in the main PS-86A board .On depressing this key the programs. Starts executing from the
beginning or reset address 0000. On power on reset it. Displays PS- 86A in local LCD display
PS -86
!!!!
H (Help Menu)
This key is used go PS- 86A help menu and it will display the following commands
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
10/71
3/12/2015
KEY
A <BEG>
B
D <BEG>
E <BEG><END>
G <BEG>
H
I <INSERT>
L <OFFSET>
M <ADDR>
N
Q
R <REG>
S
T <START><END><DS>
U <BEG><END>
X
?
FUNCTIONS
ASSEMBLE
BAUD RATE
DISASSEMBLE
EXAMINE
EXECUTE
HELP COMMANDS
INTERNAL RAM
DOWN LODE
MODIFY
NORMAL MODE
QUIT
REGISTER DISPLAY
SERIAL TRANSFER
BLOCK TRENSFER
UP LODE
DELETE BLACK MEMORY
INSTRUCTIONS
OPERATING INSTRUCTIONS
Power On
Connect the PS 8051 board to the power having the following specifications.
+9V DC 1 Amp
Switch on the power supply after ensuring the correct voltages. Following message will appear on the LCD
display.
PS -- 86
!!!!
On power on or after reset the display shows PS 86 as a sign on message. The prompt character is displayed
in the next line informing the user, that the board is ready to accept the commands.
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
11/71
3/12/2015
Instruction
Entering Mnemonics
Example
A1100
Enter Key
User program starts from address 1100 and displays the following and waits for the user data to be typed in the
second line
Example
0000 : 1100:
MOV AX,1212
Enter Key
0000 : 1103:
MOV BX,1212
Enter Key
Program end.
Exit Command: Double Enter you get the main menu
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
12/71
3/12/2015
PS _ 86
_
Modify Memory
Press H for help
_M1100
Enter Key
0000:1100
18 _
0000:1100
18B8_
Enter the Space Bar Key
0000:1101:
34 12_
Enter the Space Bar Key
Program end. Exit Command:
Double Enter you get the Main Menu
PS _ 86
_G1100
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
13/71
3/12/2015
Enter Key
After executing display
PS _ 86
Executing display
_G1100
To EXIT Execution Mode PRESS RESET Switch
_M
Enter Key
Disassembler
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
_D1100
Enter Key
1100: B8 12 12
MOV AX,1212
Enter the Space Bar Key
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
14/71
3/12/2015
1103: BB 12 12
MOV AX,1212
Enter the space bar key
Using this command the user can display/modify any external memory address.
Modify External memory
Press H for help
_M1100
R (Register Display)
Example
_R
Enter Key
AX=1104
Enter the Space Bar Key
BX=1204
Enter the space bar to see the remaining registers
T (Transfer Command)
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
15/71
3/12/2015
Example
Press T
The source segment addresses 0000. The above command transfer the memory content starting from source start
address 1100 to destination start address 1200 till source end address 1500 is reached.
0000
1100
1200
1500
Block Transfer
Src seg : 0000
Enter Key
start : 1100
end : 1200
Enter Key
for exit command
dest : 0 : 1500
Enter Key
Transfer Complete
Enter Key
for exit command
N (Local Mode)
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
16/71
3/12/2015
When this key is depressed on PC keyboard, the PS 8051 Kit starts working through local 101 keyboard.
Serial communication is disabled. Following message will appear in the LCD display.
! NORMAL MODE !
B (baud rate)
Press the B
Cur BAUD : 2400
150
Cur BAUD : 2400
9600
Enter Key
SET the 9600 baud rate
Baud rates : 150, 300, 600, 1200, 2400, 4800, 9600
When using the serial Communication.
When this key is depressed the system start communicating through connector. All keys are disabled except
reset.
! Serial Mode!
The system displays the message SERIAL MODE. To come back to LCD mode
(Normal Mode) user has to press the N key in the computer keyboard otherwise press the Reset button.
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
17/71
3/12/2015
ADDRESS
1100
1103
1106
1108
110B
110D
OPCODES
B8 12 12
BB 12 12
01 D8
BE 00 12
89 04
F4
MNEMONICS
MOV AX,1212
MOV BX,1212
ADD AX,BX
MOV SI,1200
MOV [SI],AX
HLT
6) To verify the code depress D starting address and depress space bar to see next memory location
For Ex: D1100 and press spacebar till the end of the program
7) To execute the program Depress G staring address for Ex: G1100.
8) To see the result depress M result address for Ex: M1200.
9) To view the output in the Register depress R and press enter key in keyboard.
18/71
3/12/2015
ADDRESS
1100
1103
1106
1108
110B
110D
OPCODES
B8 12 12
BB 12 12
01 D8
BE 00 12
89 04
F4
MNEMONICS
MOV AX,1212
MOV BX,1212
ADD AX,BX
MOV SI,1200
MOV [SI],AX
HLT
2) To view the code depress D starting address and depress space bar to see next memory
For Ex: D1100 and press spacebar till the end of the program
3) To execute the program Depress G staring address for Ex: G1100.
4) To see the result depress M result address for Ex: M1200.
5) To view the output in the Register depress R and press enter key in keyboard
Note:
M is used for displaying the result, for Ex: M8500
M is used to entering the Opcode.
M is used for entering the data.
Note:
There are two ways to enter the program
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
19/71
3/12/2015
Mnemonics method
Opcode method
Sample program is given to enter the program in both the methods
PROGRAMMING DETAILS
The 8086 Microprocessor uses a multiplexed 16 bit address and address bus
During the first clock of machine cycle the 16 bit address s sent out on address/data bus
These 16 bit addresses may be latched externally by the address latch enable signals(ALE)
8086 Microprocessor can access 1024kb of external memory using its 20 bit address and memory
read/write signals
The 8086 provide s0, s1 and s2 signals for bus control.
The 8086 Microprocessor has a 16 bit program counter (IP) and 16 bit stack pointer (sp)
It has following set of 16 bit Registers:
AX Accumulator
BX, CX, DX (These four register can be used as two 8 bit register individually)
Index Register
SI Source index
DI Destination index
BP Base pointer index
Segment Register
CS Code segment register
DS Data segment register
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
20/71
3/12/2015
Interrupts
When break point is encountered, all the register values are saved and the Acc. AX=XXXX Value is
displayed in the LCD display. Now use SPACE key to check register values one by one
EXAMPLE PROGRAMS
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
21/71
3/12/2015
Algorithm
Input
Output
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
22/71
3/12/2015
Program
ADDRESS OPCODE
MNEMONICS
MOV
SI, 1500
COMMENTS
1100
BE 00 15
1103
AD
1104
89 C3
1106
AD
1107
01 C3
ADD
BX, AX
1109
BF 20 15
MOV
DI, 1520
110C
89 1D
MOV
[DI], BX
110E
74
LODSW
MOV
BX, AX
LODSW
HLT
HALT
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
23/71
3/12/2015
Algorithm
Input
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
24/71
3/12/2015
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
BE 00 15
MOV SI,1500
1103
AD
LODSW
1104
89 C3
MOV BX, AX
1106
AD
LODSW
1107
01 C3
SUB BX, AX
subtract AX from BX
1109
BF 20 15
110C
89 1D
MOV [DI],BX
110E
CC
INT 3
Break point
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
25/71
3/12/2015
Algorithm
Input
26/71
3/12/2015
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
BE 00 15
MOV SI,1500
1103
AD
LODSW
1104
89 C3
MOV BX, AX
1106
AD
LODSW
1107
F7 E3
MUL BX
1109
BF 0 5 15
110C
89 05
MOV [DI], AX
110E
47
INC DI
Increment the DI
110F
47
INC DI
Increment the DI
1110
89 15
MOV [DI], BX
1112
CC
INT 3
Break point
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
27/71
3/12/2015
Algorithm
Input
Output
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
28/71
3/12/2015
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
BA 00 00
Clear DX registers
1103
B8 FD FF
1106
B9 0F 00
MOV BX, 0F
1109
F7 F1
DIV BX
110B
BF 00 15
110E
88 05
MOV [DI], AL
1110
47
INC DI
Increment DI
1111
88 25
MOV [DI], AH
1113
47
INC DI
Increment DI
1114
89 15
MOV [DI], DX
1116
CC
INT3
Break point
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
29/71
3/12/2015
Algorithm
Input
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
30/71
3/12/2015
Input data from address 1500 which is pointed SI, transferred to the desired Location.
Number of byte in CL.
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
MOV CL, 08
1100
B1 08
1102
BE 00 14
1105
BF 50 14
1108
AC
LODSB
1109
88 05
MOV [DI], AL
110B
47
INC DI
110C
FE C9
DEC CL
110E
75 F8
JNZ 1108
1110
CC
INT 3
Break point
Searching a Byte
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
31/71
3/12/2015
Algorithm
Initialize the pointer to the memory for storing data and result.
Load DL with search byte.
Load CL with count.
Load AL with data from memory. Compare AL with DL if its equal store the result else decrement counts
go to step2.
Store the result.
Input
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
32/71
3/12/2015
Output
Program
COMMENTS
1100
BF 00 13
1103
BE 00 12
1106
B1 50
MOV CL, 50
Load 50 into CL
1108
B2 0A
MOV DL, 0A
Load 10 into DL
110A
AC
LODSW
110B
38 C2
CMP DL, AL
110D
FE C9
DEC CL
Decrement CL register
110F
75 05
JZ 1114
1111
75 F7
JNZ 110A
1113
F4
HLT
1114
88 05
MOV [DI], AL
1116
4E
DEC SI
Decrement SI register
1117
89 F3
MOV BX, SI
1119
47
INC DI
Increment DI
111A
88 1D
MOV [DI], BL
111C
47
INC DI
Increment DI
111D
88 3D
MOV [DI], BH
111F
CC
INT 3
Break point
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
33/71
3/12/2015
Flow Chart
AlgorithmFlow Chart
34/71
3/12/2015
Input
Data in 1500.
Output
Result in 1501.
Lookup Table
Program
ADDRESS
OPCODE
MNEMONICS
BB 00 12
1103
BE 50 11
1106
AC
LODSB
1107
D7
XLAT
1108
BF 51 11
110B
88 05
MOV [DI], AL
110D
CC
INT3
Break point
1100
COMMENTS
Load 1200 into BX
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
35/71
3/12/2015
Flow Chart
Algorithm
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
36/71
3/12/2015
Input
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
B1 O4
MOV CL,04
1102
B0 00
MOV AL,00
1104
B3 01
MOV BL,01
1106
00 D8
ADD AL,BL
1108
FE C3
INC BL
Increment BL
110A
FE C9
DEC CL
Decrement CL
110C
75 F8
JNZ 1106
110E
BF 00 20
MOV DI,1600
1111
89 05
MOV [DI],AX
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
37/71
3/12/2015
1113
CC
INT3
Break point
Flow Chart
Algorithm
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
38/71
3/12/2015
Input
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
B0 31
MOV AL,31
1102
2C 30
SUB AL,30
1104
3C 10
CMP AL,10
1106
72 04
JB 110C
1108
74 02
JZ 110C
110A
2C 07
SUB AL,07
110C
CC
INT 3
Break point
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
39/71
3/12/2015
Flow Chart
Algorithm
Input
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
40/71
3/12/2015
Data in AL register.
Output
Result in AL register.
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
B0 10
MOV AL,10
1102
88 C4
MOV AH,AL
1104
80 E4 OF
AND AH,0F
1107
88 E3
MOV BL,AH
1109
24 F0
AND AL,F0
110B
B1 O4
MOV CL,04
110D
D2 C8
ROR AL,CL
110F
B7 0A
MOV BH,0A
1111
F6 E7
MUL BH
Multiply by 10
1113
00 D8
ADD AL,BL
1115
CC
INT3
Break point
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
41/71
3/12/2015
Algorithm
Input
Data in AL register.
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
42/71
3/12/2015
Output
Result in AL register.
Program
COMMENTS
1100
B0 0A
MOV AL,0A
1102
3C 09
CMP AL,09
1104
74 04
JZ 110A
1106
72 02
JB 110A
1108
04 07
ADD AL,07
110A
04 30
ADD AL,30
add 30 with AL
110C
CC
INT3
Break point
Matrix Addition
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
43/71
3/12/2015
Algorithm
Input
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
44/71
3/12/2015
Data in 2000 consecutive location as rows and columns for first matrix.
Data in 3000 consecutive location as rows and columns for second matrix.
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
B1 09
MOV CL, 09
1102
BE 00 20
1105
BF 00 30
1108
8A 04
110A
8A 1D
110C
00 D8
ADD AL, BL
110E
88 05
MOV [DI], AL
1110
47
INC DI
Increment DI
1111
46
INC SI
Increment SI
1112
FE C9
DEC CL
1114
75 F2
JNZ 1108
Decrement CL
Loop continues until all elements of
Matrix to added
1116
CC
INT3
Break point
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
45/71
3/12/2015
Algorithm
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
46/71
3/12/2015
Input
utput
Program
ADDRESS
OPCODE
MNEMONICS
COMMENTS
1100
B1 08
MOV CL, 08
Initialize 08 into CL
1102
BE 00 20
1105
BF 00 30
1108
AC
LODSB
1109
D0 C8
ROR AL,1
110B
72 FB
JB 1108
110D
D0 C0
ROL AL, 1
110F
88 05
MOV [D1], AL
1111
47
INC DI
Increment DI
1112
FE C9
DEC CL
Decrement CL
1114
75 F2
JNZ 1108
1116
CC
INT3
Break point
Fibonacci Series
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
47/71
3/12/2015
Floew Chart
Algorithm
48/71
3/12/2015
Input
Output
Result in 2000 (clear the memory from 2000 by 00 before executing the program).
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
B1 10
MOV CL, 10
1102
B3 00
MOV BL, 00
1104
B2 01
MOV DL, 01
1106
BF 00 20
1109
88 D0
MOV AL, DL
110B
00 D8
ADD AL, BL
110D
88 05
MOV [DI],AL
110F
47
INC DI
Increment DI
1110
88 D3
MOV BL, DL
1112
88 C2
MOV DL, AL
1114
FE C9
DEC CL
Decrement CL
1116
75 F3
JNZ110B
1118
CC
INT3
Breakpoint
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
49/71
3/12/2015
Factorial of a Number
Flow Chart
Algorithm
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
50/71
3/12/2015
Input
Output
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
B1 04
MOV CL, 04
1102
B0 01
MOV AL, 01
Initialize 01 into AL
1104
B3 01
MOV BL, 01
Initialize 01 into BL
1106
F6 E3
MUL BL
1108
FE C3
INC BL
Increment BL
110A
FE C9
DEC CL
Decrement CL
110C
75 F8
JNZ 1106
110E
BF 00 20
1111
89 05
MOV [DI], AX
1113
CC
INT3
Break point
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
51/71
3/12/2015
Flow Chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
52/71
3/12/2015
Algorithm
Input
Output
Program
COMMENTS
1100
BE 00 90
MOV SI,9000
1103
8A 0C
MOV CL,[SI]
1105
46
INC SI
Increment SI
1106
8A 04
MOV AL,[SI]
1108
FE C9
DEC CL
110A
46
INC SI
Increment SI
110B
3A 04
CMP AL,[SI]
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
53/71
3/12/2015
110D
73 02
JNB 1111
110F
8A 04
MOV AL,[SI]
1111
FE C9
DEC CL
1113
75 F5
JNZ 110A
1115
BF 00 95
MOV DI,9500
1118
88 05
MOV [DI],AL
111A
CC
INT3
Break point
Average Of An Array
Flow chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
54/71
3/12/2015
Algorithm
Input
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
55/71
3/12/2015
Output
Program
COMMENTS
ADDRESS
OPCODE
MNEMONICS
1100
BB 00 00
MOV BX,0000
1103
BE 00 90
MOV SI,9000
1106
B8 00 00
MOV AX,0000
1109
B1 06
MOV CL,06
110B
88 CD
MOV CH,CL
110D
8A 1C
MOV BL,[SI]
110F
00 D8
ADD AL,BL
1111
46
INC SI
1112
FE C9
DEC CL
1114
75 F7
JNZ 110D
1116
F6 F5
DIV CH
1118
CC
INT3
Break point
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
56/71
3/12/2015
Flow chart
Program
ADDRESS OPCODE
MNEMONICS
COMMENTS
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
57/71
3/12/2015
1100
B0 B7
MOV AL,36
1102
BA 06 FF
MOV DX,FF06
1105
EE
OUT DX,AL
1106
B0 02
MOV AL,FF
1108
BA 04 FF
MOV DX,FF04
Port address in DX
110B
EE
OUT DX,AL
110C
B0 00
MOV AL,00
110E
BA 04 FF
MOV DX,FF04
1111
EE
OUT DX,AL
1112
CC
INT3
Break point
Descending Order
Algorithm
Get the first data and compare with the second data.
If the two data are in descending order then no swap.
Else swap the data byte by descending order and then again compare the other data bytes up to the count.
Do the above the array is a ranged in descending order.
Finally the array is arranged in ascending order.
Input
58/71
3/12/2015
Output
Flow chart
Program
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
59/71
3/12/2015
ADDRESS OPCODE
MNEMONICS
COMMENTS
1100
BE 00 90
1103
8A 0C
1105
BE 00 90
1108
8A 14
110A
46
INC SI
110B
8A 04
first data in AL
110D
FE CA
DEC DL
Decrement DL
110F
74 16
JZ 1127
1111
46
INC SI
Increment SI
1112
8A 1C
1114
3A C3
CMP AL, BL
if al > bl go to (jump1)
1116
72 07
JB 111F
1118
4E
DEC SI
Decrement SI
1119
88 04
MOV [SI],AL
111B
88 D8
MOV AL, BL
111D
EB 03
JMP 1122
111F
4E
DEC SI
Decrement SI
1120
88 1C
MOV [SI], BL
1122
46
INC SI
Increment SI
1123
FE CA
DEC DL
Decrement DL
1125
75 EA
JNZ 1111
1127
88 04
MOV [SI], AL
1129
FE C9
DEC CL
Decrement CL
112B
75 D8
JNZ 1105
112D
CC
INT3
Break point
Ascending Order
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
60/71
3/12/2015
Algorithm
Get the first data and compare with the second data.
If the two data are in ascending order then no swap.
Else swap the data byte by ascending order and then again compare the other data bytes up to the count.
Do the above the array is arranged in ascending order.
Finally the array is arranged in ascending order.
Input
Output
Flow chart
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
61/71
3/12/2015
Program
ADDRESS
OPCODE
MNEMONICS
COMMENTS
1100
BE 00 90
1103
8A 0C
1105
BE 00 90
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
62/71
3/12/2015
1108
8A 14
110A
46
INC SI
Increment SI
110B
8A 04
110D
FE CA
DEC DL
Decrement DL
110F
74 16
JZ 1127
1111
46
INC SI
Increment SI
1112
8A 1C
1114
38 D8
CMP AL, BL
if AL > BL go to (jump1)
1116
72 07
JNB 111F
1118
4E
DEC SI
Decrement SI
1119
88 04
MOV [SI],AL
111B
88 D8
MOV AL, BL
111D
EB 03
JMP 1122
111F
4E
DEC SI
Decrement SI
1120
88 1C
MOV [SI], BL
1122
46
INC SI
Increment SI
1123
FE CA
DEC DL
Decrement DL
1125
75 EA
JNZ 1111
1127
88 04
MOV [SI], AL
1129
FE C9
DEC CL
Decrement CL
112B
75 D8
JNZ 1105
112D
CC
INT3
Breakpoint
Compare string
ADDRESS
1100
1104
MNEMONICS
LEA SI, [1200]
LEA DI, [1300]
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
63/71
3/12/2015
1108
110b
CLD
110c
REPE CMPSB
110e
JNZ NOTEQUAL
1110
MOV AL, 01
1112
MOV [1400], AL
1115
HLT
1116
NOTEQUAL:
MOV AL, 00
1118
MOV [1400], AL
111b
HLT
1ST INPUT
1200
11
1201
22
2ND INPUT
1300
11
1301
22
1202
1302
33
33
Output
1400 : 01
1ST INPUT
1200
11
1201
22
2ND INPUT
1300
44
1301
55
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
64/71
3/12/2015
1202
33
1302
66
Output
1400
ADDRESS
1100
1104
1108
110c
110d
110f
OPCODE
MOV
CX,[1500]
LEA
SI,[1600]
LEA
DI,[1700]
CLD
REP
MOVSB
HLT
Input location
COUNT INPUT
1500
03
1601
11
DATA INPUT
1601
22
1602
33
Out location
OUTPUT
1700
11
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
65/71
3/12/2015
1701
1703
22
33
Objective
To find the one's complement of the data in register pair AX and store the result at 1400.
Theory
In the one's complement of a binary number the ones are changed to zeros and vice versa. It is one way of
representing negative numbers. All negative numbers start with a 1 at the MSBit. For instance considering the hex
number 5600 For ex: 5600 = 0101 0110 0000 0000 One's complement = 1010 1001 1111 1111
= A9FF
Example
The example given is to find the one's complement of 1234 and store it in memory location 1400.
Input :
Data : (AX) = 0001 0010 0011 0100 = 1234
Result : [1400] = 1110 1101 1100 1011 = EDCB
MEMORY ADDRESS
1100
1103
1106
110A
OPCODE
C7 C0 34 12
F7 D0
89 06 00 14
F4
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
MNEMONICS
MOVAX, 1234
NOT AX
MOV [1400],AX
HLT
66/71
3/12/2015
Procedure
Enter the above mnemonics into RAM memory from 1100 using the assembler command.
Using GO command execute the program and enter 1100. This is the address from where execution of
your program starts.
Press ENTER key to start execution.
Reset the kit using RESET key.
Objective
Theory
The logical AND instruction is used for masking off bits. The bits which have to be cleared are to be AND with a
logical zero and the other bits are to be high. Hence to achieve the above objective, AND with 0F0F.
Example
The 16 bit number is at location 1200 and the result is at location 1400.
Input: [1200] = FF
[1201] = FF
Result: [1400] = 0F
[1401] = 0F
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
67/71
3/12/2015
MEMORY ADDRESS
1100
1104
1108
110C
OPCODE
8B 06 00 12
81 E0 0F0F
89 06 00 14
F4
MNEMONICS
MOV BX,1200
AND AX,0F0F
MOV [1400],AX
HLT
Procedure
The procedure outlined for previous exercises is to be followed for this program also.
Objective
To obtain a Boolean expression F which has 4 terms and 8 variables A,B,C,D,E,F,G,H. F = {(AB'CDE' +
A'BCD(BCD+EFGH)}
Theory
Evaluation of Boolean expressions through minimization procedures is customary. But this example seeks to do
the same using the 8086 registers. The 4 minterms are in FOUR 8 bit registers. Use of logical instructions to
perform this is consequential. Don't care variables are represented by set bits. The correspondence is,
ABCDEFGH)))) D7 D6 D5 D4 D3 D2 D1 D0
Example
68/71
3/12/2015
MEMORY ADDRESS
1100
1103
1106
1108
110C
110E
1110
1112
1116
OPCODE
C6 C0 B7
C6 C4 7F
C6 C3 FF
C6 C7 FF
08 FB
20 DC
08 E0
88 06 00 12
F4
MNEMONICS
MOV AL, B7
MOV AH, 7F
MOV BL, FF
MOV BH, FF
OR BL, BH
AND AH, BL
OR AL, AH
MOV [1200], AL
HLT
Related Article
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
69/71
3/12/2015
Related Document
8086 Trainer Kit user and Technical
Reference Manual
Resources
Blog
Videos
Presentations
Buying Guides
Newsletters
Across the Web
Twitter
Facebook
Linkedin
Google +
YouTube
Slideshare
Scribd
Stumbleupon
Pinterest
More Information
Warranty Information
Return Policy
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
70/71
3/12/2015
Cancellation Order
Holidays
Terms for Softwares
RoHS
Dealership
Shipping Policy
Company
About Us
Terms of use
Privacy policy
Terms & Conditions
Careers
Events
SiteMap
Contact us
Pantech ProLabs Team
CRM Login
Copyright 2015 Pantech ProLabs India Pvt Ltd
Content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
License
https://www.pantechsolutions.net/microcontroller-boards/8086-trainer-kit-user-and-technical-reference-manual
71/71