home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
PCMODE.H
< prev
next >
Wrap
Text File
|
1990-10-22
|
3KB
|
117 lines
/*
pcmode.h
% Header for pc_ routines
5/16/88 by Ted.
OWL-PC 1.2
Copyright (c) 1986, 1987, 1988 by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
3/10/90 ted: Put OCDECL stuff here for assembler files.
3/28/90 jmd ansi-fied
6/05/90 gam Added TSC OCDECL define.
6/06/90 ted Added M6 OCDECL define.
6/20/90 ted Added Watcom 8.0 '386 defines.
10/10/90 ted Added oasm_func and oasm_fptr macros to support C++ compiles.
*/
/* -------------------------------------------------------------------------- */
/* CDECL macro for use in prototyping assembler functions. */
#ifdef M5
# ifdef M6 /* Microsoft C version 6.x Dependent Code */
# define OCDECL _cdecl
# else /* Microsoft C version 5.x Dependent Code */
# define OCDECL _CDECL
# endif
#endif
#ifdef TC /* Turbo C Dependent Code */
# define OCDECL _Cdecl
#endif
#ifdef TCP /* Turbo C++ Dependent Code */
# define OCPP
#endif
#ifdef TSC /* JPI TopSpeed C Dependent Code */
# define OCDECL cdecl
#endif
#ifdef W8 /* Watcom 8.0 Dependent Code */
# define OCDECL cdecl
#endif
#ifdef W8386 /* Watcom 8.0 '386 Dependent Code */
# define OCDECL cdecl
# include <stddef.h>
#endif
#ifdef Z2 /* Zortech C++ 2.0 Dependent Code */
# define OCDECL cdecl
#endif
#ifndef OCDECL
# define OCDECL
#endif
#ifdef OCPP
# define oasm_func(typ,fnm,args) "C" { typ DIGPRIV fnm args; }
# define oasm_fptr(typ,fnm,args) typ (DIGPRIV *fnm)args;
#else
# define oasm_func(typ,fnm,args) typ OCDECL DIGPRIV fnm args;
# define oasm_fptr(typ,fnm,args) typ (OCDECL DIGPRIV *fnm)args;
#endif
/* -------------------------------------------------------------------------- */
#define pc_SetRetrace(wait) \
((wait) ? text_setretracefuncs(&curr_dmgr->disp.dig) : \
text_setnormfuncs(&curr_dmgr->disp.dig))
/* These macros are a special hack to swap from a ram text dig to a bios dig */
#define pc_SetRAM() text_setnormfuncs(&curr_dmgr->disp.dig)
#define pc_SetBIOS() text_setbiosfuncs(&curr_dmgr->disp.dig)
/* PCTEXTIN.C */
extern boolean pc_GetRetrace(void);
/* PCTEXT.C */
extern void text_setnormfuncs(dig_struct *digp);
extern void text_setretracefuncs(dig_struct *digp);
/* PCBIOS.C */
extern void text_setbiosfuncs(dig_struct *digp);
/* PCMODE.C */
extern void pc_SetMode(int mode);
extern int pc_GetMode(void);
extern boolean pc_ModeSupport(int mode);
extern boolean pc_IsHerc(void);
extern boolean pc_IsMDA(void);
extern boolean pc_IsCGA(void);
extern boolean pc_IsEGA(void);
extern boolean pc_IsMCGA(void);
extern boolean pc_IsVGA(void);
extern boolean pc_IsCompaqPlasma(void);
/* PCISCPQ.ASM */
#ifdef OCPP
extern "C" { boolean pc_IsCompaq(void); };
#else
extern boolean OCDECL pc_IsCompaq(void);
#endif
/* PCMGRAPH.C */
extern int pc_SetModeGraphics(void);
/* PCRESTOR.C */
extern void pc_RestoreDisp(void);
/* Non-standard video mode specifiers */
#define PCMODE_EGA43 0x103
#define PCMODE_VGA50 0x203
#define PCMODE_HERC0 0x10A
#define PCMODE_HERC1 0x10B
#define PCMODE_CPQ40 0x140
/* -------------------------------------------------------------------------- */