LAB 4 IS DONE.

This commit is contained in:
winPond
2019-07-06 10:39:40 +08:00
parent 21dd0e1a51
commit e78b336ba8
113 changed files with 11622 additions and 0 deletions

26
lab/kern/console.h Normal file
View File

@@ -0,0 +1,26 @@
/* See COPYRIGHT for copyright information. */
#ifndef _CONSOLE_H_
#define _CONSOLE_H_
#ifndef JOS_KERNEL
# error "This is a JOS kernel header; user programs should not #include it"
#endif
#include <inc/types.h>
#define MONO_BASE 0x3B4
#define MONO_BUF 0xB0000
#define CGA_BASE 0x3D4
#define CGA_BUF 0xB8000
#define CRT_ROWS 25
#define CRT_COLS 80
#define CRT_SIZE (CRT_ROWS * CRT_COLS)
void cons_init(void);
int cons_getc(void);
void kbd_intr(void); // irq 1
void serial_intr(void); // irq 4
#endif /* _CONSOLE_H_ */