Write an assembly language program to COMPARE two strings stored
from memory location 8091H and 8061H. Length of the string is stored in
8060H. If both strings are same, place 00H, otherwise place FFH at the
memory location 8070H.
1 st string: 01H, 4FH, 10H, 9BH, 8BH
2nd string: 01H, 4FH, 10H, 9BH, 8BH
#ORG 8000
START : LXI H,8091H
LXI B,8061H
LDA 8060H
MOV D,A
LOOP:LDAX B
CMP M
JNZ SKIP
INX H
INX B
DCR D
JNZ LOOP
MVI A,01H
STA 8070H
HLT
SKIP:MVI A,FF
STA 8070H
HLT
Post a Comment
0 Comments