10 static unsigned short *ch_vram;
11 static unsigned short X,Y,pos;
12 static unsigned char attr;
24 void init_sysvga(void)
26 ch_vram=(unsigned short*)0xb8000;
28 DisplayColorChangeChar(White,Black);
31 void ClearScreen(void)
33 ch_vram=(unsigned short*)0xb8000;
35 while(ch_vram<(unsigned short*)0xc0000)
39 ch_vram=(unsigned short*)0xb8000;
41 vga_text_update_cursor();
46 void vga_text_update_cursor(void)
49 subset_out8(CRTC_ADDR, CRTC_CURSOR_H);
50 subset_out8(CRTC_DATA, pos >> 8 );
51 subset_out8(CRTC_ADDR, CRTC_CURSOR_L);
52 subset_out8(CRTC_DATA, pos & 0xFF );
55 void DisplayOutputChar(const char ch)
74 DisplayOutputChar(' ');
75 DisplayOutputChar(' ');
78 *ch_vram++ = (((attr)<<8) | ch);
83 void ShiftDisplayChar(unsigned int len)
85 unsigned int *sc1,*sc2;
86 sc1=0xb8000; sc2=0xb8000+(80*2);
87 while(sc2<=0xc0000)*sc1++ = *sc2++;
90 ShiftDisplayChar(len);
94 void DisplayColorChangeChar(Color_t fore, Color_t back)
96 attr |= (back<<4) | (fore & 0x0f);