Experiment-6: 8085 ALP to multiply two 8-bit numbers 8085 MPI Lab by Ravinder Nath Rajotiya - May 19, 2021June 3, 20210 Share on Facebook Share Send email Mail Print Print Table of Contents Toggle 6.1 Write a program to perform Multiplication of two 8 bit numbers.Objective:AlgorithmExample-6.2: Write the multiplication table of a numberObjective 6.1 Write a program to perform Multiplication of two 8 bit numbers. Objective: To understand the multiplication using repeated addition To develop flowchart for multiplication using addition process To develop 8085 assembly program for multiplication of two 8-bit numbers To analyse and debug the assembly program Algorithm Load multiplicand in one register say Register B Load multiplier in register C Clear accumulator Add accumulator and register B decrement count (multiplier value) go to step-4 and repeat if count not zero stop Program for multiplying two 8-bit numbers Addr Opcode Operands Label mnemonic Remarks 4200 C3 06 042 jmp start ;data 4203 multiplicand: db 12 4204 08 (1 bytes) multiplier: db 8 4205 product: ds 1 ;code 4206 00 start: nop 4207 3A 03 042 LDA multiplicand 420A 47 MOV B, A Save multiplicand in B 420B 3A 04 042 LDA multiplier 420E 4F MOV C, A ; save multiplier in C 420F AF XRA A ; clear Acc 4210 00 again: nop 4211 80 ADD B ; A= A+B 4212 0D DCR C ;decrement count/multiplier 4213 C2 10 42 JNZ again ; repeat if not zero 4216 32 05 042 STA product ; save product 4219 76 hlt Output: Example-6.2: Write the multiplication table of a number Aim : to develop assembly program for 8085 microprocessor to find multiplication table of a number Objective To understand the multiplication using repeated addition To develop flowchart for multiplication using addition process To develop 8085 assembly program for multiplication of two 8-bit numbers To analyse and debug the assembly program Steps in writing the program: Load a number in Accumulator Make a copy in register B Set count to 9 in register C Set the HL pair to Point to Y save Acc (1st data) in Y at index(0) increment pointer to point to next position in Y ADD A with B save Acc at address in HL decrement countable go to step ‘7’ if count not zero stop Program for generating multiplication table of a number Address OP-CODE AND OPERANDS Label Mnemonic Comments 4203 4 X: DB 4 4204 – 420D Y: DS 10 ; storage for multiplication table 420E 00 START: nop 420F 3A,03,42 LDA X Load accumulator with numble whose multiplication table is to be found 4212 47 MOV B,A ;copy in register B 4213 21,04,42 LXI H, Y ; set memory pointer 4216 77 MOV M, A ; copy the muber at index(0) 4217 0E, 9 MVI C, 9 ; set count 4219 80 NEXT: ADD B ; add number 421A 23 INX H 421B 77 MOV M, A ; save product at next location 421C 0D DCR C ; decrement count 421D C2,19.42 JNZ NEXT ; if not zero go to next 4220 76 HLT RESULT OUTPUT: Share on Facebook Share Send email Mail Print Print