|
Last change
on this file since 4b63bf3 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
|
File size:
538 bytes
|
| Line | |
|---|
| 1 | .globl _memccpy
|
|---|
| 2 | .text
|
|---|
| 3 | _memccpy:
|
|---|
| 4 | ~~memccpy:
|
|---|
| 5 | ~s1=R13
|
|---|
| 6 | ~s2=R12
|
|---|
| 7 | ~c=R7
|
|---|
| 8 | ~n=R6
|
|---|
| 9 | link R14,#0
|
|---|
| 10 | movem.l R5-R7/R12-R13,-(sp)
|
|---|
| 11 | *line 19
|
|---|
| 12 | move.l 8(R14),R13
|
|---|
| 13 | *line 19
|
|---|
| 14 | move.l 12(R14),R12
|
|---|
| 15 | *line 19
|
|---|
| 16 | move.b 17(R14),R7
|
|---|
| 17 | *line 19
|
|---|
| 18 | move 18(R14),R6
|
|---|
| 19 | *line 19
|
|---|
| 20 | bra L4
|
|---|
| 21 | L3:
|
|---|
| 22 | *line 20
|
|---|
| 23 | *line 21
|
|---|
| 24 | move.b R7,R0
|
|---|
| 25 | ext.w R0
|
|---|
| 26 | move.b (R12)+,R1
|
|---|
| 27 | ext.w R1
|
|---|
| 28 | move.b R1,(R13)+
|
|---|
| 29 | cmp R1,R0
|
|---|
| 30 | bne L5
|
|---|
| 31 | *line 21
|
|---|
| 32 | move.l R13,R0
|
|---|
| 33 | bra L1
|
|---|
| 34 | L5:L4:
|
|---|
| 35 | *line 22
|
|---|
| 36 | sub #1,R6
|
|---|
| 37 | bge L3
|
|---|
| 38 | L2:
|
|---|
| 39 | *line 22
|
|---|
| 40 | clr.l R0
|
|---|
| 41 | bra L1
|
|---|
| 42 | L1:tst.l (sp)+
|
|---|
| 43 | movem.l (sp)+,R6-R7/R12-R13
|
|---|
| 44 | unlk R14
|
|---|
| 45 | rts
|
|---|
| 46 | .data
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.