Browse Source

update console.c for more correct comments

main
yuchen 9 years ago
parent
commit
6770c2a473
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      labcodes/lab1/kern/driver/console.c

+ 8
- 8
labcodes/lab1/kern/driver/console.c View File

@ -65,14 +65,14 @@ static uint16_t addr_6845;
static void static void
cga_init(void) { cga_init(void) {
volatile uint16_t *cp = (uint16_t *)CGA_BUF; //CGA_BUF: 0xB8000 () volatile uint16_t *cp = (uint16_t *)CGA_BUF; //CGA_BUF: 0xB8000 ()
uint16_t was = *cp; //
*cp = (uint16_t) 0xA55A;
if (*cp != 0xA55A) {
cp = (uint16_t*)MONO_BUF; // MONO_BUF 0xB0000
addr_6845 = MONO_BASE; //IO地址MONO_BASE: 0x3B4
} else {
*cp = was; //
addr_6845 = CGA_BASE; // IO地址 CGA_BASE: 0x3D4
uint16_t was = *cp; //0xB8000
*cp = (uint16_t) 0xA55A; // 便
if (*cp != 0xA55A) { //
cp = (uint16_t*)MONO_BUF; // MONO_BUF 0xB0000
addr_6845 = MONO_BASE; //IO地址MONO_BASE: 0x3B4
} else { //
*cp = was; //
addr_6845 = CGA_BASE; // IO地址CGA_BASE: 0x3D4
} }
// Extract cursor location // Extract cursor location

Loading…
Cancel
Save