Advertisements
Advertisements
प्रश्न
Write an assembly language program to check whether fourth and fifth bits of a hexadecimal number stored in memory location D900H is logical one then store 00H else FFH of memory location D901H.
कोड लेखन
Advertisements
उत्तर
Label Instructions Comments
LXI H, D900H ; Load HL to D900H
MOV A, M ; Move M to A
ANI 18H ; AND with 18H
SUI 18H ; Subtract 18H with A
JZ Store ; Jump on zero go to store
MVI A, FFH ; SET A To FFH
Store STA D901H ; Store A to D901H
HLT ; Stop shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
