summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/dos/memset.S
blob: 86e12ab29940d8cb2e5a881136eb4606e1055155 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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