Department of Electronics and Communications Engineering Experiment No: 1 ADDITION OF TWO 16-BIT NUMBERS AIM : To write an assembly language program

to ADD two 16-BIT numbers using 8086 microprocessor Apparatus Required : 1. 8086 Micro processor kit. 2. Key Board. 3. Adapter. PROCEDURE: 1. Connect the power supply of +5v to the Kit. 2. Reset the Microprocessor Kit. 3. To Enter the program, the syntax is RESET A STARTING ADDRESS 4. Then Enter all the instructions of the program. 5. To give the input data, the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(,)to enter the next data. 6. To execute the program, syntax is RESET GO STARTING ADDRESS 7. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS

Bheema Institute of Science and Technology 1

Department of Electronics and Communications Engineering

PROGRAM: MOV MOV MOV INC MOV INC MOV INC MOV ADD JNC INC LABEL: MOV MOV INC MOV INC MOV INT RESULT: WITHOUT CARRY AH
12

SI,@INPUT ADDRESS CL, 00H AL, [SI] SI AH, [SI] SI BL, [SI] SI BH, [SI] AX, BX LABEL (OFFSET ADDRESS) CL SI,@OUTPUT ADDRESS [SI], AL SI [SI], AH SI [SI], CL 03 WITH CARRY AH
AB

AL

34

5

AL

CD

BH 56 BL 70 -----------------------------------------AH 68 AL A4 CL=0

BH AB BL CD -----------------------------------AH 57 AL 9A CL=1

Bheema Institute of Science and Technology

2

Connect the power supply of +5v to the Kit. To give the input data. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Then Enter all the instructions of the program. the syntax is RESET A STARTING ADDRESS 4. 5. To execute the program.)to enter the next data. syntax is RESET GO STARTING ADDRESS 7.Department of Electronics and Communications Engineering Experiment No: 2 SUBSTRACTION OF TWO 16-BIT NUMBERS AIM : To write an assembly language program to SUBSTRACT two 16-BIT numbers using 8086 microprocessor Apparatus Required : 1. To Enter the program. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS . 8086 Micro processor kit. PROCEDURE: 1. Key Board. 6. 3. Adapter. 3. Reset the Microprocessor Kit. 2. 2.

Bheema Institute of Science and Technology 1 .

[SI] SI AH.@INPUT ADDRESS CL. [SI] SI BL.@OUTPUT ADDRESS [SI]. AL SI [SI]. BX LABEL (OFFSET ADDRESS) CL SI. [SI] AX. CL 03 WITH BORROW AH 34 RESULT: WITHOUT BORROW AH 56 AL 78 5 AL 12 BH 34 BL 12 -----------------------------------------AH 22 AL 66 CL=0 BH 56 BL 78 ------------------------------AH DD AL 9A CL=1 Bheema Institute of Science and Technology . AH SI [SI]. [SI] SI BH. 00H AL.Department of Electronics and Communications Engineering PROGRAM: MOV MOV MOV INC MOV INC MOV INC MOV SUB JNC INC LABEL: MOV MOV INC MOV INC MOV INT SI.

To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . Adapter. Connect the power supply of +5v to the Kit. To execute the program. Key Board. To Enter the program. 3. 5. 6. Then Enter all the instructions of the program. 3. syntax is RESET GO STARTING ADDRESS 7. 2. 8086 Micro processor kit. PROCEDURE: 1.Department of Electronics and Communications Engineering Experiment No: 3 MULTIPLICATION OF TWO 16-BIT NUMBERS AIM : To write an assembly language program to MULTIPLY two 16-BIT numbers using 8086 microprocessor Apparatus Required : 1. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. 2. To give the input data. the syntax is RESET A STARTING ADDRESS 4. Reset the Microprocessor Kit.)to enter the next data.

1 .

DH 03 AL 34 5 BH 4B BL 4C ------------------------------------------------------------------------DH 05 DL 5A AH A3 AL 70 Bheema Institute of Science and Technology . DL SI [SI].Department of Electronics and Communications Engineering PROGRAM: MOV MOV INC MOV INC MOV INC MOV MUL MOV MOV INC MOV INC MOV INC MOV INT RESULT: AH 12 SI. [SI] SI BH. AL SI [SI]. [SI] SI AH.@OUTPUT ADDRESS [SI].@INPUT ADDRESS AL. AH SI [SI]. [SI] SI BL. [SI] BX SI.

