Advertisements
Advertisements
प्रश्न
Write an Assembly Language Program to exchange the digits of a number the digits of a number stored in C200H and add it to the original number Store the result at C201H.
कोड लेखन
Advertisements
उत्तर
Label Mnemonics and Operand Comments
LXI H, C200H ; Set HL with C200H
MOV A, M ; Copy memory content to accumulator
RRC ; Rotate right (1st time)
RRC ; Rotate right (2nd time)
RRC ; Rotate right (3rd time)
RRC ; Rotate right (4th time) → Exchange nibbles
ADD M ; Add original memory content with accumulator
STA C201H ; Store result at C201H
HLT ; Stop execution
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
