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.
Advertisements
उत्तर
| 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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
