source: buchla-68k/alcyon/etstrn.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: 3.7 KB
RevLine 
[7bf3856]1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _io_time
7.globl _io_lcd
8.globl _io_ser
9.globl _io_midi
10.globl _io_disk
11.globl _io_tone
12.globl _io_leds
13.globl _io_kbrd
14.globl _lcd_a0
15.globl _lcd_a1
16.globl _io_vreg
17.globl _io_vraw
18.globl _io_vram
19.globl _io_fpu
20.globl _v_regs
21.globl _v_odtab
22.globl _v_actab
23.globl _v_ct0
24.globl _v_gt1
25.globl _v_score
26.globl _v_cgtab
27.globl _v_curs0
28.globl _v_curs1
29.globl _v_curs2
30.globl _v_curs3
31.globl _v_curs4
32.globl _v_curs5
33.globl _v_curs6
34.globl _v_curs7
35.globl _v_tcur
36.globl _v_kbobj
37.globl _v_lnobj
38.globl _v_win0
39.globl _v_cur
40.globl _fc_sw
41.globl _fc_val
42.globl _obj8
43.globl _grptran
44.globl _sdmctl
45.globl _vtccol
46.globl _vtcrow
47.globl _vtxval
48.globl _vtyval
49.globl _dspbuf
50.globl _et_strn
51.text
52_et_strn:
53~~et_strn:
54link R14,#-4
55*line 40
56tst _grptran
57bge L10000
58move _grptran,R0
59neg R0
60move R0,(sp)
61bra L10002
62L10000:move _grptran,(sp)
63L10002:tst _grptran
64bge L10003
65move #45,-(sp)
66bra L10005
67L10003:move #43,-(sp)
68L10005:move.l #L2,-(sp)
69move.l #_ebuf,-(sp)
70jsr _sprintf
71adda.l #10,sp
72*line 42
73move #1,_ebflag
74*line 44
75clr R0
76bra L1
77L1:unlk R14
78rts
79.globl _ef_strn
80.text
81_ef_strn:
82~~ef_strn:
83link R14,#0
84movem.l R6-R7,-(sp)
85~ival=R7
86*line 61
87clr.b 3+_ebuf
88*line 62
89move.b 1+_ebuf,R7
90ext.w R7
91add #-48,R7
92muls #10,R7
93move.b 2+_ebuf,R0
94ext.w R0
95add R0,R7
96add #-48,R7
97*line 64
98clr _ebflag
99*line 66
100*line 67
101tst R7
102beq L4
103cmp.b #45,_ebuf
104bne L4
105*line 67
106move R7,R0
107neg R0
108move R0,R7
109*line 68
110L4:
111*line 69
112move R7,_grptran
113*line 71
114clr R0
115bra L3
116L3:tst.l (sp)+
117movem.l (sp)+,R7-R7
118unlk R14
119rts
120.globl _rd_strn
121.text
122_rd_strn:
123~~rd_strn:
124link R14,#-4
125*line 83
126tst _grptran
127bge L10006
128move _grptran,R0
129neg R0
130move R0,(sp)
131bra L10008
132L10006:move _grptran,(sp)
133L10008:tst _grptran
134bge L10009
135move #45,-(sp)
136bra L10011
137L10009:move #43,-(sp)
138L10011:move.l #L6,-(sp)
139move.l #_dspbuf,-(sp)
140jsr _sprintf
141adda.l #10,sp
142*line 85
143*line 86
144clr R0
145move 10+_v_regs,R0
146and #384,R0
147beq L7
148*line 86
149clr (sp)
150jsr _vbank
151*line 87
152L7:
153*line 88
154move #20,(sp)
155move.l #_dspbuf,-(sp)
156move #22,-(sp)
157move #7,-(sp)
158move.l _obj8,-(sp)
159jsr _vputs
160adda.l #12,sp
161*line 90
162clr R0
163bra L5
164L5:unlk R14
165rts
166.globl _nd_strn
167.text
168_nd_strn:
169~~nd_strn:
170~n=8
171~k=10
172link R14,#0
173movem.l R6-R7,-(sp)
174~ec=R7
175*line 108
176*line 109
177cmp #4,_sdmctl
178beq L9
179*line 109
180move #-1,R0
181bra L8
182*line 110
183L9:
184*line 111
185*line 112
186cmp #22,_vtccol
187blt L10
188cmp #24,_vtccol
189bgt L10
190*line 112
191move _vtccol,R7
192add #-22,R7
193*line 113
194bra L11
195L10:
196*line 114
197move #-1,R0
198bra L8
199L11:
200*line 116
201*line 116
202tst R7
203bne L12
204*line 117
205*line 118
206*line 119
207cmp #8,10(R14)
208bne L13
209*line 119
210move #45,10(R14)
211bra L14
212L13:
213*line 120
214*line 121
215cmp #9,10(R14)
216bne L15
217*line 121
218move #43,10(R14)
219*line 122
220bra L16
221L15:
222*line 123
223move #-1,R0
224bra L8
225L16:L14:
226*line 124
227bra L17
228L12:
229*line 125
230add #48,10(R14)
231L17:
232*line 127
233move 10(R14),R0
234move R7,R9
235add.l #_ebuf,R9
236move.b R0,(R9)
237*line 129
238*line 130
239clr R0
240move 10+_v_regs,R0
241and #384,R0
242beq L18
243*line 130
244clr (sp)
245jsr _vbank
246*line 131
247L18:
248*line 132
249move #100,(sp)
250move 10(R14),-(sp)
251move _vtccol,-(sp)
252move #7,-(sp)
253move.l _obj8,-(sp)
254jsr _vputc
255adda.l #10,sp
256*line 134
257*line 134
258cmp #24,_vtccol
259bge L19
260*line 135
261*line 136
262add #1,_vtccol
263*line 137
264move _vtccol,R0
265asl #3,R0
266move R0,_vtxval
267*line 138
268move _vtccol,(sp)
269move _vtcrow,-(sp)
270jsr _ttcpos
271addq.l #2,sp
272*line 139
273*line 140
274L19:
275*line 141
276clr R0
277bra L8
278L8:tst.l (sp)+
279movem.l (sp)+,R7-R7
280unlk R14
281rts
282.data
283L2:.dc.b $25,$63,$25,$30,$32,$64,$0
284L6:.dc.b $25,$63,$25,$30,$32,$64,$0
Note: See TracBrowser for help on using the repository browser.