summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/dos/memset.S
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/dos/memset.S')
-rw-r--r--contrib/syslinux-4.02/dos/memset.S21
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/dos/memset.S b/contrib/syslinux-4.02/dos/memset.S
new file mode 100644
index 0000000..86e12ab
--- /dev/null
+++ b/contrib/syslinux-4.02/dos/memset.S
@@ -0,0 +1,21 @@
+#
+# memset.S
+#
+# Minimal 16-bit memset() implementation
+#
+
+ .text
+ .code16gcc
+ .globl memset
+ .type memset, @function
+memset:
+ cld
+ pushw %di
+ movw %ax,%di
+ movb %dl,%al
+ # The third argument is already in %cx
+ rep ; stosb
+ popw %di
+ retl
+
+ .size memset,.-memset