@@ -261,7 +261,7 @@ int test_pause(unsigned int secs) {
261261 return 1 ;
262262}
263263
264- void vga_dacmask_test (void ) {
264+ void vga_dacmask_test (unsigned char fgcolor ) {
265265 unsigned int o ,i ;
266266
267267 /* set palette index 255 to white */
@@ -290,7 +290,7 @@ void vga_dacmask_test(void) {
290290 mov ah ,0x0E ; teletype output
291291 mov al ,cv
292292 xor bh ,bh
293- mov bl ,0xFF ; foreground color ( white )
293+ mov bl ,fgcolor
294294 int 10 h
295295 }
296296 }
@@ -329,7 +329,7 @@ void vga_dacmask_test(void) {
329329 mov ah ,0x0E ; teletype output
330330 mov al ,cv
331331 xor bh ,bh
332- mov bl ,0xFF ; foreground color ( white )
332+ mov bl ,fgcolor
333333 int 10 h
334334 }
335335 }
@@ -573,7 +573,7 @@ void vga_test(unsigned int w,unsigned int h) {
573573 vga_write_AC (VGA_AC_ENABLE |0x1F ,0 );
574574 }
575575
576- vga_dacmask_test ();
576+ vga_dacmask_test (0xFF );
577577}
578578
579579#define EGARGB2 (r ,g ,b ) \
@@ -1028,7 +1028,7 @@ void ega_test(unsigned int w,unsigned int h) {
10281028 if (!brk ) break ;
10291029 }
10301030
1031- vga_dacmask_test ();
1031+ vga_dacmask_test (0x0F );
10321032 }
10331033}
10341034
@@ -1207,7 +1207,7 @@ void cga4_test(unsigned int w,unsigned int h) {
12071207 test_pause (1 );
12081208
12091209 if ((vga_state .vga_flags & (VGA_IS_MCGA |VGA_IS_VGA )))
1210- vga_dacmask_test ();
1210+ vga_dacmask_test (3 );
12111211}
12121212
12131213void cga2_test (unsigned int w ,unsigned int h ) {
@@ -1337,7 +1337,7 @@ void cga2_test(unsigned int w,unsigned int h) {
13371337 test_pause (1 );
13381338
13391339 if ((vga_state .vga_flags & (VGA_IS_MCGA |VGA_IS_VGA )))
1340- vga_dacmask_test ();
1340+ vga_dacmask_test (1 );
13411341}
13421342
13431343void alphanumeric_test (unsigned int w ,unsigned int h ) {
@@ -1513,7 +1513,7 @@ void alphanumeric_test(unsigned int w,unsigned int h) {
15131513 test_pause (3 );
15141514
15151515 if ((vga_state .vga_flags & (VGA_IS_MCGA |VGA_IS_VGA )))
1516- vga_dacmask_test ();
1516+ vga_dacmask_test (7 );
15171517}
15181518
15191519int main () {
0 commit comments