Advertisements
Advertisements
प्रश्न
Write an Assembly Language Program to multiply two one byte data stored at memory location CO60H and CO61H. Store the two byte result starting with memory location CO62H.
कोड लेखन
Advertisements
उत्तर
LABEL MNEMONICS COMMENTS
START: LXI H, 0000H ; Set initial product = 0 in HL pair
LDA C060H ; Load first number (N1) into Accumulator
MOV E, A ; Move N1 to register E
MVI D, 00H ; Clear register D (DE now contains 00N1)
LDA C061H ; Load second number (N2) into Accumulator
LOOP: DAD D ; Add DE to HL (Product = Product + N1)
DCR A ; Decrement N2 (Counter)
JNZ LOOP ; If N2 is not zero, repeat addition
END: SHLD C062H ; Store 16-bit result at C062H and C063H
HLT ; Stop the programshaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
