repo.or.cz
/
syslinux-debian
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding a few replaces declarations in control to ease upgrades from pre-May 2013...
[syslinux-debian/hramrach.git]
/
dos
/
memmove.S
blob
1ab2cb236b8ebb5518881a3a7752ebb8a0e86ff5
1
#
2
# memmove.S
3
#
4
# Simple 16-bit memmove() implementation
5
#
6
7
.text
8
.code16gcc
9
.globl memmove
10
.type memmove, @function
11
memmove:
12
pushw %di
13
pushw %si
14
movw %ax,%di
15
movw %dx,%si
16
cmpw %si,%di
17
ja 1f
18
# The third argument is already in cx
19
cld
20
rep ; movsb
21
2:
22
popw %si
23
popw %di
24
ret
25
26
1: /* si <= di, need reverse copy */
27
add %cx,%di
28
add %cx,%si
29
dec %di
30
dec %si
31
std
32
rep ; movsb
33
cld
34
jmp 2b
35
36
.size memmove,.-memmove