Advertisements
Advertisements
प्रश्न
Write an Assembly Language Program to multiply a number stored at location 1050 with a nunber at location 1051. Result is 2-byte. Store result at locations 1052 and 1053.
उत्तर
Label | Mnemonics | Comments |
SUB A | clear the accumulator | |
MOV D, A | clear the D register | |
LXI H, 1050H | load immediately 1050 to HL pair | |
MOV B, M | move memory to B reg. | |
INX H | increment HL pair | |
MOV C, M | move memory to C reg | |
BACK: | ADD B | add B with accumulator |
JNC NEXT | jump if not carry to NEXT | |
INR D | increment D reg. | |
NEXT : | DCR C | Decrement C reg. |
JNZ BACK | jump if not zero to BACK | |
INX H | increment HL pair | |
MOV M, A | move accumulator to memory | |
INX H | increment HL pair | |
MOV M, D | move D reg. to memory | |
RST 1.0 | Restart |
shaalaa.com
Instruction Set and Programming of 8085
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?