diff --git a/26_day/bootpack.c b/26_day/bootpack.c index 8d16a9e..a2a4c98 100644 --- a/26_day/bootpack.c +++ b/26_day/bootpack.c @@ -268,8 +268,13 @@ void HariMain(void) task->tss.eax = (int) &(task->tss.esp0); task->tss.eip = (int) asm_end_app; io_sti(); + } else { /*命令行窗口*/ + task = sht->task; + io_cli(); + fifo32_put(&task->fifo, 4); + io_sti(); } - } + } break; } } diff --git a/26_day/console.c b/26_day/console.c index d219b85..2da67d9 100644 --- a/26_day/console.c +++ b/26_day/console.c @@ -54,6 +54,9 @@ void console_task(struct SHEET *sheet, int memtotal) boxfill8(sheet->buf, sheet->bxsize, COL8_000000, cons.cur_x, cons.cur_y, cons.cur_x + 7, cons.cur_y + 15); cons.cur_c = -1; } + if (i == 4) { /*点击命令行窗口的“×”按钮*/ + cmd_exit(&cons, fat); + } if (256 <= i && i <= 511) { /*键盘数据(通过任务A)*/ if (i == 8 + 256) { /*退格键*/