annotate playercode/resample.asm @ 11:d5cb2cfc8eca

Initial revision
author darius
date Fri, 23 Jan 1998 16:05:11 +0000
parents d14fd386d182
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
1 .386p
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
2 .model flat
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
3 .data ; self-modifying code... keep in data segment
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
5 NAME resample
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
6 EXTRN _rvoltab :DWORD
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
7 EXTRN _lvoltab :DWORD
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
8 EXTRN _bitshift :BYTE
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
9
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
10 PUBLIC _AsmStereoNormal
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
11 PUBLIC _AsmStereoSurround
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
12 PUBLIC _AsmMonoNormal
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
13 IFDEF __ASMSTUFF__
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
14 PUBLIC _AsmMix32To16_Normal
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
15 PUBLIC _AsmMix32To8_Normal
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
16 ENDIF
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
17
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
18
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
19 STUBSTART macro
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
20 push eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
21 push ebx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
22 push ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
23 push edx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
24 push esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
25 push edi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
26 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
27 endm
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
28
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
29
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
30 STUBEND macro
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
31 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
32 pop edi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
33 pop esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
34 pop edx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
35 pop ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
36 pop ebx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
37 pop eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
38 endm
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
39
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
40
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
41 SS2F MACRO index,lab1,lab2,lab3,lab4 ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
42 mov al,[edx]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
43 db 081h,0c3h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
44 lab1 dd 0 ; add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
45 db 081h,0d2h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
46 lab2 dd 0 ; adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
47 mov esi,(index*8)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
48 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
49 lab3 dd 0 ; mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
50 mov ebp,(index*8+4)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
51 add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
52 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
53 lab4 dd 0 ; mov ecx,[eax*4+table2]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
54 mov (index*8)[edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
55 add ebp,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
56 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
57
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
58 SS2M MACRO index,lab1,lab2,lab3,lab4 ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
59 mov al,[edx]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
60 mov (index*8-4)[edi],ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
61 db 081h,0c3h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
62 lab1 dd 0 ; add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
63 db 081h,0d2h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
64 lab2 dd 0 ; adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
65 mov esi,(index*8)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
66 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
67 lab3 dd 0 ; mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
68 mov ebp,(index*8+4)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
69 add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
70 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
71 lab4 dd 0 ; mov ecx,[eax*4+table2]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
72 mov (index*8)[edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
73 add ebp,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
74 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
75
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
76 SS3F MACRO index,lab1,lab2,lab3 ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
77 mov al,[edx]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
78 db 081h,0c3h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
79 lab1 dd 0 ; add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
80 db 081h,0d2h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
81 lab2 dd 0 ; adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
82 mov esi,(index*8)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
83 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
84 lab3 dd 0 ; mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
85 mov ebp,(index*8+4)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
86 add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
87 sub ebp,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
88 mov (index*8)[edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
89 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
90
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
91 SS3M MACRO index,lab1,lab2,lab3 ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
92 mov al,[edx]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
93 mov (index*8-4)[edi],ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
94 db 081h,0c3h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
95 lab1 dd 0 ; add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
96 db 081h,0d2h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
97 lab2 dd 0 ; adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
98 mov esi,(index*8)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
99 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
100 lab3 dd 0 ; mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
101 mov ebp,(index*8+4)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
102 add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
103 sub ebp,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
104 mov (index*8)[edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
105 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
106
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
107 SS2L MACRO index ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
108 mov (index*8-4)[edi],ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
109 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
110
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
111 SM2F MACRO index,lab1,lab2,lab3 ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
112 mov al,[edx] ; AGI-3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
113 db 081h,0c3h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
114 lab1 dd 0 ; add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
115 db 081h,0d2h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
116 lab2 dd 0 ; adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
117 mov esi,(index*4)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
118 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
119 lab3 dd 0 ; mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
120 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
121
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
122 SM2M MACRO index,lab1,lab2,lab3 ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
123 mov al,[edx] ; AGI-3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
124 add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
125 db 081h,0c3h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
126 lab1 dd 0 ; add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
127 mov (index*4-4)[edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
128 db 081h,0d2h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
129 lab2 dd 0 ; adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
130 mov esi,(index*4)[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
131 db 08bh,0ch,085h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
132 lab3 dd 0 ; mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
133 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
134
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
135 SM2L MACRO index ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
136 add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
137 mov (index*4-4)[edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
138 ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
139
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
140 ;SS2 ; 386
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
141 ;mov al,[edx+source]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
142 ;add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
143 ;adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
144 ;mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
145 ;mov ebp,[eax*4+table2]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
146 ;add [edi],ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
147 ;add [edi+4],ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
148 ;ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
149
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
150 ;SS2M ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
151 ;mov al,[edx+source]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
152 ;mov [edi-8+4],ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
153 ;add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
154 ;adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
155 ;mov esi,[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
156 ;mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
157 ;mov ebp,[edi+4]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
158 ;add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
159 ;mov ecx,[eax*4+table2]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
160 ;mov [edi],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
161 ;add ebp,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
162 ;ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
163
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
164 ;SM2M ; 386
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
165 ;add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
166 ;adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
167 ;mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
168 ;mov al,[edx+source]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
169 ;add [edi],ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
170 ;ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
171
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
172 ;SM2M ; 486+
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
173 ;add ebx,lo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
174 ;mov [edi-4],esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
175 ;adc edx,hi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
176 ;mov esi,[edi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
177 ;mov ecx,[eax*4+table1]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
178 ;mov al,[edx+source] ; AGI-3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
179 ;add esi,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
180 ;ENDM
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
181
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
182
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
183 _AsmStereoNormal:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
184 STUBSTART
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
185 mov esi,[esp+32] ; get src
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
186 mov edi,[esp+36] ; get dst
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
187 mov ebx,[esp+40] ; get index
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
188 mov ecx,[esp+44] ; get increment
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
189 mov ebp,[esp+48] ; get todo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
190 mov eax,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
191 mov edx,ebx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
192 sar eax,31
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
193 sar edx,31
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
194 shld eax,ecx,21 ; convert to 32:32
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
195 shl ecx,21
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
196 shld edx,ebx,21 ; convert to 32:32
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
197 shl ebx,21
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
198 add edx,esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
199 mov shi1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
200 mov shi2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
201 mov shi3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
202 mov shi4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
203 mov shi5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
204 mov eax,_lvoltab
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
205 mov slo1,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
206 mov slo2,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
207 mov slo3,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
208 mov slo4,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
209 mov slo5,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
210 mov sltab1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
211 mov sltab2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
212 mov sltab3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
213 mov sltab4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
214 mov sltab5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
215 mov eax,_rvoltab
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
216 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
217 mov srtab1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
218 mov srtab2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
219 mov srtab3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
220 mov srtab4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
221 mov srtab5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
222 xor eax,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
223 jmp s1 ; flush code cache
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
224 s1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
225 shr ebp,2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
226 jz sskip16
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
227 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
228 sagain16:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
229 SS2F 0,slo1,shi1,sltab1,srtab1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
230 SS2M 1,slo2,shi2,sltab2,srtab2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
231 SS2M 2,slo3,shi3,sltab3,srtab3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
232 SS2M 3,slo4,shi4,sltab4,srtab4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
233 SS2L 4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
234 add edi,(4*8)
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
235 dec dword ptr [esp]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
236 jnz sagain16
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
237 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
238 sskip16:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
239 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
240 and ebp,3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
241 jz sskip1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
242 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
243 sagain1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
244 SS2F 0,slo5,shi5,sltab5,srtab5
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
245 SS2L 1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
246 add edi,8
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
247 dec dword ptr [esp]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
248 jnz sagain1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
249 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
250 sskip1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
251 STUBEND
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
252 ret
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
253
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
254
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
255 _AsmStereoSurround:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
256 STUBSTART
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
257 mov esi,[esp+32] ; get src
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
258 mov edi,[esp+36] ; get dst
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
259 mov ebx,[esp+40] ; get index
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
260 mov ecx,[esp+44] ; get increment
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
261 mov ebp,[esp+48] ; get todo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
262 mov eax,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
263 mov edx,ebx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
264 sar eax,31
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
265 sar edx,31
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
266 shld eax,ecx,21 ; convert to 32:32
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
267 shl ecx,21
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
268 shld edx,ebx,21 ; convert to 32:32
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
269 shl ebx,21
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
270 add edx,esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
271 mov s2hi1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
272 mov s2hi2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
273 mov s2hi3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
274 mov s2hi4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
275 mov s2hi5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
276 mov eax,_lvoltab
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
277 mov s2lo1,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
278 mov s2lo2,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
279 mov s2lo3,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
280 mov s2lo4,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
281 mov s2lo5,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
282 mov s2ltab1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
283 mov s2ltab2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
284 mov s2ltab3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
285 mov s2ltab4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
286 mov s2ltab5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
287 ;mov eax,_rvoltab
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
288 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
289 ;mov s2rtab1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
290 ;mov s2rtab2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
291 ;mov s2rtab3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
292 ;mov s2rtab4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
293 ;mov s2rtab5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
294 xor eax,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
295 jmp s3 ; flush code cache
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
296 s3:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
297 shr ebp,2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
298 jz s2skip16
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
299 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
300 s2again16:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
301 SS3F 0,s2lo1,s2hi1,s2ltab1 ;,s2rtab1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
302 SS3M 1,s2lo2,s2hi2,s2ltab2 ;,s2rtab2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
303 SS3M 2,s2lo3,s2hi3,s2ltab3 ;,s2rtab3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
304 SS3M 3,s2lo4,s2hi4,s2ltab4 ;,s2rtab4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
305 SS2L 4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
306 add edi,(4*8)
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
307 dec dword ptr [esp]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
308 jnz s2again16
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
309 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
310 s2skip16:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
311 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
312 and ebp,3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
313 jz s2skip1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
314 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
315 s2again1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
316 SS3F 0,s2lo5,s2hi5,s2ltab5 ;,s2rtab5
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
317 SS2L 1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
318 add edi,8
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
319 dec dword ptr [esp]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
320 jnz s2again1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
321 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
322 s2skip1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
323 STUBEND
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
324 ret
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
325
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
326
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
327 _AsmMonoNormal:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
328 STUBSTART
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
329 mov esi,[esp+32] ; get src
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
330 mov edi,[esp+36] ; get dst
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
331 mov ebx,[esp+40] ; get index
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
332 mov ecx,[esp+44] ; get increment
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
333 mov ebp,[esp+48] ; get todo
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
334 mov eax,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
335 mov edx,ebx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
336 sar eax,31
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
337 sar edx,31
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
338 shld eax,ecx,21 ; convert to 32:32
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
339 shl ecx,21
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
340 shld edx,ebx,21 ; convert to 32:32
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
341 shl ebx,21
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
342 add edx,esi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
343 mov mhi1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
344 mov mhi2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
345 mov mhi3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
346 mov mhi4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
347 mov mhi5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
348 mov eax,_lvoltab
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
349 mov mlo1,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
350 mov mlo2,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
351 mov mlo3,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
352 mov mlo4,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
353 mov mlo5,ecx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
354 mov mltab1,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
355 mov mltab2,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
356 mov mltab3,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
357 mov mltab4,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
358 mov mltab5,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
359 xor eax,eax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
360
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
361 jmp m1 ; flush code cache
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
362 m1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
363 push ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
364 shr ebp,2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
365 jz mskip16
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
366 magain16:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
367 SM2F 0,mlo1,mhi1,mltab1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
368 SM2M 1,mlo2,mhi2,mltab2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
369 SM2M 2,mlo3,mhi3,mltab3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
370 SM2M 3,mlo4,mhi4,mltab4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
371 SM2L 4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
372 add edi,(4*4)
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
373 dec ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
374 jnz magain16
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
375 mskip16:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
376 pop ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
377 and ebp,3
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
378 jz mskip1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
379 magain1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
380 SM2F 0,mlo5,mhi5,mltab5
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
381 SM2L 1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
382 add edi,4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
383 dec ebp
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
384 jnz magain1
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
385 mskip1:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
386 STUBEND
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
387 ret
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
388
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
389
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
390
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
391 IFDEF __ASMSTUFF__
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
392 _AsmMix32To16_Normal:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
393 STUBSTART
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
394 mov edi,[esp+32] ; get dest
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
395 mov esi,[esp+36] ; get src
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
396 mov edx,[esp+40] ; get count
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
397 mov cl,[_bitshift]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
398 again:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
399 mov eax,[esi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
400 sar eax,cl
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
401 cmp eax,32767
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
402 jg toobig
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
403 cmp eax,-32768
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
404 jl toosmall
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
405 write:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
406 mov [edi],ax
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
407 add esi,4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
408 add edi,2
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
409 dec edx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
410 jnz again
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
411 jmp ready
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
412 toobig:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
413 mov eax,32767
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
414 jmp write
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
415 toosmall:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
416 mov eax,-32768
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
417 jmp write
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
418 ready:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
419 STUBEND
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
420 ret
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
421
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
422
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
423 _AsmMix32To8_Normal:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
424 STUBSTART
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
425 mov edi,[esp+32] ; get dest
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
426 mov esi,[esp+36] ; get src
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
427 mov edx,[esp+40] ; get count
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
428 mov cl,[_bitshift]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
429 cagain:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
430 mov eax,[esi]
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
431 sar eax,cl
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
432 cmp eax,127
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
433 jg ctoobig
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
434 cmp eax,-128
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
435 jl ctoosmall
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
436 cwrite:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
437 add al,080h
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
438 add esi,4
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
439 mov [edi],al
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
440 inc edi
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
441 dec edx
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
442 jnz cagain
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
443 jmp cready
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
444 ctoobig:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
445 mov eax,127
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
446 jmp cwrite
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
447 ctoosmall:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
448 mov eax,-128
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
449 jmp cwrite
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
450 cready:
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
451 STUBEND
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
452 ret
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
453 ENDIF
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
454
d14fd386d182 Initial entry of mikmod into the CVS tree.
darius
parents:
diff changeset
455 END