You are on page 1of 9

Aim:

G. H. RAISONI COLLEGE OF ENGINEERING, NAGPUR

(An Autonomous Institute under UGC Act 1956)

Department of Information Technology

Date: 20.05.2021

Practical Subject: AMPMC


Session: 2020-21

Student Details:
Roll Number 44

Name Ritesh Ramdas Amilkanthwar

Semester II

Section J

Group J-43,J-44

PRACTICAL NO. - 1
Aim:
AIM:
A) To write and execute an assembly language program to add the given two 8 bit numbers.

Apparatus:
1.8051 microcontroller kit
2.Keiluvision 5 development tool

Theory:
Algorithm:
1) Addition without carry
1. Start the Program.
2. Move the Data1 to the accumulator.
3. Add the Data2 with the accumulator, the result stored in accumulator.
4. Move the result which is in accumulator to the 30H address location.
5. Stop the Program.
Aim:
Aim:
B) To write and execute an assembly language program to subtract the given two 8 Bit Numbers.

Algorithm:
1. Start the program
2. Move the data 1 to the accumulator
3. Subtract the data2 with the accumulator, the result stored in accumulator.
4. Move the result which is stored in the accumulator to the register 30H memory location.
5. Stop

Program: Subtract a small number from a large number


Aim:
AIM:
To write and execute an assembly language program to multiply the given two 8-bit Numbers.

Algorithm:
6. Move the multiplicand to accumulator.
7. Move the multiplier to ‘B’ register (SFR with direct address FOH)
8. Multiply the contents of Accumulator and ‘B’ register.
9. Store the lower byte result from ‘A’ register to 8300 memory location 5. Store the higher byte result from ‘B’
register to 8301 memory location
6. Stop or Halt the program execution.

Program: Two 8 Bit Multiplication


AIM:
C) To write and execute an assembly language program to divide the given two 8 bit Numbers.

Algorithm:
1. Move the dividend to accumulator.
2. Move the divisor to ‘B’ register.
3. Divide the contents of Accumulator and ‘B’ register.
4. Store the result in register r3 and move content of b in register r4.
5. Stop or Halt the program execution.

Program: Two 8 Bit division


AIM:
C) To write and execute an assembly language program to increment the given 8 Bit Number. Algorithm:

1. Start
2. Move the content to the accumulator.
3. Increment the content of accumulator.
4. Move the incremented value at the accumulator to register r5.
5. Stop.

Program: increment operation


AIM:To write and execute an assembly language program to decrement the given 8-bit Number.
Algorithm:
1. Start

2. Move the content to the accumulator.

3. Decrement the content of accumulator.

4. Move the incremented value at the accumulator to register r6.

5. Stop.

Program: Decrement operation

Result:
Thus an assembly language program 8 bit addition, subtraction multiplication, division, increment and decrement
were written and executed successfully.
Postlab:

1. Explain the difference between the following two instructions: MOVX A,@DPTR MOVC
A,@A+DPTR
2. Circle the invalid instructions. MOV R2,@R1 MOV A,@R2 MOVC A,@A+DPTR MOV R1,R2

You might also like