1 | //
|
---|
2 | // QEMU Cirrus CLGD 54xx VGABIOS Extension.
|
---|
3 | //
|
---|
4 | // Copyright (c) 2004 Makoto Suzuki (suzu)
|
---|
5 | //
|
---|
6 | // This library is free software; you can redistribute it and/or
|
---|
7 | // modify it under the terms of the GNU Lesser General Public
|
---|
8 | // License as published by the Free Software Foundation; either
|
---|
9 | // version 2 of the License, or (at your option) any later version.
|
---|
10 | //
|
---|
11 | // This library is distributed in the hope that it will be useful,
|
---|
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | // Lesser General Public License for more details.
|
---|
15 | //
|
---|
16 | // You should have received a copy of the GNU Lesser General Public
|
---|
17 | // License along with this library; if not, write to the Free Software
|
---|
18 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
19 | //
|
---|
20 |
|
---|
21 |
|
---|
22 | /*
|
---|
23 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
24 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
25 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
26 | * a choice of LGPL license versions is made available with the language indicating
|
---|
27 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
28 | * of the LGPL is applied is otherwise unspecified.
|
---|
29 | */
|
---|
30 | //#define CIRRUS_VESA3_PMINFO
|
---|
31 | #ifdef VBE
|
---|
32 | #undef CIRRUS_VESA3_PMINFO
|
---|
33 | #endif
|
---|
34 |
|
---|
35 | #define PM_BIOSMEM_CURRENT_MODE 0x449
|
---|
36 | #define PM_BIOSMEM_CRTC_ADDRESS 0x463
|
---|
37 | #define PM_BIOSMEM_VBE_MODE 0x4BA
|
---|
38 |
|
---|
39 | typedef struct
|
---|
40 | {
|
---|
41 | /* + 0 */
|
---|
42 | unsigned short mode;
|
---|
43 | unsigned short width;
|
---|
44 | unsigned short height;
|
---|
45 | unsigned short depth;
|
---|
46 | /* + 8 */
|
---|
47 | unsigned short hidden_dac; /* 0x3c6 */
|
---|
48 | unsigned short *seq; /* 0x3c4 */
|
---|
49 | unsigned short *graph; /* 0x3ce */
|
---|
50 | unsigned short *crtc; /* 0x3d4 */
|
---|
51 | /* +16 */
|
---|
52 | unsigned char bitsperpixel;
|
---|
53 | unsigned char vesacolortype;
|
---|
54 | unsigned char vesaredmask;
|
---|
55 | unsigned char vesaredpos;
|
---|
56 | unsigned char vesagreenmask;
|
---|
57 | unsigned char vesagreenpos;
|
---|
58 | unsigned char vesabluemask;
|
---|
59 | unsigned char vesabluepos;
|
---|
60 | /* +24 */
|
---|
61 | unsigned char vesareservedmask;
|
---|
62 | unsigned char vesareservedpos;
|
---|
63 | } cirrus_mode_t;
|
---|
64 | #define CIRRUS_MODE_SIZE 26
|
---|
65 |
|
---|
66 |
|
---|
67 | /* For VESA BIOS 3.0 */
|
---|
68 | #define CIRRUS_PM16INFO_SIZE 20
|
---|
69 |
|
---|
70 | /* VGA */
|
---|
71 | unsigned short cseq_vga[] = {0x0007,0xffff};
|
---|
72 | unsigned short cgraph_vga[] = {0x0009,0x000a,0x000b,0xffff};
|
---|
73 | unsigned short ccrtc_vga[] = {0x001a,0x001b,0x001d,0xffff};
|
---|
74 |
|
---|
75 | /* extensions */
|
---|
76 | unsigned short cgraph_svgacolor[] = {
|
---|
77 | 0x0000,0x0001,0x0002,0x0003,0x0004,0x4005,0x0506,0x0f07,0xff08,
|
---|
78 | 0x0009,0x000a,0x000b,
|
---|
79 | 0xffff
|
---|
80 | };
|
---|
81 | /* 640x480x8 */
|
---|
82 | unsigned short cseq_640x480x8[] = {
|
---|
83 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1107,
|
---|
84 | 0x580b,0x580c,0x580d,0x580e,
|
---|
85 | 0x0412,0x0013,0x2017,
|
---|
86 | 0x331b,0x331c,0x331d,0x331e,
|
---|
87 | 0xffff
|
---|
88 | };
|
---|
89 | unsigned short ccrtc_640x480x8[] = {
|
---|
90 | 0x2c11,
|
---|
91 | 0x5f00,0x4f01,0x4f02,0x8003,0x5204,0x1e05,0x0b06,0x3e07,
|
---|
92 | 0x4009,0x000c,0x000d,
|
---|
93 | 0xea10,0xdf12,0x5013,0x4014,0xdf15,0x0b16,0xc317,0xff18,
|
---|
94 | 0x001a,0x221b,0x001d,
|
---|
95 | 0xffff
|
---|
96 | };
|
---|
97 | /* 640x480x16 */
|
---|
98 | unsigned short cseq_640x480x16[] = {
|
---|
99 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1707,
|
---|
100 | 0x580b,0x580c,0x580d,0x580e,
|
---|
101 | 0x0412,0x0013,0x2017,
|
---|
102 | 0x331b,0x331c,0x331d,0x331e,
|
---|
103 | 0xffff
|
---|
104 | };
|
---|
105 | unsigned short ccrtc_640x480x16[] = {
|
---|
106 | 0x2c11,
|
---|
107 | 0x5f00,0x4f01,0x4f02,0x8003,0x5204,0x1e05,0x0b06,0x3e07,
|
---|
108 | 0x4009,0x000c,0x000d,
|
---|
109 | 0xea10,0xdf12,0xa013,0x4014,0xdf15,0x0b16,0xc317,0xff18,
|
---|
110 | 0x001a,0x221b,0x001d,
|
---|
111 | 0xffff
|
---|
112 | };
|
---|
113 | /* 640x480x24 */
|
---|
114 | unsigned short cseq_640x480x24[] = {
|
---|
115 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1507,
|
---|
116 | 0x580b,0x580c,0x580d,0x580e,
|
---|
117 | 0x0412,0x0013,0x2017,
|
---|
118 | 0x331b,0x331c,0x331d,0x331e,
|
---|
119 | 0xffff
|
---|
120 | };
|
---|
121 | unsigned short ccrtc_640x480x24[] = {
|
---|
122 | 0x2c11,
|
---|
123 | 0x5f00,0x4f01,0x4f02,0x8003,0x5204,0x1e05,0x0b06,0x3e07,
|
---|
124 | 0x4009,0x000c,0x000d,
|
---|
125 | 0xea10,0xdf12,0x0013,0x4014,0xdf15,0x0b16,0xc317,0xff18,
|
---|
126 | 0x001a,0x321b,0x001d,
|
---|
127 | 0xffff
|
---|
128 | };
|
---|
129 | /* 800x600x8 */
|
---|
130 | unsigned short cseq_800x600x8[] = {
|
---|
131 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1107,
|
---|
132 | 0x230b,0x230c,0x230d,0x230e,
|
---|
133 | 0x0412,0x0013,0x2017,
|
---|
134 | 0x141b,0x141c,0x141d,0x141e,
|
---|
135 | 0xffff
|
---|
136 | };
|
---|
137 | unsigned short ccrtc_800x600x8[] = {
|
---|
138 | 0x2311,0x7d00,0x6301,0x6302,0x8003,0x6b04,0x1a05,0x9806,0xf007,
|
---|
139 | 0x6009,0x000c,0x000d,
|
---|
140 | 0x7d10,0x5712,0x6413,0x4014,0x5715,0x9816,0xc317,0xff18,
|
---|
141 | 0x001a,0x221b,0x001d,
|
---|
142 | 0xffff
|
---|
143 | };
|
---|
144 | /* 800x600x16 */
|
---|
145 | unsigned short cseq_800x600x16[] = {
|
---|
146 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1707,
|
---|
147 | 0x230b,0x230c,0x230d,0x230e,
|
---|
148 | 0x0412,0x0013,0x2017,
|
---|
149 | 0x141b,0x141c,0x141d,0x141e,
|
---|
150 | 0xffff
|
---|
151 | };
|
---|
152 | unsigned short ccrtc_800x600x16[] = {
|
---|
153 | 0x2311,0x7d00,0x6301,0x6302,0x8003,0x6b04,0x1a05,0x9806,0xf007,
|
---|
154 | 0x6009,0x000c,0x000d,
|
---|
155 | 0x7d10,0x5712,0xc813,0x4014,0x5715,0x9816,0xc317,0xff18,
|
---|
156 | 0x001a,0x221b,0x001d,
|
---|
157 | 0xffff
|
---|
158 | };
|
---|
159 | /* 800x600x24 */
|
---|
160 | unsigned short cseq_800x600x24[] = {
|
---|
161 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1507,
|
---|
162 | 0x230b,0x230c,0x230d,0x230e,
|
---|
163 | 0x0412,0x0013,0x2017,
|
---|
164 | 0x141b,0x141c,0x141d,0x141e,
|
---|
165 | 0xffff
|
---|
166 | };
|
---|
167 | unsigned short ccrtc_800x600x24[] = {
|
---|
168 | 0x2311,0x7d00,0x6301,0x6302,0x8003,0x6b04,0x1a05,0x9806,0xf007,
|
---|
169 | 0x6009,0x000c,0x000d,
|
---|
170 | 0x7d10,0x5712,0x2c13,0x4014,0x5715,0x9816,0xc317,0xff18,
|
---|
171 | 0x001a,0x321b,0x001d,
|
---|
172 | 0xffff
|
---|
173 | };
|
---|
174 | /* 1024x768x8 */
|
---|
175 | unsigned short cseq_1024x768x8[] = {
|
---|
176 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1107,
|
---|
177 | 0x760b,0x760c,0x760d,0x760e,
|
---|
178 | 0x0412,0x0013,0x2017,
|
---|
179 | 0x341b,0x341c,0x341d,0x341e,
|
---|
180 | 0xffff
|
---|
181 | };
|
---|
182 | unsigned short ccrtc_1024x768x8[] = {
|
---|
183 | 0x2911,0xa300,0x7f01,0x7f02,0x8603,0x8304,0x9405,0x2406,0xf507,
|
---|
184 | 0x6009,0x000c,0x000d,
|
---|
185 | 0x0310,0xff12,0x8013,0x4014,0xff15,0x2416,0xc317,0xff18,
|
---|
186 | 0x001a,0x221b,0x001d,
|
---|
187 | 0xffff
|
---|
188 | };
|
---|
189 | /* 1024x768x16 */
|
---|
190 | unsigned short cseq_1024x768x16[] = {
|
---|
191 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1707,
|
---|
192 | 0x760b,0x760c,0x760d,0x760e,
|
---|
193 | 0x0412,0x0013,0x2017,
|
---|
194 | 0x341b,0x341c,0x341d,0x341e,
|
---|
195 | 0xffff
|
---|
196 | };
|
---|
197 | unsigned short ccrtc_1024x768x16[] = {
|
---|
198 | 0x2911,0xa300,0x7f01,0x7f02,0x8603,0x8304,0x9405,0x2406,0xf507,
|
---|
199 | 0x6009,0x000c,0x000d,
|
---|
200 | 0x0310,0xff12,0x0013,0x4014,0xff15,0x2416,0xc317,0xff18,
|
---|
201 | 0x001a,0x321b,0x001d,
|
---|
202 | 0xffff
|
---|
203 | };
|
---|
204 | /* 1024x768x24 */
|
---|
205 | unsigned short cseq_1024x768x24[] = {
|
---|
206 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1507,
|
---|
207 | 0x760b,0x760c,0x760d,0x760e,
|
---|
208 | 0x0412,0x0013,0x2017,
|
---|
209 | 0x341b,0x341c,0x341d,0x341e,
|
---|
210 | 0xffff
|
---|
211 | };
|
---|
212 | unsigned short ccrtc_1024x768x24[] = {
|
---|
213 | 0x2911,0xa300,0x7f01,0x7f02,0x8603,0x8304,0x9405,0x2406,0xf507,
|
---|
214 | 0x6009,0x000c,0x000d,
|
---|
215 | 0x0310,0xff12,0x8013,0x4014,0xff15,0x2416,0xc317,0xff18,
|
---|
216 | 0x001a,0x321b,0x001d,
|
---|
217 | 0xffff
|
---|
218 | };
|
---|
219 | /* 1280x1024x8 */
|
---|
220 | unsigned short cseq_1280x1024x8[] = {
|
---|
221 | 0x0300,0x2101,0x0f02,0x0003,0x0e04,0x1107,
|
---|
222 | 0x760b,0x760c,0x760d,0x760e,
|
---|
223 | 0x0412,0x0013,0x2017,
|
---|
224 | 0x341b,0x341c,0x341d,0x341e,
|
---|
225 | 0xffff
|
---|
226 | };
|
---|
227 | unsigned short ccrtc_1280x1024x8[] = {
|
---|
228 | 0x2911,0xc300,0x9f01,0x9f02,0x8603,0x8304,0x9405,0x2406,0xf707,
|
---|
229 | 0x6009,0x000c,0x000d,
|
---|
230 | 0x0310,0xff12,0xa013,0x4014,0xff15,0x2416,0xc317,0xff18,
|
---|
231 | 0x001a,0x221b,0x001d,
|
---|
232 | 0xffff
|
---|
233 | };
|
---|
234 |
|
---|
235 |
|
---|
236 | cirrus_mode_t cirrus_modes[] =
|
---|
237 | {
|
---|
238 | {0x5f,640,480,8,0x00,
|
---|
239 | cseq_640x480x8,cgraph_svgacolor,ccrtc_640x480x8,8,
|
---|
240 | 4,0,0,0,0,0,0,0,0},
|
---|
241 | {0x64,640,480,16,0xe1,
|
---|
242 | cseq_640x480x16,cgraph_svgacolor,ccrtc_640x480x16,16,
|
---|
243 | 6,5,11,6,5,5,0,0,0},
|
---|
244 | {0x66,640,480,15,0xf0,
|
---|
245 | cseq_640x480x16,cgraph_svgacolor,ccrtc_640x480x16,16,
|
---|
246 | 6,5,10,5,5,5,0,1,15},
|
---|
247 | {0x71,640,480,24,0xe5,
|
---|
248 | cseq_640x480x24,cgraph_svgacolor,ccrtc_640x480x24,24,
|
---|
249 | 6,8,16,8,8,8,0,0,0},
|
---|
250 |
|
---|
251 | {0x5c,800,600,8,0x00,
|
---|
252 | cseq_800x600x8,cgraph_svgacolor,ccrtc_800x600x8,8,
|
---|
253 | 4,0,0,0,0,0,0,0,0},
|
---|
254 | {0x65,800,600,16,0xe1,
|
---|
255 | cseq_800x600x16,cgraph_svgacolor,ccrtc_800x600x16,16,
|
---|
256 | 6,5,11,6,5,5,0,0,0},
|
---|
257 | {0x67,800,600,15,0xf0,
|
---|
258 | cseq_800x600x16,cgraph_svgacolor,ccrtc_800x600x16,16,
|
---|
259 | 6,5,10,5,5,5,0,1,15},
|
---|
260 |
|
---|
261 | {0x60,1024,768,8,0x00,
|
---|
262 | cseq_1024x768x8,cgraph_svgacolor,ccrtc_1024x768x8,8,
|
---|
263 | 4,0,0,0,0,0,0,0,0},
|
---|
264 | {0x74,1024,768,16,0xe1,
|
---|
265 | cseq_1024x768x16,cgraph_svgacolor,ccrtc_1024x768x16,16,
|
---|
266 | 6,5,11,6,5,5,0,0,0},
|
---|
267 | {0x68,1024,768,15,0xf0,
|
---|
268 | cseq_1024x768x16,cgraph_svgacolor,ccrtc_1024x768x16,16,
|
---|
269 | 6,5,10,5,5,5,0,1,15},
|
---|
270 |
|
---|
271 | {0x78,800,600,24,0xe5,
|
---|
272 | cseq_800x600x24,cgraph_svgacolor,ccrtc_800x600x24,24,
|
---|
273 | 6,8,16,8,8,8,0,0,0},
|
---|
274 | {0x79,1024,768,24,0xe5,
|
---|
275 | cseq_1024x768x24,cgraph_svgacolor,ccrtc_1024x768x24,24,
|
---|
276 | 6,8,16,8,8,8,0,0,0},
|
---|
277 |
|
---|
278 | {0x6d,1280,1024,8,0x00,
|
---|
279 | cseq_1280x1024x8,cgraph_svgacolor,ccrtc_1280x1024x8,8,
|
---|
280 | 4,0,0,0,0,0,0,0,0},
|
---|
281 |
|
---|
282 | {0xfe,0,0,0,0,cseq_vga,cgraph_vga,ccrtc_vga,0,
|
---|
283 | 0xff,0,0,0,0,0,0,0,0},
|
---|
284 | {0xff,0,0,0,0,0,0,0,0,
|
---|
285 | 0xff,0,0,0,0,0,0,0,0},
|
---|
286 | };
|
---|
287 |
|
---|
288 | unsigned char cirrus_id_table[] = {
|
---|
289 | // 5430
|
---|
290 | 0xA0, 0x32,
|
---|
291 | // 5446
|
---|
292 | 0xB8, 0x39,
|
---|
293 |
|
---|
294 | 0xff, 0xff
|
---|
295 | };
|
---|
296 |
|
---|
297 |
|
---|
298 | unsigned short cirrus_vesa_modelist[] = {
|
---|
299 | // 640x480x8
|
---|
300 | 0x101, 0x5f,
|
---|
301 | // 640x480x15
|
---|
302 | 0x110, 0x66,
|
---|
303 | // 640x480x16
|
---|
304 | 0x111, 0x64,
|
---|
305 | // 640x480x24
|
---|
306 | 0x112, 0x71,
|
---|
307 | // 800x600x8
|
---|
308 | 0x103, 0x5c,
|
---|
309 | // 800x600x15
|
---|
310 | 0x113, 0x67,
|
---|
311 | // 800x600x16
|
---|
312 | 0x114, 0x65,
|
---|
313 | // 800x600x24
|
---|
314 | 0x115, 0x78,
|
---|
315 | // 1024x768x8
|
---|
316 | 0x105, 0x60,
|
---|
317 | // 1024x768x15
|
---|
318 | 0x116, 0x68,
|
---|
319 | // 1024x768x16
|
---|
320 | 0x117, 0x74,
|
---|
321 | // 1024x768x24
|
---|
322 | //0x118, 0x79,
|
---|
323 | // 1280x1024x8
|
---|
324 | 0x107, 0x6d,
|
---|
325 | // invalid
|
---|
326 | 0xffff,0xffff
|
---|
327 | };
|
---|
328 |
|
---|
329 |
|
---|
330 | ASM_START
|
---|
331 |
|
---|
332 | cirrus_installed:
|
---|
333 | .ascii "cirrus-compatible VGA is detected"
|
---|
334 | .byte 0x0d,0x0a
|
---|
335 | .byte 0x0d,0x0a,0x00
|
---|
336 |
|
---|
337 | cirrus_not_installed:
|
---|
338 | .ascii "cirrus-compatible VGA is not detected"
|
---|
339 | .byte 0x0d,0x0a
|
---|
340 | .byte 0x0d,0x0a,0x00
|
---|
341 |
|
---|
342 | cirrus_vesa_vendorname:
|
---|
343 | cirrus_vesa_productname:
|
---|
344 | cirrus_vesa_oemname:
|
---|
345 | .ascii "VGABIOS Cirrus extension"
|
---|
346 | .byte 0
|
---|
347 | cirrus_vesa_productrevision:
|
---|
348 | .ascii "1.0"
|
---|
349 | .byte 0
|
---|
350 |
|
---|
351 | cirrus_init:
|
---|
352 | call cirrus_check
|
---|
353 | jnz no_cirrus
|
---|
354 | SET_INT_VECTOR(0x10, #0xC000, #cirrus_int10_handler)
|
---|
355 | mov al, #0x0f ; memory setup
|
---|
356 | mov dx, #0x3C4
|
---|
357 | out dx, al
|
---|
358 | inc dx
|
---|
359 | in al, dx
|
---|
360 | and al, #0x18
|
---|
361 | mov ah, al
|
---|
362 | mov al, #0x0a
|
---|
363 | dec dx
|
---|
364 | out dx, ax
|
---|
365 | mov ax, #0x0007 ; set vga mode
|
---|
366 | out dx, ax
|
---|
367 | mov ax, #0x0431 ; reset bitblt
|
---|
368 | mov dx, #0x3CE
|
---|
369 | out dx, ax
|
---|
370 | mov ax, #0x0031
|
---|
371 | out dx, ax
|
---|
372 | no_cirrus:
|
---|
373 | ret
|
---|
374 |
|
---|
375 | cirrus_display_info:
|
---|
376 | push ds
|
---|
377 | push si
|
---|
378 | push cs
|
---|
379 | pop ds
|
---|
380 | call cirrus_check
|
---|
381 | mov si, #cirrus_not_installed
|
---|
382 | jnz cirrus_msgnotinstalled
|
---|
383 | mov si, #cirrus_installed
|
---|
384 |
|
---|
385 | cirrus_msgnotinstalled:
|
---|
386 | call _display_string
|
---|
387 | pop si
|
---|
388 | pop ds
|
---|
389 | ret
|
---|
390 |
|
---|
391 | cirrus_check:
|
---|
392 | push ax
|
---|
393 | push dx
|
---|
394 | mov ax, #0x9206
|
---|
395 | mov dx, #0x3C4
|
---|
396 | out dx, ax
|
---|
397 | inc dx
|
---|
398 | in al, dx
|
---|
399 | cmp al, #0x12
|
---|
400 | pop dx
|
---|
401 | pop ax
|
---|
402 | ret
|
---|
403 |
|
---|
404 |
|
---|
405 | cirrus_int10_handler:
|
---|
406 | pushf
|
---|
407 | push bp
|
---|
408 | cmp ah, #0x00 ;; set video mode
|
---|
409 | jz cirrus_set_video_mode
|
---|
410 | cmp ah, #0x12 ;; cirrus extension
|
---|
411 | jz cirrus_extbios
|
---|
412 | cmp ah, #0x4F ;; VESA extension
|
---|
413 | jz cirrus_vesa
|
---|
414 |
|
---|
415 | cirrus_unhandled:
|
---|
416 | pop bp
|
---|
417 | popf
|
---|
418 | jmp vgabios_int10_handler
|
---|
419 |
|
---|
420 | cirrus_return:
|
---|
421 | #ifdef CIRRUS_DEBUG
|
---|
422 | call cirrus_debug_dump
|
---|
423 | #endif
|
---|
424 | pop bp
|
---|
425 | popf
|
---|
426 | iret
|
---|
427 |
|
---|
428 | cirrus_set_video_mode:
|
---|
429 | #ifdef CIRRUS_DEBUG
|
---|
430 | call cirrus_debug_dump
|
---|
431 | #endif
|
---|
432 | push si
|
---|
433 | push ax
|
---|
434 | push bx
|
---|
435 | push ds
|
---|
436 | #ifdef CIRRUS_VESA3_PMINFO
|
---|
437 | db 0x2e ;; cs:
|
---|
438 | mov si, [cirrus_vesa_sel0000_data]
|
---|
439 | #else
|
---|
440 | xor si, si
|
---|
441 | #endif
|
---|
442 | mov ds, si
|
---|
443 | xor bx, bx
|
---|
444 | mov [PM_BIOSMEM_VBE_MODE], bx
|
---|
445 | pop ds
|
---|
446 | pop bx
|
---|
447 | call cirrus_get_modeentry
|
---|
448 | jnc cirrus_set_video_mode_extended
|
---|
449 | mov al, #0xfe
|
---|
450 | call cirrus_get_modeentry_nomask
|
---|
451 | call cirrus_switch_mode
|
---|
452 | pop ax
|
---|
453 | pop si
|
---|
454 | jmp cirrus_unhandled
|
---|
455 |
|
---|
456 | cirrus_extbios:
|
---|
457 | #ifdef CIRRUS_DEBUG
|
---|
458 | call cirrus_debug_dump
|
---|
459 | #endif
|
---|
460 | cmp bl, #0x80
|
---|
461 | jb cirrus_unhandled
|
---|
462 | cmp bl, #0xAF
|
---|
463 | ja cirrus_unhandled
|
---|
464 | push bx
|
---|
465 | and bx, #0x7F
|
---|
466 | shl bx, 1
|
---|
467 | db 0x2e ;; cs:
|
---|
468 | mov bp, cirrus_extbios_handlers[bx]
|
---|
469 | pop bx
|
---|
470 | push #cirrus_return
|
---|
471 | push bp
|
---|
472 | ret
|
---|
473 |
|
---|
474 | cirrus_vesa:
|
---|
475 | #ifdef CIRRUS_DEBUG
|
---|
476 | call cirrus_debug_dump
|
---|
477 | #endif
|
---|
478 | cmp al, #0x0F
|
---|
479 | ja cirrus_vesa_not_handled
|
---|
480 | push bx
|
---|
481 | xor bx, bx
|
---|
482 | mov bl, al
|
---|
483 | shl bx, 1
|
---|
484 | db 0x2e ;; cs:
|
---|
485 | mov bp, cirrus_vesa_handlers[bx]
|
---|
486 | pop bx
|
---|
487 | push #cirrus_return
|
---|
488 | push bp
|
---|
489 | ret
|
---|
490 |
|
---|
491 | cirrus_vesa_not_handled:
|
---|
492 | mov ax, #0x014F ;; not implemented
|
---|
493 | jmp cirrus_return
|
---|
494 |
|
---|
495 | #ifdef CIRRUS_DEBUG
|
---|
496 | cirrus_debug_dump:
|
---|
497 | push es
|
---|
498 | push ds
|
---|
499 | pusha
|
---|
500 | push cs
|
---|
501 | pop ds
|
---|
502 | call _cirrus_debugmsg
|
---|
503 | popa
|
---|
504 | pop ds
|
---|
505 | pop es
|
---|
506 | ret
|
---|
507 | #endif
|
---|
508 |
|
---|
509 | cirrus_set_video_mode_extended:
|
---|
510 | call cirrus_switch_mode
|
---|
511 | pop ax ;; mode
|
---|
512 | and al, #0x7f
|
---|
513 |
|
---|
514 | push ds
|
---|
515 | #ifdef CIRRUS_VESA3_PMINFO
|
---|
516 | db 0x2e ;; cs:
|
---|
517 | mov si, [cirrus_vesa_sel0000_data]
|
---|
518 | #else
|
---|
519 | xor si, si
|
---|
520 | #endif
|
---|
521 | mov ds, si
|
---|
522 | mov [PM_BIOSMEM_CURRENT_MODE], al
|
---|
523 | pop ds
|
---|
524 |
|
---|
525 | mov al, #0x20
|
---|
526 |
|
---|
527 | pop si
|
---|
528 | jmp cirrus_return
|
---|
529 |
|
---|
530 | cirrus_vesa_pmbios_init:
|
---|
531 | retf
|
---|
532 | cirrus_vesa_pmbios_entry:
|
---|
533 | pushf
|
---|
534 | push bp
|
---|
535 | cmp ah, #0x4F
|
---|
536 | jnz cirrus_vesa_pmbios_unimplemented
|
---|
537 | cmp al, #0x0F
|
---|
538 | ja cirrus_vesa_pmbios_unimplemented
|
---|
539 | push bx
|
---|
540 | xor bx, bx
|
---|
541 | mov bl, al
|
---|
542 | shl bx, 1
|
---|
543 | db 0x2e ;; cs:
|
---|
544 | mov bp, cirrus_vesa_handlers[bx]
|
---|
545 | pop bx
|
---|
546 | push #cirrus_vesa_pmbios_return
|
---|
547 | push bp
|
---|
548 | ret
|
---|
549 | cirrus_vesa_pmbios_unimplemented:
|
---|
550 | mov ax, #0x014F
|
---|
551 | cirrus_vesa_pmbios_return:
|
---|
552 | pop bp
|
---|
553 | popf
|
---|
554 | retf
|
---|
555 |
|
---|
556 | ; in si:mode table
|
---|
557 | cirrus_switch_mode:
|
---|
558 | push ds
|
---|
559 | push bx
|
---|
560 | push dx
|
---|
561 | push cs
|
---|
562 | pop ds
|
---|
563 |
|
---|
564 | mov bx, [si+10] ;; seq
|
---|
565 | mov dx, #0x3c4
|
---|
566 | mov ax, #0x1206
|
---|
567 | out dx, ax ;; Unlock cirrus special
|
---|
568 | call cirrus_switch_mode_setregs
|
---|
569 |
|
---|
570 | mov bx, [si+12] ;; graph
|
---|
571 | mov dx, #0x3ce
|
---|
572 | call cirrus_switch_mode_setregs
|
---|
573 |
|
---|
574 | mov bx, [si+14] ;; crtc
|
---|
575 | call cirrus_get_crtc
|
---|
576 | call cirrus_switch_mode_setregs
|
---|
577 |
|
---|
578 | mov dx, #0x3c6
|
---|
579 | mov al, #0x00
|
---|
580 | out dx, al
|
---|
581 | in al, dx
|
---|
582 | in al, dx
|
---|
583 | in al, dx
|
---|
584 | in al, dx
|
---|
585 | mov al, [si+8] ;; hidden dac
|
---|
586 | out dx, al
|
---|
587 | mov al, #0xff
|
---|
588 | out dx, al
|
---|
589 |
|
---|
590 | mov al, #0x00
|
---|
591 | mov bl, [si+17] ;; memory model
|
---|
592 | or bl, bl
|
---|
593 | jz is_text_mode
|
---|
594 | mov al, #0x01
|
---|
595 | cmp bl, #0x03
|
---|
596 | jnz is_text_mode
|
---|
597 | or al, #0x40
|
---|
598 | is_text_mode:
|
---|
599 | mov bl, #0x10
|
---|
600 | call biosfn_get_single_palette_reg
|
---|
601 | and bh, #0xfe
|
---|
602 | or bh, al
|
---|
603 | call biosfn_set_single_palette_reg
|
---|
604 |
|
---|
605 | pop dx
|
---|
606 | pop bx
|
---|
607 | pop ds
|
---|
608 | ret
|
---|
609 |
|
---|
610 | cirrus_enable_16k_granularity:
|
---|
611 | push ax
|
---|
612 | push dx
|
---|
613 | mov dx, #0x3ce
|
---|
614 | mov al, #0x0b
|
---|
615 | out dx, al
|
---|
616 | inc dx
|
---|
617 | in al, dx
|
---|
618 | or al, #0x20 ;; enable 16k
|
---|
619 | out dx, al
|
---|
620 | pop dx
|
---|
621 | pop ax
|
---|
622 | ret
|
---|
623 |
|
---|
624 | cirrus_switch_mode_setregs:
|
---|
625 | csms_1:
|
---|
626 | mov ax, [bx]
|
---|
627 | cmp ax, #0xffff
|
---|
628 | jz csms_2
|
---|
629 | out dx, ax
|
---|
630 | add bx, #0x2
|
---|
631 | jmp csms_1
|
---|
632 | csms_2:
|
---|
633 | ret
|
---|
634 |
|
---|
635 | cirrus_extbios_80h:
|
---|
636 | push dx
|
---|
637 | call cirrus_get_crtc
|
---|
638 | mov al, #0x27
|
---|
639 | out dx, al
|
---|
640 | inc dx
|
---|
641 | in al, dx
|
---|
642 | mov bx, #_cirrus_id_table
|
---|
643 | c80h_1:
|
---|
644 | db 0x2e ;; cs:
|
---|
645 | mov ah, [bx]
|
---|
646 | cmp ah, al
|
---|
647 | jz c80h_2
|
---|
648 | cmp ah, #0xff
|
---|
649 | jz c80h_2
|
---|
650 | inc bx
|
---|
651 | inc bx
|
---|
652 | jmp c80h_1
|
---|
653 | c80h_2:
|
---|
654 | db 0x2e ;; cs:
|
---|
655 | mov al, 0x1[bx]
|
---|
656 | pop dx
|
---|
657 | mov ah, #0x00
|
---|
658 | xor bx, bx
|
---|
659 | ret
|
---|
660 |
|
---|
661 | cirrus_extbios_81h:
|
---|
662 | mov ax, #0x100 ;; XXX
|
---|
663 | ret
|
---|
664 | cirrus_extbios_82h:
|
---|
665 | push dx
|
---|
666 | call cirrus_get_crtc
|
---|
667 | xor ax, ax
|
---|
668 | mov al, #0x27
|
---|
669 | out dx, al
|
---|
670 | inc dx
|
---|
671 | in al, dx
|
---|
672 | and al, #0x03
|
---|
673 | mov ah, #0xAF
|
---|
674 | pop dx
|
---|
675 | ret
|
---|
676 |
|
---|
677 | cirrus_extbios_85h:
|
---|
678 | push cx
|
---|
679 | push dx
|
---|
680 | mov dx, #0x3C4
|
---|
681 | mov al, #0x0f ;; get DRAM band width
|
---|
682 | out dx, al
|
---|
683 | inc dx
|
---|
684 | in al, dx
|
---|
685 | ;; al = 4 << bandwidth
|
---|
686 | mov cl, al
|
---|
687 | shr cl, #0x03
|
---|
688 | and cl, #0x03
|
---|
689 | cmp cl, #0x03
|
---|
690 | je c85h2
|
---|
691 | mov al, #0x04
|
---|
692 | shl al, cl
|
---|
693 | jmp c85h3
|
---|
694 | c85h2:
|
---|
695 | ;; 4MB or 2MB
|
---|
696 | and al, #0x80
|
---|
697 | mov al, #0x20 ;; 2 MB
|
---|
698 | je c85h3
|
---|
699 | mov al, #0x40 ;; 4 MB
|
---|
700 | c85h3:
|
---|
701 | pop dx
|
---|
702 | pop cx
|
---|
703 | ret
|
---|
704 |
|
---|
705 | cirrus_extbios_9Ah:
|
---|
706 | mov ax, #0x4060
|
---|
707 | mov cx, #0x1132
|
---|
708 | ret
|
---|
709 |
|
---|
710 | cirrus_extbios_A0h:
|
---|
711 | call cirrus_get_modeentry
|
---|
712 | mov ah, #0x01
|
---|
713 | sbb ah, #0x00
|
---|
714 | mov bx, cirrus_extbios_A0h_callback
|
---|
715 | mov si, #0xffff
|
---|
716 | mov di, bx
|
---|
717 | mov ds, bx
|
---|
718 | mov es, bx
|
---|
719 | ret
|
---|
720 |
|
---|
721 | cirrus_extbios_A0h_callback:
|
---|
722 | ;; fatal: not implemented yet
|
---|
723 | cli
|
---|
724 | hlt
|
---|
725 | retf
|
---|
726 |
|
---|
727 | cirrus_extbios_A1h:
|
---|
728 | mov bx, #0x0E00 ;; IBM 8512/8513, color
|
---|
729 | ret
|
---|
730 |
|
---|
731 | cirrus_extbios_A2h:
|
---|
732 | mov al, #0x07 ;; HSync 31.5 - 64.0 kHz
|
---|
733 | ret
|
---|
734 |
|
---|
735 | cirrus_extbios_AEh:
|
---|
736 | mov al, #0x01 ;; High Refresh 75Hz
|
---|
737 | ret
|
---|
738 |
|
---|
739 | cirrus_extbios_unimplemented:
|
---|
740 | ret
|
---|
741 |
|
---|
742 | cirrus_vesa_00h:
|
---|
743 | push ds
|
---|
744 | push si
|
---|
745 | mov bp, di
|
---|
746 | push es
|
---|
747 | pop ds
|
---|
748 | cld
|
---|
749 | mov ax, [di]
|
---|
750 | cmp ax, #0x4256 ;; VB
|
---|
751 | jnz cv00_1
|
---|
752 | mov ax, [di+2]
|
---|
753 | cmp ax, #0x3245 ;; E2
|
---|
754 | jnz cv00_1
|
---|
755 | ;; VBE2
|
---|
756 | lea di, 0x14[bp]
|
---|
757 | mov ax, #0x0100 ;; soft ver.
|
---|
758 | stosw
|
---|
759 | mov ax, # cirrus_vesa_vendorname
|
---|
760 | stosw
|
---|
761 | mov ax, cs
|
---|
762 | stosw
|
---|
763 | mov ax, # cirrus_vesa_productname
|
---|
764 | stosw
|
---|
765 | mov ax, cs
|
---|
766 | stosw
|
---|
767 | mov ax, # cirrus_vesa_productrevision
|
---|
768 | stosw
|
---|
769 | mov ax, cs
|
---|
770 | stosw
|
---|
771 | cv00_1:
|
---|
772 | mov di, bp
|
---|
773 | mov ax, #0x4556 ;; VE
|
---|
774 | stosw
|
---|
775 | mov ax, #0x4153 ;; SA
|
---|
776 | stosw
|
---|
777 | mov ax, #0x0200 ;; v2.00
|
---|
778 | stosw
|
---|
779 | mov ax, # cirrus_vesa_oemname
|
---|
780 | stosw
|
---|
781 | mov ax, cs
|
---|
782 | stosw
|
---|
783 | xor ax, ax ;; caps
|
---|
784 | stosw
|
---|
785 | stosw
|
---|
786 | lea ax, 0x40[bp]
|
---|
787 | stosw
|
---|
788 | mov ax, es
|
---|
789 | stosw
|
---|
790 | call cirrus_extbios_85h ;; vram in 64k
|
---|
791 | mov ah, #0x00
|
---|
792 | stosw
|
---|
793 |
|
---|
794 | push cs
|
---|
795 | pop ds
|
---|
796 | lea di, 0x40[bp]
|
---|
797 | mov si, #_cirrus_vesa_modelist
|
---|
798 | cv00_2:
|
---|
799 | lodsw
|
---|
800 | stosw
|
---|
801 | add si, #2
|
---|
802 | cmp ax, #0xffff
|
---|
803 | jnz cv00_2
|
---|
804 |
|
---|
805 | mov ax, #0x004F
|
---|
806 | mov di, bp
|
---|
807 | pop si
|
---|
808 | pop ds
|
---|
809 | ret
|
---|
810 |
|
---|
811 | cirrus_vesa_01h:
|
---|
812 | mov ax, cx
|
---|
813 | and ax, #0x3fff
|
---|
814 | call cirrus_vesamode_to_mode
|
---|
815 | cmp ax, #0xffff
|
---|
816 | jnz cirrus_vesa_01h_1
|
---|
817 | jmp cirrus_vesa_unimplemented
|
---|
818 | cirrus_vesa_01h_1:
|
---|
819 | push ds
|
---|
820 | push si
|
---|
821 | push cx
|
---|
822 | push dx
|
---|
823 | push bx
|
---|
824 | mov bp, di
|
---|
825 | cld
|
---|
826 | push cs
|
---|
827 | pop ds
|
---|
828 | call cirrus_get_modeentry_nomask
|
---|
829 |
|
---|
830 | push di
|
---|
831 | xor ax, ax
|
---|
832 | mov cx, #0x80
|
---|
833 | rep
|
---|
834 | stosw ;; clear buffer
|
---|
835 | pop di
|
---|
836 |
|
---|
837 | mov ax, #0x003b ;; mode
|
---|
838 | stosw
|
---|
839 | mov ax, #0x0007 ;; attr
|
---|
840 | stosw
|
---|
841 | mov ax, #0x0010 ;; granularity =16K
|
---|
842 | stosw
|
---|
843 | mov ax, #0x0040 ;; size =64K
|
---|
844 | stosw
|
---|
845 | mov ax, #0xA000 ;; segment A
|
---|
846 | stosw
|
---|
847 | xor ax, ax ;; no segment B
|
---|
848 | stosw
|
---|
849 | mov ax, #cirrus_vesa_05h_farentry
|
---|
850 | stosw
|
---|
851 | mov ax, cs
|
---|
852 | stosw
|
---|
853 | call cirrus_get_line_offset_entry
|
---|
854 | stosw ;; bytes per scan line
|
---|
855 | mov ax, [si+2] ;; width
|
---|
856 | stosw
|
---|
857 | mov ax, [si+4] ;; height
|
---|
858 | stosw
|
---|
859 | mov ax, #0x08
|
---|
860 | stosb
|
---|
861 | mov ax, #0x10
|
---|
862 | stosb
|
---|
863 | mov al, #1 ;; count of planes
|
---|
864 | stosb
|
---|
865 | mov al, [si+6] ;; bpp
|
---|
866 | stosb
|
---|
867 | mov al, #0x1 ;; XXX number of banks
|
---|
868 | stosb
|
---|
869 | mov al, [si+17]
|
---|
870 | stosb ;; memory model
|
---|
871 | mov al, #0x0 ;; XXX size of bank in K
|
---|
872 | stosb
|
---|
873 | call cirrus_get_line_offset_entry
|
---|
874 | mov bx, [si+4]
|
---|
875 | mul bx ;; dx:ax=vramdisp
|
---|
876 | or ax, ax
|
---|
877 | jz cirrus_vesa_01h_3
|
---|
878 | inc dx
|
---|
879 | cirrus_vesa_01h_3:
|
---|
880 | call cirrus_extbios_85h ;; al=vram in 64k
|
---|
881 | mov ah, #0x00
|
---|
882 | mov cx, dx
|
---|
883 | xor dx, dx
|
---|
884 | div cx
|
---|
885 | dec ax
|
---|
886 | stosb ;; number of image pages = vramtotal/vramdisp-1
|
---|
887 | mov al, #0x00
|
---|
888 | stosb
|
---|
889 |
|
---|
890 | ;; v1.2+ stuffs
|
---|
891 | push si
|
---|
892 | add si, #18
|
---|
893 | movsw
|
---|
894 | movsw
|
---|
895 | movsw
|
---|
896 | movsw
|
---|
897 | pop si
|
---|
898 |
|
---|
899 | mov ah, [si+16]
|
---|
900 | mov al, #0x0
|
---|
901 | sub ah, #9
|
---|
902 | rcl al, #1 ; bit 0=palette flag
|
---|
903 | stosb ;; direct screen mode info
|
---|
904 |
|
---|
905 | ;; v2.0+ stuffs
|
---|
906 | ;; 32-bit LFB address
|
---|
907 | xor ax, ax
|
---|
908 | stosw
|
---|
909 | call cirrus_get_lfb_addr
|
---|
910 | stosw
|
---|
911 | or ax, ax
|
---|
912 | jz cirrus_vesa_01h_4
|
---|
913 | push di
|
---|
914 | mov di, bp
|
---|
915 | db 0x26 ;; es:
|
---|
916 | mov ax, [di]
|
---|
917 | or ax, #0x0080 ;; mode bit 7:LFB
|
---|
918 | stosw
|
---|
919 | pop di
|
---|
920 | cirrus_vesa_01h_4:
|
---|
921 |
|
---|
922 | xor ax, ax
|
---|
923 | stosw ; reserved
|
---|
924 | stosw ; reserved
|
---|
925 | stosw ; reserved
|
---|
926 |
|
---|
927 | mov ax, #0x004F
|
---|
928 | mov di, bp
|
---|
929 | pop bx
|
---|
930 | pop dx
|
---|
931 | pop cx
|
---|
932 | pop si
|
---|
933 | pop ds
|
---|
934 |
|
---|
935 | test cx, #0x4000 ;; LFB flag
|
---|
936 | jz cirrus_vesa_01h_5
|
---|
937 | push cx
|
---|
938 | db 0x26 ;; es:
|
---|
939 | mov cx, [di]
|
---|
940 | cmp cx, #0x0080 ;; is LFB supported?
|
---|
941 | jnz cirrus_vesa_01h_6
|
---|
942 | mov ax, #0x014F ;; error - no LFB
|
---|
943 | cirrus_vesa_01h_6:
|
---|
944 | pop cx
|
---|
945 | cirrus_vesa_01h_5:
|
---|
946 | ret
|
---|
947 |
|
---|
948 | cirrus_vesa_02h:
|
---|
949 | ;; XXX support CRTC registers
|
---|
950 | test bx, #0x3e00
|
---|
951 | jnz cirrus_vesa_02h_2 ;; unknown flags
|
---|
952 | mov ax, bx
|
---|
953 | and ax, #0x1ff ;; bit 8-0 mode
|
---|
954 | cmp ax, #0x100 ;; legacy VGA mode
|
---|
955 | jb cirrus_vesa_02h_legacy
|
---|
956 | call cirrus_vesamode_to_mode
|
---|
957 | cmp ax, #0xffff
|
---|
958 | jnz cirrus_vesa_02h_1
|
---|
959 | cirrus_vesa_02h_2:
|
---|
960 | jmp cirrus_vesa_unimplemented
|
---|
961 | cirrus_vesa_02h_legacy:
|
---|
962 | #ifdef CIRRUS_VESA3_PMINFO
|
---|
963 | db 0x2e ;; cs:
|
---|
964 | cmp byte ptr [cirrus_vesa_is_protected_mode], #0
|
---|
965 | jnz cirrus_vesa_02h_2
|
---|
966 | #endif // CIRRUS_VESA3_PMINFO
|
---|
967 | int #0x10
|
---|
968 | mov ax, #0x004F
|
---|
969 | ret
|
---|
970 | cirrus_vesa_02h_1:
|
---|
971 | push si
|
---|
972 | push ax
|
---|
973 | call cirrus_get_modeentry_nomask
|
---|
974 | call cirrus_switch_mode
|
---|
975 | test bx, #0x4000 ;; LFB
|
---|
976 | jnz cirrus_vesa_02h_3
|
---|
977 | call cirrus_enable_16k_granularity
|
---|
978 | cirrus_vesa_02h_3:
|
---|
979 | pop ax
|
---|
980 | push ds
|
---|
981 | #ifdef CIRRUS_VESA3_PMINFO
|
---|
982 | db 0x2e ;; cs:
|
---|
983 | mov si, [cirrus_vesa_sel0000_data]
|
---|
984 | #else
|
---|
985 | xor si, si
|
---|
986 | #endif
|
---|
987 | mov ds, si
|
---|
988 | mov [PM_BIOSMEM_CURRENT_MODE], al
|
---|
989 | mov [PM_BIOSMEM_VBE_MODE], bx
|
---|
990 | pop ds
|
---|
991 | pop si
|
---|
992 | mov ax, #0x004F
|
---|
993 | ret
|
---|
994 |
|
---|
995 | cirrus_vesa_03h:
|
---|
996 | push ds
|
---|
997 | #ifdef CIRRUS_VESA3_PMINFO
|
---|
998 | db 0x2e ;; cs:
|
---|
999 | mov ax, [cirrus_vesa_sel0000_data]
|
---|
1000 | #else
|
---|
1001 | xor ax, ax
|
---|
1002 | #endif
|
---|
1003 | mov ds, ax
|
---|
1004 | mov bx, # PM_BIOSMEM_VBE_MODE
|
---|
1005 | mov ax, [bx]
|
---|
1006 | mov bx, ax
|
---|
1007 | test bx, bx
|
---|
1008 | jnz cirrus_vesa_03h_1
|
---|
1009 | mov bx, # PM_BIOSMEM_CURRENT_MODE
|
---|
1010 | mov al, [bx]
|
---|
1011 | mov bl, al
|
---|
1012 | xor bh, bh
|
---|
1013 | cirrus_vesa_03h_1:
|
---|
1014 | mov ax, #0x004f
|
---|
1015 | pop ds
|
---|
1016 | ret
|
---|
1017 |
|
---|
1018 | cirrus_vesa_05h_farentry:
|
---|
1019 | call cirrus_vesa_05h
|
---|
1020 | retf
|
---|
1021 |
|
---|
1022 | cirrus_vesa_05h:
|
---|
1023 | cmp bl, #0x01
|
---|
1024 | ja cirrus_vesa_05h_1
|
---|
1025 | cmp bh, #0x00
|
---|
1026 | jz cirrus_vesa_05h_setmempage
|
---|
1027 | cmp bh, #0x01
|
---|
1028 | jz cirrus_vesa_05h_getmempage
|
---|
1029 | cirrus_vesa_05h_1:
|
---|
1030 | jmp cirrus_vesa_unimplemented
|
---|
1031 | cirrus_vesa_05h_setmempage:
|
---|
1032 | or dh, dh ; address must be < 0x100
|
---|
1033 | jnz cirrus_vesa_05h_1
|
---|
1034 | push dx
|
---|
1035 | mov al, bl ;; bl=bank number
|
---|
1036 | add al, #0x09
|
---|
1037 | mov ah, dl ;; dx=window address in granularity
|
---|
1038 | mov dx, #0x3ce
|
---|
1039 | out dx, ax
|
---|
1040 | pop dx
|
---|
1041 | mov ax, #0x004F
|
---|
1042 | ret
|
---|
1043 | cirrus_vesa_05h_getmempage:
|
---|
1044 | mov al, bl ;; bl=bank number
|
---|
1045 | add al, #0x09
|
---|
1046 | mov dx, #0x3ce
|
---|
1047 | out dx, al
|
---|
1048 | inc dx
|
---|
1049 | in al, dx
|
---|
1050 | xor dx, dx
|
---|
1051 | mov dl, al ;; dx=window address in granularity
|
---|
1052 | mov ax, #0x004F
|
---|
1053 | ret
|
---|
1054 |
|
---|
1055 | cirrus_vesa_06h:
|
---|
1056 | mov ax, cx
|
---|
1057 | cmp bl, #0x01
|
---|
1058 | je cirrus_vesa_06h_3
|
---|
1059 | cmp bl, #0x02
|
---|
1060 | je cirrus_vesa_06h_2
|
---|
1061 | jb cirrus_vesa_06h_1
|
---|
1062 | mov ax, #0x0100
|
---|
1063 | ret
|
---|
1064 | cirrus_vesa_06h_1:
|
---|
1065 | call cirrus_get_bpp_bytes
|
---|
1066 | mov bl, al
|
---|
1067 | xor bh, bh
|
---|
1068 | mov ax, cx
|
---|
1069 | mul bx
|
---|
1070 | cirrus_vesa_06h_2:
|
---|
1071 | call cirrus_set_line_offset
|
---|
1072 | cirrus_vesa_06h_3:
|
---|
1073 | call cirrus_get_bpp_bytes
|
---|
1074 | mov bl, al
|
---|
1075 | xor bh, bh
|
---|
1076 | xor dx, dx
|
---|
1077 | call cirrus_get_line_offset
|
---|
1078 | push ax
|
---|
1079 | div bx
|
---|
1080 | mov cx, ax
|
---|
1081 | pop bx
|
---|
1082 | call cirrus_extbios_85h ;; al=vram in 64k
|
---|
1083 | xor dx, dx
|
---|
1084 | mov dl, al
|
---|
1085 | xor ax, ax
|
---|
1086 | div bx
|
---|
1087 | mov dx, ax
|
---|
1088 | mov ax, #0x004f
|
---|
1089 | ret
|
---|
1090 |
|
---|
1091 | cirrus_vesa_07h:
|
---|
1092 | cmp bl, #0x80
|
---|
1093 | je cirrus_vesa_07h_1
|
---|
1094 | cmp bl, #0x01
|
---|
1095 | je cirrus_vesa_07h_2
|
---|
1096 | jb cirrus_vesa_07h_1
|
---|
1097 | mov ax, #0x0100
|
---|
1098 | ret
|
---|
1099 | cirrus_vesa_07h_1:
|
---|
1100 | push dx
|
---|
1101 | call cirrus_get_bpp_bytes
|
---|
1102 | mov bl, al
|
---|
1103 | xor bh, bh
|
---|
1104 | mov ax, cx
|
---|
1105 | mul bx
|
---|
1106 | pop bx
|
---|
1107 | push ax
|
---|
1108 | call cirrus_get_line_offset
|
---|
1109 | mul bx
|
---|
1110 | pop bx
|
---|
1111 | add ax, bx
|
---|
1112 | jnc cirrus_vesa_07h_3
|
---|
1113 | inc dx
|
---|
1114 | cirrus_vesa_07h_3:
|
---|
1115 | push dx
|
---|
1116 | and dx, #0x0003
|
---|
1117 | mov bx, #0x04
|
---|
1118 | div bx
|
---|
1119 | pop dx
|
---|
1120 | shr dx, #2
|
---|
1121 | call cirrus_set_start_addr
|
---|
1122 | mov ax, #0x004f
|
---|
1123 | ret
|
---|
1124 | cirrus_vesa_07h_2:
|
---|
1125 | call cirrus_get_start_addr
|
---|
1126 | shl dx, #2
|
---|
1127 | push dx
|
---|
1128 | mov bx, #0x04
|
---|
1129 | mul bx
|
---|
1130 | pop bx
|
---|
1131 | or dx, bx
|
---|
1132 | push ax
|
---|
1133 | call cirrus_get_line_offset
|
---|
1134 | mov bx, ax
|
---|
1135 | pop ax
|
---|
1136 | div bx
|
---|
1137 | push ax
|
---|
1138 | push dx
|
---|
1139 | call cirrus_get_bpp_bytes
|
---|
1140 | mov bl, al
|
---|
1141 | xor bh, bh
|
---|
1142 | pop ax
|
---|
1143 | xor dx, dx
|
---|
1144 | div bx
|
---|
1145 | mov cx, ax
|
---|
1146 | pop dx
|
---|
1147 | mov ax, #0x004f
|
---|
1148 | ret
|
---|
1149 |
|
---|
1150 | cirrus_vesa_unimplemented:
|
---|
1151 | mov ax, #0x014F ;; not implemented
|
---|
1152 | ret
|
---|
1153 |
|
---|
1154 |
|
---|
1155 | ;; in ax:vesamode, out ax:cirrusmode
|
---|
1156 | cirrus_vesamode_to_mode:
|
---|
1157 | push ds
|
---|
1158 | push cx
|
---|
1159 | push si
|
---|
1160 | push cs
|
---|
1161 | pop ds
|
---|
1162 | mov cx, #0xffff
|
---|
1163 | mov si, #_cirrus_vesa_modelist
|
---|
1164 | cvtm_1:
|
---|
1165 | cmp [si],ax
|
---|
1166 | jz cvtm_2
|
---|
1167 | cmp [si],cx
|
---|
1168 | jz cvtm_2
|
---|
1169 | add si, #4
|
---|
1170 | jmp cvtm_1
|
---|
1171 | cvtm_2:
|
---|
1172 | mov ax,[si+2]
|
---|
1173 | pop si
|
---|
1174 | pop cx
|
---|
1175 | pop ds
|
---|
1176 | ret
|
---|
1177 |
|
---|
1178 | ; cirrus_get_crtc
|
---|
1179 | ;; NOTE - may be called in protected mode
|
---|
1180 | cirrus_get_crtc:
|
---|
1181 | push ds
|
---|
1182 | push ax
|
---|
1183 | mov dx, #0x3cc
|
---|
1184 | in al, dx
|
---|
1185 | and al, #0x01
|
---|
1186 | shl al, #5
|
---|
1187 | mov dx, #0x3b4
|
---|
1188 | add dl, al
|
---|
1189 | pop ax
|
---|
1190 | pop ds
|
---|
1191 | ret
|
---|
1192 |
|
---|
1193 | ;; in - al:mode, out - cflag:result, si:table, ax:destroyed
|
---|
1194 | cirrus_get_modeentry:
|
---|
1195 | and al, #0x7f
|
---|
1196 | cirrus_get_modeentry_nomask:
|
---|
1197 | mov si, #_cirrus_modes
|
---|
1198 | cgm_1:
|
---|
1199 | db 0x2e ;; cs:
|
---|
1200 | mov ah, [si]
|
---|
1201 | cmp al, ah
|
---|
1202 | jz cgm_2
|
---|
1203 | cmp ah, #0xff
|
---|
1204 | jz cgm_4
|
---|
1205 | add si, # CIRRUS_MODE_SIZE
|
---|
1206 | jmp cgm_1
|
---|
1207 | cgm_4:
|
---|
1208 | xor si, si
|
---|
1209 | stc ;; video mode is not supported
|
---|
1210 | jmp cgm_3
|
---|
1211 | cgm_2:
|
---|
1212 | clc ;; video mode is supported
|
---|
1213 | cgm_3:
|
---|
1214 | ret
|
---|
1215 |
|
---|
1216 | ; get LFB address
|
---|
1217 | ; out - ax:LFB address (high 16 bit)
|
---|
1218 | ;; NOTE - may be called in protected mode
|
---|
1219 | cirrus_get_lfb_addr:
|
---|
1220 | push cx
|
---|
1221 | push dx
|
---|
1222 | push eax
|
---|
1223 | xor cx, cx
|
---|
1224 | mov dl, #0x00
|
---|
1225 | call cirrus_pci_read
|
---|
1226 | cmp ax, #0xffff
|
---|
1227 | jz cirrus_get_lfb_addr_5
|
---|
1228 | cirrus_get_lfb_addr_3:
|
---|
1229 | mov dl, #0x00
|
---|
1230 | call cirrus_pci_read
|
---|
1231 | cmp ax, #0x1013 ;; cirrus
|
---|
1232 | jz cirrus_get_lfb_addr_4
|
---|
1233 | add cx, #0x8
|
---|
1234 | cmp cx, #0x200 ;; search bus #0 and #1
|
---|
1235 | jb cirrus_get_lfb_addr_3
|
---|
1236 | cirrus_get_lfb_addr_5:
|
---|
1237 | xor dx, dx ;; no LFB
|
---|
1238 | jmp cirrus_get_lfb_addr_6
|
---|
1239 | cirrus_get_lfb_addr_4:
|
---|
1240 | mov dl, #0x10 ;; I/O space #0
|
---|
1241 | call cirrus_pci_read
|
---|
1242 | test ax, #0xfff1
|
---|
1243 | jnz cirrus_get_lfb_addr_5
|
---|
1244 | shr eax, #16
|
---|
1245 | mov dx, ax ;; LFB address
|
---|
1246 | cirrus_get_lfb_addr_6:
|
---|
1247 | pop eax
|
---|
1248 | mov ax, dx
|
---|
1249 | pop dx
|
---|
1250 | pop cx
|
---|
1251 | ret
|
---|
1252 |
|
---|
1253 | cirrus_pci_read:
|
---|
1254 | mov eax, #0x00800000
|
---|
1255 | mov ax, cx
|
---|
1256 | shl eax, #8
|
---|
1257 | mov al, dl
|
---|
1258 | mov dx, #0xcf8
|
---|
1259 | out dx, eax
|
---|
1260 | add dl, #4
|
---|
1261 | in eax, dx
|
---|
1262 | ret
|
---|
1263 |
|
---|
1264 | ;; out - al:bytes per pixel
|
---|
1265 | cirrus_get_bpp_bytes:
|
---|
1266 | push dx
|
---|
1267 | mov dx, #0x03c4
|
---|
1268 | mov al, #0x07
|
---|
1269 | out dx, al
|
---|
1270 | inc dx
|
---|
1271 | in al, dx
|
---|
1272 | and al, #0x0e
|
---|
1273 | cmp al, #0x06
|
---|
1274 | jne cirrus_get_bpp_bytes_1
|
---|
1275 | and al, #0x02
|
---|
1276 | cirrus_get_bpp_bytes_1:
|
---|
1277 | shr al, #1
|
---|
1278 | cmp al, #0x04
|
---|
1279 | je cirrus_get_bpp_bytes_2
|
---|
1280 | inc al
|
---|
1281 | cirrus_get_bpp_bytes_2:
|
---|
1282 | pop dx
|
---|
1283 | ret
|
---|
1284 |
|
---|
1285 | ;; in - ax: new line offset
|
---|
1286 | cirrus_set_line_offset:
|
---|
1287 | shr ax, #3
|
---|
1288 | push ax
|
---|
1289 | call cirrus_get_crtc
|
---|
1290 | mov al, #0x13
|
---|
1291 | out dx, al
|
---|
1292 | inc dx
|
---|
1293 | pop ax
|
---|
1294 | out dx, al
|
---|
1295 | dec dx
|
---|
1296 | mov al, #0x1b
|
---|
1297 | out dx, al
|
---|
1298 | inc dx
|
---|
1299 | shl ah, #4
|
---|
1300 | in al, dx
|
---|
1301 | and al, #0xef ; @@@AH 20040817 a hex marker was missing
|
---|
1302 | or al, ah
|
---|
1303 | out dx, al
|
---|
1304 | ret
|
---|
1305 |
|
---|
1306 | ;; out - ax: active line offset
|
---|
1307 | cirrus_get_line_offset:
|
---|
1308 | push dx
|
---|
1309 | push bx
|
---|
1310 | call cirrus_get_crtc
|
---|
1311 | mov al, #0x13
|
---|
1312 | out dx, al
|
---|
1313 | inc dx
|
---|
1314 | in al, dx
|
---|
1315 | mov bl, al
|
---|
1316 | dec dx
|
---|
1317 | mov al, #0x1b
|
---|
1318 | out dx, al
|
---|
1319 | inc dx
|
---|
1320 | in al, dx
|
---|
1321 | mov ah, al
|
---|
1322 | shr ah, #4
|
---|
1323 | and ah, #0x01
|
---|
1324 | mov al, bl
|
---|
1325 | shl ax, #3
|
---|
1326 | pop bx
|
---|
1327 | pop dx
|
---|
1328 | ret
|
---|
1329 |
|
---|
1330 | ;; in - si: table
|
---|
1331 | ;; out - ax: line offset for mode
|
---|
1332 | cirrus_get_line_offset_entry:
|
---|
1333 | push bx
|
---|
1334 | mov bx, [si+14] ;; crtc table
|
---|
1335 | push bx
|
---|
1336 | offset_loop1:
|
---|
1337 | mov ax, [bx]
|
---|
1338 | cmp al, #0x13
|
---|
1339 | je offset_found1
|
---|
1340 | inc bx
|
---|
1341 | inc bx
|
---|
1342 | jnz offset_loop1
|
---|
1343 | offset_found1:
|
---|
1344 | xor al, al
|
---|
1345 | shr ax, #5
|
---|
1346 | pop bx
|
---|
1347 | push ax
|
---|
1348 | offset_loop2:
|
---|
1349 | mov ax, [bx]
|
---|
1350 | cmp al, #0x1b
|
---|
1351 | je offset_found2
|
---|
1352 | inc bx
|
---|
1353 | inc bx
|
---|
1354 | jnz offset_loop2
|
---|
1355 | offset_found2:
|
---|
1356 | pop bx
|
---|
1357 | and ax, #0x1000
|
---|
1358 | shr ax, #1
|
---|
1359 | or ax, bx
|
---|
1360 | pop bx
|
---|
1361 | ret
|
---|
1362 |
|
---|
1363 | ;; in - new address in DX:AX
|
---|
1364 | cirrus_set_start_addr:
|
---|
1365 | push bx
|
---|
1366 | push dx
|
---|
1367 | push ax
|
---|
1368 | call cirrus_get_crtc
|
---|
1369 | mov al, #0x0d
|
---|
1370 | out dx, al
|
---|
1371 | inc dx
|
---|
1372 | pop ax
|
---|
1373 | out dx, al
|
---|
1374 | dec dx
|
---|
1375 | mov al, #0x0c
|
---|
1376 | out dx, al
|
---|
1377 | inc dx
|
---|
1378 | mov al, ah
|
---|
1379 | out dx, al
|
---|
1380 | dec dx
|
---|
1381 | mov al, #0x1d
|
---|
1382 | out dx, al
|
---|
1383 | inc dx
|
---|
1384 | in al, dx
|
---|
1385 | and al, #0x7f
|
---|
1386 | pop bx
|
---|
1387 | mov ah, bl
|
---|
1388 | shl bl, #4
|
---|
1389 | and bl, #0x80
|
---|
1390 | or al, bl
|
---|
1391 | out dx, al
|
---|
1392 | dec dx
|
---|
1393 | mov bl, ah
|
---|
1394 | and ah, #0x01
|
---|
1395 | shl bl, #1
|
---|
1396 | and bl, #0x0c
|
---|
1397 | or ah, bl
|
---|
1398 | mov al, #0x1b
|
---|
1399 | out dx, al
|
---|
1400 | inc dx
|
---|
1401 | in al, dx
|
---|
1402 | and al, #0xf2
|
---|
1403 | or al, ah
|
---|
1404 | out dx, al
|
---|
1405 | pop bx
|
---|
1406 | ret
|
---|
1407 |
|
---|
1408 | ;; out - current address in DX:AX
|
---|
1409 | cirrus_get_start_addr:
|
---|
1410 | push bx
|
---|
1411 | call cirrus_get_crtc
|
---|
1412 | mov al, #0x0c
|
---|
1413 | out dx, al
|
---|
1414 | inc dx
|
---|
1415 | in al, dx
|
---|
1416 | mov ah, al
|
---|
1417 | dec dx
|
---|
1418 | mov al, #0x0d
|
---|
1419 | out dx, al
|
---|
1420 | inc dx
|
---|
1421 | in al, dx
|
---|
1422 | push ax
|
---|
1423 | dec dx
|
---|
1424 | mov al, #0x1b
|
---|
1425 | out dx, al
|
---|
1426 | inc dx
|
---|
1427 | in al, dx
|
---|
1428 | dec dx
|
---|
1429 | mov bl, al
|
---|
1430 | and al, #0x01
|
---|
1431 | and bl, #0x0c
|
---|
1432 | shr bl, #1
|
---|
1433 | or bl, al
|
---|
1434 | mov al, #0x1d
|
---|
1435 | out dx, al
|
---|
1436 | inc dx
|
---|
1437 | in al, dx
|
---|
1438 | and al, #0x80
|
---|
1439 | shr al, #4
|
---|
1440 | or bl, al
|
---|
1441 | mov dl, bl
|
---|
1442 | xor dh, dh
|
---|
1443 | pop ax
|
---|
1444 | pop bx
|
---|
1445 | ret
|
---|
1446 |
|
---|
1447 | cirrus_extbios_handlers:
|
---|
1448 | ;; 80h
|
---|
1449 | dw cirrus_extbios_80h
|
---|
1450 | dw cirrus_extbios_81h
|
---|
1451 | dw cirrus_extbios_82h
|
---|
1452 | dw cirrus_extbios_unimplemented
|
---|
1453 | ;; 84h
|
---|
1454 | dw cirrus_extbios_unimplemented
|
---|
1455 | dw cirrus_extbios_85h
|
---|
1456 | dw cirrus_extbios_unimplemented
|
---|
1457 | dw cirrus_extbios_unimplemented
|
---|
1458 | ;; 88h
|
---|
1459 | dw cirrus_extbios_unimplemented
|
---|
1460 | dw cirrus_extbios_unimplemented
|
---|
1461 | dw cirrus_extbios_unimplemented
|
---|
1462 | dw cirrus_extbios_unimplemented
|
---|
1463 | ;; 8Ch
|
---|
1464 | dw cirrus_extbios_unimplemented
|
---|
1465 | dw cirrus_extbios_unimplemented
|
---|
1466 | dw cirrus_extbios_unimplemented
|
---|
1467 | dw cirrus_extbios_unimplemented
|
---|
1468 | ;; 90h
|
---|
1469 | dw cirrus_extbios_unimplemented
|
---|
1470 | dw cirrus_extbios_unimplemented
|
---|
1471 | dw cirrus_extbios_unimplemented
|
---|
1472 | dw cirrus_extbios_unimplemented
|
---|
1473 | ;; 94h
|
---|
1474 | dw cirrus_extbios_unimplemented
|
---|
1475 | dw cirrus_extbios_unimplemented
|
---|
1476 | dw cirrus_extbios_unimplemented
|
---|
1477 | dw cirrus_extbios_unimplemented
|
---|
1478 | ;; 98h
|
---|
1479 | dw cirrus_extbios_unimplemented
|
---|
1480 | dw cirrus_extbios_unimplemented
|
---|
1481 | dw cirrus_extbios_9Ah
|
---|
1482 | dw cirrus_extbios_unimplemented
|
---|
1483 | ;; 9Ch
|
---|
1484 | dw cirrus_extbios_unimplemented
|
---|
1485 | dw cirrus_extbios_unimplemented
|
---|
1486 | dw cirrus_extbios_unimplemented
|
---|
1487 | dw cirrus_extbios_unimplemented
|
---|
1488 | ;; A0h
|
---|
1489 | dw cirrus_extbios_A0h
|
---|
1490 | dw cirrus_extbios_A1h
|
---|
1491 | dw cirrus_extbios_A2h
|
---|
1492 | dw cirrus_extbios_unimplemented
|
---|
1493 | ;; A4h
|
---|
1494 | dw cirrus_extbios_unimplemented
|
---|
1495 | dw cirrus_extbios_unimplemented
|
---|
1496 | dw cirrus_extbios_unimplemented
|
---|
1497 | dw cirrus_extbios_unimplemented
|
---|
1498 | ;; A8h
|
---|
1499 | dw cirrus_extbios_unimplemented
|
---|
1500 | dw cirrus_extbios_unimplemented
|
---|
1501 | dw cirrus_extbios_unimplemented
|
---|
1502 | dw cirrus_extbios_unimplemented
|
---|
1503 | ;; ACh
|
---|
1504 | dw cirrus_extbios_unimplemented
|
---|
1505 | dw cirrus_extbios_unimplemented
|
---|
1506 | dw cirrus_extbios_AEh
|
---|
1507 | dw cirrus_extbios_unimplemented
|
---|
1508 |
|
---|
1509 | cirrus_vesa_handlers:
|
---|
1510 | ;; 00h
|
---|
1511 | dw cirrus_vesa_00h
|
---|
1512 | dw cirrus_vesa_01h
|
---|
1513 | dw cirrus_vesa_02h
|
---|
1514 | dw cirrus_vesa_03h
|
---|
1515 | ;; 04h
|
---|
1516 | dw cirrus_vesa_unimplemented
|
---|
1517 | dw cirrus_vesa_05h
|
---|
1518 | dw cirrus_vesa_06h
|
---|
1519 | dw cirrus_vesa_07h
|
---|
1520 | ;; 08h
|
---|
1521 | dw cirrus_vesa_unimplemented
|
---|
1522 | dw cirrus_vesa_unimplemented
|
---|
1523 | dw cirrus_vesa_unimplemented
|
---|
1524 | dw cirrus_vesa_unimplemented
|
---|
1525 | ;; 0Ch
|
---|
1526 | dw cirrus_vesa_unimplemented
|
---|
1527 | dw cirrus_vesa_unimplemented
|
---|
1528 | dw cirrus_vesa_unimplemented
|
---|
1529 | dw cirrus_vesa_unimplemented
|
---|
1530 |
|
---|
1531 |
|
---|
1532 |
|
---|
1533 | ASM_END
|
---|
1534 |
|
---|
1535 | #ifdef CIRRUS_VESA3_PMINFO
|
---|
1536 | ASM_START
|
---|
1537 | cirrus_vesa_pminfo:
|
---|
1538 | /* + 0 */
|
---|
1539 | .byte 0x50,0x4d,0x49,0x44 ;; signature[4]
|
---|
1540 | /* + 4 */
|
---|
1541 | dw cirrus_vesa_pmbios_entry ;; entry_bios
|
---|
1542 | dw cirrus_vesa_pmbios_init ;; entry_init
|
---|
1543 | /* + 8 */
|
---|
1544 | cirrus_vesa_sel0000_data:
|
---|
1545 | dw 0x0000 ;; sel_00000
|
---|
1546 | cirrus_vesa_selA000_data:
|
---|
1547 | dw 0xA000 ;; sel_A0000
|
---|
1548 | /* +12 */
|
---|
1549 | cirrus_vesa_selB000_data:
|
---|
1550 | dw 0xB000 ;; sel_B0000
|
---|
1551 | cirrus_vesa_selB800_data:
|
---|
1552 | dw 0xB800 ;; sel_B8000
|
---|
1553 | /* +16 */
|
---|
1554 | cirrus_vesa_selC000_data:
|
---|
1555 | dw 0xC000 ;; sel_C0000
|
---|
1556 | cirrus_vesa_is_protected_mode:
|
---|
1557 | ;; protected mode flag and checksum
|
---|
1558 | dw (~((0xf2 + (cirrus_vesa_pmbios_entry >> 8) + (cirrus_vesa_pmbios_entry) \
|
---|
1559 | + (cirrus_vesa_pmbios_init >> 8) + (cirrus_vesa_pmbios_init)) & 0xff) << 8) + 0x01
|
---|
1560 | ASM_END
|
---|
1561 | #endif // CIRRUS_VESA3_PMINFO
|
---|
1562 |
|
---|
1563 |
|
---|
1564 | #ifdef CIRRUS_DEBUG
|
---|
1565 | static void cirrus_debugmsg(DI, SI, BP, SP, BX, DX, CX, AX, DS, ES, FLAGS)
|
---|
1566 | Bit16u DI, SI, BP, SP, BX, DX, CX, AX, ES, DS, FLAGS;
|
---|
1567 | {
|
---|
1568 | if((GET_AH()!=0x0E)&&(GET_AH()!=0x02)&&(GET_AH()!=0x09)&&(AX!=0x4F05))
|
---|
1569 | printf("vgabios call ah%02x al%02x bx%04x cx%04x dx%04x\n",GET_AH(),GET_AL(),BX,CX,DX);
|
---|
1570 | }
|
---|
1571 | #endif
|
---|