diff options
| author | Klaatu <[email protected]> | 2015-05-17 15:33:21 +1200 |
|---|---|---|
| committer | Klaatu <[email protected]> | 2015-05-17 15:33:21 +1200 |
| commit | b0de699679e8f1e39af847ed172d1ba605b4370c (patch) | |
| tree | 01dac00471d61f727394e508c613b29cff0ceae5 /S/str_copyn.S | |
bulk upload of source
Diffstat (limited to 'S/str_copyn.S')
| -rw-r--r-- | S/str_copyn.S | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/S/str_copyn.S b/S/str_copyn.S new file mode 100644 index 0000000..7a8765c --- /dev/null +++ b/S/str_copyn.S @@ -0,0 +1,22 @@ +.globl str_copyn +.type str_copyn, @function +str_copyn: + pushl %edi + pushl %esi + movl 12(%esp), %edi + movl 16(%esp), %esi + movl 20(%esp), %ecx +.L1: + decl %ecx + js .L2 + lodsb + stosb + testb %al,%al + jne .L1 + decl %edi +.L2: + movl %edi, %eax + subl 12(%esp), %eax + popl %esi + popl %edi + ret |
