aboutsummaryrefslogtreecommitdiff
path: root/ft_strcpy.s
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-02-11 15:40:48 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-02-11 15:40:48 +0100
commitcd5c9e6a923878e797212d27476ee217eb844a14 (patch)
treef5ea8605d0521cbfbf384b05567bf3d2155b0b45 /ft_strcpy.s
parent28424105e255f0a4c887b6e6a83afd6dce372709 (diff)
downloadlibasm-cd5c9e6a923878e797212d27476ee217eb844a14.tar.gz
libasm-cd5c9e6a923878e797212d27476ee217eb844a14.tar.bz2
libasm-cd5c9e6a923878e797212d27476ee217eb844a14.zip
Added Linux compatibility
Diffstat (limited to 'ft_strcpy.s')
-rw-r--r--ft_strcpy.s11
1 files changed, 9 insertions, 2 deletions
diff --git a/ft_strcpy.s b/ft_strcpy.s
index 3789283..eb8ea1a 100644
--- a/ft_strcpy.s
+++ b/ft_strcpy.s
@@ -10,10 +10,17 @@
; ;
; **************************************************************************** ;
-global _ft_strcpy
+%ifdef __LINUX__
+ %define M_FT_STRCPY ft_strcpy
+%else
+ %define M_FT_STRCPY _ft_strcpy
+%endif
+global M_FT_STRCPY
+
+section .text
; char *ft_strcpy(char *dst, const char *src);
-_ft_strcpy:
+M_FT_STRCPY:
push rbx
push rcx
mov rax, rdi ; dst