pushl %eax
// Setup for iretw call
- pushw $SEG_BIOS
+ pushw %cs
pushw $1f // return point
pushw BREGS_flags(%eax) // flags
pushl BREGS_ip(%eax) // CS:IP
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "util.h" // usleep
+#include "util.h" // call16
#include "bregs.h" // struct bregs
-#include "config.h" // SEG_BIOS
#include "farptr.h" // GET_FLATPTR
#include "biosvar.h" // get_ebda_seg
inline void
__call16_int(struct bregs *callregs, u16 offset)
{
- callregs->cs = SEG_BIOS;
+ if (MODE16)
+ callregs->cs = GET_SEG(CS);
+ else
+ callregs->cs = SEG_BIOS;
callregs->ip = offset;
call16(callregs);
}