source: buchla-68k/alcyon/etres1.s@ 9519422

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 13.0 KB
Line 
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 _ac_code
43.globl _scname
44.globl _se_chg
45.globl _curscor
46.globl _cursect
47.globl _se1_cnt
48.globl _se2_cnt
49.globl _se3_cnt
50.globl _spool
51.globl _pspool
52.globl _spcount
53.globl _frags
54.globl _t_bak
55.globl _t_cur
56.globl _t_ctr
57.globl _t_fwd
58.globl _size1
59.globl _size2
60.globl _size3
61.globl _scores
62.globl _scp
63.globl _seclist
64.globl _hplist
65.globl _p_bak
66.globl _p_cur
67.globl _p_ctr
68.globl _p_fwd
69.globl _ancmsw
70.globl _angroup
71.globl _ctrsw
72.globl _recsw
73.globl _stccol
74.globl _obj8
75.globl _anrs
76.globl _grpmode
77.globl _grpstat
78.globl _var2src
79.globl _varmode
80.globl _gdstbc
81.globl _valents
82.globl _et_res1
83.text
84_et_res1:
85~~et_res1:
86~n=8
87link R14,#-4
88*line 49
89move 8(R14),R0
90asl #5,R0
91ext.l R0
92tst _angroup
93bge L10000
94move _angroup,R1
95neg R1
96bra L10002
97L10000:move _angroup,R1
98L10002:sub #1,R1
99asl #1,R1
100ext.l R1
101add.l R1,R0
102move.l R0,R8
103move.l #_anrs,R9
104move 0(R8,R9.l),R0
105move.b R0,_ebuf
106*line 50
107move #1,_ebflag
108*line 51
109clr R0
110bra L1
111L1:unlk R14
112rts
113.globl _ef_res1
114.text
115_ef_res1:
116~~ef_res1:
117~n=8
118link R14,#0
119movem.l R4-R7/R13-R13,-(sp)
120~ival=R7
121~grp=R6
122~vg=R5
123~ep=R13
124*line 70
125clr _ebflag
126*line 71
127tst _angroup
128bge L10003
129move _angroup,R0
130neg R0
131bra L10005
132L10003:move _angroup,R0
133L10005:move R0,R6
134sub #1,R6
135*line 72
136move.b _ebuf,R7
137ext.w R7
138and #255,R7
139*line 74
140*line 75
141cmp #3,R7
142blt L10006
143cmp #8,R7
144ble L3
145L10006:*line 75
146move #-1,R0
147bra L2
148*line 76
149L3:
150*line 77
151move 8(R14),R0
152asl #5,R0
153ext.l R0
154move R6,R1
155asl #1,R1
156ext.l R1
157add.l R1,R0
158add.l #_anrs,R0
159move.l R0,R8
160move R7,(R8)
161*line 79
162*line 80
163tst _recsw
164beq L4
165move R6,R8
166add.l R8,R8
167move.l #_grpstat,R9
168tst 0(R8,R9.l)
169beq L4
170tst _ancmsw
171beq L10007
172move 8(R14),R0
173asl #5,R0
174ext.l R0
175move R6,R1
176asl #1,R1
177ext.l R1
178add.l R1,R0
179move.l R0,R8
180move.l #_varmode,R9
181move 0(R8,R9.l),R0
182bra L10009
183L10007:move R6,R8
184add.l R8,R8
185move.l #_grpmode,R9
186move 0(R8,R9.l),R0
187L10009:cmp #2,R0
188bne L4
189*line 81
190*line 82
191move R6,R5
192move 8(R14),R0
193asl #4,R0
194or R0,R5
195*line 83
196*line 84
197*line 84
198move #-1,(sp)
199move R5,-(sp)
200move #15,-(sp)
201move.l _t_cur,-(sp)
202move.l _p_cur,-(sp)
203jsr _findev
204adda.l #12,sp
205move.l R0,R13
206move.l R13,R0
207beq L5
208*line 85
209*line 86
210move.b R7,7(R13)
211*line 87
212bra L6
213L5:
214*line 88
215*line 88
216move #6,(sp)
217jsr _e_alc
218move.l R0,R13
219move.l R13,R0
220beq L7
221*line 89
222*line 90
223move.b #15,5(R13)
224*line 91
225move.b R5,6(R13)
226*line 92
227move.b R7,7(R13)
228*line 93
229move.l _t_cur,(R13)
230*line 94
231move.l _t_cur,(sp)
232clr -(sp)
233move.l _p_cur,-(sp)
234jsr _ep_adj
235addq.l #6,sp
236move.l R0,(sp)
237move.l R13,-(sp)
238jsr _e_ins
239addq.l #4,sp
240move.l R0,R8
241move.l 12(R8),_p_cur
242*line 95
243move #4,(sp)
244move.l R13,-(sp)
245jsr _eh_ins
246addq.l #4,sp
247*line 96
248move #1,_ctrsw
249*line 97
250move #1,(sp)
251move.l #_gdstbc,-(sp)
252clr -(sp)
253move.l R13,-(sp)
254jsr _se_disp
255adda.l #10,sp
256*line 98
257jsr _scupd
258*line 99
259L7:L6:
260*line 100
261*line 101
262L4:
263*line 102
264clr R0
265bra L2
266L2:tst.l (sp)+
267movem.l (sp)+,R5-R7/R13-R13
268unlk R14
269rts
270.globl _rd_res1
271.text
272_rd_res1:
273~~rd_res1:
274~n=8
275link R14,#0
276movem.l R5-R7,-(sp)
277~grp=R7
278~chr=R6
279*line 120
280tst _angroup
281bge L10010
282move _angroup,R0
283neg R0
284bra L10012
285L10010:move _angroup,R0
286L10012:move R0,R7
287sub #1,R7
288*line 122
289move 8(R14),R0
290asl #5,R0
291ext.l R0
292move R7,R1
293asl #1,R1
294ext.l R1
295add.l R1,R0
296add.l #_anrs,R0
297move.l R0,R8
298move (R8),R6
299add #48,R6
300*line 124
301*line 125
302clr R0
303move 10+_v_regs,R0
304and #384,R0
305beq L9
306*line 125
307clr (sp)
308jsr _vbank
309*line 126
310L9:
311*line 127
312move #18,(sp)
313move R6,-(sp)
314move 8(R14),R0
315muls #9,R0
316move R0,-(sp)
317add #6,(sp)
318move #7,-(sp)
319move.l _obj8,-(sp)
320jsr _vputc
321adda.l #10,sp
322*line 129
323clr R0
324bra L8
325L8:tst.l (sp)+
326movem.l (sp)+,R6-R7
327unlk R14
328rts
329.globl _nd_res1
330.text
331_nd_res1:
332~~nd_res1:
333~n=8
334~k=10
335link R14,#-4
336*line 145
337move 10(R14),R0
338move.b R0,_ebuf
339*line 147
340*line 148
341clr R0
342move 10+_v_regs,R0
343and #384,R0
344beq L11
345*line 148
346clr (sp)
347jsr _vbank
348*line 149
349L11:
350*line 150
351move #98,(sp)
352move 10(R14),-(sp)
353add #48,(sp)
354move _stccol,-(sp)
355move #7,-(sp)
356move.l _obj8,-(sp)
357jsr _vputc
358adda.l #10,sp
359*line 152
360clr R0
361bra L10
362L10:unlk R14
363rts
364.globl _et_aval
365.text
366_et_aval:
367~~et_aval:
368~n=8
369link R14,#-6
370movem.l R4-R7,-(sp)
371~val=R7
372~grp=R6
373~gs=R5
374~val1=-2
375~val2=-4
376~val3=-6
377*line 171
378tst _angroup
379bge L10013
380move _angroup,R0
381neg R0
382bra L10015
383L10013:move _angroup,R0
384L10015:move R0,R6
385sub #1,R6
386*line 172
387move R6,R5
388asl #4,R5
389move 8(R14),R8
390add.l R8,R8
391add.l #_var2src,R8
392move (R8),R0
393or R0,R5
394*line 173
395move R5,R0
396muls #10,R0
397add.l #_valents,R0
398move.l R0,R8
399move 8(R8),R7
400asr #5,R7
401*line 175
402*line 175
403tst R7
404bge L13
405*line 176
406*line 177
407move.b #8,_ebuf
408*line 178
409move R7,R0
410neg R0
411move R0,R7
412*line 179
413bra L14
414L13:
415*line 180
416*line 181
417*line 182
418move.b #9,_ebuf
419L14:
420*line 185
421move R7,R0
422ext.l R0
423divs #100,R0
424move R0,-2(R14)
425*line 186
426move R7,R0
427move -2(R14),R1
428muls #100,R1
429sub R1,R0
430ext.l R0
431divs #10,R0
432move.b R0,4+_ebuf
433*line 187
434move -2(R14),R0
435ext.l R0
436divs #10,R0
437move R0,-4(R14)
438*line 188
439move -2(R14),R0
440move -4(R14),R1
441muls #10,R1
442sub R1,R0
443move.b R0,2+_ebuf
444*line 189
445move -4(R14),R0
446move.b R0,1+_ebuf
447*line 191
448move #1,_ebflag
449*line 193
450clr R0
451bra L12
452L12:tst.l (sp)+
453movem.l (sp)+,R5-R7
454unlk R14
455rts
456.globl _ef_aval
457.text
458_ef_aval:
459~~ef_aval:
460~n=8
461link R14,#0
462movem.l R3-R7/R13-R13,-(sp)
463~val=R7
464~grp=R6
465~src=R5
466~vg=R4
467~ep=R13
468*line 212
469clr _ebflag
470*line 213
471tst _angroup
472bge L10016
473move _angroup,R0
474neg R0
475bra L10018
476L10016:move _angroup,R0
477L10018:move R0,R6
478sub #1,R6
479*line 214
480move 8(R14),R8
481add.l R8,R8
482add.l #_var2src,R8
483move (R8),R5
484*line 215
485move.b 1+_ebuf,R7
486ext.w R7
487muls #100,R7
488move.b 2+_ebuf,R0
489ext.w R0
490muls #10,R0
491add R0,R7
492move.b 4+_ebuf,R0
493ext.w R0
494add R0,R7
495muls #10,R7
496*line 217
497*line 218
498cmp #1000,R7
499ble L16
500*line 218
501move #-1,R0
502bra L15
503*line 219
504L16:
505*line 220
506*line 221
507cmp.b #8,_ebuf
508bne L17
509*line 221
510move R7,R0
511neg R0
512move R0,R7
513*line 222
514L17:
515*line 223
516asl #5,R7
517*line 225
518move R7,(sp)
519move R5,-(sp)
520move R6,-(sp)
521jsr _setsv
522addq.l #4,sp
523*line 227
524*line 228
525tst _recsw
526beq L18
527move R6,R8
528add.l R8,R8
529move.l #_grpstat,R9
530tst 0(R8,R9.l)
531beq L18
532tst _ancmsw
533beq L10019
534move 8(R14),R0
535asl #5,R0
536ext.l R0
537move R6,R1
538asl #1,R1
539ext.l R1
540add.l R1,R0
541move.l R0,R8
542move.l #_varmode,R9
543move 0(R8,R9.l),R0
544bra L10021
545L10019:move R6,R8
546add.l R8,R8
547move.l #_grpmode,R9
548move 0(R8,R9.l),R0
549L10021:cmp #2,R0
550bne L18
551*line 229
552*line 230
553move R6,R4
554move 8(R14),R0
555asl #4,R0
556or R0,R4
557*line 231
558*line 232
559*line 232
560move #-1,(sp)
561move R4,-(sp)
562move #14,-(sp)
563move.l _t_cur,-(sp)
564move.l _p_cur,-(sp)
565jsr _findev
566adda.l #12,sp
567move.l R0,R13
568move.l R13,R0
569beq L19
570*line 233
571*line 234
572move R7,R0
573ext.l R0
574move.l #$10,R1
575asl.l R1,R0
576move.l R0,16(R13)
577*line 235
578bra L20
579L19:
580*line 236
581*line 236
582move #6,(sp)
583jsr _e_alc
584move.l R0,R13
585move.l R13,R0
586beq L21
587*line 237
588*line 238
589move.b #14,5(R13)
590*line 239
591move.b R4,6(R13)
592*line 240
593move R7,R0
594ext.l R0
595move.l #$10,R1
596asl.l R1,R0
597move.l R0,16(R13)
598*line 241
599move.l _t_cur,(R13)
600*line 242
601move.l _t_cur,(sp)
602clr -(sp)
603move.l _p_cur,-(sp)
604jsr _ep_adj
605addq.l #6,sp
606move.l R0,(sp)
607move.l R13,-(sp)
608jsr _e_ins
609addq.l #4,sp
610move.l R0,R8
611move.l 12(R8),_p_cur
612*line 243
613move #1,_ctrsw
614*line 244
615move #1,(sp)
616move.l #_gdstbc,-(sp)
617clr -(sp)
618move.l R13,-(sp)
619jsr _se_disp
620adda.l #10,sp
621*line 245
622jsr _scupd
623*line 246
624L21:L20:
625*line 247
626*line 248
627L18:
628*line 249
629clr R0
630bra L15
631L15:tst.l (sp)+
632movem.l (sp)+,R4-R7/R13-R13
633unlk R14
634rts
635.globl _rd_aval
636.text
637_rd_aval:
638~~rd_aval:
639~n=8
640link R14,#-10
641movem.l R4-R7,-(sp)
642~grp=R7
643~val=R6
644~gs=R5
645~val1=-2
646~val2=-4
647~buf=-10
648*line 269
649tst _angroup
650bge L10022
651move _angroup,R0
652neg R0
653bra L10024
654L10022:move _angroup,R0
655L10024:move R0,R7
656sub #1,R7
657*line 270
658move R7,R5
659asl #4,R5
660move 8(R14),R8
661add.l R8,R8
662add.l #_var2src,R8
663move (R8),R0
664or R0,R5
665*line 271
666move R5,R0
667muls #10,R0
668add.l #_valents,R0
669move.l R0,R8
670move 8(R8),R6
671asr #5,R6
672*line 273
673*line 273
674tst R6
675bge L23
676*line 274
677*line 275
678move.b #45,-10(R14)
679*line 276
680move R6,R0
681neg R0
682move R0,R6
683*line 277
684bra L24
685L23:
686*line 278
687*line 279
688*line 280
689move.b #43,-10(R14)
690L24:
691*line 283
692move R6,R0
693ext.l R0
694divs #100,R0
695move R0,-2(R14)
696*line 284
697move R6,R0
698move -2(R14),R1
699muls #100,R1
700sub R1,R0
701ext.l R0
702divs #10,R0
703add #48,R0
704move.b R0,-6(R14)
705*line 285
706move -2(R14),R0
707ext.l R0
708divs #10,R0
709move R0,-4(R14)
710*line 286
711move -2(R14),R0
712move -4(R14),R1
713muls #10,R1
714sub R1,R0
715add #48,R0
716move.b R0,-8(R14)
717*line 287
718move -4(R14),R0
719add #48,R0
720move.b R0,-9(R14)
721*line 288
722move.b #46,-7(R14)
723*line 289
724clr.b -5(R14)
725*line 291
726*line 292
727clr R0
728move 10+_v_regs,R0
729and #384,R0
730beq L25
731*line 292
732clr (sp)
733jsr _vbank
734*line 293
735L25:
736*line 294
737move #18,(sp)
738move.l R14,-(sp)
739add.l #-10,(sp)
740move 8(R14),R0
741muls #9,R0
742move R0,-(sp)
743add #8,(sp)
744move #7,-(sp)
745move.l _obj8,-(sp)
746jsr _vputs
747adda.l #12,sp
748*line 296
749clr R0
750bra L22
751L22:tst.l (sp)+
752movem.l (sp)+,R5-R7
753unlk R14
754rts
755.globl _nd_aval
756.text
757_nd_aval:
758~~nd_aval:
759~n=R7
760~k=R6
761link R14,#0
762movem.l R4-R7,-(sp)
763~ec=R5
764*line 314
765move 8(R14),R7
766*line 314
767move 10(R14),R6
768*line 314
769move _stccol,R5
770move.l _cfetp,R8
771move 2(R8),R0
772sub R0,R5
773*line 316
774*line 317
775cmp #3,R5
776bne L27
777*line 317
778move #-1,R0
779bra L26
780*line 318
781L27:
782*line 319
783move R6,R0
784move R5,R9
785add.l #_ebuf,R9
786move.b R0,(R9)
787*line 321
788*line 322
789tst R5
790bne L28
791*line 322
792cmp #8,R6
793bne L10025
794move #45,R0
795bra L10027
796L10025:move #43,R0
797L10027:move R0,R6
798*line 323
799bra L29
800L28:
801*line 324
802add #48,R6
803L29:
804*line 326
805*line 327
806clr R0
807move 10+_v_regs,R0
808and #384,R0
809beq L30
810*line 327
811clr (sp)
812jsr _vbank
813*line 328
814L30:
815*line 329
816move #98,(sp)
817move R6,-(sp)
818move _stccol,-(sp)
819move #7,-(sp)
820move.l _obj8,-(sp)
821jsr _vputc
822adda.l #10,sp
823*line 331
824*line 332
825cmp #4,R5
826bne L31
827*line 332
828clr R0
829bra L26
830*line 333
831L31:
832*line 334
833jsr _advscur
834*line 336
835*line 337
836cmp #2,R5
837bne L32
838*line 337
839jsr _advscur
840*line 338
841L32:
842*line 339
843clr R0
844bra L26
845L26:tst.l (sp)+
846movem.l (sp)+,R5-R7
847unlk R14
848rts
849.globl _et_agrp
850.text
851_et_agrp:
852~~et_agrp:
853~n=8
854link R14,#-4
855*line 355
856tst _angroup
857bge L10028
858move _angroup,R0
859neg R0
860move R0,(sp)
861bra L10030
862L10028:move _angroup,(sp)
863L10030:move.l #L34,-(sp)
864move.l #_ebuf,-(sp)
865jsr _sprintf
866addq.l #8,sp
867*line 356
868move #1,_ebflag
869*line 357
870clr R0
871bra L33
872L33:unlk R14
873rts
874.globl _ef_agrp
875.text
876_ef_agrp:
877~~ef_agrp:
878~n=8
879link R14,#0
880movem.l R6-R7,-(sp)
881~ival=R7
882*line 375
883clr _ebflag
884*line 376
885move.b _ebuf,R7
886ext.w R7
887add #-48,R7
888muls #10,R7
889move.b 1+_ebuf,R0
890ext.w R0
891add R0,R7
892add #-48,R7
893*line 378
894*line 379
895cmp #12,R7
896bgt L10031
897cmp #1,R7
898bge L36
899L10031:*line 379
900move #-1,R0
901bra L35
902*line 380
903L36:
904*line 381
905tst _angroup
906bge L10032
907move R7,R0
908neg R0
909bra L10034
910L10032:move R7,R0
911L10034:move R0,_angroup
912*line 383
913jsr _ds_anmd
914*line 384
915jsr _ds_anrs
916*line 385
917jsr _ds_anvl
918*line 386
919clr R0
920bra L35
921L35:tst.l (sp)+
922movem.l (sp)+,R7-R7
923unlk R14
924rts
925.globl _rd_agrp
926.text
927_rd_agrp:
928~~rd_agrp:
929~n=8
930link R14,#-8
931~buf=-4
932*line 404
933tst _angroup
934bge L10035
935move _angroup,R0
936neg R0
937move R0,(sp)
938bra L10037
939L10035:move _angroup,(sp)
940L10037:move.l #L38,-(sp)
941move.l R14,-(sp)
942sub.l #4,(sp)
943jsr _sprintf
944addq.l #8,sp
945*line 406
946*line 407
947clr R0
948move 10+_v_regs,R0
949and #384,R0
950beq L39
951*line 407
952clr (sp)
953jsr _vbank
954*line 408
955L39:
956*line 409
957move #18,(sp)
958move.l R14,-(sp)
959sub.l #4,(sp)
960move #61,-(sp)
961move #7,-(sp)
962move.l _obj8,-(sp)
963jsr _vputs
964adda.l #12,sp
965*line 411
966clr R0
967bra L37
968L37:unlk R14
969rts
970.globl _nd_agrp
971.text
972_nd_agrp:
973~~nd_agrp:
974~n=8
975~k=10
976link R14,#0
977movem.l R6-R7,-(sp)
978~ec=R7
979*line 429
980move _stccol,R7
981move.l _cfetp,R8
982move 2(R8),R0
983sub R0,R7
984*line 431
985move 10(R14),R0
986add #48,R0
987move R7,R9
988add.l #_ebuf,R9
989move.b R0,(R9)
990*line 433
991*line 434
992clr R0
993move 10+_v_regs,R0
994and #384,R0
995beq L41
996*line 434
997clr (sp)
998jsr _vbank
999*line 435
1000L41:
1001*line 436
1002move #98,(sp)
1003move 10(R14),-(sp)
1004add #48,(sp)
1005move _stccol,-(sp)
1006move #7,-(sp)
1007move.l _obj8,-(sp)
1008jsr _vputc
1009adda.l #10,sp
1010*line 437
1011jsr _advscur
1012*line 439
1013clr R0
1014bra L40
1015L40:tst.l (sp)+
1016movem.l (sp)+,R7-R7
1017unlk R14
1018rts
1019.data
1020L34:.dc.b $25,$30,$32,$2E,$32,$64,$0
1021L38:.dc.b $25,$30,$32,$2E,$32,$64,$0
Note: See TracBrowser for help on using the repository browser.