www.delorie.com/djgpp/doc/libc-2.01/libc_379.html   search  
Go to the first, previous, next, last section, table of contents.


_go32_dpmi_simulate_fcall

Syntax

#include <dpmi.h>

int _go32_dpmi_simulate_fcall(_go32_dpmi_registers *regs);

Description

See section DPMI Overview

This function simulates a real-mode far call to a function that returns with a far return. The registers are set up from regs, including CS and IP, which indicate the address of the call. Any registers the function modifies are reflected in regs on return.

If SS and SP are both zero, a small temporary stack is used when in real mode. If not, they are used AS IS. It's a good idea to use memset to initialize the register structure before using it.

Return Value

Zero on success, nonzero on failure.

Example

_go32_dpmi_registers r;
r.x.ax = 47;
r.x.cs = some_segment;
r.x.ip = some_offset;
r.x.ss = r.x.sp = 0;
_go32_dpmi_simulate_fcall(&r);
printf("returns %d\n", r.x.ax);


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997