//* This is the C prototype header file for DOSCALLS.  This provides
//* the minimal DOS dependent interface for flatmodel programs into
//* DOS.	The primary support needed is the ability to allocate and
//* de-allocate memory in the low 1mb of address space.
/*																																					 */
/*		Written by John W. Ratcliff (c) 1994																	 */
/*			 Compuserve: 70253,3237 																						 */
/*			 Genie: J.RATCLIFF3 																								 */
/*			 BBS: 1-314-939-0200																								 */
/*			 Addresss:																													 */
/*					 747 Napa Lane																									 */
/*					 St. Charles, MO 63304																					 */
/*																																					 */
extern char * cdecl AllocLowMem(long int size,short *selector); // Allocate low memory.
extern void cdecl FreeLowMem(short selector); // Free allocated memory.
extern char * cdecl RealPtr(char *real); // Convert flat model address to segment:offset
extern void cdecl memorymove(char *dest,char *source,long int length);
extern void cdecl memoryset(char *dest,int value,int length);

#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define GRAY 7
#define GREY 7
#define DARK_GREY 8
#define DARK_GRAY 8
#define LIGHT_BLUE 9
#define LIGHT_GREEN 10
#define LIGHT_CYAN 11
#define LIGHT_RED 12
#define LIGHT_MAGENTA 13
#define YELLOW 14
#define WHITE 15

#define BEHIND << 4 |

extern void cdecl tprint(int x,int y,int len,char *string,int color);
extern void cdecl TextCursor(int xloc,int yloc);
extern long cdecl GetHeartBeat(void);
extern void cdecl DBUG(int value,int xloc,int yloc);
extern int	cdecl ChangeDirectory(char *dirname);
extern int	cdecl CD_Init(void);	// Locate CD-ROM drive.

extern void IOCTL(int drive,void *request); // IOCTL in IOCTL.C

extern int cdecl InWindows(void); // returns true if running in windows dos box.

extern void cdecl SetVolume(char *sound,int length,int volume);

// This installs a timer interupt at a particular service rate.  The callback,
// goes to a valid C routine.  Will save and restore all registers, handle
// chaining the interrupt vector, and sets up DS addressability and an
// independent stack.  The stack is very small, so your C routine should use
// stack variables at an abolute minimum.
// Returns a pointer to a long integer clock tick counter.
long int * cdecl InstallServiceRoutine(void *address,unsigned int divisor);
// Puts hardware interrupt back the way it belongs.
void cdecl RestoreServiceRoutine(void);
