瀏覽代碼

update console.c for more correct comments

main
yuchen 9 年之前
父節點
當前提交
6770c2a473
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. +8
    -8
      labcodes/lab1/kern/driver/console.c

+ 8
- 8
labcodes/lab1/kern/driver/console.c 查看文件

@ -65,14 +65,14 @@ static uint16_t addr_6845;
static void
cga_init(void) {
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

Loading…
取消
儲存