AIM
TO PERFORM ADDITION OF TWO 8 BIT NUMBERS USING 8085ALGORITHM
1. START THE PROGRAM BY LOADING THE FIRST DATA INTO THE ACCUMULATOR2. MOVE THE DATA TO A A REGISTER( B REGISTER)
3. GET THE SECOND DATA THE LOAD INTO ACCUMULATOR
4. ADD THE TWO REGISTER CONTENTS
5. CHECK FOR CARRY
6. STORE THE VALUE OF SUM AND CARRY IN MEMORY LOCATION
7. TERMINATE THE PROGRAM
PROGRAM
MVI C,00H INITIALIZE CLDA 4150 LOAD THE VALUE TO ACCUMULATOR
MOV B,A MOV THE CONTENT OF ACCUMULATOR TO B REGISTER
LDA 4151 LOAD THE VALUE TO ACCUMULATOR
ADD B ADD THE VALUE OF REGISTER TO B
JNC LOOP JUMP ON NO CARRY
INR C INCREMENT VALUE OF REGISTER C
LOOP: STA 4152 STORE THE VALUE OF ACCUMULATOR (SUM)
MOV A,C MOVE CONTENT OF REGISTER C TO ACCUMULATOR
STA 4153 STORE THE VALUE OF ACCUMULATOR (CARRY)
HLT HALT THE PROGRAM
No comments:
Post a Comment