12 #define outpw outportw 19 int num, *red, *green, *blue;
21 if (num > 255 || num < 0)
return;
23 while (!(inp(0x3da) & 0x8)) ;
34 int num, red, green, blue;
36 if (num > 255 || num < 0)
return;
38 while (!(inp(0x3da) & 0x8)) ;
54 if (i+n > 256 || i < 0 || n < 0)
return;
58 for (j = 0; j < n; j++) {
76 if (i+n > 256 || i < 0 || n < 0)
return;
80 for (j = 0; j < n; j++) {
97 while (!(inp(0x3da) & 0x8)) ;
98 for (j = 0; j < 16; j++) {
102 outp(0x3c0,j | 0x20);
116 while (!(inp(0x3da) & 0x8)) ;
117 for (j = 0; j < 16; j++) {
121 outp(0x3c0,j | 0x20);
void vga_get_color(int num, int *red, int *green, int *blue)
void vga_get_cblock(char *p, int i, int n)
void vga_set_cblock(char *p, int i, int n)
void vga_set_cpblock(char *p)
void vga_set_color(int num, int red, int green, int blue)
void vga_get_cpblock(char *p)