Advertisements
Advertisements
प्रश्न
Locate smallest number in a block from 2050H to 2060H and store it in memory location 2061H
उत्तर
Mnemonics | Comment | |
Opcode | Operand | |
MVI C, 0A | ; Block length in C Register | |
LXI H, 2050 | ; Store 2050 in HL pair | |
MOV A, M | ; Copy content of memory to Acc. | |
BACK: INX H | ; Increment HL pair by 1 | |
CMP M | ; Compare Acc. with memory | |
JC : NEXT | ; If Cy = 1, then go to NEXT | |
MOV A, M | ; Copy content of Memory to Acc. | |
NEXT : DCR C | ; Decrement C Reg. by 1 | |
JNZ : BACK | ; If Cy ? 0, then go to Back | |
INX H | ; Increment HL by 1 | |
MOV M, A | ; Store Acc. content to memory | |
RST 1.0 | ; Restart |
shaalaa.com
Instruction Set and Programming of 8085
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?