source: buchla-68k/alcyon/ftell.s@ 4810254

Last change on this file since 4810254 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1.globl _Cbuffs
2.globl _Stdbufs
3.globl _Stdbuf
4.globl _chantab
5.globl _Wrkbuf
6.globl _ftell
7.text
8_ftell:
9~~ftell:
10~fp=R13
11link R14,#0
12movem.l R4-R7/R11-R13,-(sp)
13~fcp=R12
14~chp=R11
15~dpos=R7
16~pos=R6
17~diff=R5
18*line 35
19move.l 8(R14),R13
20*line 35
21*line 35
22move.l R13,R0
23bne L2
24*line 36
25*line 40
26*line 41
27*line 42
28clr.l R0
29bra L1
30*line 43
31*line 44
32L2:
33*line 45
34*line 45
35tst.b 12(R13)
36beq L10000
37clr R0
38bra L10001
39L10000:move #1,R0
40L10001:and #1,R0
41beq L3
42*line 46
43*line 50
44*line 51
45*line 52
46clr.l R0
47bra L1
48*line 53
49*line 54
50L3:
51*line 55
52move.b 13(R13),R0
53ext.w R0
54muls #12,R0
55move.l R0,R11
56add.l #_chantab,R11
57*line 57
58*line 57
59move.l 4(R11),R0
60cmp.l #__filecl,R0
61beq L4
62*line 58
63*line 63
64*line 64
65*line 65
66clr.l R0
67bra L1
68*line 66
69*line 67
70L4:
71*line 68
72move.l 8(R11),R12
73*line 70
74clr.l R7
75move 38(R12),R7
76move.l 40(R12),R0
77move.l #$9,R1
78asl.l R1,R0
79add.l R0,R7
80*line 72
81*line 73
82btst #2,12(R13)
83beq L5
84*line 73
85move.l (R13),R5
86sub.l 8(R13),R5
87move.l R7,R6
88add.l R5,R6
89bra L6
90L5:
91*line 74
92*line 75
93tst.l (R13)
94beq L7
95*line 75
96move.l 4(R13),R5
97sub.l (R13),R5
98move.l R7,R6
99sub.l R5,R6
100*line 76
101bra L8
102L7:
103*line 77
104move.l R7,R6
105L8:L6:
106*line 95
107move.l R6,R0
108bra L1
109L1:tst.l (sp)+
110movem.l (sp)+,R5-R7/R11-R13
111unlk R14
112rts
113.data
Note: See TracBrowser for help on using the repository browser.