Last change
on this file was
e16e8f2,
checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago
|
bootstuff
|
-
Property mode set to
100644
|
File size:
281 bytes
|
Rev | Line | |
---|
[e16e8f2] | 1 | # |
---|
| 2 | # memcpy.S |
---|
| 3 | # |
---|
| 4 | # Simple 16-bit memcpy() implementation |
---|
| 5 | # |
---|
| 6 | |
---|
| 7 | .text |
---|
| 8 | .code16gcc |
---|
| 9 | .globl memcpy |
---|
| 10 | .type memcpy, @function |
---|
| 11 | memcpy: |
---|
| 12 | cld |
---|
| 13 | pushw %di |
---|
| 14 | pushw %si |
---|
| 15 | movw %ax,%di |
---|
| 16 | movw %dx,%si |
---|
| 17 | # The third argument is already in cx |
---|
| 18 | rep ; movsb |
---|
| 19 | popw %si |
---|
| 20 | popw %di |
---|
| 21 | ret |
---|
| 22 | |
---|
| 23 | .size memcpy,.-memcpy |
---|
Note: See
TracBrowser
for help on using the repository browser.