6.)to enter the next data. 2. Then Enter all the instructions of the program. 3. PROCEDURE: 1.Department of Electronics and Communications Engineering Experiment No: 4 DIVISION OF 32-BIT NUMBER BY 16-BIT NUMBER AIM : To write an assembly language program to DIVIDE a 32-BIT number by 16-bit number using 8086 microprocessor Apparatus Required : 1. Key Board. Reset the Microprocessor Kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. 3. 8086 Micro processor kit. Connect the power supply of +5v to the Kit. Adapter. 5. syntax is RESET GO STARTING ADDRESS 7. the syntax is RESET A STARTING ADDRESS 4. To execute the program. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . To give the input data. To Enter the program. 2.

1 .

DH 03 DL 4B AH 02 AL 01 BH 4C BL 4C -----------------------------------------------------------------------------DH 04 DL F5 AH AA AL 9C . [SI] SI DH. [SI] BX SI. AH SI [SI]. [SI] SI BL.@INPUT ADDRESS AL. [SI] SI BH. [SI] SI AH.Department of Electronics and Communications Engineering PROGRAM: MOV MOV INC MOV INC MOV INC MOV INC MOV INC MOV DIV MOV MOV INC MOV INC MOV INC MOV INT RESULT: DH 4C SI.@OUTPUT ADDRESS [SI]. AL SI [SI]. [SI] SI DL. DL SI [SI].

8086 Micro processor kit. To Enter the program. the syntax is RESET A STARTING ADDRESS 4. Adapter. 5. 6. 2. Reset the Microprocessor Kit. To give the input data. Connect the power supply of +5v to the Kit. 3. Then Enter all the instructions of the program. 2. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. 3. Key Board. To execute the program. PROCEDURE: 1. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS . syntax is RESET GO STARTING ADDRESS 7.Bheema Institute of Science and Technology Department of Electronics and Communications Engineering Experiment No: 5 SUM OF N NUMBERS AIM : To write an assembly language program to perform the addition of N numbers using 8086 microprocessor Apparatus Required : 1.)to enter the next data.

Bheema Institute of Science and Technology 1 .

AX BX. DL 03 AL -------------------------------------------BH 02 BL 31 DL 00 Bheema Institute of Science and Technology . BX CX. [SI] BX. BH SI [SI]. BL SI [SI]. [SI] SI AL.@INPUT ADDRESS CL.Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR XOR MOV MOV BACK: INC MOV ADD JNC INC LABEL: LOOP MOV MOV INC MOV INC MOV INT RESULT: CL 03 AL AA AL BB CC AX. AX LABEL (OFFSET ADDRESS) DL BACK (OFFSET ADDRESS) SI.@OUTPUT ADDRESS [SI]. DX SI. CX DX.

6.)to enter the next data. To execute the program. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology .Department of Electronics and Communications Engineering Experiment No: 6 SUM OF SQUARES OF N NUMBERS AIM : To write an assembly language program to perform the addition of squares of N numbers using 8086 microprocessor Apparatus Required : 1. 3. 2. 2. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Reset the Microprocessor Kit. 3. To give the input data. Then Enter all the instructions of the program. syntax is RESET GO STARTING ADDRESS 7. PROCEDURE: 1. To Enter the program. 8086 Micro processor kit. 5. Key Board. Connect the power supply of +5v to the Kit. Adapter. the syntax is RESET A STARTING ADDRESS 4.

1 .

AX BX. AX LABEL (OFFSET ADDRESS) DL BACK (OFFSET ADDRESS) SI. DX SI.@INPUT ADDRESS CL.@OUTPUT ADDRESS [SI]. [SI] AL BX. DL 03 AL -------------------------------------------BH 9C BL 0D DL 01 Bheema Institute of Science and Technology . BL SI [SI]. BX CX. [SI] SI AL. CX DX. BH SI [SI].Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR XOR MOV MOV BACK: INC MOV MUL ADD JNC INC LABEL: LOOP MOV MOV INC MOV INC MOV INT RESULT: CL 03 AL AA AL BB CC AX.

5. Connect the power supply of +5v to the Kit. Reset the Microprocessor Kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. To give the input data. Adapter. 3. the syntax is RESET A STARTING ADDRESS 4. To execute the program.)to enter the next data. PROCEDURE: 1.Department of Electronics and Communications Engineering Experiment No: 7 SUM OF CUBES OF N NUMBERS AIM : To write an assembly language program to perform the addition of cubes of N numbers using 8086 microprocessor Apparatus Required : 1. syntax is RESET GO STARTING ADDRESS 7. 8086 Micro processor kit. Key Board. 2. To Enter the program. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . 3. Then Enter all the instructions of the program. 6. 2.

Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR XOR MOV MOV BACK: INC MOV MOV MUL MUL ADD JNC INC LABEL: LOOP MOV MOV INC MOV INC MOV INT RESULT: CL 03 AL 0A AL 0B 0C AX. [SI] SI AL. BH SI [SI]. AX LABEL (OFFSET ADDRESS) DL BACK (OFFSET ADDRESS) SI. DX SI.@OUTPUT ADDRESS [SI]. CX DX. DL 03 AL -------------------------------------------BH 0F BL DB DL 00 Bheema Institute of Science and Technology . BL SI [SI].@INPUT ADDRESS CL. AX BX. [SI] AL. BX CX. DL DL AL BX.

