source:
trunk/minix/lib/i86/string/strcpy.s@
16
| Last change on this file since 16 was 9, checked in by , 15 years ago | |
|---|---|
| File size: 368 bytes | |
| Rev | Line | |
|---|---|---|
| [9] | 1 | ! strcpy() Author: Kees J. Bot |
| 2 | ! 27 Jan 1994 | |
| 3 | .sect .text; .sect .rom; .sect .data; .sect .bss | |
| 4 | ||
| 5 | ! char *strcpy(char *s1, const char *s2) | |
| 6 | ! Copy string s2 to s1. | |
| 7 | ! | |
| 8 | .sect .text | |
| 9 | .define _strcpy | |
| 10 | _strcpy: | |
| 11 | push bp | |
| 12 | mov bp, sp | |
| 13 | push si | |
| 14 | push di | |
| 15 | mov cx, #-1 ! Unlimited length | |
| 16 | call __strncpy ! Common code | |
| 17 | mov ax, 4(bp) ! Return s1 | |
| 18 | pop di | |
| 19 | pop si | |
| 20 | pop bp | |
| 21 | ret |
Note:
See TracBrowser
for help on using the repository browser.