source: buchla-68k/alcyon/dcopy.s@ 6f49665

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1.globl _Cbuffs
2.globl _Stdbufs
3.globl _Stdbuf
4.globl _defect
5.globl _end
6.globl _edata
7.globl _etext
8.globl _p_dlen
9.globl _mphead
10.globl _dcopy
11.text
12_dcopy:
13~~dcopy:
14link R14,#0
15movem.l R3-R7/R12-R13,-(sp)
16~fp=R13
17~from=R12
18~wrtlen=R7
19~loadlen=R6
20~bsslen=R5
21~txtlen=R4
22*line 40
23clr _defect
24*line 42
25move.l #_etext,R4
26sub.l #_Lo_RAM,R4
27*line 43
28move.l #_end,R5
29sub.l #_edata,R5
30*line 45
31move.l #_edata,R6
32sub.l #_Lo_RAM,R6
33*line 49
34move #24602,_mphead
35*line 50
36move.l R4,2+_mphead
37*line 51
38move.l _p_dlen,6+_mphead
39*line 52
40move.l R5,10+_mphead
41*line 53
42clr.l 14+_mphead
43*line 54
44clr.l 18+_mphead
45*line 55
46move.l #_Lo_RAM,22+_mphead
47*line 56
48move #-1,26+_mphead
49*line 62
50jsr _preio
51*line 64
52*line 64
53move.l #L3,(sp)
54move.l #L2,-(sp)
55jsr _fopenb
56addq.l #4,sp
57move.l R0,R13
58move.l R13,R0
59bne L4
60*line 65
61*line 66
62move #1,_defect
63*line 67
64jsr _postio
65*line 68
66move #-1,R0
67bra L1
68*line 69
69*line 70
70*line 71
71*line 72
72*line 73
73*line 74
74L4:
75*line 75
76move.l #_mphead,R12
77*line 77
78move.l #$1c,R7
79bra L7
80L8:
81*line 78
82*line 78
83move.l R13,(sp)
84move.b (R12)+,R0
85ext.w R0
86move R0,-(sp)
87jsr _putc
88addq.l #2,sp
89cmp #-1,R0
90bne L9
91*line 79
92*line 80
93move #2,_defect
94*line 81
95move.l R13,(sp)
96jsr _fclose
97*line 82
98jsr _postio
99*line 83
100move #-1,R0
101bra L1
102*line 84
103*line 85
104*line 86
105*line 87
106L9:L6:L7:
107*line 77
108move.l R7,R0
109sub.l #$1,R7
110tst.l R0
111bne L8
112L5:
113*line 88
114move.l #_Lo_RAM,R12
115*line 90
116move.l R6,R7
117bra L12
118L13:
119*line 91
120*line 91
121move.l R13,(sp)
122move.b (R12)+,R0
123ext.w R0
124move R0,-(sp)
125jsr _putc
126addq.l #2,sp
127cmp #-1,R0
128bne L14
129*line 92
130*line 93
131move #3,_defect
132*line 94
133move.l R13,(sp)
134jsr _fclose
135*line 95
136jsr _postio
137*line 96
138move #-1,R0
139bra L1
140*line 97
141*line 98
142*line 99
143*line 100
144L14:L11:L12:
145*line 90
146move.l R7,R0
147sub.l #$1,R7
148tst.l R0
149bne L13
150L10:
151*line 101
152move.l R13,(sp)
153jsr _fflush
154*line 102
155move.l R13,(sp)
156jsr _fclose
157*line 103
158jsr _postio
159*line 104
160clr R0
161bra L1
162L1:tst.l (sp)+
163movem.l (sp)+,R4-R7/R12-R13
164unlk R14
165rts
166.data
167L2:.dc.b $6D,$69,$64,$61,$73,$2E,$61,$62,$73,$0
168L3:.dc.b $77,$0
Note: See TracBrowser for help on using the repository browser.