source: buchla-68k/alcyon/vsetpal.s@ bc1afe0

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1.globl _dfltpal
2.data
3_dfltpal:
4.dc.w $0
5.dc.w $0
6.dc.w $0
7.dc.w $0
8.dc.w $1
9.dc.w $0
10.dc.w $0
11.dc.w $0
12.dc.w $2
13.dc.w $0
14.dc.w $0
15.dc.w $3
16.dc.w $0
17.dc.w $2
18.dc.w $0
19.dc.w $0
20.dc.w $3
21.dc.w $0
22.dc.w $0
23.dc.w $2
24.dc.w $2
25.dc.w $0
26.dc.w $3
27.dc.w $3
28.dc.w $3
29.dc.w $0
30.dc.w $0
31.dc.w $3
32.dc.w $1
33.dc.w $0
34.dc.w $3
35.dc.w $0
36.dc.w $3
37.dc.w $3
38.dc.w $1
39.dc.w $2
40.dc.w $3
41.dc.w $2
42.dc.w $0
43.dc.w $2
44.dc.w $3
45.dc.w $0
46.dc.w $2
47.dc.w $2
48.dc.w $2
49.dc.w $3
50.dc.w $3
51.dc.w $3
52.globl _vsetpal
53.text
54_vsetpal:
55~~vsetpal:
56~slot=R7
57~red=R6
58~grn=R5
59~blu=R4
60link R14,#-4
61movem.l R2-R7,-(sp)
62~palval=R3
63~pal=-4
64*line 52
65move 8(R14),R7
66*line 52
67move 10(R14),R6
68*line 52
69move 12(R14),R5
70*line 52
71move 14(R14),R4
72*line 52
73move.l #$280000,-4(R14)
74*line 54
75*line 55
76*line 56
77*line 57
78move R7,R3
79lsl #6,R3
80clr R0
81move R6,R0
82and #1,R0
83lsl #5,R0
84or R0,R3
85clr R0
86move R6,R0
87and #2,R0
88lsl #1,R0
89or R0,R3
90clr R0
91move R5,R0
92and #1,R0
93lsl #4,R0
94or R0,R3
95clr R0
96move R5,R0
97and #2,R0
98or R0,R3
99clr R0
100move R4,R0
101and #1,R0
102lsl #3,R0
103or R0,R3
104clr R0
105move R4,R0
106and #2,R0
107lsr #1,R0
108or R0,R3
109*line 59
110clr R0
111move R3,R0
112move #63,R1
113eor R1,R0
114move.l -4(R14),R9
115move R0,(R9)
116L1:tst.l (sp)+
117movem.l (sp)+,R3-R7
118unlk R14
119rts
120.globl _vsndpal
121.text
122_vsndpal:
123~~vsndpal:
124~pp=8
125link R14,#0
126movem.l R6-R7,-(sp)
127~i=R7
128*line 85
129clr R7
130bra L5
131L6:
132*line 86
133move.l 8(R14),R8
134move R7,R1
135muls #6,R1
136move 4(R8,R1.l),(sp)
137move.l 8(R14),R8
138move R7,R1
139muls #6,R1
140move 2(R8,R1.l),-(sp)
141move.l 8(R14),R8
142move R7,R1
143muls #6,R1
144move 0(R8,R1.l),-(sp)
145move R7,-(sp)
146jsr _vsetpal
147addq.l #6,sp
148L4:
149*line 85
150add #1,R7
151L5:
152*line 85
153cmp #16,R7
154blt L6
155L3:L2:tst.l (sp)+
156movem.l (sp)+,R7-R7
157unlk R14
158rts
159.data
Note: See TracBrowser for help on using the repository browser.