aboutsummaryrefslogtreecommitdiff
path: root/ft_strcmp.s
diff options
context:
space:
mode:
Diffstat (limited to 'ft_strcmp.s')
-rw-r--r--ft_strcmp.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/ft_strcmp.s b/ft_strcmp.s
new file mode 100644
index 0000000..4c5aee7
--- /dev/null
+++ b/ft_strcmp.s
@@ -0,0 +1,12 @@
+_ft_strcmp:
+ mov eax, sp
+ mov ebx, sp + 8
+ FT_STRCMP_LOOP:
+ cmp eax, 0
+ jneq FT_STRCMP_LOOP
+ cmp ebx, 0
+ jneq FT_STRCMP_LOOP
+ cmp eax, ebx
+ jeq FT_STRCMP_LOOP
+ sub eax, ebx
+ ret