Compare commits

...

2 Commits

Author SHA1 Message Date
Yourtion
f78ffbbfb6 提高分辨率(1) 2016-04-21 11:28:56 +08:00
Yourtion
5ebfdafc68 删除测试代码 2016-04-21 11:10:18 +08:00
2 changed files with 6 additions and 20 deletions

View File

@@ -30,8 +30,7 @@ void HariMain(void)
enable_mouse(&fifo, 512, &mdec);
io_out8(PIC0_IMR, 0xf8); /* 设定PIT和PIC1以及键盘为许可(11111000) */
io_out8(PIC1_IMR, 0xef); /* 开放鼠标中断(11101111) */
set490&fifo,1
timer = timer_alloc();
timer_init(timer, &fifo, 10);
timer_settime(timer, 1000);
@@ -196,16 +195,3 @@ void putfonts8_asc_sht(struct SHEET *sht, int x, int y, int c, int b, char *s, i
sheet_refresh(sht, x, y, x + l * 8, y + 16);
return;
}
void set490(struct FIFO32 *fifo, int mode){
int i;
struct TIMER *timer;
if (mode != 0) {
for (i = 0; i < 490; i++) {
timer = timer_alloc();
timer_init(timer, fifo, 1024 + i);
timer_settime(timer, 100 * 60 * 60 * 24 * 50 + i * 100);
}
}
return;
}

View File

@@ -17,13 +17,13 @@ VRAM EQU 0x0ff8 ; 图像缓冲区的起始地址
; 画面设置
MOV AL,0x13 ; VGA显卡320x200x8bit
MOV AH,0x00
MOV BX,0x4101 ; VBE的640x480x8bi彩色
MOV AX,0x4f02
INT 0x10
MOV BYTE [VMODE],8 ; 屏幕的模式参考C语言的引用
MOV WORD [SCRNX],320
MOV WORD [SCRNY],200
MOV DWORD [VRAM],0x000a0000
MOV WORD [SCRNX],640
MOV WORD [SCRNY],480
MOV DWORD [VRAM],0xe0000000
; 通过 BIOS 获取指示灯状态