Files
2ine-tms34010/native/viocalls.h
T
Ryan C. Gordon 26a52988a6 16-bit support!
This gets us everything we need (I hope!) to support 16-bit code in LX
binaries and call into 16-bit OS/2 APIs. This is just enough to call
into VioGetMode() (which isn't otherwise implemented yet) as an example.

If this is ever used Winelib-style to provide an OS/2 API to native Linux
binaries, the 16-bit system APIs are 32-bit clean and C callable, as one
might expect them to be. All the tapdancing is to support existing LX
binaries in the loader and bridge between the 32-bit clean APIs and
existing 16-bit code that expects to call 16-bit APIs.

This was a staggering amount of effort, but yay!

Other fixes and improvements probably leaked into this commit, as a
lot of code got touched and a lot of research and debugging took place.
2016-10-27 01:44:26 -04:00

47 lines
692 B
C

#ifndef _INCL_VIOCALLS_H_
#define _INCL_VIOCALLS_H_
#include "os2types.h"
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push, 1)
typedef struct
{
USHORT cb;
UCHAR fbType;
UCHAR color;
USHORT col;
USHORT row;
USHORT hres;
USHORT vres;
UCHAR fmt_ID;
UCHAR attrib;
ULONG buf_addr;
ULONG buf_length;
ULONG full_length;
ULONG partial_length;
PCHAR ext_data_addr;
} VIOMODEINFO, *PVIOMODEINFO;
#pragma pack(pop)
enum
{
VGMT_OTHER = 0x1,
VGMT_GRAPHICS = 0x02,
VGMT_DISABLEBURST = 0x04
};
APIRET16 OS2API16 VioGetMode(PVIOMODEINFO pvioModeInfo, HVIO hvio);
#ifdef __cplusplus
}
#endif
#endif
// end of viocalls.h ...