First commit 09/04/1995

This commit is contained in:
2021-09-03 17:50:32 +02:00
commit e0a9c4f8c9
120 changed files with 13455 additions and 0 deletions

46
EMMC.H Normal file
View File

@ -0,0 +1,46 @@
/*== Typedefs ========================================================*/
typedef unsigned char BYTE; /*nos construimos un byte*/
typedef unsigned int WORD;
typedef BYTE BOOL; /*como BOOLEAN en Pascal*/
/*== Macros ==========================================================*/
/*-- MK_FP crea de una direcci<63>n de segmento y Offset un -------------*/
/*-- puntero FAR a un objeto -------*/
#ifdef MK_FP /*<2A>ya se defini<6E> MK_FP?*/
#undef MK_FP
#endif
#define MK_FP(seg, ofs) ((void far *) ((unsigned long) (seg)<<16|(ofs)))
/*-- PAGE_ADR devuelve un puntero a la p<>gina f<>sica X dentro del ----*/
/*-- Page-Frame de la memoria EMS ----*/
#define PAGE_ADR(x) ((void *) MK_FP(ems_frame_seg() + ((x) << 10), 0))
/*== Constantes ======================================================*/
#define TRUE 1 /*Constantes para el trabajo con BOOL*/
#define FALSE 0
#define EMS_INT 0x67 /*n<>mero de interrupci<63>n para acceder a la EMM*/
#define EMS_ERR -1 /*se devuelve en caso de error*/
/*== variables globales===============================================*/
extern BYTE emm_ec; /*aqu<71> se guardan los c<>digos de error EMM*/
BOOL ems_inst(void);
int ems_num_page(void);
int ems_free_page(void);
WORD ems_frame_seg(void);
int ems_alloc(int pages);
BOOL ems_map(int handle, int logp, BYTE physp);
BOOL ems_free(int handle);
BYTE ems_version(void);
BOOL ems_save_map(int handle);
BOOL ems_restore_map(int handle);
void print_err(void);