summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/i386/strcpy.S
blob: a597436bc5b16beef26e101dcef30b669caae39e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

.text
.align 0 
.global strcpy
.type	 strcpy,@function
strcpy:
	pushl %esi
	pushl %edi
	
	movl 12(%esp), %edx
	movl 16(%esp), %esi
	movl %edx, %edi
	cld

.Lloop:
	lodsb
	stosb
	orb %al, %al
	jnz .Lloop

	popl %edi
	popl %esi
	movl %edx,%eax
	ret