Skip to content

Commit

Permalink
增加命令行窗口(3)
Browse files Browse the repository at this point in the history
  • Loading branch information
yourtion committed May 13, 2016
1 parent 34fc4ec commit d1e4c44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 25_day/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ int cmd_app(struct CONSOLE *cons, int *fat, char *cmdline)
dathrb = *((int *) (p + 0x0014));
q = (char *) memman_alloc_4k(memman, segsiz);
task->ds_base = (int) q;
set_segmdesc(gdt + 1003, finfo->size - 1, (int) p, AR_CODE32_ER + 0x60);
set_segmdesc(gdt + 1004, segsiz - 1, (int) q, AR_DATA32_RW + 0x60);
set_segmdesc(gdt + task->sel / 8 + 1000, finfo->size - 1, (int) p, AR_CODE32_ER + 0x60);
set_segmdesc(gdt + task->sel / 8 + 2000, segsiz - 1, (int) q, AR_DATA32_RW + 0x60);
for (i = 0; i < datsiz; i++) {
q[esp + i] = p[dathrb + i];
}
start_app(0x1b, 1003 * 8, esp, 1004 * 8, &(task->tss.esp0));
start_app(0x1b, task->sel + 1000 * 8, esp, task->sel + 2000 * 8, &(task->tss.esp0));
shtctl = (struct SHTCTL *) *((int *) 0x0fe4);
for (i = 0; i < MAX_SHEETS; i++) {
sht = &(shtctl->sheets0[i]);
Expand Down

0 comments on commit d1e4c44

Please sign in to comment.