source: buchla-68k/alcyon/select.s@ 7bf3856

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1.globl _ebflag
2.globl _ebuf
3.globl _curfet
4.globl _cfetp
5.globl _infetp
6.globl _cxval
7.globl _cyval
8.globl _astat
9.globl _cursbox
10.globl _hitbox
11.globl _hitcx
12.globl _hitcy
13.globl _csbp
14.globl _curboxp
15.globl _whatbox
16.text
17_whatbox:
18~~whatbox:
19link R14,#0
20movem.l R7-R7/R13-R13,-(sp)
21~sb=R13
22*line 42
23move.l _csbp,R13
24*line 43
25move #-1,_hitbox
26*line 51
27*line 52
28move.l R13,R0
29bne L2
30*line 52
31clr R0
32bra L1
33*line 53
34L2:
35*line 54
36bra L5
37L4:
38*line 55
39*line 56
40add #1,_hitbox
41*line 57
42*line 58
43*line 59
44*line 60
45*line 61
46move (R13),R0
47cmp _cxval,R0
48bgt L6
49move 4(R13),R0
50cmp _cxval,R0
51blt L6
52move 2(R13),R0
53cmp _cyval,R0
54bgt L6
55move 6(R13),R0
56cmp _cyval,R0
57blt L6
58*line 62
59*line 63
60move _cxval,_hitcx
61*line 64
62move _cyval,_hitcy
63*line 65
64move.l R13,_curboxp
65*line 66
66*line 71
67*line 72
68*line 73
69move #1,R0
70bra L1
71*line 74
72*line 75
73L6:
74*line 76
75add.l #14,R13
76L5:
77*line 77
78tst.l 10(R13)
79bne L4
80L3:
81*line 84
82move #-1,_hitbox
83*line 85
84clr R0
85bra L1
86L1:tst.l (sp)+
87movem.l (sp)+,R13-R13
88unlk R14
89rts
90.globl _select
91.text
92_select:
93~~select:
94link R14,#-4
95*line 99
96*line 99
97tst _astat
98beq L8
99*line 100
100*line 104
101*line 105
102*line 106
103*line 106
104jsr _whatbox
105tst R0
106beq L9
107*line 107
108*line 112
109*line 113
110*line 114
111move.l _curboxp,R8
112move 8(R8),-(sp)
113move.l _curboxp,R8
114move.l 10(R8),R8
115jsr (R8)
116addq.l #2,sp
117*line 115
118move _hitbox,_cursbox
119*line 116
120bra L10
121L9:
122*line 117
123*line 118
124*line 122
125*line 123
126L10:
127*line 124
128*line 125
129L8:L7:unlk R14
130rts
131.data
Note: See TracBrowser for help on using the repository browser.