root/memdump/memset.S

Revision 5a16eeb519c87fa4c437e838af81731b8d355052, 263 bytes (checked in by H. Peter Anvin <hpa@…>, 5 years ago)

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.

  • Property mode set to 100644
Line 
1#
2# memset.S
3#
4# Minimal 16-bit memset() implementation
5#
6
7        .text
8        .code16gcc
9        .globl memset
10        .type memset, @function
11memset:
12        cld
13        pushw %di
14        movw %ax,%di
15        movb %dl,%al
16        # The third argument is already in %cx
17        rep ; stosb
18        popw %di
19        retl
20
21        .size memset,.-memset
Note: See TracBrowser for help on using the browser.