Wednesday, March 9, 2011

Program to multiply two 8-bit data......

Program to Multiply two 8-bit data stored at memory location 2101H and 2102H.

For multiplication we will take one number as a reference keep it decrementing by one and the other number incrementing by magnitude equal to its value.

----------
LDA 2101H
MOVE B, A;
LDA 2102H;
MOVE C, A;
MVI D, 00H;
<A2> ADD C;
JC A1;
DCR B;
JZ EXITA4;
JMP A2;
<A1> INR D;
JMP A2
<EXITA4>HLT;
-------------------

No comments:

Post a Comment