Advertisements
Advertisements
प्रश्न
Write ALP to divide number at 6068H by a non-zero number at 6067H. Store quotient at 6069H and remainder at 606AH.
संक्षेप में उत्तर
उत्तर
Mnemonics | Comment | |
Opcode | Operand | |
MVI C, 00 | ; Store 00 in C Register | |
LXI H, 6067 | ; Store 6067 in HL pair | |
MOV A, M | ; Copy memory to Acc | |
INX H | ; Increment HL pair by 1 | |
MOV B, M | ; Copy memory to B Register | |
BACK: CMP B | ; Compare Acc. with B Register | |
JC : NEXT | ; If Cy = 1, go to next | |
SUB B | ; Subtract B from Acc | |
INR C | ; Increment C content by 1 | |
JMP : BACK | ; Jump to Back | |
INX H | ; Increment HL pair by 1 | |
MOV M, C | ; Store Quotient in memory | |
INX H | ; Increment HL pair by 1 | |
MOV M, A | ; Store Reminder in memory | |
RST 1.0 | ; Restart. |
shaalaa.com
Instruction Set and Programming of 8085
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?