Rev 1618 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* Project: OSLib |
2 | * Description: The OS Construction Kit |
||
3 | * Date: 1.6.2000 |
||
4 | * Idea by: Luca Abeni & Gerardo Lamastra |
||
5 | * |
||
6 | * OSLib is an SO project aimed at developing a common, easy-to-use |
||
7 | * low-level infrastructure for developing OS kernels and Embedded |
||
8 | * Applications; it partially derives from the HARTIK project but it |
||
9 | * currently is independently developed. |
||
10 | * |
||
11 | * OSLib is distributed under GPL License, and some of its code has |
||
12 | * been derived from the Linux kernel source; also some important |
||
13 | * ideas come from studying the DJGPP go32 extender. |
||
14 | * |
||
15 | * We acknowledge the Linux Community, Free Software Foundation, |
||
16 | * D.J. Delorie and all the other developers who believe in the |
||
17 | * freedom of software and ideas. |
||
18 | * |
||
19 | * For legalese, check out the included GPL license. |
||
20 | */ |
||
21 | |||
22 | /* Memcopy to other address spaces */ |
||
23 | |||
24 | #include <ll/i386/linkage.h> |
||
25 | #include <ll/i386/defs.h> |
||
26 | |||
27 | .data |
||
28 | |||
29 | ASMFILE(Mem-ASM) |
||
30 | |||
31 | .text |
||
32 | |||
33 | .globl SYMBOL_NAME(fmemcpy) |
||
34 | |||
35 | /* void fmemcpy(unsigned short ds,unsigned long do, |
||
36 | unsigned short ss,unsigned long so,unsigned n) */ |
||
37 | |||
38 | SYMBOL_NAME_LABEL(fmemcpy) |
||
39 | /* Build the standard stack frame */ |
||
40 | pushl %ebp |
||
41 | movl %esp,%ebp |
||
42 | pushl %esi |
||
43 | pushl %edi |
||
44 | pushw %ds |
||
45 | pushw %es |
||
46 | |||
47 | /* Get parms into register */ |
||
48 | movl 8(%ebp),%eax |
||
49 | movw %ax,%es |
||
50 | movl 12(%ebp),%edi |
||
51 | movl 16(%ebp),%eax |
||
52 | movw %ax,%ds |
||
53 | movl 20(%ebp),%esi |
||
54 | movl 24(%ebp),%ecx |
||
55 | cld |
||
56 | rep |
||
57 | movsb |
||
58 | popw %es |
||
59 | popw %ds |
||
60 | popl %edi |
||
61 | popl %esi |
||
62 | leave |
||
63 | ret |