上面是我个人在Dos时代自己积累下来的一些工具包的一部分,还有其他的,如:Mouse Control,Keyboard Control,Chinese Display on Graphics mode, Whidow control on tc or bc3.1 .....如果你有需要,给我发信,我给你寄过去!
有点请注意,如果源码使用请标明出处 //by superspirit studio !
给你我的包:
//Written by Superspirit studio
#ifndef XRH_XMS_LIBRARY
#define XRH_XMS_LIBRARY
#include <DOS.H>
#include <STDIO.H>
#include <STDLIB.H>
struct XMS_Move_Data{
unsigned long far Move_Bytes; //移动的字节数
unsigned far Source_Handle; //源句柄
unsigned long far Source_Offset; //源偏移量
unsigned far Target_Handle; //目的句柄
unsigned long far Target_Offset; //目的偏移量
};
int far XMS=0;
// void (far *Xms)();
// int far Xms_Err=0;
class MyXMS{
private:
int XMS;
int Xms_Err;
int IsErr(int Xms_Err_Num);
void (far *Xms)(void);
void XMS_Get_Drive_Addr(void);
static int MyXMS_Num;
public:
XMS_Move_Data Xmd;
int XMS_Check(unsigned &Max_Block_Size,unsigned &Total_Size);
int XMS_Get(unsigned &Handle,unsigned Size);
int XMS_ReGet(unsigned Handle,unsigned ReSize);
int XMS_Free(unsigned Handle);
int XMS_Move();//XMS_Move_Data& Xmd);
MyXMS();
~MyXMS();
};
int MyXMS::MyXMS_Num=0;
//XMS (Int 2F/43) 多路中断
// INT 2F - XMS 驱动程序安装检测
// 输入参数:AX = 4300h
// 返回值:AL = 80h XMS 驱动程序已安装
// AL <> 80h 未发现XMS 驱动程序