Then Enter all the instructions of the program. Connect the power supply of +5v to the Kit. 2. 5.)to enter the next data. To execute the program. 3. 3. To Enter the program. 6. PROCEDURE: 1. 2. Key Board. the syntax is RESET A STARTING ADDRESS 4.Department of Electronics and Communications Engineering Experiment No:8 ARITHMETIC MEAN OF N NUMBERS AIM : To write an assembly language program to perform the arithmetic mean of N numbers using 8086 microprocessor Apparatus Required : 1. Adapter. Reset the Microprocessor Kit. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . To give the input data. syntax is RESET GO STARTING ADDRESS 7. 8086 Micro processor kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(.

@INPUT ADDRESS CL. [SI] DL. [SI] AX. DX SI.@OUTPUT ADDRESS [SI]. BX LABEL (OFFSET ADDRESS) AH BACK (OFFSET ADDRESS) DL SI.Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR XOR MOV MOV MOV DEC INC MOV BACK: INC MOV ADD JNC INC LABEL: LOOP DIV MOV MOV INC MOV INT RESULT: DL=CL 03 AX. AX BX. CX DX. [SI] SI BL. AH 03 AL 01 02 03 06 AH 00 AL DL 06 03 AL ----------------------AL 02 AL ------------------------AH 00 AL Bheema Institute of Science and Technology . BX CX. AL SI [SI]. CL CL SI AL.

the syntax is RESET A STARTING ADDRESS 4. syntax is RESET GO STARTING ADDRESS 7. Then Enter all the instructions of the program.)to enter the next data. 2. Reset the Microprocessor Kit. To give the input data. To execute the program. 3. 3. 5. To Enter the program. 8086 Micro processor kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. PROCEDURE: 1. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . 2. 6.Department of Electronics and Communications Engineering Experiment No: 9 FINDING MINIMUM NUMBER AMONG 8-BIT DATA AIM : To write an assembly language program to find a minimum number from given 8-bit N numbers using 8086 microprocessor Apparatus Required : 1. Key Board. Adapter. Connect the power supply of +5v to the Kit.

.

AL 03 02 01 09 08 ----------------------------------------------------------------AL: 01 Bheema Institute of Science and Technology . [SI] SI BL.@OUTPUT ADDRESS [SI].Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR MOV MOV DEC INC MOV BACK: INC MOV CMP JC MOV LABEL: LOOP MOV MOV INT RESULT: CL: DATA: 06 05 AX. CX SI. [SI] AL. BL LABEL (OFFSET ADDRESS) AL. BL BACK (OFFSET ADDRESS) SI.@INPUT ADDRESS CL. AX BX. [SI] CL SI AL. BX CX.

Reset the Microprocessor Kit. the syntax is RESET A STARTING ADDRESS 4. 8086 Micro processor kit. PROCEDURE: 1. 2. syntax is RESET GO STARTING ADDRESS 7. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. To give the input data. To execute the program. 5. 2. 6. To Enter the program. Then Enter all the instructions of the program.Department of Electronics and Communications Engineering Experiment No: 10 FINDING MAXIMUM NUMBER AMONG 8-BIT DATA AIM: To write an assembly language program to find a maximum number from given 8-bit N numbers using 8086 microprocessor Apparatus Required: 1. 3. Key Board.)to enter the next data. Connect the power supply of +5v to the Kit. 3. Adapter. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology .

.

AX BX. [SI] SI BL. BL BACK (OFFSET ADDRESS) SI.Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR MOV MOV DEC INC MOV BACK: INC MOV CMP JNC MOV LABEL: LOOP MOV MOV INT RESULT: CL: DATA: 06 05 AX. CX SI. BX CX. AL 03 02 01 09 08 ----------------------------------------------------------------AL: 09 Bheema Institute of Science and Technology . [SI] CL SI AL.@OUTPUT ADDRESS [SI]. [SI] AL.@INPUT ADDRESS CL. BL LABEL (OFFSET ADDRESS) AL.

To execute the program. 8086 Micro processor kit.)to enter the next data. PROCEDURE: 1. 6. Connect the power supply of +5v to the Kit. Then Enter all the instructions of the program. syntax is RESET GO STARTING ADDRESS 7. 2. the syntax is RESET A STARTING ADDRESS 4. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Key Board. 3. 5. 2. Reset the Microprocessor Kit. To give the input data. 3.Department of Electronics and Communications Engineering Experiment No: 11 FINDING MINIMUM NUMBER AMONG 16-BIT DATA AIM: To write an assembly language program to find a minimum number from given 16-bit N numbers using 8086 microprocessor Apparatus Required: 1. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . Adapter. To Enter the program.

