Last change
on this file since 9519422 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
908 bytes
|
Line | |
---|
1 | .globl _strtok
|
---|
2 | .text
|
---|
3 | _strtok:
|
---|
4 | ~~strtok:
|
---|
5 | ~string=8
|
---|
6 | ~sepset=12
|
---|
7 | link R14,#0
|
---|
8 | movem.l R7-R7/R11-R13,-(sp)
|
---|
9 | ~p=R13
|
---|
10 | ~q=R12
|
---|
11 | ~r=R11
|
---|
12 | ~savept=L2
|
---|
13 | .bss
|
---|
14 | L2:.ds.b 4
|
---|
15 | .text
|
---|
16 | *line 27
|
---|
17 | tst.l 8(R14)
|
---|
18 | bne L10000
|
---|
19 | move.l L2,R0
|
---|
20 | bra L10002
|
---|
21 | L10000:move.l 8(R14),R0
|
---|
22 | L10002:move.l R0,R13
|
---|
23 | *line 29
|
---|
24 | *line 30
|
---|
25 | move.l R13,R0
|
---|
26 | bne L3
|
---|
27 | *line 30
|
---|
28 | clr.l R0
|
---|
29 | bra L1
|
---|
30 | *line 31
|
---|
31 | L3:
|
---|
32 | *line 32
|
---|
33 | move.l 12(R14),(sp)
|
---|
34 | move.l R13,-(sp)
|
---|
35 | jsr _strspn
|
---|
36 | addq.l #4,sp
|
---|
37 | ext.l R0
|
---|
38 | move.l R0,R12
|
---|
39 | move.l R13,R0
|
---|
40 | add.l R0,R12
|
---|
41 | *line 34
|
---|
42 | *line 35
|
---|
43 | tst.b (R12)
|
---|
44 | bne L4
|
---|
45 | *line 35
|
---|
46 | clr.l R0
|
---|
47 | bra L1
|
---|
48 | *line 36
|
---|
49 | L4:
|
---|
50 | *line 37
|
---|
51 | *line 38
|
---|
52 | move.l 12(R14),(sp)
|
---|
53 | move.l R12,-(sp)
|
---|
54 | jsr _strpbrk
|
---|
55 | addq.l #4,sp
|
---|
56 | move.l R0,R11
|
---|
57 | move.l R11,R0
|
---|
58 | bne L5
|
---|
59 | *line 38
|
---|
60 | clr.l L2
|
---|
61 | bra L6
|
---|
62 | L5:
|
---|
63 | *line 39
|
---|
64 | *line 40
|
---|
65 | clr.b (R11)
|
---|
66 | *line 41
|
---|
67 | add.l #1,R11
|
---|
68 | move.l R11,L2
|
---|
69 | L6:
|
---|
70 | *line 44
|
---|
71 | move.l R12,R0
|
---|
72 | bra L1
|
---|
73 | L1:tst.l (sp)+
|
---|
74 | movem.l (sp)+,R11-R13
|
---|
75 | unlk R14
|
---|
76 | rts
|
---|
77 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.