New York, NY IMG HI 58° LO 56° Home About Contact
IMG-LOGO
Home Electrical and Electronics Microprocessor & Interfacing Write a Program to ADD, SUBSTRACT, DIVIDE, MULTIPLY Two Numbers.
Microprocessor & Interfacing Lab Experiments

Write a Program to ADD, SUBSTRACT, DIVIDE, MULTIPLY Two Numbers.



Aim

Write a program to ADD, SUBSTRACT, DIVIDE, MULTIPLY two numbers.

Apparatus:

  1. 8051 micro controller kit.
  2. PC for connecting the DYNA51 kit.
  3. Keil-U-Vision software for compilation of program.

Program:

Org 0000h

mov a,#10h

mov b,#5h

add a,b

mov r1,a

clr a

mov b,#00h

mov a,#20h

mov b,#10h

subb a,b

mov r2,a

clr a

mov b,#00h

mov a,#2h

mov b,#2h

mul ab

mov r3,a

clr a

mov b, #00h

mov a,#21h

mov b,#2h

div ab

mov r4,a

mov r5,b

end












Subscribe

Get all latest content delivered to your email a few times a month.