mirror of
https://github.com/yourtion/30dayMakeOS.git
synced 2026-02-04 18:43:25 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1e4c44149 | ||
|
|
34fc4eca27 |
@@ -429,18 +429,6 @@ int *hrb_api(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int
|
||||
timer_settime((struct TIMER *) ebx, eax);
|
||||
} else if (edx == 19) {
|
||||
timer_free((struct TIMER *) ebx);
|
||||
} else if (edx == 20) {
|
||||
if (eax == 0) {
|
||||
i = io_in8(0x61);
|
||||
io_out8(0x61, i & 0x0d);
|
||||
} else {
|
||||
i = 1193180000 / eax;
|
||||
io_out8(0x43, 0xb6);
|
||||
io_out8(0x42, i & 0xff);
|
||||
io_out8(0x42, i >> 8);
|
||||
i = io_in8(0x61);
|
||||
io_out8(0x61, (i | 0x03) & 0x0f);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
@@ -429,6 +429,18 @@ int *hrb_api(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int
|
||||
timer_settime((struct TIMER *) ebx, eax);
|
||||
} else if (edx == 19) {
|
||||
timer_free((struct TIMER *) ebx);
|
||||
} else if (edx == 20) {
|
||||
if (eax == 0) {
|
||||
i = io_in8(0x61);
|
||||
io_out8(0x61, i & 0x0d);
|
||||
} else {
|
||||
i = 1193180000 / eax;
|
||||
io_out8(0x43, 0xb6);
|
||||
io_out8(0x42, i & 0xff);
|
||||
io_out8(0x42, i >> 8);
|
||||
i = io_in8(0x61);
|
||||
io_out8(0x61, (i | 0x03) & 0x0f);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user