root/dos/memmove.S

Revision 0b014e446285b7aad1e19163a15b9cc8936047d3, 425 bytes (checked in by H. Peter Anvin <hpa@…>, 2 years ago)

dos: vacuous ADV support

Vacuous ADV support: install an empty ADV.

Signed-off-by: H. Peter Anvin <hpa@…>

  • Property mode set to 100644
Line 
1#
2# memmove.S
3#
4# Simple 16-bit memmove() implementation
5#
6
7        .text
8        .code16gcc
9        .globl memmove
10        .type memmove, @function
11memmove:
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
212:
22        popw %si
23        popw %di
24        ret
25
261:      /* 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
Note: See TracBrowser for help on using the browser.