From 0c2b6c5934e067bc3d83396b8506df795d48dba8 Mon Sep 17 00:00:00 2001 From: Yourtion Date: Mon, 16 May 2016 12:36:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=91=BD=E4=BB=A4=E8=A1=8C?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=EF=BC=882=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 26_day/bootpack.c | 7 ++++++- 26_day/console.c | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) 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) { /*退格键*/