diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-09-21 16:52:35 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-09-21 16:52:35 -0700 |
commit | 5a16eeb519c87fa4c437e838af81731b8d355052 (patch) | |
tree | f59258a720429d5ad8beaf2070f73cab6a187077 /memdump/memcpy.S | |
parent | 31daeb2ddb972dc70b929da1c93288e821c87ed7 (diff) | |
download | syslinux-5a16eeb519c87fa4c437e838af81731b8d355052.tar.gz |
memdump: a debugging utility to dump memory over a serial port
A memory-dumping utility which runs in real mode. Thus, it can be
used to get memory dumps from a relatively pristine system.
Diffstat (limited to 'memdump/memcpy.S')
-rw-r--r-- | memdump/memcpy.S | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/memdump/memcpy.S b/memdump/memcpy.S new file mode 100644 index 00000000..76eef73c --- /dev/null +++ b/memdump/memcpy.S @@ -0,0 +1,23 @@ +# +# memcpy.S +# +# Simple 16-bit memcpy() implementation +# + + .text + .code16gcc + .globl memcpy + .type memcpy, @function +memcpy: + cld + pushw %di + pushw %si + movw %ax,%di + movw %dx,%si + # The third argument is already in cx + rep ; movsb + popw %si + popw %di + ret + + .size memcpy,.-memcpy |