44,6 → 44,8 |
#define __CHK_IO__ |
*/ |
|
#define __LL_DEBUG__ |
|
#define VM86_STACK_SIZE 1024 |
|
extern DWORD ll_irq_table[256]; |
123,7 → 125,7 |
cs = (a & 0xFF000) >> 4; |
eip = (a & 0xFFF); |
message("Real-Mode Address is CS=%lx IP=%lx\nLinear=%lx\n",cs,eip,a); |
esp = /* (void *)(tos)*/ 0x69; |
esp = /* (void *)(tos)*/ (void *)0x69; |
message("Stack frame: %p %lx %lx\n", |
esp, vm86_TSS.t.esp0, vm86_TSS.t.esp); |
message("%lx ",lmempeekd(esp)); /* bp */ |
187,10 → 189,7 |
GDT_place(X_VM86_TSS,(DWORD)(&vm86_TSS), |
sizeof(vm86_TSS),FREE_TSS386,GRAN_16); |
|
/* HACKME!!! */ |
// IDT_place(0x48,vm86_exc); |
l1_int_bind(0x48, vm86_return); |
// ll_irq_table[0x48] = (DWORD)vm86_return; |
IDT_place(0x48, (void *)(vm86_return)); |
|
/* Prepare a real-mode stack, obtaining it from the |
* DOS memory allocator! |
334,16 → 333,6 |
out->x.di = (WORD)vm86_TSS.t.edi; |
out->x.cflag = (WORD)vm86_TSS.t.eflags; |
*/ |
#ifdef __LL_DEBUG__ |
#error Fix the following: use global_regs->xxx ??? |
message("%x\n", (WORD)*(GLOBesp)); |
message("%x\n", (WORD)*(GLOBesp+1)); /*EDI*/ |
message("%x\n", (WORD)*(GLOBesp+2)); /*ESI*/ |
message("%x\n", (WORD)*(GLOBesp+3)); /*EBP*/ |
message("%x\n", (WORD)*(GLOBesp+4)); /*ESP*/ |
message("%x\n", (WORD)*(GLOBesp+5)); /*EBX*/ |
message("%x\n", (WORD)*(GLOBesp+6)); /*EDX*/ |
#endif |
out->x.ax = global_regs->eax; |
out->x.bx = global_regs->ebx; |
out->x.cx = global_regs->ecx; |