Last change
on this file since 3fcb810 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
331 bytes
|
Rev | Line | |
---|
[7bf3856] | 1 | .globl _strlen
|
---|
| 2 | .text
|
---|
| 3 | _strlen:
|
---|
| 4 | ~~strlen:
|
---|
| 5 | ~s=R13
|
---|
| 6 | link R14,#0
|
---|
| 7 | movem.l R6-R7/R13-R13,-(sp)
|
---|
| 8 | ~n=R7
|
---|
| 9 | *line 15
|
---|
| 10 | clr R7
|
---|
| 11 | *line 17
|
---|
| 12 | move.l 8(R14),R13
|
---|
| 13 | *line 17
|
---|
| 14 | bra L4
|
---|
| 15 | L3:
|
---|
| 16 | *line 18
|
---|
| 17 | add #1,R7
|
---|
| 18 | L4:
|
---|
| 19 | *line 18
|
---|
| 20 | tst.b (R13)+
|
---|
| 21 | bne L3
|
---|
| 22 | L2:
|
---|
| 23 | *line 20
|
---|
| 24 | move R7,R0
|
---|
| 25 | bra L1
|
---|
| 26 | L1:tst.l (sp)+
|
---|
| 27 | movem.l (sp)+,R7-R7/R13-R13
|
---|
| 28 | unlk R14
|
---|
| 29 | rts
|
---|
| 30 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.