source: buchla-68k/alcyon/strtok.s@ 9519422

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
7link R14,#0
8movem.l R7-R7/R11-R13,-(sp)
9~p=R13
10~q=R12
11~r=R11
12~savept=L2
13.bss
14L2:.ds.b 4
15.text
16*line 27
17tst.l 8(R14)
18bne L10000
19move.l L2,R0
20bra L10002
21L10000:move.l 8(R14),R0
22L10002:move.l R0,R13
23*line 29
24*line 30
25move.l R13,R0
26bne L3
27*line 30
28clr.l R0
29bra L1
30*line 31
31L3:
32*line 32
33move.l 12(R14),(sp)
34move.l R13,-(sp)
35jsr _strspn
36addq.l #4,sp
37ext.l R0
38move.l R0,R12
39move.l R13,R0
40add.l R0,R12
41*line 34
42*line 35
43tst.b (R12)
44bne L4
45*line 35
46clr.l R0
47bra L1
48*line 36
49L4:
50*line 37
51*line 38
52move.l 12(R14),(sp)
53move.l R12,-(sp)
54jsr _strpbrk
55addq.l #4,sp
56move.l R0,R11
57move.l R11,R0
58bne L5
59*line 38
60clr.l L2
61bra L6
62L5:
63*line 39
64*line 40
65clr.b (R11)
66*line 41
67add.l #1,R11
68move.l R11,L2
69L6:
70*line 44
71move.l R12,R0
72bra L1
73L1:tst.l (sp)+
74movem.l (sp)+,R11-R13
75unlk R14
76rts
77.data
Note: See TracBrowser for help on using the repository browser.