* Switches modes of the video card. * * If mode == MODETEXT (0x03), then the card is placed into text * mode. If mode == 640x480, then the card is placed into vga * mode (video mode 0x12). No other modes are currently supported. * */
| 831 | * |
| 832 | */ |
| 833 | static void |
| 834 | vga_SwitchMode(unsigned int mode) |
| 835 | { |
| 836 | union REGS regs; |
| 837 | |
| 838 | if ((mode == MODE640x480) || (mode == MODETEXT)) { |
| 839 | if (iflags.usevga && (mode == MODE640x480)) { |
| 840 | iflags.grmode = 1; |
| 841 | } else { |
| 842 | iflags.grmode = 0; |
| 843 | } |
| 844 | regs.x.ax = mode; |
| 845 | (void) int86(VIDEO_BIOS, ®s, ®s); |
| 846 | } else { |
| 847 | iflags.grmode = 0; /* force text mode for error msg */ |
| 848 | regs.x.ax = MODETEXT; |
| 849 | (void) int86(VIDEO_BIOS, ®s, ®s); |
| 850 | g_attribute = attrib_text_normal; |
| 851 | impossible("vga_SwitchMode: Bad video mode requested 0x%X", mode); |
| 852 | } |
| 853 | } |
| 854 | |
| 855 | /* |
| 856 | * This allows grouping of several tasks to be done when |
no test coverage detected