home *** CD-ROM | disk | FTP | other *** search
- include asm.inc
-
- public strcmpi
-
- .code
- extn tolower
-
- ;; strcmpi
- ;
- ; entry DS:SI string1
- ; ES:DI string2
- ; exit Zf if string1==string2
- ; uses AX
- ;
- strcmpi proc
- pushm di,si
- sci1: mov ah,es:[di]
- lodsb
- or ax,ax
- jz sci2 ; if same strings
- inc di
- call tolower
- xchg al,ah
- call tolower
- cmp ah,al
- je sci1 ; if strings match so far
- sci2: popm si,di
- ret
- strcmpi endp
-
- end
-