aboutsummaryrefslogtreecommitdiffstats
path: root/core/strcpy.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/strcpy.inc')
-rw-r--r--core/strcpy.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/strcpy.inc b/core/strcpy.inc
new file mode 100644
index 00000000..2bafa7fe
--- /dev/null
+++ b/core/strcpy.inc
@@ -0,0 +1,13 @@
+;
+; strcpy: Copy DS:SI -> ES:DI up to and including a null byte;
+; on exit SI and DI point to the byte *after* the null byte
+;
+ section .text
+
+strcpy: push ax
+.loop: lodsb
+ stosb
+ and al,al
+ jnz .loop
+ pop ax
+ ret