Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[FASM] Compare 2 strings filter_list
Author
Message
[FASM] Compare 2 strings #1
Code:
include 'win32ax.inc'

str1 db '1111111111',0
str2 db '1111111112',0

start:
stdcall CmpStr,str1,str2
test eax,eax
jz not_the_same
invoke MessageBox,0,'Both strings are alike!!','FASM',MB_OK
jmp exit
not_the_same:
invoke MessageBox,0,'Both strings are Wrong','FASM',MB_OK
exit:invoke ExitProcess,0

proc CmpStr uses esi edi ecx,str1,str2; returns 0 when strings are not the same.
cld
mov ecx,0ah
mov esi,[str1]
mov edi,[str2]
repe cmpsb
jnz @f
mov eax,-1
ret
@@:
xor eax

Reply





Messages In This Thread
[FASM] Compare 2 strings - by Houston1337 - 09-15-2022, 04:14 PM
RE: [FASM] Compare 2 strings - by Endeavor - 12-12-2022, 10:15 AM
RE: [FASM] Compare 2 strings - by Confidential - 02-14-2023, 08:36 AM



Users browsing this thread: 1 Guest(s)