Mail Archives: djgpp/1994/09/25/23:18:22
> I've got to do two things with es:di. First I have to get it to point
> to a function I want called by a real-mode function, and second I have to
> get it to point to an array of data.
Here's a code fragment setting some registers and calling a real-mode
function (it happens to be a time-slice release function)
_go32_dpmi_registers go32_regs;
go32_regs.x.cs = slicer_info.rm_segment;
go32_regs.x.ip = 0;
go32_regs.x.ss = go32_regs.x.sp = 0;
_go32_dpmi_simulate_fcall(&go32_regs);
DOS memory is allocated by _go32_dpmi_allocate_dos_memory() and the function
code or data can be transfered to this DOS memory by using dosmemput().
If you need to call a protected mode function from real mode, I believe you
need to use _go32_dpmi_allocate_real_mode_callback_iret() or ..._retf() (this
is not something I've ever needed to do).
- Raw text -