Advertisements
Advertisements
Question
Write an Assembly Language Program to check whether fourth and fifth bits of a hexadecimal number stored in memory location DICH is logicalone then store 00H else FFH of memory location D90IH.
Code Writing
Advertisements
Solution
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
STA D901H ; Store A to D901H
HLT ; Stop shaalaa.com
Is there an error in this question or solution?