.

CX SI.@OUTPUT ADDRESS [SI]. [SI] SI BH. [SI] AX. AX BX.Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR MOV MOV DEC INC MOV INC MOV BACK: INC MOV INC MOV CMP JC MOV LABEL: LOOP MOV MOV INT AX. BX BACK (OFFSET ADDRESS) SI. BX CX. [SI] SI BL. [SI] SI AH. [SI] CL SI AL. AX 03 03 RESULT: CL: 3 DATA: 06 02 01 2 09 08 1 06 ----------------------------------------------------------------------AH: 01 AL: 09 Bheema Institute of Science and Technology .@INPUT ADDRESS CL. BX LABEL (OFFSET ADDRESS) AX.

Key Board.Department of Electronics and Communications Engineering Experiment No: 12 FINDING MAXIMUM NUMBER AMONG 16-BIT DATA AIM: To write an assembly language program to find a maximum number from given 16-bit N numbers using 8086 microprocessor Apparatus Required: 1. To Enter the program. 3. To execute the program. 6. To give the input data. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. 5.)to enter the next data. 8086 Micro processor kit. 2. syntax is RESET GO STARTING ADDRESS 7. 3. Adapter. Connect the power supply of +5v to the Kit. 2. Reset the Microprocessor Kit. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . the syntax is RESET A STARTING ADDRESS 4. PROCEDURE: 1. Then Enter all the instructions of the program.

BX BACK (OFFSET ADDRESS) SI. AX BX. [SI] SI AH. CX SI.@OUTPUT ADDRESS [SI]. BX CX. [SI] CL SI AL. BX LABEL (OFFSET ADDRESS) AX. [SI] SI BL.Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR MOV MOV DEC INC MOV INC MOV BACK: INC MOV INC MOV CMP JNC MOV LABEL: LOOP MOV MOV INT AX.@INPUT ADDRESS CL. [SI] AX. [SI] SI BH. AX 03 03 RESULT: CL: 3 DATA: 06 02 01 2 09 08 1 06 ----------------------------------------------------------------------AH: 08 AL: 06 Bheema Institute of Science and Technology .

Then Enter all the instructions of the program. 3. To give the input data. PROCEDURE: 1. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . Key Board. 5.)to enter the next data. Adapter. 6. 8086 Micro processor kit. 2. To execute the program. syntax is RESET GO STARTING ADDRESS 7. the syntax is RESET A STARTING ADDRESS 4. Connect the power supply of +5v to the Kit. 3. 2. Reset the Microprocessor Kit.Department of Electronics and Communications Engineering Experiment No: 13 ARRANGING GIVEN 8-BIT DATA IN ASCENDING ORDER AIM: To write an assembly language program to arrange given N numbers in ascending order using 8086 microprocessor Apparatus Required: 1. To Enter the program.

@INPUT ADDRESS CL.Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR MOV MOV DEC MOV AGAIN: BACK: INC MOV INC CMP JC XCHG LABEL: LOOP SUB MOV MOV LOOP INT AX. [SI] CL DX. DX [SI]. [SI] SI AL. CX SI AL. AX BX. BX CX. AL CX. [SI] BACK (OFFSET ADDRESS) SI. CX SI. [SI] LABEL (OFFSET ADDRESS) AL. DX AGAIN (OFFSET ADDRESS) 03 05 RESULT: I/P DATA: CL: 0E 0B 0C 0A 0D ----------------------------------------------------------------------0B 0C O/P DATA: 0A 0D 0E Bheema Institute of Science and Technology .

Then Enter all the instructions of the program. 3. 8086 Micro processor kit. To Enter the program.Department of Electronics and Communications Engineering Experiment No: 14 ARRANGING GIVEN 16-BIT DATA IN DESCENDING ORDER AIM: To write an assembly language program to arrange given N numbers in ascending order using 8086 microprocessor Apparatus Required: 1. 5. To give the input data. Connect the power supply of +5v to the Kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Reset the Microprocessor Kit. Key Board. 6. 2. syntax is RESET GO STARTING ADDRESS 7. 2. Adapter. To execute the program. 3. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . PROCEDURE: 1. the syntax is RESET A STARTING ADDRESS 4.)to enter the next data.

.

