EXPERIMENT NUMBER 8
EXPERIMENT NUMBER 8
TITLE :
MACRO:
A macro is a group of instructions used repeatedly in the source code to perform a task. When the
repeated group of instructions is too short, not appropriate to be defined as procedure, macros are used.
Algorithm:
N
Is CH = CL
IS [SI]=[DI]
N
Is CX = 0 ?
Stop
PROGRAM:
MOV AH,09H
INT 21H
ENDM
.MODEL SMALL
.DATA
BUFF1 DB 10 DUP(‘$’)
BUFF2 DB 10 DUP(‘$’)
.CODE
MOV AX,@DATA
MOV DS,AX
MOV ES,AX
PRINT MS1
INT 21H
PRINT MS2
INT 21H
MOV CL, LENGTH BUFF1
CMP CL,CH
JNE UNEQ
MOV CH,00H
CLD
REPE CMPSB
JNZ UNEQ
PRINT MS3
JMP FINISH
INT 21H
END
Conclusion:
This program check whether the strings are equal or not and display a message “ Equal strings” or
“unequal strings” on screen.