source: buchla-68k/alcyon/cminit.s@ 0580615

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 10.9 KB
RevLine 
[7bf3856]1.globl ___atab
2.globl _QQsw
3.comm _QQsw,2
4.globl _QQanch
5.comm _QQanch,2
6.globl _QQin
7.comm _QQin,4
8.globl _QQip
9.comm _QQip,4
10.globl _QQop
11.comm _QQop,4
12.globl _QQnum
13.comm _QQnum,4
14.globl _QQlnum
15.comm _QQlnum,2
16.globl _QQdig
17.comm _QQdig,2
18.globl _QQchr
19.comm _QQchr,2
20.globl _QQstr
21.comm _QQstr,258
22.globl _CMinit
23.text
24_CMinit:
25~~CMinit:
26~ip=8
27link R14,#0
28movem.l R6-R7/R13-R13,-(sp)
29~i=R7
30~t=R13
31*line 48
32move.l 8(R14),_QQip
33*line 49
34move.l 8(R14),_QQin
35*line 50
36move #1,_QQsw
37*line 51
38clr _QQanch
39*line 52
40move.b #63,_QQdig
41*line 53
42move.b #63,_QQchr
43*line 54
44clr.l _QQnum
45*line 55
46move.l #_QQstr,_QQop
47*line 56
48move.l #_QQstr,R13
49*line 58
50clr R7
51bra L4
52L5:
53*line 59
54clr.b (R13)+
55L3:
56*line 58
57add #1,R7
58L4:
59*line 58
60cmp #257,R7
61blt L5
62L2:L1:tst.l (sp)+
63movem.l (sp)+,R7-R7/R13-R13
64unlk R14
65rts
66.globl _CMchr
67.text
68_CMchr:
69~~CMchr:
70~c=9
71link R14,#-4
72*line 75
73*line 75
74tst _QQanch
75bne L7
76*line 75
77bra L10
78L9:
79*line 75
80add.l #1,_QQip
81L10:
82*line 75
83move.l _QQip,R8
84cmp.b #32,(R8)
85beq L9
86L8:
87*line 76
88L7:
89*line 77
90*line 78
91move.l _QQip,R8
92move.b (R8),R0
93ext.w R0
94cmp.b 9(R14),R0
95beq L11
96*line 78
97clr R0
98move R0,_QQsw
99bra L6
100*line 79
101L11:
102*line 80
103move.l _QQip,R8
104move.b (R8),_QQchr
105add.l #1,_QQip
106*line 81
107move #1,R0
108move R0,_QQsw
109bra L6
110L6:unlk R14
111rts
112.globl _CMuchr
113.text
114_CMuchr:
115~~CMuchr:
116~c=R7
117link R14,#0
118movem.l R5-R7,-(sp)
119~t=R6
120*line 99
121move.b 9(R14),R7
122*line 99
123*line 99
124tst _QQanch
125bne L13
126*line 99
127bra L16
128L15:
129*line 99
130add.l #1,_QQip
131L16:
132*line 99
133move.l _QQip,R8
134cmp.b #32,(R8)
135beq L15
136L14:
137*line 100
138L13:
139*line 101
140move.l _QQip,R8
141move.b (R8),R6
142*line 103
143*line 104
144move.b R7,R0
145ext.w R0
146and #-128,R0
147bne L17
148*line 104
149*line 105
150move.b R7,R0
151ext.w R0
152ext.l R0
153add.l #___atab,R0
154move.l R0,R8
155btst #3,(R8)
156beq L18
157*line 105
158add.b #32,R7
159*line 106
160L18:L17:
161*line 107
162*line 108
163move.b R6,R0
164ext.w R0
165and #-128,R0
166bne L19
167*line 108
168*line 109
169move.b R6,R0
170ext.w R0
171ext.l R0
172add.l #___atab,R0
173move.l R0,R8
174btst #3,(R8)
175beq L20
176*line 109
177add.b #32,R6
178*line 110
179L20:L19:
180*line 111
181*line 112
182cmp.b R6,R7
183beq L21
184*line 112
185clr R0
186move R0,_QQsw
187bra L12
188*line 113
189L21:
190*line 114
191move.l _QQip,R8
192move.b (R8),_QQchr
193add.l #1,_QQip
194*line 115
195move #1,R0
196move R0,_QQsw
197bra L12
198L12:tst.l (sp)+
199movem.l (sp)+,R6-R7
200unlk R14
201rts
202.globl _CMstr
203.text
204_CMstr:
205~~CMstr:
206~s=8
207link R14,#-4
208movem.l R7-R7/R13-R13,-(sp)
209~t=R13
210~q=-4
211*line 134
212*line 134
213tst _QQanch
214bne L23
215*line 134
216bra L26
217L25:
218*line 134
219add.l #1,_QQip
220L26:
221*line 134
222move.l _QQip,R8
223cmp.b #32,(R8)
224beq L25
225L24:
226*line 135
227L23:
228*line 136
229move.l _QQip,R13
230*line 137
231move.l 8(R14),-4(R14)
232*line 139
233bra L29
234L28:
235*line 140
236*line 141
237*line 142
238move.l 8(R14),R8
239move.b (R8),R0
240ext.w R0
241cmp.b (R13)+,R0
242move sr,R0
243add.l #1,8(R14)
244move R0,ccr
245beq L30
246*line 142
247clr R0
248move R0,_QQsw
249bra L22
250L30:L29:
251*line 143
252move.l 8(R14),R8
253tst.b (R8)
254bne L28
255L27:
256*line 145
257move.l #_QQstr,_QQop
258*line 147
259bra L33
260L32:L33:
261*line 147
262move.l -4(R14),R8
263move.b (R8),R0
264ext.w R0
265move.l _QQop,R9
266move.b R0,(R9)
267add.l #1,-4(R14)
268add.l #1,_QQop
269tst R0
270bne L32
271L31:
272*line 149
273move.l R13,_QQip
274*line 150
275move #1,R0
276move R0,_QQsw
277bra L22
278L22:tst.l (sp)+
279movem.l (sp)+,R13-R13
280unlk R14
281rts
282.globl _CMustr
283.text
284_CMustr:
285~~CMustr:
286~s=R13
287link R14,#-4
288movem.l R5-R7/R12-R13,-(sp)
289~t=R12
290~t1=R7
291~t2=R6
292~q=-4
293*line 169
294move.l 8(R14),R13
295*line 169
296*line 169
297tst _QQanch
298bne L35
299*line 169
300bra L38
301L37:
302*line 169
303add.l #1,_QQip
304L38:
305*line 169
306move.l _QQip,R8
307cmp.b #32,(R8)
308beq L37
309L36:
310*line 170
311L35:
312*line 171
313move.l _QQip,R12
314*line 172
315move.l R13,-4(R14)
316*line 174
317bra L41
318L40:
319*line 175
320*line 176
321move.b (R12)+,R7
322*line 177
323move.b (R13)+,R6
324*line 178
325*line 179
326*line 180
327move.b R7,R0
328ext.w R0
329and #-128,R0
330bne L42
331*line 180
332*line 181
333move.b R7,R0
334ext.w R0
335ext.l R0
336add.l #___atab,R0
337move.l R0,R8
338btst #3,(R8)
339beq L43
340*line 181
341add.b #32,R7
342*line 182
343L43:L42:
344*line 183
345*line 184
346move.b R6,R0
347ext.w R0
348and #-128,R0
349bne L44
350*line 184
351*line 185
352move.b R6,R0
353ext.w R0
354ext.l R0
355add.l #___atab,R0
356move.l R0,R8
357btst #3,(R8)
358beq L45
359*line 185
360add.b #32,R6
361*line 186
362L45:L44:
363*line 187
364*line 188
365cmp.b R6,R7
366beq L46
367*line 188
368clr R0
369move R0,_QQsw
370bra L34
371L46:L41:
372*line 189
373tst.b (R13)
374bne L40
375L39:
376*line 191
377move.l #_QQstr,_QQop
378*line 193
379bra L49
380L48:L49:
381*line 193
382move.l -4(R14),R8
383move.b (R8),R0
384ext.w R0
385move.l _QQop,R9
386move.b R0,(R9)
387add.l #1,-4(R14)
388add.l #1,_QQop
389tst R0
390bne L48
391L47:
392*line 195
393move.l R12,_QQip
394*line 196
395move #1,R0
396move R0,_QQsw
397bra L34
398L34:tst.l (sp)+
399movem.l (sp)+,R6-R7/R12-R13
400unlk R14
401rts
402.globl _CMlong
403.text
404_CMlong:
405~~CMlong:
406link R14,#0
407movem.l R5-R7/R13-R13,-(sp)
408~p=R13
409~n=R7
410~c=R6
411*line 215
412*line 215
413tst _QQanch
414bne L51
415*line 215
416bra L54
417L53:
418*line 215
419add.l #1,_QQip
420L54:
421*line 215
422move.l _QQip,R8
423cmp.b #32,(R8)
424beq L53
425L52:
426*line 216
427L51:
428*line 217
429move.l _QQip,R13
430*line 218
431clr.l R7
432*line 219
433move.b (R13)+,R6
434*line 221
435*line 222
436move.b R6,R0
437ext.w R0
438and #-128,R0
439beq L55
440*line 222
441clr R0
442move R0,_QQsw
443bra L50
444*line 223
445L55:
446*line 224
447*line 225
448move.b R6,R0
449ext.w R0
450ext.l R0
451add.l #___atab,R0
452move.l R0,R8
453btst #2,(R8)
454bne L56
455*line 225
456clr R0
457move R0,_QQsw
458bra L50
459*line 226
460L56:
461*line 227
462move.b R6,R0
463ext.w R0
464add #-48,R0
465ext.l R0
466move.l R0,R7
467*line 229
468bra L59
469L58:
470*line 230
471*line 231
472*line 232
473move.b R6,R0
474ext.w R0
475and #-128,R0
476bne L57
477*line 233
478*line 234
479*line 235
480move.b R6,R0
481ext.w R0
482ext.l R0
483add.l #___atab,R0
484move.l R0,R8
485btst #2,(R8)
486beq L57
487*line 236
488*line 237
489move.l #$a,-(sp)
490move.l R7,-(sp)
491jsr lmul
492addq.l #8,sp
493move.l R0,R7
494move.b R6,R0
495ext.w R0
496add #-48,R0
497ext.l R0
498add.l R0,R7
499*line 238
500add.l #1,R13
501L59:
502*line 239
503move.b (R13),R6
504bne L58
505L57:
506*line 241
507move.l R13,_QQip
508*line 242
509move.l R7,_QQnum
510*line 243
511move #1,R0
512move R0,_QQsw
513bra L50
514L50:tst.l (sp)+
515movem.l (sp)+,R6-R7/R13-R13
516unlk R14
517rts
518.globl _CMdig
519.text
520_CMdig:
521~~CMdig:
522link R14,#0
523movem.l R6-R7,-(sp)
524~c=R7
525*line 260
526*line 260
527tst _QQanch
528bne L61
529*line 260
530bra L64
531L63:
532*line 260
533add.l #1,_QQip
534L64:
535*line 260
536move.l _QQip,R8
537cmp.b #32,(R8)
538beq L63
539L62:
540*line 261
541L61:
542*line 262
543move.l _QQip,R8
544move.b (R8),R7
545*line 264
546*line 265
547move.b R7,R0
548ext.w R0
549and #-128,R0
550beq L65
551*line 265
552clr R0
553move R0,_QQsw
554bra L60
555*line 266
556L65:
557*line 267
558*line 268
559move.b R7,R0
560ext.w R0
561ext.l R0
562add.l #___atab,R0
563move.l R0,R8
564btst #2,(R8)
565bne L66
566*line 268
567clr R0
568move R0,_QQsw
569bra L60
570*line 269
571L66:
572*line 270
573move.b R7,_QQdig
574*line 271
575add.l #1,_QQip
576*line 272
577move #1,R0
578move R0,_QQsw
579bra L60
580L60:tst.l (sp)+
581movem.l (sp)+,R7-R7
582unlk R14
583rts
584.globl _CMlist
585.text
586_CMlist:
587~~CMlist:
588~l=-4
589~l=8
590link R14,#0
591movem.l R6-R7/R12-R13,-(sp)
592~n=R7
593~p=R13
594~q=R12
595*line 291
596*line 291
597tst _QQanch
598bne L68
599*line 291
600bra L71
601L70:
602*line 291
603add.l #1,_QQip
604L71:
605*line 291
606move.l _QQip,R8
607cmp.b #32,(R8)
608beq L70
609L69:
610*line 292
611L68:
612*line 293
613clr R7
614*line 295
615bra L74
616L73:
617*line 296
618*line 297
619move.l R13,R12
620*line 298
621*line 299
622*line 299
623move.l R13,(sp)
624jsr _CMstr
625tst R0
626beq L75
627*line 300
628*line 301
629move.l #_QQstr,_QQop
630*line 302
631*line 303
632bra L78
633L77:L78:
634*line 303
635move.b (R12)+,R0
636ext.w R0
637move.l _QQop,R9
638move.b R0,(R9)
639add.l #1,_QQop
640tst R0
641bne L77
642L76:
643*line 304
644*line 305
645move R7,_QQlnum
646*line 306
647move #1,R0
648move R0,_QQsw
649bra L67
650*line 307
651*line 308
652L75:
653*line 309
654add #1,R7
655L74:
656*line 310
657move.l 8(R14),R8
658move.l (R8),R13
659move.l R13,R0
660add.l #4,8(R14)
661tst.l R0
662bne L73
663L72:
664*line 312
665clr R0
666move R0,_QQsw
667bra L67
668L67:tst.l (sp)+
669movem.l (sp)+,R7-R7/R12-R13
670unlk R14
671rts
672.globl _CMulist
673.text
674_CMulist:
675~~CMulist:
676~l=-4
677~l=8
678link R14,#0
679movem.l R6-R7/R12-R13,-(sp)
680~n=R7
681~p=R13
682~q=R12
683*line 332
684*line 332
685tst _QQanch
686bne L80
687*line 332
688bra L83
689L82:
690*line 332
691add.l #1,_QQip
692L83:
693*line 332
694move.l _QQip,R8
695cmp.b #32,(R8)
696beq L82
697L81:
698*line 333
699L80:
700*line 334
701clr R7
702*line 336
703bra L86
704L85:
705*line 337
706*line 338
707move.l R13,R12
708*line 339
709*line 340
710*line 340
711move.l R13,(sp)
712jsr _CMustr
713tst R0
714beq L87
715*line 341
716*line 342
717move.l #_QQstr,_QQop
718*line 343
719*line 344
720bra L90
721L89:L90:
722*line 344
723move.b (R12)+,R0
724ext.w R0
725move.l _QQop,R9
726move.b R0,(R9)
727add.l #1,_QQop
728tst R0
729bne L89
730L88:
731*line 345
732*line 346
733move R7,_QQlnum
734*line 347
735move #1,R0
736move R0,_QQsw
737bra L79
738*line 348
739*line 349
740L87:
741*line 350
742add #1,R7
743L86:
744*line 351
745move.l 8(R14),R8
746move.l (R8),R13
747move.l R13,R0
748add.l #4,8(R14)
749tst.l R0
750bne L85
751L84:
752*line 353
753clr R0
754move R0,_QQsw
755bra L79
756L79:tst.l (sp)+
757movem.l (sp)+,R7-R7/R12-R13
758unlk R14
759rts
760.globl _CMstat
761.text
762_CMstat:
763~~CMstat:
764~msg=8
765link R14,#0
766movem.l R7-R7/R13-R13,-(sp)
767~tp=R13
768*line 371
769move.l _QQin,R13
770*line 372
771move.l 8(R14),(sp)
772move.l #L92,-(sp)
773jsr _printf
774addq.l #4,sp
775*line 373
776*line 374
777*line 375
778*line 376
779move.b _QQdig,R0
780ext.w R0
781move R0,(sp)
782move.b _QQchr,R0
783ext.w R0
784and #-128,R0
785bne L10000
786move.b _QQchr,R0
787ext.w R0
788move R0,R8
789move.l #___atab,R9
790move.b 0(R8,R9.l),R0
791ext.w R0
792and #94,R0
793beq L10001
794move.b _QQchr,R0
795ext.w R0
796move R0,-(sp)
797bra L10003
798L10001:move #32,-(sp)
799L10003:bra L10005
800L10000:move #32,-(sp)
801L10005:move.b _QQchr,R0
802ext.w R0
803move R0,-(sp)
804tst _QQanch
805beq L10006
806move.l #L96,-(sp)
807bra L10008
808L10006:move.l #L97,-(sp)
809L10008:tst _QQsw
810beq L10009
811move.l #L94,-(sp)
812bra L10011
813L10009:move.l #L95,-(sp)
814L10011:move.l #L93,-(sp)
815jsr _printf
816adda.l #16,sp
817*line 377
818move _QQlnum,(sp)
819move.l _QQnum,-(sp)
820move.l #L98,-(sp)
821jsr _printf
822addq.l #8,sp
823*line 378
824move.l #_QQstr,(sp)
825move.l #L99,-(sp)
826jsr _printf
827addq.l #4,sp
828*line 379
829move.l _QQin,(sp)
830move.l #L100,-(sp)
831jsr _printf
832addq.l #4,sp
833*line 380
834move.l #L101,(sp)
835jsr _printf
836*line 382
837bra L104
838L103:
839*line 383
840move.l #L105,(sp)
841jsr _printf
842L104:
843*line 383
844cmp.l _QQip,R13
845move sr,R0
846add.l #1,R13
847move R0,ccr
848bne L103
849L102:
850*line 385
851move.l #L106,(sp)
852jsr _printf
853*line 386
854move _QQsw,R0
855bra L91
856L91:tst.l (sp)+
857movem.l (sp)+,R13-R13
858unlk R14
859rts
860.data
861L92:.dc.b $25,$73,$D,$A,$0
862L93:.dc.b $20,$20,$51,$51,$73,$77,$3A,$20,$25,$73,$2C,$20,$51,$51,$61,$6E,$63,$68,$3A,$20,$25,$73,$2C,$20,$51,$51,$63,$68,$72,$3A
863.dc.b $20,$30,$78,$25,$30,$32,$78,$20,$3C,$25,$63,$3E,$2C,$20,$51,$51,$64,$69,$67,$3A,$20,$25,$63,$D,$A,$0
864L94:.dc.b $4F,$4B,$0
865L95:.dc.b $4E,$4F,$47,$4F,$0
866L96:.dc.b $61,$6E,$63,$68,$6F,$72,$65,$64,$0
867L97:.dc.b $64,$65,$62,$6C,$61,$6E,$6B,$65,$64,$0
868L98:.dc.b $20,$20,$51,$51,$6E,$75,$6D,$3A,$20,$25,$6C,$64,$2C,$20,$51,$51,$6C,$6E,$75,$6D,$3A,$20,$25,$64,$D,$A,$0
869L99:.dc.b $20,$20,$51,$51,$73,$74,$72,$3A,$20,$25,$73,$D,$A,$0
870L100:.dc.b $20,$20,$7B,$25,$73,$7D,$D,$A,$0
871L101:.dc.b $20,$20,$20,$0
872L105:.dc.b $20,$0
873L106:.dc.b $5E,$D,$A,$0
Note: See TracBrowser for help on using the repository browser.