Department of Electronics and Communications Engineering PROGRAM: XOR XOR XOR MOV MOV DEC MOV AGAIN: BACK: INC MOV INC CMP JNC XCHG LABEL: LOOP SUB MOV MOV LOOP INT AX. AX BX. DX [SI]. CX SI.@INPUT ADDRESS CL. [SI] CL DX. [SI] SI AL. [SI] BACK (OFFSET ADDRESS) SI. BX CX. DX AGAIN (OFFSET ADDRESS) 03 05 RESULT: I/P DATA: CL: 0E 0B 0C 0A 0D ----------------------------------------------------------------------0D 0C O/P DATA: 0E 0B 0A Bheema Institute of Science and Technology . [SI] LABEL (OFFSET ADDRESS) AL. CX SI AL. AL CX.

6. To Enter the program. 3. PROCEDURE: 1. Adapter. Key Board. To execute the program. To give the input data. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . syntax is RESET GO STARTING ADDRESS 7. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. 2. Connect the power supply of +5v to the Kit. Reset the Microprocessor Kit. the syntax is RESET A STARTING ADDRESS 4. Then Enter all the instructions of the program.Department of Electronics and Communications Engineering Experiment No: 15 CONVERSION OF CELSIUS TEMPARATURE INTO FAHRENHEIT TEMPARATURE AIM: To write an assembly language program to convert Celsius temperature into Fahrenheit temperature using 8086 microprocessor Apparatus Required: 1.)to enter the next data. 2. 3. 5. 8086 Micro processor kit.

AX 03 F= (9/5) C+32 AL 19 HEXA=19=>DECI=25 F=(9/5)25+32 F=77 HEXA=77=>DECI=4D --------------------------------------------------------------AH 00 AL 4D Bheema Institute of Science and Technology .@OUTPUT ADDRESS [SI].Department of Electronics and Communications Engineering PROGRAM: XOR XOR MOV MOV MOV MUL MOV DIV MOV ADD MOV MOV INT RESULT: AX. BX SI. 20 AX. AX BX. BX SI. [SI] BL. 05 BL BL.@INPUT ADDRESS AL. 09 BL BL.

3. 2. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Then Enter all the instructions of the program. To give the input data. PROCEDURE: 1. 2. To Enter the program. 5. To execute the program. Key Board. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . Reset the Microprocessor Kit.Department of Electronics and Communications Engineering Experiment No: 16 CONVERSION OF FAHRENHEIT TEMPARATURE INTO CELSIUS TEMPARATURE AIM: To write an assembly language program to convert Fahrenheit temperature into Celsius temperature using 8086 microprocessor Apparatus Required: 1. 6. 8086 Micro processor kit. Connect the power supply of +5v to the Kit.)to enter the next data. 3. Adapter. syntax is RESET GO STARTING ADDRESS 7. the syntax is RESET A STARTING ADDRESS 4.

Department of Electronics and Communications Engineering PROGRAM: XOR XOR MOV MOV MOV SUB MOV MOV MOV DIV MOV MOV INT RESULT: AX. BX SI.@INPUT ADDRESS AL. BL BL. 09 BL SI. [SI] BL. 05 BL BL. AX BX. AX 03 C= (F-32) *(5/9) AL 4D HEXA=4D=>DECI=77 C= (77-32)*(5/9) C=19 HEXA=19=>DECI=25 --------------------------------------------------------------AH 00 AL 19 Bheema Institute of Science and Technology .@OUTPUT ADDRESS [SI]. 20 AL.

Department of Electronics and Communications Engineering Experiment No: 17 CONVERSION OF PACKED BCD INTO UNPACKED BCD NUMBER AIM: To write an assembly language program to convert a packed BCD number into unpacked BCD number using 8086 microprocessor Apparatus Required: 1. Key Board. the syntax is RESET A STARTING ADDRESS 4. To execute the program. To give the input data. To Enter the program. syntax is RESET GO STARTING ADDRESS 7. 6. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . 2. 3. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Connect the power supply of +5v to the Kit. 2. 8086 Micro processor kit. Reset the Microprocessor Kit. Then Enter all the instructions of the program. Adapter. 3. PROCEDURE: 1.)to enter the next data. 5.

0F BL. CL BL. AL SI [SI]. 0F SI. BX SI. BL 03 AL BL ROR BL. [SI] CL.@OUTPUT ADDRESS [SI]. AX BX.CL BL AND 19 91 91 04 PACKED BCD AL 91 0F 0F --------------------------------------------------------------BL 09 AL 01 UNPACKED BCD Bheema Institute of Science and Technology .@INPUT ADDRESS AL.Department of Electronics and Communications Engineering PROGRAM: XOR XOR MOV MOV AND MOV MOV ROR AND MOV MOV INC MOV INT RESULT: CL AX. [SI] AL. 04 BL.

