You are on page 1of 3

ENGINEERING INSTITUTE FOR JUNIOR EXECUTIVES

M.B. ROAD, DALALPUKUR, HOWRAH-711104


GOVT. OF WEST BENGAL

MICRO CONTROLLER & IT’S APPLICATIONS


------------------------------------------------------------------------------
ASSINMENT NO:- 05B DATE:- 13/03/23
Page no – 5b.1

TITLE: Arithmetic operation


--------------------------------------------------------------------------------------------------------------

Assembly Language Program ( ALP) to


perform arithmetic operation: Addition,
Substraction, Multiplication etc .
ORG 0000H
MOV A,#02H ;Move the data 02h in accumulator ADD A, #03H ;Add the contents
of accumulator with 03h
MOV RO, A ;Store the result in RO register CLR A ;Clear the contents of
accumulator
CLR C;Clear the carry flag
MOV A, #03H ;Move the data 03h in accumulator
MOV B, #04H ;Move the data 04h in accumulator
MUL AB ;Multiply the contents of A and B
MOV R2, A ;Store the result (LSB) in R2
MOV A, # 95H ;Move the data 95h in accumulator Page no -5b.2
MOV B, #10H ;Move the data 10h in accumulator
DIV AB ;Divide the contents of A and B
MOV R4, A;Store the quotient in R4 register
MOV R5, B ;Store the Remainder in R5 register
MOV A, #05H ;Move the data 05h in accumulator
SUBB A, #02H;Subtract the contents of accumulator and 02h
MOV R1, A;Store the result in R1 register CLR A ;Clear the contents of
accumulator
MOV R3, B ;Store the result (MSB) in R3 CLR A;Clear the contents of accumulator
END;Stop

Input and output:-


Page no – 5b.3

You might also like