projects
/
retrocrawl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
testing stuff
[retrocrawl]
/
src
/
amiga
/
libc
/
libc_asm.s
1
| vi:filetype=gas68k:
2
.text
3
4
| optimize: transfer words at a time
5
.global memcpy
6
memcpy:
7
move.l 4(%sp), %a0
8
move.l 8(%sp), %a1
9
move.l 12(%sp), %d0
10
sub.l #1, %d0
11
0: move.b (%a1)+, (%a0)+
12
dbra %d0, 0b
13
rts
14
15
| optimize: same as above
16
.global memset
17
memset:
18
move.l 4(%sp), %a0
19
move.l 8(%sp), %d1
20
move.l 12(%sp), %d0
21
sub.l #1, %d0
22
0: move.b %d1, (%a0)+
23
dbra %d0, 0b
24
rts