Then Enter all the instructions of the program.)to enter the next data. 2. To Enter the program. 2.Department of Electronics and Communications Engineering Experiment No: 18 CONVERSION OF UNPACKED BCD INTO PACKED BCD NUMBER AIM: To write an assembly language program to convert an unpacked BCD number into packed BCD number using 8086 microprocessor Apparatus Required: 1. Reset the Microprocessor Kit. 8086 Micro processor kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Connect the power supply of +5v to the Kit. 6. PROCEDURE: 1. To give the input data. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . 5. the syntax is RESET A STARTING ADDRESS 4. 3. To execute the program. 3. Adapter. Key Board. syntax is RESET GO STARTING ADDRESS 7.

[SI] SI BL. AL 03 04 02 AL 04 UNPACKED BCD ROR BL.@OUTPUT ADDRESS [SI].@INPUT ADDRESS AL. CL 20 AL BL 04 20 --------------------------------------------------------------AL 24 PACKED BCD Bheema Institute of Science and Technology Department of Electronics and Communications Engineering .Department of Electronics and Communications Engineering PROGRAM: XOR XOR MOV MOV INC MOV MOV ROR OR MOV MOV INT RESULT: CL BL BL AX. BL SI. CL AL. 04 BL. [SI] CL. BX SI. AX BX.

the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. Reset the Microprocessor Kit. To give the input data. 3.Experiment No: 19 CONVERSION OF DECIMAL INTO HEXADECIMAL NUMBER AIM: To write an assembly language program to convert a DECIMAL number into HEXADECIMAL number using 8086 microprocessor Apparatus Required: 1. Adapter. the syntax is RESET A STARTING ADDRESS 4. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . To execute the program.)to enter the next data. Connect the power supply of +5v to the Kit. 2. Key Board. Then Enter all the instructions of the program. To Enter the program. 6. 2. 5. PROCEDURE: 1. syntax is RESET GO STARTING ADDRESS 7. 3. 8086 Micro processor kit.

@OUTPUT ADDRESS [SI]. AL AL. 0A BL AL. 0F BH. BX SI. 0F AL.Department of Electronics and Communications Engineering PROGRAM: XOR XOR MOV MOV MOV AND MOV MOV ROR AND MOV MUL ADD MOV MOV INT RESULT: CL BH AX. [SI] BL.@INPUT ADDRESS AL. AX BX.BH SI. 04 BL. AL CL. CL BL. AL 03 AL BL AL BH DECIMAL 04 19 01 09 12 01 --------------------------------------------------------------AL 13 HEXADEIMAL Bheema Institute of Science and Technology .

Then Enter all the instructions of the program. Reset the Microprocessor Kit. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. PROCEDURE: 1. To execute the program.Department of Electronics and Communications Engineering Experiment No: 20 CONVERSION OF HEXADECIMAL INTO DECIMAL NUMBER AIM: To write an assembly language program to convert a HEXADECIMAL number into DECIMAL number using 8086 microprocessor Apparatus Required: 1. To give the input data.)to enter the next data. 5. the syntax is RESET A STARTING ADDRESS 4. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS Bheema Institute of Science and Technology . 2. 3. 8086 Micro processor kit. To Enter the program. Key Board. 6. 3. Adapter. Connect the power supply of +5v to the Kit. syntax is RESET GO STARTING ADDRESS 7. 2.

Department of Electronics and Communications Engineering

PROGRAM:
XOR XOR XOR XOR MOV MOV MOV DIV MOV MOV MOV MOV DIV MOV MOV MOV MUL INC MOV MOV MUL ADD ADD MOV MOV INT AX, AX BX, BX CX, CX DX, DX SI,@INPUT ADDRESS AL, [SI] BL, 64 BL DL, AL AL, AH AH, 00 BL, 0A BL CL, AL BL, AH AX, 0100 DX SI [SI], AX AX, 0010 CX AX, BX AX, [SI] SI,@OUTPUT ADDRESS [SI], AX 03 DL 02
FF

RESULT:
AL

CL BL

05 05

[SI] 0200 AX 0050 BX 0005 -------------------------------------------------AX
0255

HEXADECIMAL

DECIMAL

Bheema Institute of Science and Technology

Department of Electronics and Communications Engineering Experiment No: 21 FINDING LARGEST NUMBER AMONG 8-BIT DATA USING 8051 AIM: To write an assembly language program to finding the largest number among given 8-BIT N numbers using 8051 microcontroller. Apparatus Required: 1. 8051 Micro Controller kit. 2. Key Board. 3. Adapter. PROCEDURE: 1. Connect the power supply of +5v to the Kit. 2. Reset the Microcontroller Kit. 3. To Enter the program, the syntax is RESET A STARTING ADDRESS 4. Then Enter all the instructions of the program. 5. To give the input data, the syntax is RESET MD INPUT ADDRESS Then enter the input data and use enter ( ) to enter the next data. 6. To execute the program, syntax is RESET G STARTING ADDRESS 7. To see the output which is present in output location the syntax is RESET MD STARTING ADDRESS 8. To view the program for modifications the syntax is RESET Z STARTING ADDRESS

