Parcourir la source

update console.c for more correct comments

main
yuchen il y a 9 ans
Parent
révision
6770c2a473
1 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. +8
    -8
      labcodes/lab1/kern/driver/console.c

+ 8
- 8
labcodes/lab1/kern/driver/console.c Voir le fichier

@ -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

Chargement…
Annuler
Enregistrer