4 * Copyright 1995 Anand Kumria
12 /* #define DEBUG_VXD */
16 #define VXD_BARF(context,name) \
17 fprintf( stderr, "vxd %s: unknown/not implemented parameters:\n" \
18 "vxd %s: AX %04x, BX %04x, CX %04x, DX %04x, " \
19 "SI %04x, DI %04x, DS %04x, ES %04x\n", \
20 (name), (name), AX_reg(context), BX_reg(context), \
21 CX_reg(context), DX_reg(context), SI_reg(context), \
22 DI_reg(context), (WORD)DS_reg(context), (WORD)ES_reg(context) )
24 /***********************************************************************
27 void VXD_PageFile( CONTEXT
*context
)
29 /* taken from Ralf Brown's Interrupt List */
31 dprintf_vxd(stddeb
,"VxD PageFile called ...\n");
33 switch(AX_reg(context
))
35 case 0x00: /* get version, is this windows version? */
36 dprintf_vxd(stddeb
,"VxD PageFile: returning version\n");
37 AX_reg(context
) = (WINVERSION
>> 8) | ((WINVERSION
<< 8) & 0xff00);
41 case 0x01: /* get swap file info */
42 dprintf_vxd(stddeb
,"VxD PageFile: returning swap file info\n");
43 AX_reg(context
) = 0x00; /* paging disabled */
44 ECX_reg(context
) = 0; /* maximum size of paging file */
45 /* FIXME: do I touch DS:SI or DS:DI? */
49 case 0x02: /* delete permanent swap on exit */
50 dprintf_vxd(stddeb
,"VxD PageFile: supposed to delete swap\n");
54 case 0x03: /* current temporary swap file size */
55 dprintf_vxd(stddeb
,"VxD PageFile: what is current temp. swap size\n");
59 case 0x04: /* read or write?? INTERRUP.D */
60 case 0x05: /* cancel?? INTERRUP.D */
61 case 0x06: /* test I/O valid INTERRUP.D */
63 VXD_BARF( context
, "pagefile" );
69 /***********************************************************************
72 void VXD_Shell( CONTEXT
*context
)
74 dprintf_vxd(stddeb
,"VxD Shell called ...\n");
76 switch (DX_reg(context
)) /* Ralf Brown says EDX, but I use DX instead */
79 dprintf_vxd(stddeb
,"VxD Shell: returning version\n");
80 AX_reg(context
) = (WINVERSION
>> 8) | ((WINVERSION
<< 8) & 0xff00);
81 EBX_reg(context
) = 1; /* system VM Handle */
89 dprintf_vxd(stddeb
,"VxD Shell: EDX = %08lx\n",EDX_reg(context
));
90 VXD_BARF( context
, "shell" );
93 case 0x0006: /* SHELL_Get_VM_State */
94 dprintf_vxd(stddeb
,"VxD Shell: returning VM state\n");
95 /* Actually we don't, not yet. We have to return a structure
96 * and I am not to sure how to set it up and return it yet,
97 * so for now let's do nothing. I can (hopefully) get this
100 /* RESET_CFLAG(context); */
120 dprintf_vxd(stddeb
,"VxD Shell: EDX = %08lx\n",EDX_reg(context
));
121 VXD_BARF( context
, "shell");
127 /***********************************************************************
130 void VXD_Comm( CONTEXT
*context
)
132 dprintf_vxd(stddeb
,"VxD Comm called ...\n");
134 switch (AX_reg(context
))
136 case 0x0000: /* get version */
137 dprintf_vxd(stddeb
,"VxD Comm: returning version\n");
138 AX_reg(context
) = (WINVERSION
>> 8) | ((WINVERSION
<< 8) & 0xff00);
139 RESET_CFLAG(context
);
142 case 0x0001: /* set port global */
143 case 0x0002: /* get focus */
144 case 0x0003: /* virtualise port */
146 VXD_BARF( context
, "comm" );