Bheema Institute of Science and Technology

B. A DPTR A. A DPTR A. #OUTPUT ADDRESS @DPTR. @DPTR R1 B. B R1. L3 (OFFSET ADDRESS) DPTR.Department of Electronics and Communications Engineering PROGRAM: MOV DPTR. A L4 (OFFSET ADDRESS) MOVX MOV INC MOVX DEC L3: MOV INC MOVX CJNE L1: L2: JNC XCH DJNZ MOV MOVX L4: RESULT: R1: DATA: 06 SJMP 05 02 01 09 08 ----------------------------------------------------------------A: 09 Bheema Institute of Science and Technology . #STARTING ADDRESS A. L1 (OFFSET ADDRESS) L2 (OFFSET ADDRESS) A. @DPTR R1. @DPTR A.

Apparatus Required: 1. 2. Key Board. 8051 Micro Controller kit. 6. To execute the program. To give the input data. 3. syntax is RESET G STARTING ADDRESS 7. To Enter the program. To view the program for modifications the syntax is RESET Z STARTING ADDRESS Bheema Institute of Science and Technology . the syntax is RESET A STARTING ADDRESS 4. To see the output which is present in output location the syntax is RESET MD STARTING ADDRESS 8. 3.Department of Electronics and Communications Engineering Experiment No: 22 FINDING SMALLEST NUMBER AMONG 8-BIT DATA USING 8051 AIM: To write an assembly language program to finding the SMALLEST number among given 8-BIT N numbers using 8051 microcontroller. Connect the power supply of +5v to the Kit. the syntax is RESET MD INPUT ADDRESS Then enter the input data and use enter ( ) to enter the next data. Then Enter all the instructions of the program. Adapter. Reset the Microcontroller Kit. PROCEDURE: 1. 2. 5.

Department of Electronics and Communications Engineering PROGRAM: MOV DPTR. A L4 (OFFSET ADDRESS) MOVX MOV INC MOVX DEC L3: MOV INC MOVX CJNE L1: L2: JC XCH DJNZ MOV MOVX L4: RESULT: R1: DATA: 06 SJMP 05 02 01 09 08 ----------------------------------------------------------------A: 01 Bheema Institute of Science and Technology . @DPTR R1 B. #OUTPUT ADDRESS @DPTR. A DPTR A. #STARTING ADDRESS A. L1 (OFFSET ADDRESS) L2 (OFFSET ADDRESS) A. A DPTR A. @DPTR A. @DPTR R1. B R1. B. L3 (OFFSET ADDRESS) DPTR.

To Enter the program. Apparatus Required: 1. Key Board. 6. To give the input data. the syntax is RESET MD INPUT ADDRESS Then enter the input data and use enter ( ) to enter the next data. PROCEDURE: 1. Then Enter all the instructions of the program. 8051 Micro Controller kit.Department of Electronics and Communications Engineering Experiment No: 23 READING AND WRITING ON A PARALLEL PORT OF 8051 AIM: To write an assembly language program to perform the operations like reading and writing the data on a parallel port of 8051 microcontroller. Adapter. Reset the Microcontroller Kit. 3. the syntax is RESET A STARTING ADDRESS 4. 2. syntax is RESET G STARTING ADDRESS 7. 2. Connect the power supply of +5v to the Kit. To view the program for modifications the syntax is RESET Z STARTING ADDRESS Bheema Institute of Science and Technology . 5. 3. To see the output which is present in output location the syntax is RESET MD STARTING ADDRESS 8. To execute the program.

@DPTR 90. #STARTING ADDRESS A.Department of Electronics and Communications Engineering PROGRAM: MOV DPTR. A DPTR A. 90 @DPTR. A DPTR A. A L4 (OFFSET ADDRESS) MOV MOVX INC MOVX MOV INC MOV MOVX L4: RESULT: SJMP 00 PORT IS ON DATA IS READ DATA IS WRITE FF INPUT DATA: 85 85 OUTPUT 00 85 Bheema Institute of Science and Technology . 90 @DPTR.

To give the input data. 6. Apparatus Required: 1. 8051 Micro Controller kit. PROCEDURE: 1. the syntax is RESET A STARTING ADDRESS 4. To execute the program. 3. Adapter. To view the program for modifications the syntax is RESET Z STARTING ADDRESS . 2. Key Board. 3. the syntax is RESET MD INPUT ADDRESS Then enter the input data and use enter ( ) to enter the next data.Department of Electronics and Communications Engineering Experiment No: 24 BIT AND BYTE OPERATIONS BY USING 8051 AIM: To write an assembly language program to perform the BIT and BYTE operations like set. 5. To Enter the program. To see the output which is present in output location the syntax is RESET MD STARTING ADDRESS 8. Connect the power supply of +5v to the Kit. Reset the Microcontroller Kit. Then Enter all the instructions of the program. syntax is RESET G STARTING ADDRESS 7. reset and swap by using 8051 microcontroller. 2.

