source: buchla-68k/alcyon/wdfield.s

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 26.9 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 _astat
43.globl _cmtype
44.globl _curfunc
45.globl _curinst
46.globl _curslim
47.globl _curvce
48.globl _curwave
49.globl _curwdth
50.globl _curwfnl
51.globl _curwhrm
52.globl _curwhrv
53.globl _curwoff
54.globl _curwpnt
55.globl _curwslt
56.globl _cxrate
57.globl _cxval
58.globl _cyrate
59.globl _cyval
60.globl _hitbox
61.globl _lstwoff
62.globl _lstwpnt
63.globl _stccol
64.globl _stcrow
65.globl _wdupdfl
66.globl _wplast
67.globl _wpntsv
68.globl _wvlast
69.globl _crate1
70.globl _offsets
71.globl _vmtab
72.globl _wsbuf
73.globl _wsnmod
74.globl _waveob
75.globl _bfs
76.globl _vbufs
77.globl _csbp
78.globl _wdboxes
79.globl _wdcurtb
80.data
81_wdcurtb:
82.dc.w $7FFF
83.dc.w $7FFB
84.dc.w $7FEC
85.dc.w $7FD3
86.dc.w $7FB1
87.dc.w $7F84
88.dc.w $7F4E
89.dc.w $7F0E
90.dc.w $7EC5
91.dc.w $7E71
92.dc.w $7E15
93.dc.w $7DAE
94.dc.w $7D3E
95.dc.w $7CC5
96.dc.w $7C42
97.dc.w $7BB6
98.dc.w $7B20
99.dc.w $7A82
100.dc.w $79DB
101.dc.w $792A
102.dc.w $7871
103.dc.w $77AF
104.dc.w $76E5
105.dc.w $7612
106.dc.w $7536
107.dc.w $7453
108.dc.w $7367
109.dc.w $7274
110.dc.w $7179
111.dc.w $7076
112.dc.w $6F6B
113.dc.w $6E5A
114.dc.w $6D41
115.dc.w $6C21
116.dc.w $6AFB
117.dc.w $69CD
118.dc.w $689A
119.dc.w $6760
120.dc.w $6620
121.dc.w $64DA
122.dc.w $638E
123.dc.w $623D
124.dc.w $60E7
125.dc.w $5F8B
126.dc.w $5E2B
127.dc.w $5CC6
128.dc.w $5B5D
129.dc.w $59EF
130.dc.w $587E
131.dc.w $5708
132.dc.w $558F
133.dc.w $5413
134.dc.w $5294
135.dc.w $5112
136.dc.w $4F8D
137.dc.w $4E06
138.dc.w $4C7C
139.dc.w $4AF1
140.dc.w $4964
141.dc.w $47D5
142.dc.w $4646
143.dc.w $44B5
144.dc.w $4324
145.dc.w $4192
146.dc.w $4000
147.dc.w $3E6E
148.dc.w $3CDC
149.dc.w $3B4B
150.dc.w $39BA
151.dc.w $382A
152.dc.w $369C
153.dc.w $350F
154.dc.w $3383
155.dc.w $31FA
156.dc.w $3073
157.dc.w $2EEE
158.dc.w $2D6C
159.dc.w $2BEC
160.dc.w $2A70
161.dc.w $28F7
162.dc.w $2782
163.dc.w $2610
164.dc.w $24A3
165.dc.w $2339
166.dc.w $21D4
167.dc.w $2074
168.dc.w $1F19
169.dc.w $1DC2
170.dc.w $1C71
171.dc.w $1B26
172.dc.w $19E0
173.dc.w $18A0
174.dc.w $1766
175.dc.w $1632
176.dc.w $1505
177.dc.w $13DE
178.dc.w $12BE
179.dc.w $11A6
180.dc.w $1094
181.dc.w $F8A
182.dc.w $E87
183.dc.w $D8B
184.dc.w $C98
185.dc.w $BAC
186.dc.w $AC9
187.dc.w $9EE
188.dc.w $91B
189.dc.w $850
190.dc.w $78E
191.dc.w $6D5
192.dc.w $625
193.dc.w $57D
194.dc.w $4DF
195.dc.w $449
196.dc.w $3BD
197.dc.w $33B
198.dc.w $2C1
199.dc.w $251
200.dc.w $1EB
201.dc.w $18E
202.dc.w $13A
203.dc.w $F1
204.dc.w $B1
205.dc.w $7B
206.dc.w $4E
207.dc.w $2C
208.dc.w $13
209.dc.w $4
210.globl _wdcurct
211.data
212_wdcurct:
213.dc.w $1
214.dc.w $80
215.dc.w $2
216.dc.w $40
217.dc.w $4
218.dc.w $20
219.dc.w $8
220.dc.w $10
221.dc.w $10
222.dc.w $8
223.dc.w $20
224.dc.w $4
225.dc.w $40
226.dc.w $2
227.dc.w $80
228.dc.w $1
229.globl _wxrate
230.data
231_wxrate:
232.dc.w $1
233.globl _wd_fet1
234.data
235_wd_fet1:
236.dc.w $17
237.dc.w $A
238.dc.w $B
239.dc.w $2
240*line 106
241.dc.l _et_wavs
242*line 106
243.dc.l _ef_wavs
244*line 106
245.dc.l _rd_wavs
246*line 106
247.dc.l _nd_wavs
248.dc.w $17
249.dc.w $13
250.dc.w $14
251.dc.w $102
252*line 107
253.dc.l _et_wvce
254*line 107
255.dc.l _ef_wvce
256*line 107
257.dc.l _rd_wvce
258*line 107
259.dc.l _nd_wvce
260.dc.w $17
261.dc.w $22
262.dc.w $24
263.dc.w $4
264*line 108
265.dc.l _et_wpnt
266*line 108
267.dc.l _ef_wpnt
268*line 108
269.dc.l _rd_wpnt
270*line 108
271.dc.l _nd_wpnt
272.dc.w $17
273.dc.w $2C
274.dc.w $30
275.dc.w $104
276*line 109
277.dc.l _et_woff
278*line 109
279.dc.l _ef_woff
280*line 109
281.dc.l _rd_woff
282*line 109
283.dc.l _nd_woff
284.dc.w $17
285.dc.w $3D
286.dc.w $3E
287.dc.w $5
288*line 110
289.dc.l _et_whar
290*line 110
291.dc.l _ef_whar
292*line 110
293.dc.l _rd_whar
294*line 110
295.dc.l _nd_whar
296.dc.w $18
297.dc.w $14
298.dc.w $14
299.dc.w $302
300*line 112
301.dc.l _et_wslt
302*line 112
303.dc.l _ef_wslt
304*line 112
305.dc.l _rd_wslt
306*line 112
307.dc.l _nd_wslt
308.dc.w $18
309.dc.w $39
310.dc.w $3C
311.dc.w $105
312*line 113
313.dc.l _et_whrv
314*line 113
315.dc.l _ef_whrv
316*line 113
317.dc.l _rd_whrv
318*line 113
319.dc.l _nd_whrv
320.dc.w $0
321.dc.w $0
322.dc.w $0
323.dc.w $0
324.dc.l $0
325.dc.l $0
326.dc.l $0
327.dc.l $0
328.globl _wdbox
329.data
330_wdbox:
331.dc.w $1
332.dc.w $1
333.dc.w $1FE
334.dc.w $133
335.dc.w $B
336.dc.w $3
337.dc.w $0
338.dc.w $1
339.dc.w $1
340.dc.w $135
341.dc.w $1FE
342.dc.w $140
343.dc.w $B
344.dc.w $4
345.dc.w $16
346.dc.w $0
347.dc.w $1
348.dc.w $142
349.dc.w $AE
350.dc.w $15C
351.dc.w $B
352.dc.w $5
353.dc.w $17
354.dc.w $1
355.dc.w $B0
356.dc.w $142
357.dc.w $E6
358.dc.w $15C
359.dc.w $B
360.dc.w $E
361.dc.w $17
362.dc.w $17
363.dc.w $E8
364.dc.w $142
365.dc.w $18E
366.dc.w $15C
367.dc.w $B
368.dc.w $5
369.dc.w $17
370.dc.w $1E
371.dc.w $190
372.dc.w $142
373.dc.w $1FE
374.dc.w $15C
375.dc.w $B
376.dc.w $E
377.dc.w $17
378.dc.w $33
379.globl _wdbxlb0
380.data
381_wdbxlb0:
382*line 130
383.dc.l L1
384*line 134
385.dc.l L2
386*line 136
387.dc.l L3
388*line 137
389.dc.l L4
390*line 138
391.dc.l L5
392*line 140
393.dc.l L6
394.globl _wdbxlb1
395.data
396_wdbxlb1:
397*line 144
398.dc.l L7
399*line 145
400.dc.l L8
401*line 146
402.dc.l L9
403*line 147
404.dc.l L10
405*line 148
406.dc.l L11
407*line 150
408.dc.l L12
409.globl _wd_flds
410.data
411_wd_flds:
412*line 157
413.dc.l _stdctp1
414*line 158
415.dc.l _nokey
416*line 159
417.dc.l _nokey
418*line 160
419.dc.l _cxkstd
420*line 161
421.dc.l _cykstd
422*line 162
423.dc.l _wdcxupd
424*line 163
425.dc.l _wdcyupd
426*line 164
427.dc.l _wdykup
428*line 165
429.dc.l _wdykdn
430*line 166
431.dc.l _wdxkey
432*line 167
433.dc.l _select
434*line 168
435.dc.l _stdmkey
436*line 169
437.dc.l _stddkey
438*line 170
439.dc.l _wdnfld
440*line 171
441.dc.l _wd_fet1
442*line 172
443.dc.l _wdboxes
444*line 173
445.dc.l _crate1
446*line 174
447.dc.l _crate1
448.dc.w $0
449.dc.w $100
450.dc.w $80
451.globl _updfpu
452.text
453_updfpu:
454~~updfpu:
455link R14,#0
456movem.l R6-R7/R12-R13,-(sp)
457~i=R7
458~wsp1=R13
459~wsp2=R12
460*line 196
461move _curvce,R0
462move #9,R1
463asl R1,R0
464asl #1,R0
465ext.l R0
466move.l R0,R13
467tst _curwslt
468beq L10000
469clr R0
470bra L10002
471L10000:move #256,R0
472L10002:asl #1,R0
473ext.l R0
474add.l R0,R13
475add.l #_io_fpu,R13
476add.l #$2,R13
477*line 197
478tst _curwslt
479beq L10003
480move _curvce,R0
481muls #3938,R0
482add.l #_vbufs,R0
483add.l #2858,R0
484bra L10005
485L10003:move _curvce,R0
486muls #3938,R0
487add.l #_vbufs,R0
488add.l #1778,R0
489L10005:move.l R0,R12
490*line 199
491move #254,(sp)
492move.l R12,-(sp)
493move.l R13,-(sp)
494jsr _memcpyw
495addq.l #8,sp
496*line 203
497move -2(R12),-2(R13)
498*line 204
499move 506(R12),508(R13)
500*line 210
501move #254,(sp)
502move.l R12,-(sp)
503move.l R13,-(sp)
504jsr _memcpyw
505addq.l #8,sp
506*line 212
507move -2(R12),-2(R13)
508*line 213
509move 506(R12),508(R13)
510*line 216
511move _curwpnt,R8
512add.l R8,R8
513move 0(R12,R8.l),R0
514asr #5,R0
515move R0,_curwfnl
516L13:tst.l (sp)+
517movem.l (sp)+,R7-R7/R12-R13
518unlk R14
519rts
520.globl _wsupd
521.text
522_wsupd:
523~~wsupd:
524link R14,#0
525movem.l R6-R7/R12-R13,-(sp)
526~i=R7
527~wsp1=R13
528~wsp2=R12
529*line 235
530tst _curwslt
531beq L10006
532move _curvce,R0
533muls #3938,R0
534add.l #_vbufs,R0
535add.l #3366,R0
536bra L10008
537L10006:move _curvce,R0
538muls #3938,R0
539add.l #_vbufs,R0
540add.l #2286,R0
541L10008:move.l R0,R12
542*line 237
543clr R7
544bra L17
545L18:
546*line 238
547move R7,R8
548add.l R8,R8
549move 0(R12,R8.l),R0
550asr #5,R0
551move R7,R9
552add #1,R9
553add.l R9,R9
554add.l #_offsets,R9
555move R0,(R9)
556L16:
557*line 237
558add #1,R7
559L17:
560*line 237
561cmp #254,R7
562blt L18
563L15:
564*line 240
565move 2+_offsets,_offsets
566*line 242
567jsr _wscalc
568*line 246
569tst _curwslt
570beq L10009
571move _curvce,R0
572muls #3938,R0
573add.l #_vbufs,R0
574add.l #2858,R0
575bra L10011
576L10009:move _curvce,R0
577muls #3938,R0
578add.l #_vbufs,R0
579add.l #1778,R0
580L10011:move.l R0,R13
581*line 248
582clr R7
583bra L21
584L22:
585*line 249
586move R7,R8
587add #1,R8
588add.l R8,R8
589move.l #_wsbuf,R9
590move 0(R8,R9.l),R0
591asl #5,R0
592move.l R13,R9
593move R7,R10
594add.l R10,R10
595add.l R10,R9
596move R0,(R9)
597L20:
598*line 248
599add #1,R7
600L21:
601*line 248
602cmp #254,R7
603blt L22
604L19:
605*line 251
606jsr _updfpu
607*line 252
608move _curvce,R8
609add.l R8,R8
610add.l R8,R8
611move _curwslt,R9
612add.l R9,R9
613add.l R9,R8
614add.l #_wsnmod,R8
615move #1,(R8)
616L14:tst.l (sp)+
617movem.l (sp)+,R7-R7/R12-R13
618unlk R14
619rts
620.globl _whupd
621.text
622_whupd:
623~~whupd:
624link R14,#0
625movem.l R6-R7/R13-R13,-(sp)
626~i=R7
627~wsp1=R13
628*line 268
629tst _curwslt
630beq L10012
631move _curvce,R0
632muls #3938,R0
633add.l #_vbufs,R0
634add.l #2858,R0
635bra L10014
636L10012:move _curvce,R0
637muls #3938,R0
638add.l #_vbufs,R0
639add.l #1778,R0
640L10014:move.l R0,R13
641*line 270
642clr R7
643bra L26
644L27:
645*line 271
646move R7,R8
647add #1,R8
648add.l R8,R8
649move.l #_wsbuf,R9
650move 0(R8,R9.l),R0
651asl #5,R0
652move.l R13,R9
653move R7,R10
654add.l R10,R10
655add.l R10,R9
656move R0,(R9)
657L25:
658*line 270
659add #1,R7
660L26:
661*line 270
662cmp #254,R7
663blt L27
664L24:
665*line 273
666jsr _updfpu
667*line 274
668move _curvce,R8
669add.l R8,R8
670add.l R8,R8
671move _curwslt,R9
672add.l R9,R9
673add.l R9,R8
674add.l #_wsnmod,R8
675move #1,(R8)
676L23:tst.l (sp)+
677movem.l (sp)+,R7-R7/R13-R13
678unlk R14
679rts
680.globl _pntsup
681.text
682_pntsup:
683~~pntsup:
684link R14,#-8
685movem.l R2-R7/R13-R13,-(sp)
686~ip=R13
687~ov=-4
688~i=R7
689~j=R6
690~k=R5
691~tv=R4
692~curdif=R3
693~cwnp=-6
694~cwin=-8
695*line 293
696move _curvce,R0
697muls #3938,R0
698move.l R0,R13
699add.l #_vbufs,R13
700*line 295
701*line 296
702tst _curwslt
703beq L10015
704move.l R13,R0
705add.l #3366,R0
706bra L10017
707L10015:move.l R13,R0
708add.l #2286,R0
709L10017:move.l R0,-4(R14)
710*line 298
711move _curwdth,R8
712add.l R8,R8
713add.l R8,R8
714add.l #_wdcurct,R8
715move (R8),-6(R14)
716*line 300
717move _curwdth,R8
718add.l R8,R8
719add.l R8,R8
720add.l #_wdcurct,R8
721move 2(R8),-8(R14)
722*line 302
723move _lstwoff,R3
724sub _curwoff,R3
725*line 306
726clr R7
727clr R5
728bra L31
729L32:
730*line 307
731*line 308
732*line 308
733tst R7
734bne L33
735*line 309
736*line 310
737move _curwoff,R0
738asl #5,R0
739move _curwpnt,R9
740add.l R9,R9
741add.l -4(R14),R9
742move R0,(R9)
743*line 311
744bra L34
745L33:
746*line 312
747*line 313
748*line 314
749move R7,R6
750add _curwpnt,R6
751*line 315
752*line 316
753*line 316
754cmp #254,R6
755bge L35
756*line 317
757*line 318
758*line 319
759*line 320
760move.l #$8000,-(sp)
761move R5,R8
762add.l R8,R8
763move.l #_wdcurtb,R9
764move 0(R8,R9.l),R0
765ext.l R0
766move.l R0,-(sp)
767move R3,R8
768move.l R8,-(sp)
769jsr lmul
770addq.l #8,sp
771move.l R0,-(sp)
772add.l #$4000,(sp)
773jsr ldiv
774addq.l #8,sp
775move.l R0,-(sp)
776move.l -4(R14),R8
777move R6,R9
778add.l R9,R9
779move 0(R8,R9.l),R0
780asr #5,R0
781ext.l R0
782sub.l (sp)+,R0
783move R0,R4
784*line 321
785*line 322
786*line 323
787cmp #1023,R4
788ble L36
789*line 323
790move #1023,R4
791bra L37
792L36:
793*line 324
794*line 325
795cmp #-1023,R4
796bge L38
797*line 325
798move #-1023,R4
799*line 326
800L38:L37:
801*line 327
802move R4,R0
803asl #5,R0
804move R6,R9
805add.l R9,R9
806add.l -4(R14),R9
807move R0,(R9)
808*line 328
809*line 329
810L35:
811*line 330
812move _curwpnt,R6
813sub R7,R6
814*line 331
815*line 332
816*line 332
817tst R6
818blt L39
819*line 333
820*line 334
821*line 335
822*line 336
823move.l #$8000,-(sp)
824move R5,R8
825add.l R8,R8
826move.l #_wdcurtb,R9
827move 0(R8,R9.l),R0
828ext.l R0
829move.l R0,-(sp)
830move R3,R8
831move.l R8,-(sp)
832jsr lmul
833addq.l #8,sp
834move.l R0,-(sp)
835add.l #$4000,(sp)
836jsr ldiv
837addq.l #8,sp
838move.l R0,-(sp)
839move.l -4(R14),R8
840move R6,R9
841add.l R9,R9
842move 0(R8,R9.l),R0
843asr #5,R0
844ext.l R0
845sub.l (sp)+,R0
846move R0,R4
847*line 337
848*line 338
849*line 339
850cmp #1023,R4
851ble L40
852*line 339
853move #1023,R4
854bra L41
855L40:
856*line 340
857*line 341
858cmp #-1023,R4
859bge L42
860*line 341
861move #-1023,R4
862*line 342
863L42:L41:
864*line 343
865move R4,R0
866asl #5,R0
867move R6,R9
868add.l R9,R9
869add.l -4(R14),R9
870move R0,(R9)
871*line 344
872L39:L34:
873*line 345
874L30:
875*line 306
876add #1,R7
877add -8(R14),R5
878L31:
879*line 306
880cmp -6(R14),R7
881blt L32
882L29:
883*line 348
884jsr _wsupd
885L28:tst.l (sp)+
886movem.l (sp)+,R3-R7/R13-R13
887unlk R14
888rts
889.globl _wdintp
890.text
891_wdintp:
892~~wdintp:
893link R14,#-4
894movem.l R2-R7/R12-R13,-(sp)
895~ip=R13
896~ov=R12
897~i=R7
898~j=R6
899~k=R5
900~n=R4
901~t=R3
902~to=-2
903~from=-4
904*line 368
905move _curwpnt,-2(R14)
906*line 369
907move _wplast,-4(R14)
908*line 371
909move _curvce,R0
910muls #3938,R0
911move.l R0,R13
912add.l #_vbufs,R13
913*line 372
914tst _curwslt
915beq L10018
916move.l R13,R0
917add.l #3366,R0
918bra L10020
919L10018:move.l R13,R0
920add.l #2286,R0
921L10020:move.l R0,R12
922*line 374
923move _curwoff,R0
924asl #5,R0
925move.l R12,R9
926move _curwpnt,R10
927add.l R10,R10
928add.l R10,R9
929move R0,(R9)
930*line 376
931*line 376
932move -4(R14),R0
933cmp -2(R14),R0
934ble L44
935*line 377
936*line 378
937move -4(R14),R7
938*line 379
939move -2(R14),-4(R14)
940*line 380
941move R7,-2(R14)
942*line 381
943*line 382
944L44:
945*line 383
946move -2(R14),R4
947sub -4(R14),R4
948*line 385
949*line 385
950cmp #1,R4
951ble L45
952*line 386
953*line 387
954move.l R12,R8
955move -4(R14),R9
956add.l R9,R9
957add.l R9,R8
958move (R8),R5
959asr #5,R5
960*line 388
961move R4,R0
962ext.l R0
963move.l R0,-(sp)
964move -2(R14),R8
965add.l R8,R8
966move 0(R12,R8.l),R0
967asr #5,R0
968ext.l R0
969move R5,R1
970ext.l R1
971sub.l R1,R0
972move.l #$10,R1
973asl.l R1,R0
974move.l R0,-(sp)
975jsr ldiv
976addq.l #8,sp
977move.l R0,R3
978*line 389
979move -4(R14),R6
980add #1,R6
981*line 390
982sub #1,R4
983*line 391
984*line 392
985clr R7
986bra L48
987L49:
988*line 393
989move R7,R0
990add #1,R0
991ext.l R0
992move.l R0,-(sp)
993move.l R3,-(sp)
994jsr lmul
995addq.l #8,sp
996move.l #$10,R1
997asr.l R1,R0
998add R5,R0
999asl #5,R0
1000move R0,-(sp)
1001move.l R12,R8
1002move R6,R9
1003add.l R9,R9
1004add.l R9,R8
1005move (sp)+,(R8)
1006add #1,R6
1007L47:
1008*line 392
1009add #1,R7
1010L48:
1011*line 392
1012cmp R4,R7
1013blt L49
1014L46:
1015*line 393
1016*line 394
1017*line 395
1018L45:
1019*line 396
1020move _curwpnt,_wplast
1021*line 397
1022move _curwoff,_wvlast
1023*line 399
1024jsr _wsupd
1025L43:tst.l (sp)+
1026movem.l (sp)+,R3-R7/R12-R13
1027unlk R14
1028rts
1029.globl _wdykdn
1030.text
1031_wdykdn:
1032~~wdykdn:
1033link R14,#-4
1034*line 413
1035*line 414
1036tst _wpntsv
1037beq L50
1038*line 415
1039*line 416
1040move _curwpnt,_lstwpnt
1041*line 417
1042move _curwoff,_lstwoff
1043L50:unlk R14
1044rts
1045.globl _wdykup
1046.text
1047_wdykup:
1048~~wdykup:
1049link R14,#-4
1050*line 428
1051*line 429
1052tst _wpntsv
1053beq L51
1054tst _wdupdfl
1055beq L51
1056*line 430
1057*line 431
1058*line 431
1059cmp #1,_wpntsv
1060bne L52
1061*line 432
1062*line 433
1063*line 434
1064cmp #8,_curwdth
1065bne L53
1066*line 434
1067jsr _wdintp
1068*line 435
1069bra L54
1070L53:
1071*line 436
1072jsr _pntsup
1073L54:
1074*line 437
1075bra L55
1076L52:
1077*line 438
1078*line 439
1079*line 440
1080move _curwhrm,(sp)
1081jsr _adj
1082*line 441
1083jsr _wscalc
1084*line 442
1085jsr _whupd
1086L55:
1087*line 445
1088clr (sp)
1089jsr _wdswin
1090*line 446
1091move #2,(sp)
1092jsr _wdswin
1093*line 447
1094move #4,(sp)
1095jsr _wdswin
1096*line 449
1097clr _wdupdfl
1098L51:unlk R14
1099rts
1100.globl _wdcyupd
1101.text
1102_wdcyupd:
1103~~wdcyupd:
1104link R14,#-6
1105movem.l R2-R7/R11-R13,-(sp)
1106~ip=R13
1107~ov=R12
1108~hv=R11
1109~i=R7
1110~j=R6
1111~k=R5
1112~tv=R4
1113~wsgn=R3
1114~wval=-2
1115~cwnp=-4
1116~cwin=-6
1117*line 469
1118move _curvce,R0
1119muls #3938,R0
1120move.l R0,R13
1121add.l #_vbufs,R13
1122*line 471
1123move _wpntsv,R0
1124bra L58
1125*line 472
1126L59:
1127*line 473
1128*line 474
1129*line 475
1130move _cyrate,R0
1131add R0,_cyval
1132*line 476
1133*line 477
1134*line 478
1135cmp #348,_cyval
1136ble L60
1137*line 478
1138move #348,_cyval
1139bra L61
1140L60:
1141*line 479
1142*line 480
1143cmp #1,_cyval
1144bge L62
1145*line 480
1146move #1,_cyval
1147*line 481
1148L62:L61:bra L56
1149*line 482
1150*line 483
1151*line 484
1152L63:
1153*line 485
1154*line 486
1155*line 487
1156move _cyrate,R0
1157sub R0,_curwoff
1158*line 488
1159*line 489
1160*line 490
1161cmp #1023,_curwoff
1162ble L64
1163*line 490
1164move #1023,_curwoff
1165bra L65
1166L64:
1167*line 491
1168*line 492
1169cmp #-1023,_curwoff
1170bge L66
1171*line 492
1172move #-1023,_curwoff
1173*line 493
1174L66:L65:
1175*line 494
1176move #133,R0
1177move _curwoff,R1
1178ext.l R1
1179divs #8,R1
1180sub R1,R0
1181move R0,_cyval
1182*line 495
1183*line 496
1184*line 496
1185tst _curwoff
1186bge L67
1187*line 497
1188*line 498
1189move _curwoff,R0
1190neg R0
1191move R0,-2(R14)
1192*line 499
1193move.b #45,R3
1194*line 500
1195bra L68
1196L67:
1197*line 501
1198*line 502
1199*line 503
1200move _curwoff,-2(R14)
1201*line 504
1202move.b #43,R3
1203L68:
1204*line 505
1205*line 506
1206*line 507
1207move -2(R14),(sp)
1208move.b R3,R0
1209ext.w R0
1210move R0,-(sp)
1211move.l #L69,-(sp)
1212move.l #_bfs,-(sp)
1213jsr _sprintf
1214adda.l #10,sp
1215*line 508
1216*line 509
1217*line 510
1218clr R0
1219move 10+_v_regs,R0
1220and #384,R0
1221beq L70
1222*line 510
1223clr (sp)
1224jsr _vbank
1225*line 511
1226L70:
1227*line 512
1228*line 513
1229move #14,(sp)
1230move.l #_bfs,-(sp)
1231move 78+_wdbox,-(sp)
1232add #14,(sp)
1233move 76+_wdbox,-(sp)
1234move 74+_wdbox,-(sp)
1235move 72+_wdbox,-(sp)
1236move #64,-(sp)
1237move.l _waveob,-(sp)
1238jsr _vcputsv
1239adda.l #18,sp
1240*line 514
1241*line 515
1242move #1,_wdupdfl
1243bra L56
1244*line 516
1245*line 517
1246*line 518
1247L71:
1248*line 519
1249*line 520
1250*line 521
1251tst _curwslt
1252beq L10021
1253move.l R13,R0
1254add.l #3874,R0
1255bra L10023
1256L10021:move.l R13,R0
1257add.l #2794,R0
1258L10023:move.l R0,R11
1259*line 522
1260*line 523
1261move.l R11,R8
1262move _curwhrm,R9
1263add.l R9,R9
1264add.l R9,R8
1265tst (R8)
1266bge L10024
1267move _curwhrm,R8
1268add.l R8,R8
1269move 0(R11,R8.l),R0
1270neg R0
1271bra L10026
1272L10024:move _curwhrm,R8
1273add.l R8,R8
1274move 0(R11,R8.l),R0
1275L10026:sub _cyrate,R0
1276move R0,_curwhrv
1277*line 524
1278*line 525
1279*line 526
1280cmp #100,_curwhrv
1281ble L72
1282*line 526
1283move #100,_curwhrv
1284bra L73
1285L72:
1286*line 527
1287*line 528
1288tst _curwhrv
1289bge L74
1290*line 528
1291clr _curwhrv
1292*line 529
1293L74:L73:
1294*line 530
1295move.l R11,R8
1296move _curwhrm,R9
1297add.l R9,R9
1298add.l R9,R8
1299tst (R8)
1300bge L10027
1301move _curwhrv,R0
1302neg R0
1303bra L10029
1304L10027:move _curwhrv,R0
1305L10029:move R0,_curwhrv
1306*line 531
1307*line 532
1308move.l R11,R8
1309move _curwhrm,R9
1310add.l R9,R9
1311add.l R9,R8
1312move _curwhrv,(R8)
1313*line 533
1314move _curwhrm,R8
1315add.l R8,R8
1316add.l #_vmtab,R8
1317move _curwhrv,(R8)
1318*line 534
1319*line 535
1320*line 535
1321tst _curwhrv
1322bge L75
1323*line 536
1324*line 537
1325move _curwhrv,R0
1326neg R0
1327move R0,-2(R14)
1328*line 538
1329move.b #45,R3
1330*line 539
1331bra L76
1332L75:
1333*line 540
1334*line 541
1335*line 542
1336move _curwhrv,-2(R14)
1337*line 543
1338move.b #43,R3
1339L76:
1340*line 544
1341*line 545
1342*line 546
1343*line 547
1344clr R0
1345move 10+_v_regs,R0
1346and #384,R0
1347beq L77
1348*line 547
1349clr (sp)
1350jsr _vbank
1351*line 548
1352L77:
1353*line 549
1354move -2(R14),(sp)
1355move.b R3,R0
1356ext.w R0
1357move R0,-(sp)
1358move.l #L78,-(sp)
1359move.l #_bfs,-(sp)
1360jsr _sprintf
1361adda.l #10,sp
1362*line 550
1363*line 551
1364*line 552
1365move #14,(sp)
1366move.l #_bfs,-(sp)
1367move 94+_wdbox,-(sp)
1368add #6,(sp)
1369move 92+_wdbox,-(sp)
1370add #1,(sp)
1371move 90+_wdbox,-(sp)
1372move 88+_wdbox,-(sp)
1373move #64,-(sp)
1374move.l _waveob,-(sp)
1375jsr _vcputsv
1376adda.l #18,sp
1377*line 553
1378*line 554
1379*line 555
1380tst _curwhrv
1381bge L79
1382*line 555
1383move #306,R0
1384move _curwhrv,R1
1385neg R1
1386asl #7,R1
1387ext.l R1
1388divs #100,R1
1389sub R1,R0
1390move R0,_cyval
1391*line 556
1392bra L80
1393L79:
1394*line 557
1395move #306,R0
1396move _curwhrv,R1
1397asl #7,R1
1398ext.l R1
1399divs #100,R1
1400sub R1,R0
1401move R0,_cyval
1402L80:
1403*line 558
1404*line 559
1405move #1,_wdupdfl
1406bra L56
1407*line 560
1408bra L57
1409L58:tst R0
1410beq L59
1411cmp #1,R0
1412beq L63
1413cmp #2,R0
1414beq L71
1415bra L57
1416L57:L56:tst.l (sp)+
1417movem.l (sp)+,R3-R7/R11-R13
1418unlk R14
1419rts
1420.globl _wdcxupd
1421.text
1422_wdcxupd:
1423~~wdcxupd:
1424link R14,#-4
1425*line 575
1426move _wpntsv,R0
1427bra L83
1428*line 576
1429L84:
1430*line 577
1431*line 578
1432*line 579
1433move _cxrate,R0
1434add R0,_cxval
1435*line 580
1436*line 581
1437*line 582
1438cmp #510,_cxval
1439ble L85
1440*line 582
1441move #510,_cxval
1442bra L86
1443L85:
1444*line 583
1445*line 584
1446cmp #1,_cxval
1447bge L87
1448*line 584
1449move #1,_cxval
1450*line 585
1451L87:L86:bra L81
1452*line 586
1453*line 587
1454L88:
1455*line 588
1456*line 589
1457*line 590
1458*line 591
1459cmp #8,_curwdth
1460bne L81
1461*line 592
1462*line 593
1463tst _cxrate
1464bge L10030
1465move _wxrate,R0
1466neg R0
1467bra L10032
1468L10030:move _wxrate,R0
1469L10032:add R0,_curwpnt
1470*line 594
1471*line 595
1472*line 596
1473cmp #254,_curwpnt
1474blt L89
1475*line 596
1476move #253,_curwpnt
1477bra L90
1478L89:
1479*line 597
1480*line 598
1481tst _curwpnt
1482bge L91
1483*line 598
1484clr _curwpnt
1485*line 599
1486L91:L90:
1487*line 600
1488move _curwpnt,R0
1489asl #1,R0
1490add #2,R0
1491move R0,_cxval
1492*line 601
1493*line 602
1494*line 603
1495clr R0
1496move 10+_v_regs,R0
1497and #384,R0
1498beq L92
1499*line 603
1500clr (sp)
1501jsr _vbank
1502*line 604
1503L92:
1504*line 605
1505move _curwpnt,(sp)
1506move.l #L93,-(sp)
1507move.l #_bfs,-(sp)
1508jsr _sprintf
1509addq.l #8,sp
1510*line 606
1511*line 607
1512move #14,(sp)
1513move.l #_bfs,-(sp)
1514move 78+_wdbox,-(sp)
1515add #4,(sp)
1516move 76+_wdbox,-(sp)
1517move 74+_wdbox,-(sp)
1518move 72+_wdbox,-(sp)
1519move #64,-(sp)
1520move.l _waveob,-(sp)
1521jsr _vcputsv
1522adda.l #18,sp
1523bra L82
1524L83:tst R0
1525beq L84
1526cmp #1,R0
1527beq L88
1528bra L82
1529L82:L81:unlk R14
1530rts
1531.globl _wdnfld
1532.text
1533_wdnfld:
1534~~wdnfld:
1535~k=8
1536link R14,#0
1537movem.l R7-R7/R12-R13,-(sp)
1538~hv=R13
1539~ip=R12
1540*line 627
1541*line 627
1542tst _astat
1543beq L95
1544*line 628
1545*line 629
1546*line 629
1547jsr _whatbox
1548tst R0
1549beq L96
1550*line 630
1551*line 631
1552move _curvce,R0
1553muls #3938,R0
1554move.l R0,R12
1555add.l #_vbufs,R12
1556*line 632
1557tst _curwslt
1558beq L10033
1559move.l R12,R0
1560add.l #3874,R0
1561bra L10035
1562L10033:move.l R12,R0
1563add.l #2794,R0
1564L10035:move.l R0,R13
1565*line 633
1566*line 634
1567*line 634
1568tst _hitbox
1569bne L97
1570*line 635
1571*line 636
1572move _wpntsv,R0
1573bra L99
1574*line 637
1575L100:
1576*line 638
1577*line 639
1578*line 640
1579*line 640
1580cmp #8,8(R14)
1581bne L101
1582*line 641
1583*line 642
1584*line 643
1585sub #1,_curwdth
1586bge L102
1587*line 643
1588move #8,_curwdth
1589*line 644
1590L102:
1591*line 645
1592move #4,(sp)
1593jsr _wdswin
1594*line 646
1595clr R0
1596bra L94
1597*line 647
1598bra L103
1599L101:
1600*line 648
1601*line 648
1602cmp #9,8(R14)
1603bne L104
1604*line 649
1605*line 650
1606*line 651
1607add #1,_curwdth
1608move _curwdth,R0
1609cmp #8,R0
1610ble L105
1611*line 651
1612clr _curwdth
1613*line 652
1614L105:
1615*line 653
1616move #4,(sp)
1617jsr _wdswin
1618*line 654
1619clr R0
1620bra L94
1621*line 655
1622*line 656
1623L104:L103:
1624*line 657
1625move #-1,R0
1626bra L94
1627*line 658
1628*line 659
1629L106:
1630*line 660
1631*line 661
1632*line 662
1633*line 662
1634cmp #8,8(R14)
1635bne L107
1636*line 663
1637*line 664
1638*line 665
1639cmp #8,_curwdth
1640bne L108
1641*line 665
1642move #-1,R0
1643bra L94
1644*line 666
1645L108:
1646*line 667
1647*line 668
1648sub #1,_curwdth
1649bge L109
1650*line 668
1651move #7,_curwdth
1652*line 669
1653L109:
1654*line 670
1655move #4,(sp)
1656jsr _wdswin
1657*line 671
1658clr R0
1659bra L94
1660*line 672
1661bra L110
1662L107:
1663*line 673
1664*line 673
1665cmp #9,8(R14)
1666bne L111
1667*line 674
1668*line 675
1669*line 675
1670cmp #8,_curwdth
1671bne L112
1672*line 676
1673*line 677
1674jsr _wdintp
1675*line 678
1676clr (sp)
1677jsr _wdswin
1678*line 679
1679move #2,(sp)
1680jsr _wdswin
1681*line 680
1682bra L113
1683L112:
1684*line 681
1685*line 682
1686add #1,_curwdth
1687move _curwdth,R0
1688cmp #8,R0
1689blt L114
1690*line 682
1691clr _curwdth
1692*line 683
1693L114:L113:
1694*line 684
1695move #4,(sp)
1696jsr _wdswin
1697*line 685
1698clr R0
1699bra L94
1700*line 686
1701*line 687
1702L111:L110:
1703*line 688
1704move #-1,R0
1705bra L94
1706*line 689
1707*line 690
1708L115:
1709*line 691
1710*line 692
1711*line 693
1712*line 693
1713cmp #8,8(R14)
1714bne L116
1715*line 694
1716*line 695
1717*line 696
1718move.l R13,R8
1719move _curwhrm,R9
1720add.l R9,R9
1721add.l R9,R8
1722tst (R8)
1723ble L117
1724*line 696
1725move _curwhrm,R8
1726add.l R8,R8
1727move 0(R13,R8.l),R0
1728neg R0
1729move.l R13,R9
1730move _curwhrm,R10
1731add.l R10,R10
1732add.l R10,R9
1733move R0,(R9)
1734*line 697
1735bra L118
1736L117:
1737*line 698
1738move #-1,R0
1739bra L94
1740L118:
1741*line 699
1742bra L119
1743L116:
1744*line 700
1745*line 700
1746cmp #9,8(R14)
1747bne L120
1748*line 701
1749*line 702
1750*line 703
1751move.l R13,R8
1752move _curwhrm,R9
1753add.l R9,R9
1754add.l R9,R8
1755tst (R8)
1756bge L121
1757*line 703
1758move _curwhrm,R8
1759add.l R8,R8
1760move 0(R13,R8.l),R0
1761neg R0
1762move.l R13,R9
1763move _curwhrm,R10
1764add.l R10,R10
1765add.l R10,R9
1766move R0,(R9)
1767*line 704
1768bra L122
1769L121:
1770*line 705
1771move #-1,R0
1772bra L94
1773L122:
1774*line 706
1775bra L123
1776L120:
1777*line 707
1778*line 708
1779*line 709
1780move #-1,R0
1781bra L94
1782L123:L119:
1783*line 710
1784*line 711
1785*line 712
1786move.l R13,R8
1787move _curwhrm,R9
1788add.l R9,R9
1789add.l R9,R8
1790move (R8),_curwhrv
1791*line 713
1792move _curwhrm,R8
1793add.l R8,R8
1794add.l #_vmtab,R8
1795move _curwhrv,(R8)
1796*line 714
1797move _curwhrm,(sp)
1798jsr _adj
1799*line 715
1800jsr _wscalc
1801*line 716
1802jsr _whupd
1803*line 717
1804clr (sp)
1805jsr _wdswin
1806*line 718
1807move #4,(sp)
1808jsr _wdswin
1809*line 719
1810move #5,(sp)
1811jsr _wdswin
1812*line 720
1813clr R0
1814bra L94
1815bra L98
1816L99:tst R0
1817beq L100
1818cmp #1,R0
1819beq L106
1820cmp #2,R0
1821beq L115
1822bra L98
1823L98:
1824*line 721
1825*line 722
1826bra L124
1827L97:
1828*line 723
1829*line 724
1830move #-1,R0
1831bra L94
1832L124:
1833*line 725
1834*line 726
1835bra L125
1836L96:
1837*line 727
1838*line 727
1839cmp #1,_hitbox
1840bne L126
1841*line 728
1842*line 729
1843*line 729
1844cmp #8,8(R14)
1845bne L127
1846*line 730
1847*line 731
1848*line 732
1849move.l R13,R8
1850move _curwhrm,R9
1851add.l R9,R9
1852add.l R9,R8
1853tst (R8)
1854ble L128
1855*line 732
1856move _curwhrm,R8
1857add.l R8,R8
1858move 0(R13,R8.l),R0
1859neg R0
1860move.l R13,R9
1861move _curwhrm,R10
1862add.l R10,R10
1863add.l R10,R9
1864move R0,(R9)
1865*line 733
1866bra L129
1867L128:
1868*line 734
1869move #-1,R0
1870bra L94
1871L129:
1872*line 735
1873bra L130
1874L127:
1875*line 736
1876*line 736
1877cmp #9,8(R14)
1878bne L131
1879*line 737
1880*line 738
1881*line 739
1882move.l R13,R8
1883move _curwhrm,R9
1884add.l R9,R9
1885add.l R9,R8
1886tst (R8)
1887bge L132
1888*line 739
1889move _curwhrm,R8
1890add.l R8,R8
1891move 0(R13,R8.l),R0
1892neg R0
1893move.l R13,R9
1894move _curwhrm,R10
1895add.l R10,R10
1896add.l R10,R9
1897move R0,(R9)
1898*line 740
1899bra L133
1900L132:
1901*line 741
1902move #-1,R0
1903bra L94
1904L133:
1905*line 742
1906bra L134
1907L131:
1908*line 743
1909*line 744
1910*line 745
1911move #-1,R0
1912bra L94
1913L134:L130:
1914*line 746
1915*line 747
1916*line 748
1917move.l R13,R8
1918move _curwhrm,R9
1919add.l R9,R9
1920add.l R9,R8
1921move (R8),_curwhrv
1922*line 749
1923move _curwhrm,R8
1924add.l R8,R8
1925add.l #_vmtab,R8
1926move _curwhrv,(R8)
1927*line 750
1928move _curwhrm,(sp)
1929jsr _adj
1930*line 751
1931jsr _wscalc
1932*line 752
1933jsr _whupd
1934*line 753
1935clr (sp)
1936jsr _wdswin
1937*line 754
1938move #4,(sp)
1939jsr _wdswin
1940*line 755
1941move #5,(sp)
1942jsr _wdswin
1943*line 756
1944clr R0
1945bra L94
1946*line 757
1947*line 758
1948L126:L125:
1949*line 759
1950move #-1,R0
1951bra L94
1952*line 760
1953L95:L94:tst.l (sp)+
1954movem.l (sp)+,R12-R13
1955unlk R14
1956rts
1957.globl _wdxkey
1958.text
1959_wdxkey:
1960~~wdxkey:
1961link R14,#-4
1962*line 775
1963*line 776
1964tst _astat
1965bne L136
1966*line 776
1967move #-1,R0
1968bra L135
1969*line 777
1970L136:
1971*line 778
1972move _cyval,R0
1973ext.l R0
1974divs #14,R0
1975move R0,_stcrow
1976*line 779
1977move _cxval,R0
1978asr #3,R0
1979move R0,_stccol
1980*line 781
1981*line 781
1982cmp #23,_stcrow
1983bne L137
1984*line 782
1985*line 783
1986*line 783
1987cmp #2,_stccol
1988bge L10036
1989cmp #8,_stccol
1990bgt L138
1991L10036:*line 784
1992*line 785
1993jsr _clrws
1994*line 786
1995bra L139
1996L138:
1997*line 787
1998*line 787
1999cmp #38,_stccol
2000blt L140
2001cmp #42,_stccol
2002bgt L140
2003*line 788
2004*line 789
2005*line 790
2006*line 791
2007move #254,(sp)
2008clr -(sp)
2009tst _curwslt
2010beq L10037
2011move _curvce,R0
2012muls #3938,R0
2013add.l #_vbufs,R0
2014move.l R0,-(sp)
2015add.l #3366,(sp)
2016bra L10039
2017L10037:move _curvce,R0
2018muls #3938,R0
2019add.l #_vbufs,R0
2020move.l R0,-(sp)
2021add.l #3366,(sp)
2022L10039:jsr _memsetw
2023addq.l #6,sp
2024*line 792
2025*line 793
2026clr _curwoff
2027*line 794
2028jsr _wsupd
2029*line 795
2030bra L141
2031L140:
2032*line 796
2033*line 796
2034cmp #51,_stccol
2035blt L142
2036cmp #58,_stccol
2037bgt L142
2038*line 797
2039*line 798
2040move #32,(sp)
2041clr -(sp)
2042move.l #_vmtab,-(sp)
2043jsr _memsetw
2044addq.l #6,sp
2045*line 799
2046clr _curwhrv
2047*line 800
2048jsr _wadj
2049*line 801
2050jsr _wscalc
2051*line 802
2052jsr _whupd
2053*line 803
2054bra L143
2055L142:
2056*line 804
2057*line 805
2058*line 806
2059move #-1,R0
2060bra L135
2061L143:L141:L139:
2062*line 807
2063*line 808
2064*line 809
2065move _curvce,R8
2066add.l R8,R8
2067add.l R8,R8
2068move _curwslt,R9
2069add.l R9,R9
2070add.l R9,R8
2071add.l #_wsnmod,R8
2072move #1,(R8)
2073*line 810
2074jsr _wwins
2075*line 811
2076clr R0
2077bra L135
2078*line 812
2079*line 813
2080L137:
2081*line 814
2082move #-1,R0
2083bra L135
2084L135:unlk R14
2085rts
2086.globl _wdfield
2087.text
2088_wdfield:
2089~~wdfield:
2090link R14,#-4
2091*line 828
2092move #307,_curslim
2093*line 830
2094move.l #_wd_flds,(sp)
2095jsr _curset
2096L144:unlk R14
2097rts
2098.data
2099L1:.dc.b $0
2100L2:.dc.b $D0,$C1,$20,$20,$D0,$C3,$20,$20,$D0,$C5,$20,$20,$D0,$C7,$20,$20,$D0,$C9,$20,$20,$D1,$C1,$20,$20,$D1,$C3,$20,$20,$D1,$C5
2101.dc.b $20,$20,$D1,$C7,$20,$20,$D1,$C9,$20,$20,$D2,$C1,$20,$20,$D2,$C3,$20,$20,$D2,$C5,$20,$20,$D2,$C7,$20,$20,$D2,$C9,$20,$20
2102.dc.b $D3,$C1,$20,$20,$0
2103L3:.dc.b $57,$61,$76,$65,$73,$68,$70,$65,$20,$20,$20,$20,$56,$6F,$69,$63,$65,$0
2104L4:.dc.b $53,$74,$6F,$72,$65,$0
2105L5:.dc.b $50,$6E,$74,$20,$20,$20,$20,$20,$4F,$66,$66,$73,$74,$0
2106L6:.dc.b $48,$61,$72,$6D,$6F,$6E,$69,$63,$20,$23,$0
2107L7:.dc.b $0
2108L8:.dc.b $0
2109L9:.dc.b $49,$6E,$73,$74,$72,$75,$6D,$65,$6E,$74,$20,$20,$20,$20,$53,$6C,$6F,$74,$0
2110L10:.dc.b $46,$65,$74,$63,$68,$0
2111L11:.dc.b $20,$20,$20,$20,$20,$20,$20,$20,$46,$69,$6E,$61,$6C,$0
2112L12:.dc.b $56,$61,$6C,$75,$65,$0
2113L69:.dc.b $25,$63,$25,$30,$34,$64,$0
2114L78:.dc.b $25,$63,$25,$30,$33,$64,$0
2115L93:.dc.b $25,$30,$33,$64,$0
Note: See TracBrowser for help on using the repository browser.