First post, by Goplat
Goplat
Offline
Rank
Newbie
The dosbox implementation of the int 15h/ah=89h function in the BIOS is a bit off: it doesn't disable IRQs on the PIC, and (more importantly) it jumps to CX when it should just get the return address off the stack. Patch:
--- src\ints\bios.bak Mon May 10 10:43:54 2010+++ src\ints\bios.cpp Fri Sep 30 21:28:19 2011@@ -700,8 +700,8 @@break;case 0x89: /* SYSTEM - SWITCH TO PROTECTED MODE */{- IO_Write(0x20,0x10);IO_Write(0x21,reg_bh);IO_Write(0x21,0);- IO_Write(0xA0,0x10);IO_Write(0xA1,reg_bl);IO_Write(0xA1,0);+ IO_Write(0x20,0x10);IO_Write(0x21,reg_bh);IO_Write(0x21,0);IO_Write(0x21,0xFF);+ IO_Write(0xA0,0x10);IO_Write(0xA1,reg_bl);IO_Write(0xA1,0);IO_Write(0xA1,0xFF);MEM_A20_Enable(true);PhysPt table=SegPhys(es)+reg_si;CPU_LGDT(mem_readw(table+0x8),mem_readd(table+0x8+0x2) & 0xFFFFFF);@@ -710,10 +710,11 @@CPU_SetSegGeneral(ds,0x18);CPU_SetSegGeneral(es,0x20);CPU_SetSegGeneral(ss,0x28);+ Bitu ret = mem_readw(SegPhys(ss)+reg_sp);reg_sp+=6; //Clear stack of interrupt frameCPU_SetFlags(0,FMASK_ALL);reg_ax=0;- CPU_JMP(false,0x30,reg_cx,0);+ CPU_JMP(false,0x30,ret,0);}break;case 0x90: /* OS HOOK - DEVICE BUSY */