Bheema Institute of Science and Technology .

#STARTING ADDRESS A. @DPTR 0E5 DPTR @DPTR. A L4 (OFFSET ADDRESS) DPTR. A L4 (OFFSET ADDRESS) DPTR. @DPTR 0E5 DPTR @DPTR. A L4 (OFFSET ADDRESS) MOVX SETB INC MOVX L4: RESET A BIT: MOV SJMP MOVX CLR INC MOVX L4: SJMP MOV COMPLIMENT A BIT: MOVX CPL INC MOVX L4: RESULT: C5 E5 SJMP SET A BIT CLEAR A BIT COMPLIMENT A BIT E5 C5 20 00 INPUT 00 20 OUTPUT Bheema Institute of Science and Technology .Department of Electronics and Communications Engineering PROGRAM: BIT OPERATONS SET A BIT: MOV DPTR. #STARTING ADDRESS A. @DPTR 0E5 DPTR @DPTR. #STARTING ADDRESS A.

@DPTR A DPTR @DPTR. @DPTR A DPTR @DPTR. A L4 (OFFSET ADDRESS) MOVX CPL INC MOVX L4: SJMP RESULT: C5 SWAP A BYTE 5C INPUT 00 FF FF OUTPUT COMPLIMENT A BYTE 00 Bheema Institute of Science and Technology . A L4 (OFFSET ADDRESS) MOVX SETB INC MOVX L4: SJMP COMPLIMENT A BYTE: MOV DPTR. #STARTING ADDRESS A. #STARTING ADDRESS A.Department of Electronics and Communications Engineering PROGRAM: BYTE OPERATONS SWAP A BYTE: MOV DPTR.

To give the input data. Then Enter all the instructions of the program. To execute the program. 2. the syntax is RESET A STARTING ADDRESS 4. Key Board.Department of Electronics and Communications Engineering Experiment No: 16 INTERFACING A STEPPER MOTOR WITH 8086 MICROPROPROCESSOR AIM: To write an assembly language program to interface a stepper motor by using 8086 microprocessor to control the speed and rotating direction i. clockwise and anticlockwise of a stepper motor. To Enter the program. Connect the power supply of +5v to the Kit.e. Reset the Microprocessor Kit. 3. Adapter. 2. 4. the syntax is RESET S STARTING ADDRESS Then enter the input data and use comma(. To see the output which is present in output location the syntax is RESET S STARTING ADDRESS 8086 Micro processor kit.)to enter the next data. 3. 6. PROCEDURE: 1. Stepper motor. Bheema Institute of Science and Technology . Apparatus Required: 1. 5. syntax is RESET GO STARTING ADDRESS 7.

.

AX DX. 41 ANTI AL. 0000 ES. 0D. 0D. AL 0FE00:01ED START MES1: DB 0A. DX 0FE00:0013 0FE00:00A9 AL. 0FFE6 AL. 00H DX. 43 CLO GET .’ENTER DIRECTION’ DB 0A.’A-ANTI CLOCKWISE C-CLOCKWISE’.Department of Electronics and Communications Engineering PROGRAM: MOV MOV MOV MOV OUT CALLS JMP */DISPLAY MESSAGE STRING*/ “0A 0D 45 4E 54 45 52 20 44 49 52 45 43 54 49 4F 4E 0A 0D 41 2D 41 4E 54 49 43 4C 4F 43 4B 57 49 53 45 20 20 20 20 20 43 2D 43 4C 4F 43 4B 57 49 53 45 00 2E 8D 16 12 20 START: LEA MOV CALLS GET: CALLS CMP JE CMP JE JMP Bheema Institute of Science and Technology AX. MES1 AX. 80 DX.

1 R2 0FE00:0031 0FE00:00 AL. 0FFE0 Bheema Institute of Science and Technology . 11 DX.*/ROUTINE FOR CLOCKWISE ROTATION OF MOTOR*/ CLO: R1: CALL OUT CALL RCR JMP COMMON DX. 1 R1 */ROUTINE FOR CLOCKWISE ROTATION OF MOTOR*/ ANTI: R2: CALL OUT CALL RCL JMP COMMON: CALLS CALLS MOV MOV RET */ROUTINE TO CONTROL SPEED OF MOTOR*/ DELAY: SS: MOV LOOP RET CX. AL DELAY AL. @VALUE SS COMMON DX. AL DELAY AL.

Sign up to vote on this title
UsefulNot useful