Vnd.openxmlformats Officedocument.wordprocessingml.document&Rendition=1
Vnd.openxmlformats Officedocument.wordprocessingml.document&Rendition=1
(UGC-AUTONOMOUS)
LABORATORY MANNUAL
1. Write and execute an Assembly language Program (ALP) to 8086 processor to add, subtract and
multiplication.
2. Write and execute an Assembly language Program (ALP) to 8086 processor to divide a 32 bit
unsigned Number.
3. Write and execute an Assembly language Program (ALP) to 8086 processor to sort the given array of
Numbers.
4. Write and execute an Assembly language Program (ALP) to 8086 processor to Bit level Logical
Operations, Rotate, Shift, Swap and Branch Operations.
5. Write and execute an Assembly language Program (ALP) to 8086 processor to pick the median
from the given String.
6. Write and execute an Assembly language Program (ALP) to 8086 processor to find the length of a
given string.
7. Write and execute an Assembly language Program (ALP) to 8086 processor to reverse the given
string.
8. Write and execute an Assembly language Program (ALP) to 8086 processor to verify the
password.
9. Write and execute an Assembly language Program (ALP) to 8086 processor to insert or delete a
character?
10. Write and execute an Assembly language Program (ALP) to 8086 processor to call a delay
subroutine and display the character on the LED display.
11. Interface a keypad to 8086 microprocessor and display the key number pressed on the 7-
segment display which is also interfaced to 8086.
12. Write an interrupt service routine to 8086 whenever there is an interrupt request on interrupt pin,
which displays “hello” on a LCD.
13. Interface an 8086 microprocessor trainer kit to PC and establish a communication between them
through RS 232.
14. Interface DMA controller to 8086 and transfer bulk data from memory to I/ O device.
15. Interface a stepper motor to 8086 and operate it in clockwise and anti-clock wise by choosing
variable step-size.
16. Interface an 8 bit ADC to 8086 and generate digital output and store it in memory for the given
square/ ramp/ triangle wave form inputs.
Equipment Required:
1. 8086 Microprocessor Trainer Kits.
2. 8051 Microcontroller Trainer Kits.
3. Interfacing Modules: ADC, DAC, Temperature Controllers etc.
4. Interfacing Cards: 8255, 8529 and 8257
ADDITIONAL EXPERIMENTS
List of Experiments:
Equipment Required:
1. Proper dress has to be maintained while entering in the Lab. (Boys Tuck in and shoes and
girlsshould be neatly dressed)
2. Students should carry observation notes and record completed in all aspects.
3. ALP and its theoretical result should be there in the observation before coming to the next lab.
6. Student should follow the procedure to start executing the ALP they have to get signed by the
Lab instructor for theoretical result then with the permission of Lab instructor they need to
switch on the desktop and after completing the same they need to switch off and keep the chairs
properly.
7. After completing the ALP Students should verify the ALP by the Lab Instructor.
8. The Practical Result should be noted down into their observations and result must be shown to
the Lecturer In-Charge for verification.
9. Students must ensure that all switches are in the OFF position, desktop is shut down properly.
DON’Ts:-
2. Don’t leave the Lab without making proper shut down of desktop and keeping the chairs
properly.
4. Don’t leave the lab without the permission of the Lecturer In-Charge.
Quick steps to learn operation with kit procedure to operate kit using assembly language
program.
Step I
Press “E”
EXPAND
Press A
1000:010A
Press “Q”(Exit)
Press “G”
BURST
SRC_SEGM 1000
ADDR 0100
WAIT COMMAND
Press “S”
Substut?
IO register
Name
BX 4444
Press “S”
Substut?
Memory
SRC_SEGM 1000
ADDR 0100
1000:0100 B8 55 55
1000:0103 B9 44 44
1000:0106 01 D8
1000:0108 CD A5
1. Write and execute an Assembly language Program (ALP) to 8086 processor to add,
subtract and multiplication.
Aim: To perform two 16-bit hexadecimal addition, subtraction and multiplication operations
using immediate addressing mode.
ApparatusRequired:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
ADDITION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
Transfer the 16-bit immediate
1000:0100 MOV AX, A3B2 B8 B2 A3 data in to the accumulator
register.
Transfer the 16-bit immediate
1000:0103 MOV BX, C5D2 BB D2 C5 data in to the base register.
Addition between the content
of AX&BX registers again
1000:0106 ADD AX,BX F7 F0 result will be stored in AX
register.
Temporarily to terminate the
1000:0108 INT A5 CD A5 program.
MULTIPLICATION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
Transfer the 16-bit immediate
1000:0100 MOV AX, A3B2 B8 B2 A3 data in to the accumulator
register.
Transfer the 16-bit immediate
1000:0103 MOV BX, C5D2 BB D2 C5 data in to the base register.
Multiplication between the
content of AX&BX registers
1000:0106 MUL BX F7 F0 again result will be stored in
AX register.
Temporarily to terminate the
1000:0108 INT A5 CD A5 program.
2. Write and execute an Assembly language Program (ALP) to 8086 processor to divide a
32 bit unsigned Number.
Aim: To perform divide 0f two 32- bit unsigned number using direct addressing mode.
ApparatusRequired:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
The content of data in 1200
1000:0100 MOV AX, [1200] A1 00 12 location is copied into the
accumulator register.
The content of data in 1202
1000:0103 MOV DX, [1202] 8B 16 02 12 location is copied into the
destination register.
1000:0107 MOV BX,[1204] 8B 1E 04 12 The content of data in 1204
location is copied into the base
register.
Division operation perform
between AX and BX registers.
1000:010B DIV BX F7 F3
After division,the content of
1000:010D MOV [1600],AX A3 00 16 AX is copied into the 1600
location.
After division,the content of
1000:0110 MOV [1602],DX 89 16 02 16 DX is copied into the 1602
location.
Temporarily to terminate the
1000:0114 INT A5 CD A5 program.
5.
Inputs of the Program:
AX= [1201][1200]=A2B3
DX= [1203][1202]=123C
BX= [1205][1204]=E2B1
Theoretical Calculations:
(123C A2B3)16= (305963699)10
(E2B1)16 = (58003)10
58003)305963699(51272
305791816
171883
(51272)10= (0498)16
(171883)10= (149B)16
OUTPUTS:
[1601][1600]=149B
[1603][1602]=0498
RESULT:-Hence we performeddivide 0f two 32- bit unsigned number using direct addressing mode.
3. Write and execute an Assembly language Program (ALP) to 8086 processor to sort the
given array of Numbers.
1. ASCENDIND ORDER:
Aim: To perform to sort the given array numbers in an assembly level language.
Apparatus Required:
Program Code:
OPCODE OPERANDS
1000:0100 MOV CL,04 B1 04
1000:0102 DEC CL FE C9
1000:0104 L3 MOV DL,CL 88 CA
1000:0107 MOV SI,1200 BE 00 12
1000:0109 L2 MOV AL,[SI] 8A 04
1000:010C CMP AL,[SI+1] 3A 44 01
1000:010E JL 0115 76 05
1000:0110 XCHG AL,[SI+1] 86 44 01
1000:0113 MOV [SI],AL 88 04
1000:0115 L1 INC SI 46
1000:0116 DEC DL FE CA
1000:0116 JNZ 0109 75 CF
1000:0118 DEC CL FE C9
1000:011A JNZ 0104 75 E6
1000:011B INT A5 CD A5
INPUTS: 02 01 03 04
Theoretical Calculations:
SI SI+1
[1200] [1201] [1202] [1203]
CL=04
02 01 04 03
DL=04
01 02 04 03
DL=03
01 02 04 03
DL=02
01 02 03 04
RESULT:
[1300]:01 [1301]:02
[1302]:03 [1304]:04
2. DESCENDIND ORDER:
Program Code:
OPCODE OPERANDS
1000:0100 MOV CL,04 B1 04
1000:0102 DEC CL FE C9
1000:0104 L3 MOV DL,CL 88 CA
1000:0107 MOV SI,1300 BE 00 13
1000:0109 L2 MOV AL,[SI] 8A 04
1000:010C CMP AL,[SI+1] 3A 44 01
1000:010E JG 0115 7C 05
1000:0110 XCHG AL,[SI+1] 86 44 01
1000:0113 MOV [SI],AL 88 04
1000:0115 L1 INC SI 46
1000:0116 DEC DL FE CA
1000:0116 JNZ 0109 75 CF
1000:0118 DEC CL FE C9
1000:011A JNZ 0104 75 E6
1000:011B INT A5 CD A5
INPUTS:
SI SI+1
[1300] [1301] [1302] [1303]
DL=04
02 01 04 03
DL=03
02 04 01 03
DL=02
02 04 03 01
DL=01
01 02 0 01
DL=00
04 03 02 01
RESULT:
RESULT:-Hence we performed to sort the given array numbers in an assembly level language.
4. Write and execute an Assembly language Program (ALP) to 8086 processor to Bit level
Logical Operations, Rotate, Shift, Swap and Branch Operations.
Aim: To Perform To Bit Level Logical Operations, Rotate, Shift, Swap And Branch Operations
Using Immediate Addressing Mode.
AND Gate:
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:0108 INT A5 CD A5
INPUTS:
AX=1234 BX=5678
Theoretical calculations:
0001001000110000
Output:
OR Gate:
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:0106 OR AX,BX 18 27
1000:0108 INT A5 A5
Inputs:
AX= 1234 BX=5678
Theoretical calculations:
0001 0010 0011 0100
0101 0110 0111 1000
0101 0110 0111 1100
Outputs:
Truth Table:
XOR Gate:
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:010C INT A5 A1 00 A5
Inputs:
AX=1234 BX=5678
Theoretical Calculations:
0001 0010 0011 0100
0101 0110 0111 1000
0100 0100 0100 1100
Output:
Truth Table:
2.ROTATE OPERATIONS:
Rotate left operation:
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
Inputs:
[1501]- 78 [1500] 04
Theoretical:
Output:
1200-11
1201- E0
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:010A INT A5 CD A5
Inputs:
[1501]- 43 [1500] 42
Theoretical:
0100 0011 0100 0010(Input)
0010 0001 1010 0001(First Turn)
1001 0000 1101 0000(Second Turn)
9 0 0 0
Output:
1200-D0
1201- 90
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:010A INT A5 CD A5
Inputs:
[1501]- 24 [1500]- 12
Theoretical:
Output:
1200-48
1201- 90
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:010A INT A5 CD A5
Inputs:
[1501]- 19 [1500]-20
Theoretical:
Output:
1200-48 1201- 06
4. shift operations:ROL
Programming Code:
1000:010A INT A5 CD A5
Inputs:
[1501]- 07 [1500] 27
Theoretical:
Output:
1200-9C
1201- 1C
ROR:
Programming Code:
1000:010A INT A5 CD A5
Inputs:
[1501]- 81 [1500] 96
Theoretical:
Output:
1200-65
1201- 20
Result: Hence we Performed To Bit Level Logical Operations, Rotate, Shift, Swap And Branch
Operations Using Immediate Addressing Mode.
5. Write and execute an Assembly language Program (ALP) to 8086 processor to pick the
median from the given String.
Aim:To perform operation to pick the median of given string by using direct addressing mode
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
1000:0109 DIV BX D1 C6
1000:010F INT A5 CD A5
Inputs:
[1200]- 50 [1201] 35 [1202] 12 [1203] 49
[1204] 03 [1205] 05 [1206] 07
Output:
Result:Hence we perform operation to pick the median of given string by using direct
addressing mode
6. Write and execute an Assembly language Program (ALP) to 8086 processor to find the
length of a given string.
Aim: To perform the program to get the length of a stringy the concept of string manipulation
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000:0100 MOV CL,00 B1 00
1000:0102 MOV SI,1200 BE 00 12
1000:0105 L2 MOV AL,[SI] 8A 04
1000:0107 CMP AL,FF 3C FF
1000:0109 JNZ 0110 74 05
1000:010B INC CL FE C1
1000:010D INC SI 46
1000:010E JMP 0105 EB F5
1000:0110 L1 INT A5 CD A5
Inputs:
[1200]-01 [1201]-02 [1202]-03 [1203]-04 [1204]-FF
Output:
AX= 00FF BX= 0000 CX= 0006 DX= 0000 FX= F046
Result: Hence we performedto get the length of a stringy the concept of string manipulation
7. Write and execute an Assembly language Program (ALP) to 8086 processor to reverse
the given string.
Aim: To perform the reverse of string operation by the concept of string manipulation
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP Label MACHINE CODE
OPCODE OPERANDS
1000:0100 MOV CL,05 B1 05
1000:0102 MOV SI,1200 Be 00 12
1000:0105 MOV DI,1304 BF 04 13
1000:0108 L1 MOV AL,[SI] BA 04
1000:010A MOV [DI],AL 88 05
1000:010C DEC CL FE C9
1000:010E INC SI 46
1000:010F DEC DI 4F
1000:0110 CMP CL,00 80 F9 00
1000:0113 JNZ 0108 75 F3
1000:0115 INT A5 A5
Inputs:
[1200]-01 [1201]-10 [1202]-02 [1203]-03 [1204]-00
Output:
8. Write and execute an Assembly language Program (ALP) to 8086 processor to verify the
password.
Aim: To write the password verification program in 8086 microprocessor in assembly level language by
using direct addressing mode
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000:0100 MOV CL,05 B1 00
1000:0102 MOV SI,1200 BE 00 12
1000:0105 MOV DI,1300 BF 00 13
1000:0108 L2 MOV AL,[SI] 8A 04
1000:010A MOV BL,[DI] 8A 1D
1000:010C CMP AL,BL 38 D8
1000:010E JNZ 0116 75 06
1000:0110 INC SI 46
1000: 0111 INC DI 47
1000:0112 DEC CL FE C9
1000:0114 JNZ L2 75 F2
1000:0100 L1 INT A5 CD A5
Inputs:
Output:
9. Write and execute an Assembly language Program (ALP) to 8086 processor to delete a
character/element?
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000:0100 MOV SI,2000 BE 00 20
1000:0103 MOV CL,[SI] 8A 0C
1000:0105 MOV DI,3000 BF 00 30
1000:0108 MOV DX,0000 BA 00 00
1000:010B MOV DL,[DI] 8A 15
1000:010D SUB CL,DL 28 D1
1000:010F ADD SI,DX 01 06
1000: 0111 L MOV AL,[SI+1] 8A 44 01
1000:0114 MOV [SI],AL 88 04
1000:0116 DEC CL FE C9
1000:0118 INC SI 46
1000:0119 JNZ 0111 75 F6
1000:101B INT A5 CD A5
Results:
Inputs Outputs
2000=10h 2000=10h
2001=20h 2001=30h
2002=30h 2002=40h
2003=40h
INSERT AN ELEMENT:
Apparatus:
1. 8086 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000:010F INC CL FE C1
1000:0113 INC DI 47
1000:0118 INC SI 46
1000:011F DEC CL FE C9
1000:1013 INT A5 CD A5
Results:
Inputs Outputs
2000=10h 2000=10h
2001=20h 2001=20h
2002=30h 2002=30h
2003=50h 2003=40h
2004=50h
Result: Hence we performedto insert an element into a string using normal instruction.
10. Write and execute an Assembly language Program (ALP) to 8086 processor to call a
delay subroutine and display the character on the LED display.
Aim:-write an ALP in 8086 to display string of characters from left to right(left entry mode) in
output mode.
Apparatus:
1. 8086 trainer kit
2. Intel 8279 interfacing module
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
4000 MOV AL,09 B0 09
4002 MOV DX,CTRL BA 02 30
4005 OUT DX,AL EE
4006 MOV AL,31 B0 31
4008 OUT DX,AL EE
4009 MOV AL,D0 B0 D0
400B OUT DX,AL EE
400C MOV CX,FFFF B9 FF FF
400F L1 LOOP L1 E2 FE
4011 MOV AL,00 B0 00
4013 OUT DX,AL EE
4014 MOV AH,08 B4 08
4016 MOV DX,3000 BB 00 30
4019 MOV AL,90 B0 90
401B OUT DX,AL EE
401C MOV AL,[BX] 8A 07
401E MOV DX,3000 BA 00 30
4021 OUT DX,AL EE
4022 MOV CX,FFFF B9 FF FF
4025 L2 LOOP L2 E2 FE
4027 INC BX 43
4028 DEC AH FE CC
402A JNZ UP 75 F0
402C MOV CX,FFFF B9 FF FF
402F L3 LOOP L3 E2 FE
4031 INT A5 CD A5
Results:
After Executing The Program 8 Characters Are Displayed On 7 Segment Display At A
Stretch Of Four Characters From Left To Right.
0 1 2 3
4 5 6 7
2. Aim:-write an ALP in 8086 to display string of characters from right to left in decode
mode.
Programming Code:
MNEMORIES
CS:IP MACHINE CODE
OPCODE OPERANDS
4000 MOV AL,09 B0 09
4002 MOV DX,CTRL BA 02 30
4005 OUT DX,AL EE
4006 MOV AL,31 B0 31
4008 OUT DX,AL EE
400C MOV CX,FFFF B9 FF FF
400F L1 LOOP L1 E2 FE
4011 MOV AL,11 B0 11
4013 OUT DX,AL EE
4014 MOV AH,08 B4 08
4016 MOV DX,3000 BB 00 30
4019 MOV AL,90 B0 90
401B OUT DX,AL EE
401C MOV AL,[BX] 8A 07
401E MOV DX,3000 BA 00 30
4021 OUT DX,AL EE
4022 MOV CX,FFFF B9 FF FF
4025 L2 LOOP L2 E2 FE
4027 INC BX 43
4028 DEC AH FE CC
402A JNZ RPT 75 F0
402C MOV CX,FFFF B9 FF FF
402F L3 LOOP L3 E2 FE
4031 INT A5 CD A5
11. Interface a keypad to 8086 microprocessor and display the key number pressed on the
7- segment display which is also interfaced to 8086.
Aim:-write an ALP to 8086 microprocessor and display the key number pressed on the 7-
segment display which is also interfaced to 8086.
Apparatus:
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1057:0100 XOR AX,AX 31 C0
1057:0102 MOV SS,AX 8E D0
1057:0104 MOV ES,AX 8E C0
1057:0106 MOV SP,11F0 BC F0 11
1057:0109 PUSH CS 0E
1057:010A POP DS 1F
1057:010B MOV DX,8807 BA 07 88
1057:010E MOV AL,81 B0 81
1057: 0110 OUT DX,AL EE
1057:0111 L6 MOV BP,1225 BD 25 12
1057:0114 MOV BX,018B BB 8B 01
1057:0117 MOV CL,01 B1 01
1057:0119 CALL 017C E8 60 00
1057:011C ADD AL,BL 00 D8
1057:011E MOV BL,AL 88 C3
1057:0120 MOV AL,[BX] 8A 07
1057:0122 MOV [BP+00],AL 88 46 00
1057:0125 MOV CL,02 B1 02
1057:0127 CALL 017C E8 52 00
1057:012A MOV BX,018B BB 8B 01
1057:012D ADD AL,BL 00 D8
1057:012F MOV BL,AL 88 C3
1057:0131 MOV AL,[BX] 8A 07
1057:0133 INC BP 45
1057:0134 MOV [BP+00],AL 88 46 00
1057:0137 INC BP 45
1057:0138 MOV DL,00 B2 00
1057:013A MOV [BP+00],DL 88 56 00
1057:013D INC BP 45
1057:013E MOV [BP+00],DL 88 56 00
1057:0141 L1&L5 MOV BP,1225 BD 25 12
1057:0144 MOV CL,80 B1 80
1057:0146 L2 MOV AL,CL 88 C8
1057:0148 ROL AL,01 D0 C0
1057:014A AND AL,0F 24 0F
1057:014C JZ 0141(L1) 74 F3
1057:014E MOV DX,8801 BA 01 88
1057:0151 OUT DX,AL EE
1057:0152 MOV CL,AL 88 C1
1057:0154 MOV AL,[BP+00] 8A 46 00
1057:0157 MOV DX,8803 BA 03 88
1057:015A OUT DX,AL EE
1057:015B MOV AL,00 B0 00
1057:015D OUT DX,AL EE
1057:015E INC BP 45
1057:015F MOV AH,0B 84 0B
1057:0161 INT A1 CD A1
1057:0163 CMP AL,FF 3C FF
1057:0165 JNZ 0146(L2) 75 DF
1057:0167 MOV AH,08 B4 08
1057:0169 INT A1 CD A1
1057:016B CMP AL,1B 3C 1B
1057:016D JZ 0177(L3) 74 08
1057:016F CMP AL,0D 3C 0D
1057:0171 JZ 0175(L4) 74 02
1057:0173 JMP 0141(L5) EB CC
1057:0175 L4 JMP 0111(L6) EB 9A
1057:0177 L3 INT A3 CD A3
1057:0179 NOP 90
1057:017A NOP 90
1057:017B NOP 90
1057:017C MOV AL,CL 88 C8
1057:017E MOV DX,8801 BA 01 88
1057:01781 OUT DX,AL EE
1057:0182 MOV DX,8805 BA 05 88
1057:0185 IN AL,DX EC
1057:0186 NOT AL F6 D0
1057:0188 AND AL,0F 24 0F
1057:018A RET C3
“DISP” PROGRAMME
1057:018B 3F 06 5B 4F 66
12. Write an interrupt service routine to 8086 whenever there is an interrupt request on
interrupt pin, which displays “hello” on a LCD.
Apparatus:
1. 8086 trainer kit
2. 8259 TRAINER KIT
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000:0100 JMP 0115 EB 13 90
1000:0103 HELLO:DB 41 4E 53 48 55 4D 41 4E 03
1000:010C ANSHUMAN:DB 41 4E 53 48 20 4C 43 36 03
1000:0115 MOV AX,11F0 B8 11 F0
1000:0118 MOV SP,AX 8B E0
1000:011A PUSH CS 0E
1000:011B POP AX 58
1000:011C MOV DS,AX 8E D8
1000: 011E NOP 90
1000:011F NOP 90
1000:0120 NOP 90
1000:0121 MOV CX,AX 8B C8
1000:0123 MOV SI,5510 BE 01 55
1000:0126 MOV AL,96 B0 96
1000:0128 INT BE CD BE
1000:012A MOV AL,13 B0 13
1000:012C MOV DX,9400 BA 94 00
1000:012F OUT DX,AL EE
1000:0130 MOV AL,90 B0 90
1000:0132 MOV DX,9402 BA 94 02
1000:135 OUT DX,AL EE
1000;0136 MOV AL,01 B0 01
10000:0138 OUT DX,AL EE
1000:0139 MOV AL,BF B0 BF
1000:013B OUT DX,AL EE
1000:013C STI FB
1000:013D L1 MOV AX,0001 B0 00 01
1000:0140 L2 MOV CX,FF ACFF B9 FF FF
1000:0143 INT AA CD AA
1000:0145 DEC AX 48
10000:0146 JNZ 0140(L2) 75 F8
1000:0148 INT AC CD AC
1000:014A MOV BX,0103 BB 01 03
1000:014D INT AF CD AF
1000:014F STI FB
1000:0150 JMP 013D(L2) EB EB
1000:0152 NOP 90
1000:0153 NOP 90
1000:0154 NOP 90
1000:0155 INT AC CD AC
1000:0157 MOV BX,010C BB 01 0C
1000:015A INT AF CD AF
1000:015C MOV AL,20 B0 20
1000:015E MOV DX,9400 BA 94 00
1000:0161 OUT DX,AL EE
1000:0162 IRET CF
1000:0163 INT A5 CD A5
Results:
The IR6 of 8259 is used in edge triggered mode. In the main routine “HELLO” is
displayed, and when positive edge triggered is applied at IR6 pin of 8259 (that is when you press
STEP push button),the display shows “ANSHUMAN”.The STEP push but (next to the RESET
push button)is connected to the IR6 pin of 8259 through inverter.the SSTP signal from STEP
push button is active LOW, thus a positive edge pulse will be applied to IR6 pin when we press
the STEP push button.
2)8088 based—if you are using 8088 in place of 8086(PL4 on MPU shorted near
U12),then using substitute memory command load at scratch pad address as follows.
0000:03FC=55,:03FD=01,:03FE=A4,:03FF=10
Aim:-to perform 8086 microprocessor trainer kit to PC and establish a communication between
them through RS 232.
Procedure:
a) R or shift-G TO work with intelligent terminal. Here onboard display keyboard
gets disabled.
b) U or shift-Dserial OP – to send information package from kit to PC.
c) I or shift-Cserial IN – to receive information package from kit to PC.
d) A,N(shift-A) meant for demonstration of RS232c from kit to kit. With PC – choose
no echo ,nopr(no priority),hex(intel hex) mode. Use baud rate of 2400.
3. Use “PC SERIAL” floppy given on drive of PC. It is write protected.
14. Interface DMA controller to 8086 and transfer bulk data from memory to I/ O device.
Apparatus:
1. 8086 trainer kit
2. 8257 TRAINER KIT
3. SMPS
4. Keyboard
5. Connecting power cable
Procedure:
1) Keep the periware on the left hand side of the kit and connect through 50 pin FRC.
2) Make S1 and S2 towards you to enable single stepping.
3) Enter the software code as given.
4) After executing the program the data 55 at memory location C000:0000H and data AA at
C000:0002H are displayed alternately on the LED’s.
5) Execute the program by pressing G, CR, CR, 13CB, CR, 0100, CR and observe on
LED’s the following result.
For active low signals “L” implies led is lighted.
ADDR
bus
Data TC HRQ AEN IR IW MR MW CS
bus (A0-
A3)
START 00 8 - - - - L - L L
STEP 1 01 5 - - - - L - L L
STEP 2 80 5 - - - - L - L L
STEP 3 00 4 - - - - L - L L
STEP 4 B0 4 - - - - L - L L
STEP 5 01 7 - - - - L - L L
STEP 6 80 7 - - - - L - L L
STEP 7 00 6 - - - - L - L L
STEP 8 B0 6 - - - - L - L L
STEP 9 84 8 - - - - L - L L
Now at this stage insert the patch cord in DRQ-2tag and connect it to Vcc, to generate
DMA request for ch.2, when HRQ-1 led glows connect HLDA tag through patch cord and press
step key.data will be appear on data bus as shown below.
ADDR
bus
Data TC HRQ AEN IR IW MR MW CS
bus (A0-
A3)
START 55 0 - 1 1 - L L - -
AA 1 1 1 1 - L L - -
STEP 1 55 0 0 1 1 - L L - -
On Giving Further Steps Same Result Will Be Repeated Alternately As Shown In Step 10 And
11 Above.
15. Interface a stepper motor to 8086 and operate it in clockwise and anti-clock wise by
choosing variable step-size.
Aim:-write an ALP to rotate the stepper motor operate it in clockwise and anti-clock wise by
choosing variable step-size.
Apparatus:
1. 8086 trainer kit
2. Stepper motor module
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000 MOV DX,0013 BA 13 00
1003 MOV AL,80 B0 80
1005 OUT DX,AL EE
1006 L3 MOV CL,64 B1 64
1008 L1 MOV DX,0012 BA 12 00
100B MOV AL,77 B0 77
100D OUT DX,AL EE
100E CALL 104B EB EF 0F
1011 MOV AL,BB B0 B8
1013 OUT DX,AL EE
1014 CALL DELAY EB E0 0F
1017 MOV AL,DD B0 DD
1019 OUT DX,AL EE
101A CALL 104B EB EF 0F
101D MOV AL,EE B0 EE
101F OUT DX,AL EE
1020 CALL 104B EB EF 0F
1023 DEC CL FE C9
1025 JNE 1008(L1) 75 E1
1027 MOV CH,32 85 32
1029 L2 MOV DX,0012 BA 12 00
102C MOV AL,EE B0 EE
102E OUT DX,AL EE
102F CALL 104B EB EF 0F
1032 MOV AL,DD B0 DD
1034 OUT DX,AL EE
1035 CALL 104B EB EF 0F
1038 MOV AL,BB B0 BB
103B CALL 104B EE EF 0F
103E MOV AL,77 B0 77
1040 OUT DX,AL EE
1041 CALL 104B EE EF 0F
1044 DEC CH FE CD
1046 JNE 1029(L2) 75 E1
1048 JMP 1006(L3) E9BB FE
104A INT A5 CD A5
DELAY PROGRAM
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
104B MOV BX,FFFF BB 10 4B
104E L1 DEC BX 4B
104F JNE 104E(L1) 75 F0
1051 RET C3
Result:-
After executing the program, first stepper motor is rotated two times in clock wise
direction and then one time in anti-clock wise direction and repeats the same until the
microprocessor kit is resetted.
16. Interface an 8 bit ADC to 8086 and generate digital output and store it in memory for
the given square/ ramp/ triangle wave form inputs.
Aim:-write an ALP in 8086 to convert Analog information into the digital by interfacing ADC
module through Intel 8255.
Apparatus:
1. 8086 trainer kit
2. ADC interfacing module
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMORIES
CS:IP LABLE MACHINE CODE
OPCODE OPERANDS
1000 MOV DX,0013 BA 13 00
1003 MOV AL,91 B0 91
1005 OUT DX,AL EE
1006 MOV DX,0011 BA 11 00
1009 MOV AL,60 B0 60
100B OUT DX,AL EE
100C MOV AL,E0 B0 E0
100E OUT DX,AL EE
100F MOV AL,80 B0 80
1011 OUT DX,AL EE
1012 MOV AL,E0 B0 E0
1014 OUT DX,AL EE
1015 L1 MOV DX,0012 BA 12 00
1018 IN AL,DX EC
1019 AND AL,01 24 01
101B CMP AL,01 3C 01
101D JNE 1015(L1) 75 F6
101F MOV DX,0011 BA 11 00
1022 MOV AL,60 B0 60
1024 OUT DX,AL EE
1025 MOV DX,0010 BA 10 00
1028 IN AL,DX EC
1029 MOV [2000],AL 88 06 00 20
102D INT A5 CD A5
RESULTS:
1) i/p=0v o/p=00h
2) i/p=4v o/p=CCh
3) i/p=5v o/p=FCh
Hence the interfacing of ADC by using 8255 PPI is implemented and output is verified.
Cycle 2:-
1. Assembly Language Programs to Perform Arithmetic (Both Signed and Unsigned) 16 Bit
Data Operations, Logical Operations (Byte and Bit Level Operations), Rotate, Shift, Swap
and Branch Instructions.
Aim: To perform two 8-bit hexadecimal addition, subtraction and multiplication operations
using immediate addressing mode for 8051 microcontroller.
ApparatusRequired:
1. 8051 trainer kit
2. SMPS
3. Keyboard
4. Connecting power cable
ADDITION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
SUBTRACTION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
MULTIPLICATION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
DIVISION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
LOGICAL OPERATIONS:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
ROTATE OPERATIONS:
Program Code: RL
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
SWAP OPERATION:
Program Code:
MNEMONICS
CS:IP Opcode Operands MACHINE CODE COMMENTS
MOV SP,#060H
MOV TMOD,#01H
MOV TH0,#0B8H
MOV P1,#0AAH
MOV TL0,#00H
MOV TH0,#00H
MOV P1,#055H
ACALL DELAY
LCALL SFTDL
SJMP BACK
ORG 300H
CLR TCON4
CLR TCON5
RET
DJNZ R5,DL2
DJNZ R4,DL3
RET
RESULT:
INPUT:
OUTPUT:
3. Serial Communication from / to 8051 to / from I/O devices.
MOV SP,#060H
MOV IE,#85H
MOV TMOD,#20H
MOV TH1,#0FAH
MOV SCON,#50H
SETB TCON6
CLR SCON1
MOV A,#'A'
MOV P1,A
SJMP RPT
RET
RESULT:
INPUT:
OUTPUT:
4. Program Using Interrupts to Generate Square Wave 10 KHZ Frequency on P2.1 Using
Timer0 8051 in 8bit Auto reload Mode and Connect a 1HZ Pulse to INT1 pin and Display
on Port0.Assume Crystal Frequency as 11.0592MHZ.
MOV IE,#85H
SJMP HERE
MOV P1,#0AAH
LCALL DELAY
LCALL DELAY
LCALL DELAY
RETI
LCALL DELAY
LCALL DELAY
RETI
DELAY NOP
MOV R4,#020H
DLY1 NOP
NOP
DJNZ R2,DLY1
DJNZ R3,DLY2
DJNZ R4,DLY3
RET
RESULT:
INPUT:
OUTPUT:
ADDITIONAL EXPERIMENTS
Apparatus:
1. 8086 trainer kit.
2. Tone generator kit
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMONICS
CS:IP LABEL MACHINE CODE
OPCODE OPERANDS
1000:0100 START JMP 103 EB 01 90
1000:0103 MOV AX,10FF B8 10 FF
1000:0106 MOV AX,AX 8B E0
1000:0108 PUSH CS 0E
1000:0109 POP DS 1F
1000:010A NOP 90
1000:010B NOP 90
1000:010C NOP 90
1000:010D MOV AL,B6 BD B6
1000:010F MOV BX,8107 BA 8C 07
1000:0112 OUT DX,AL EE
1000:0113 MOV AL,00 B0 00
1000:0115 MOV DX,8C05 BA 8C O5
1000:0118 OUT DX,AL EE
1000:0119 MOV AL,0F B0 0F
1000:011B OUT DX,AL EE
1000:011C MOV CX,0FFF B9 FF FH
1000:011F INT CD,AA CD AA
1000:0121 JMP 100 EB EA
2. Interfacing DAC
Apparatus:
1. 8086 trainer kit.
2. DAC trainer kit
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMONICS
CS:IP LABEL MACHINE CODE
OPCODE OPERANDS
1000:0100 MOV AX,0000 B8 00 00
1000:0103 MOV CS,AX DE C0
1000:0105 MOV SS,AX 8E,C0
1000:0107 MOV AX,11F0 B8 F0 11
1000:010A MOV SP,AX F9 C4
1000:010C PUSH CS DE
1000:010D POP CS 1F
1000:010E MOV AL,81 B0 81
1000:0110 MOV DX,8807 BA 07 88
1000:0113 OUT DX,AL EE
1000:0114 MOV AX,1002 B8 02 01
1000:0117 MOV BX,01E0 B8 E0 01
1000:011A MOV DX,00FF BA FF OO
1000:011D MOV AL,09 B0 89
1000:011F OUT DL,AL EE
1000:0120 INT B9 CD A9
1000:0122 PUSH DX 52
1000:012F MOV AX,1002 CD 89
1000:0131 PUSH DX 52
1000:0132 POP CX 59
1000:0133 MOV DX,8801 BA 01 88
1000:0137 MOV AL,00 B0 00
1000:0139 OUT DX,AL EE
1000:013A PUSH CX 51
1000:013C POP CX 59
1000:013E INC AL FE C0
1000:0140 CMP AL,BL 38 D8
1000:0142 JNZ 139 75 05
1000:0144 OUT DX,AL EE
1000:0145 PUSH CX 51
1000:0146 INT AA CD AA
1000:0148 POP CX 59
1000:0149 DEC AL FE C8
1000:014B JNZ 144 75 F7
1000:014D MOV AH,0012 BH OB
1000:014F INT A1 CD A1
1000:0151 AND A1,FF 24 FF
1000:0153 JZ 137 74 E2
1000:0155 INT A3 CD A3
3. TRAFFIC LIGHT CONTROLLER
Apparatus:
1. 8086 trainer kit.
2. Traffic light trainer kit
3. SMPS
4. Keyboard
5. Connecting power cable
Programming Code:
MNEMONICS
CS:IP LABEL MACHINE CODE
OPCODE OPERANDS
1000:0100 MOV AL,80 B0 80
1000:0102 MOV DX,B802 BA 07 B8
1000:0105 OUT DX,AL EE
1000:0106 MOV CX,0004 C0 04 00
1000:0109 MOV SI,1200 BE 10 88
1000:010C L1 MOV AL,[SI] 8A 0A
1000:010E MOV DX,8801 BA 10 88
1000:0111 OUT DX,AL EE
1000:0112 INC SI,1200 46
1000:0113 MOV AL,[SI] 8A 04
1000:011C MOV DX,8801 BA 0A 88
1000:011F OUT DX,AL EE
1000:0120 INC SI 46
1000:0124 MOV AL,[SI] BA 01
1000:0128 MOV DX,8801 BA 0A 88
1000:0129 OUT DX,AL EE
1000:012A INC SI 46
1000:012B MOV AL,[SI] 8A 04
1000:012D MOV DX,8803 BA D3 88
1000:0130 OUT DX,AL EE
1000:0132 MOV [SI],AL 8A CA
1000:0134 MOV DX,8805 BA 05 88
1000:0138 INC SI 46
1000:0139 CALL 0500 E8 14 05
1000:013C DEC CX 49
1000:013D JNZ L1 75 CD
1000:013F JNZ 106 7A C5
LONGER DELAY:
MNEMONICS
CS:IP LABEL MACHINE CODE
OPCODE OPERANDS
1000:0803 NOP 90
1000:0804 NOP 90
1000:0805 NOP 90
1000:0806 DEC 4B
1000:0809 RET C3
SHORTEST DELAY:
MNEMONICS
CS:IP LABEL MACHINE CODE
OPCODE OPERANDS
1000:0500 MOV BX,BFFF BX FF 0F
1000:0503 NOP 90
1000:0504 NOP 90
1000:0505 NOP 90
1000:0506 DEC CX
1000:0507 JNZ 0503 C3
4. SRAM/DRAM
Apparatus:
1. 8086 trainer kit.
2. SRAM/DRAM trainer kit
3. SMPS
4. Keyboard
5. Connecting power cable
1. Keep the per ware 1 on the left side of the kit connect through 50 pin FRC
2. Enter the Software code a given in the accompanying sheets (list)
3. Make switch SI towards you to enable signal Stepping of every access including INTA cycle
4. The 16-bit ADD 002A is to be assigned to the report
--> Connect the decoder B8 pins A.B.C. to address lines AB, AC, AD respectively
→ connect ENABLE pins G2A,G2B address line AE, AF
→ Use I0/M line tags to ENABLE PIN G of decode 138, so whenever I/O is being selectedthe
decoder is enabled (active high I0)
5. Connect O/P pin Yo of decoder to the ENDL TAGof the Buffer 245 to ENABLE the port.
6) Connect the DIR tag of buffer (IC. 07) to the GND while writing to the port
7) Load the program as given in the list 1 and execute it as.
Programming Code:
MNEMONICS
CS:IP LABEL MACHINE CODE
OPCODE OPERANDS