source: buchla-68k/alcyon/ettpch.s@ 0c06bc5

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 7.3 KB
Line 
1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _stcrow
7.globl _stccol
8.globl _cents
9.globl _tdbox
10.globl _tuntab
11.globl _dspbuf
12.globl _sfdsp
13.globl _tunob
14.globl _loc2key
15.text
16_loc2key:
17~~loc2key:
18~row=8
19~col=10
20link R14,#-4
21*line 54
22*line 54
23cmp #24,8(R14)
24bne L2
25*line 55
26*line 56
27*line 57
28cmp #6,10(R14)
29ble L3
30cmp #39,10(R14)
31bge L3
32*line 57
33move #-1,R0
34bra L1
35bra L4
36L3:
37*line 58
38*line 59
39cmp #52,10(R14)
40ble L5
41*line 59
42move #-9,R0
43bra L1
44*line 60
45bra L6
46L5:
47*line 61
48move #-10,R0
49bra L1
50L6:L4:
51*line 62
52bra L7
53L2:
54*line 63
55*line 64
56cmp #12,10(R14)
57bge L8
58*line 64
59move 8(R14),R0
60bra L1
61bra L9
62L8:
63*line 65
64*line 66
65cmp #11,10(R14)
66ble L10
67cmp #22,10(R14)
68bge L10
69*line 66
70move 8(R14),R0
71add #24,R0
72bra L1
73bra L11
74L10:
75*line 67
76*line 68
77cmp #21,10(R14)
78ble L12
79cmp #32,10(R14)
80bge L12
81*line 68
82move 8(R14),R0
83add #48,R0
84bra L1
85bra L13
86L12:
87*line 69
88*line 70
89cmp #31,10(R14)
90ble L14
91cmp #42,10(R14)
92bge L14
93*line 70
94move 8(R14),R0
95add #72,R0
96bra L1
97bra L15
98L14:
99*line 71
100*line 72
101cmp #41,10(R14)
102ble L16
103cmp #53,10(R14)
104bge L16
105*line 72
106move 8(R14),R0
107add #96,R0
108bra L1
109bra L17
110L16:
111*line 73
112*line 74
113cmp #52,10(R14)
114ble L18
115cmp #8,8(R14)
116bge L18
117*line 74
118move 8(R14),R0
119add #120,R0
120bra L1
121bra L19
122L18:
123*line 75
124*line 75
125cmp #52,10(R14)
126ble L20
127*line 76
128*line 77
129*line 78
130cmp #9,8(R14)
131beq L10000
132cmp #10,8(R14)
133bne L21
134L10000:*line 78
135move #-2,R0
136bra L1
137bra L22
138L21:
139*line 79
140*line 80
141cmp #12,8(R14)
142bne L23
143*line 80
144move #-3,R0
145bra L1
146bra L24
147L23:
148*line 81
149*line 82
150cmp #14,8(R14)
151bne L25
152*line 82
153move #-4,R0
154bra L1
155bra L26
156L25:
157*line 83
158*line 84
159cmp #16,8(R14)
160bne L27
161*line 84
162move #-5,R0
163bra L1
164bra L28
165L27:
166*line 85
167*line 86
168cmp #18,8(R14)
169bne L29
170*line 86
171move #-6,R0
172bra L1
173bra L30
174L29:
175*line 87
176*line 88
177cmp #20,8(R14)
178bne L31
179*line 88
180move #-7,R0
181bra L1
182bra L32
183L31:
184*line 89
185*line 90
186cmp #22,8(R14)
187bne L33
188*line 90
189move #-8,R0
190bra L1
191*line 91
192bra L34
193L33:
194*line 92
195move #-10,R0
196bra L1
197L34:L32:L30:L28:L26:L24:L22:
198*line 93
199L20:L19:L17:L15:L13:L11:L9:L7:L1:unlk R14
200rts
201.globl _et_tpch
202.text
203_et_tpch:
204~~et_tpch:
205~nn=8
206link R14,#0
207movem.l R5-R7,-(sp)
208~key=R7
209~val=R6
210*line 111
211move _stccol,(sp)
212move _stcrow,-(sp)
213jsr _loc2key
214addq.l #2,sp
215move R0,R7
216*line 113
217*line 114
218tst R7
219bge L36
220*line 114
221move #-1,R0
222bra L35
223*line 115
224L36:
225*line 116
226move R7,R8
227add.l R8,R8
228add.l #_tuntab,R8
229move (R8),R6
230*line 117
231move R6,R0
232asr #1,R0
233move R0,(sp)
234move.l #_ebuf,-(sp)
235jsr _cnvc2p
236addq.l #4,sp
237*line 118
238move #1,_ebflag
239*line 119
240clr R0
241bra L35
242L35:tst.l (sp)+
243movem.l (sp)+,R6-R7
244unlk R14
245rts
246.globl _ef_tpch
247.text
248_ef_tpch:
249~~ef_tpch:
250~nn=8
251link R14,#0
252movem.l R6-R7,-(sp)
253~key=R7
254*line 137
255clr _ebflag
256*line 138
257move _stccol,(sp)
258move _stcrow,-(sp)
259jsr _loc2key
260addq.l #2,sp
261move R0,R7
262*line 140
263*line 141
264tst R7
265bge L38
266*line 141
267move #-1,R0
268bra L37
269*line 142
270L38:
271*line 143
272*line 144
273jsr _cnvp2c
274cmp #-1,R0
275bne L39
276*line 144
277move #-1,R0
278bra L37
279*line 145
280L39:
281*line 146
282jsr _modtun
283*line 147
284move _cents,R0
285asl #1,R0
286move R7,R9
287add.l R9,R9
288add.l #_tuntab,R9
289move R0,(R9)
290*line 148
291clr R0
292bra L37
293L37:tst.l (sp)+
294movem.l (sp)+,R7-R7
295unlk R14
296rts
297.globl _rd_tpch
298.text
299_rd_tpch:
300~~rd_tpch:
301~nn=8
302link R14,#0
303movem.l R4-R7,-(sp)
304~val=R7
305~key=R6
306~n=R5
307*line 166
308move 8(R14),R5
309and #255,R5
310*line 167
311move.l _cfetp,R8
312move 2(R8),(sp)
313move.l _cfetp,R8
314move (R8),-(sp)
315jsr _loc2key
316addq.l #2,sp
317move R0,R6
318*line 168
319move R6,R8
320add.l R8,R8
321add.l #_tuntab,R8
322move (R8),R7
323*line 170
324move R7,R0
325asr #1,R0
326move R0,(sp)
327move.l #_dspbuf,-(sp)
328jsr _cnvc2p
329addq.l #4,sp
330*line 172
331add.b #48,_dspbuf
332*line 173
333add.b #65,1+_dspbuf
334*line 174
335move.b 2+_dspbuf,R0
336ext.w R0
337ext.l R0
338add.l #_sfdsp,R0
339move.l R0,R8
340move.b -7(R8),2+_dspbuf
341*line 175
342add.b #48,3+_dspbuf
343*line 176
344add.b #48,4+_dspbuf
345*line 177
346clr.b 5+_dspbuf
347*line 179
348clr (sp)
349jsr _vbank
350*line 180
351*line 181
352*line 182
353*line 183
354move #14,(sp)
355move.l #_dspbuf,-(sp)
356move.l _cfetp,R8
357move 2(R8),-(sp)
358move.l _cfetp,R8
359move (R8),-(sp)
360move R5,R0
361asl #4,R0
362ext.l R0
363move.l R0,R8
364move.l #_tdbox,R9
365move 10(R8,R9.l),-(sp)
366cmp #320,R7
367beq L10002
368cmp #21920,R7
369bne L10001
370L10002:move #10,-(sp)
371bra L10004
372L10001:move R5,R0
373asl #4,R0
374ext.l R0
375move.l R0,R8
376move.l #_tdbox,R9
377move 8(R8,R9.l),-(sp)
378L10004:move #64,-(sp)
379move.l _tunob,-(sp)
380jsr _vcputsv
381adda.l #18,sp
382*line 185
383clr R0
384bra L40
385L40:tst.l (sp)+
386movem.l (sp)+,R5-R7
387unlk R14
388rts
389.globl _nd_tpch
390.text
391_nd_tpch:
392~~nd_tpch:
393~nn=8
394~k=10
395link R14,#0
396movem.l R5-R7,-(sp)
397~col=R7
398~n=R6
399*line 203
400move 8(R14),R6
401and #255,R6
402*line 205
403*line 206
404cmp #11,_stccol
405bge L42
406*line 206
407move _stccol,R7
408sub #6,R7
409bra L43
410L42:
411*line 207
412*line 208
413cmp #21,_stccol
414bge L44
415*line 208
416move _stccol,R7
417add #-16,R7
418bra L45
419L44:
420*line 209
421*line 210
422cmp #31,_stccol
423bge L46
424*line 210
425move _stccol,R7
426add #-26,R7
427bra L47
428L46:
429*line 211
430*line 212
431cmp #41,_stccol
432bge L48
433*line 212
434move _stccol,R7
435add #-36,R7
436bra L49
437L48:
438*line 213
439*line 214
440cmp #52,_stccol
441bge L50
442*line 214
443move _stccol,R7
444add #-47,R7
445*line 215
446bra L51
447L50:
448*line 216
449move _stccol,R7
450add #-58,R7
451L51:L49:L47:L45:L43:
452*line 218
453move R7,R0
454bra L53
455*line 219
456L54:
457*line 220
458*line 221
459*line 222
460move 10(R14),R0
461move.b R0,_ebuf
462*line 223
463move 10(R14),R0
464add #48,R0
465move.b R0,_dspbuf
466bra L52
467*line 224
468*line 225
469L55:
470*line 226
471*line 227
472*line 228
473*line 229
474cmp #6,10(R14)
475ble L56
476*line 229
477move #-1,R0
478bra L41
479*line 230
480L56:
481*line 231
482move 10(R14),R0
483move.b R0,1+_ebuf
484*line 232
485move 10(R14),R0
486add #65,R0
487move.b R0,_dspbuf
488bra L52
489*line 233
490*line 234
491*line 235
492L57:
493*line 236
494*line 237
495*line 238
496*line 238
497cmp #7,10(R14)
498bne L58
499*line 239
500*line 240
501move 10(R14),R0
502move.b R0,2+_ebuf
503*line 241
504move.b _sfdsp,_dspbuf
505bra L52
506*line 242
507*line 243
508bra L59
509L58:
510*line 244
511*line 244
512cmp #8,10(R14)
513bne L60
514*line 245
515*line 246
516move 10(R14),R0
517move.b R0,2+_ebuf
518*line 247
519move.b 1+_sfdsp,_dspbuf
520bra L52
521*line 248
522*line 249
523bra L61
524L60:
525*line 250
526*line 250
527cmp #9,10(R14)
528bne L62
529*line 251
530*line 252
531move 10(R14),R0
532move.b R0,2+_ebuf
533*line 253
534move.b 2+_sfdsp,_dspbuf
535bra L52
536*line 254
537*line 255
538*line 256
539bra L63
540L62:
541*line 257
542move #-1,R0
543bra L41
544L63:L61:L59:
545*line 258
546*line 259
547L64:
548*line 260
549L65:
550*line 261
551*line 262
552*line 263
553move 10(R14),R0
554move R7,R9
555add.l #_ebuf,R9
556move.b R0,(R9)
557*line 264
558move 10(R14),R0
559add #48,R0
560move.b R0,_dspbuf
561bra L52
562*line 265
563bra L52
564L53:cmp #4,R0
565bhi L52
566asl #2,R0
567move R0,R8
568add.l #L66,R8
569move.l (R8),R8
570jmp (R8)
571.data
572L66:.dc.l L54
573.dc.l L55
574.dc.l L57
575.dc.l L64
576.dc.l L65
577.text
578L52:
579*line 268
580clr.b 1+_dspbuf
581*line 270
582clr (sp)
583jsr _vbank
584*line 271
585move #14,(sp)
586move.l #_dspbuf,-(sp)
587move _stccol,-(sp)
588move _stcrow,-(sp)
589move R6,R0
590asl #4,R0
591ext.l R0
592move.l R0,R8
593move.l #_tdbox,R9
594move 10(R8,R9.l),-(sp)
595move #12,-(sp)
596move #64,-(sp)
597move.l _tunob,-(sp)
598jsr _vcputsv
599adda.l #18,sp
600*line 273
601*line 274
602cmp #4,R7
603bne L67
604*line 274
605clr R0
606bra L41
607*line 275
608L67:
609*line 276
610jsr _advtcur
611*line 277
612clr R0
613bra L41
614L41:tst.l (sp)+
615movem.l (sp)+,R6-R7
616unlk R14
617rts
618.data
Note: See TracBrowser for help on using the repository browser.