home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 2
/
FFMCD02.bin
/
new
/
dev
/
misc
/
p2c
/
hp
/
import
/
sysdevs.imp
< prev
next >
Wrap
Text File
|
1993-12-21
|
16KB
|
433 lines
{IncludeFrom=sysdevs <p2c/sysdevs.h>}
{*VarStrings=1} {*ExportSymbol=}
MODULE SYSDEVS;
$SEARCH 'INITLOAD'$
IMPORT SYSGLOBALS;
EXPORT
{* DUMMY DECLARATIONS **********************************}
TYPE
KBDHOOKTYPE = PROCEDURE(VAR STATBYTE,DATABYTE: BYTE;
VAR DOIT: BOOLEAN);
OUT2TYPE = PROCEDURE(VALUE1,VALUE2: BYTE);
REQUEST1TYPE = PROCEDURE(CMD: BYTE; VAR VALUE: BYTE);
BOOLPROC = PROCEDURE(B:BOOLEAN);
{* CRT *************************************************}
{***** THIS SECTION HAS HARD OFFSET REFERENCES *********}
{ IN MODULES CRTB (ASSY FILE GASSM) }
TYPE
CRTWORD = RECORD CASE INTEGER OF
1:(HIGHLIGHTBYTE,CHARACTER: CHAR);
2:(WHOLEWORD: SHORTINT);
END;
CRTLLOPS =(CLLPUT,CLLSHIFTL,CLLSHIFTR,CLLCLEAR,CLLDISPLAY,PUTSTATUS);
CRTLLTYPE=PROCEDURE(OP:CRTLLOPS; ANYVAR POSITION:INTEGER; C:CHAR);
DBCRTOPS =(DBINFO,DBEXCG,DBGOTOXY,DBPUT,DBINIT,DBCLEAR,DBCLINE,DBSCROLLUP,
DBSCROLLDN,DBSCROLLL,DBSCROLLR,DBHIGHL);
DBCINFO = RECORD
SAVEAREA : WINDOWP;
SAVESIZE : INTEGER;
DCURSORADDR : INTEGER;
XMIN,XMAX,YMIN,YMAX : SHORTINT;
CURSX,CURSY : SHORTINT;
C : CHAR;
AREAISDBCRT : BOOLEAN;
CHARISMAPPED: BOOLEAN; { 3/25/85 }
DEBUGHIGHLIGHT: SHORTINT; { 3/25/85 }
END;
DBCRTTYPE=PROCEDURE(OP:DBCRTOPS; VAR DBCRT:DBCINFO);
crtconsttype = packed array [0..11] of byte;
crtfrec = packed record
nobreak,stupid,slowterm,hasxycrt,
haslccrt{built in crt},hasclock,
canupscroll,candownscroll : boolean;
end;
b9 = packed array[0..8] of boolean;
b14= packed array[0..13] of boolean;
crtcrec = packed record (* CRT CONTROL CHARS *)
rlf,ndfs,eraseeol,
eraseeos,home,
escape : char;
backspace : char;
fillcount : 0..255;
clearscreen,
clearline : char;
prefixed : b9
end;
crtirec = packed record (* CRT INFO & INPUT CHARS *)
width,height : shortint;
crtmemaddr,crtcontroladdr,
keybufferaddr,progstateinfoaddr:integer;
keybuffersize: shortint;
crtcon : crtconsttype;
right,left,down,up: char;
badch,chardel,stop,
break,flush,eof : char;
altmode,linedel : char;
backspace,
etx,prefix : char;
prefixed : b14 ;
cursormask : integer;
spare : integer;
end;
environ = record
miscinfo: crtfrec;
crttype: integer;
crtctrl: crtcrec;
crtinfo: crtirec;
end;
environptr = ^environ;
crtkinds = (NOCRT, ALPHATYPE, BITMAPTYPE, SPECIALCRT1, SPECIALCRT2);
VAR
SYSCOM: ENVIRONPTR;
ALPHASTATE['ALPHAFLAG'] : BOOLEAN;
GRAPHICSTATE['GRAPHICSFLAG'] : BOOLEAN;
CRTIOHOOK : AMTYPE;
TOGGLEALPHAHOOK : PROCEDURE;
TOGGLEGRAPHICSHOOK : PROCEDURE;
DUMPALPHAHOOK : PROCEDURE;
DUMPGRAPHICSHOOK : PROCEDURE;
UPDATECURSORHOOK : PROCEDURE;
CRTINITHOOK : PROCEDURE;
CRTLLHOOK : CRTLLTYPE;
DBCRTHOOK : DBCRTTYPE;
XPOS : SHORTINT; { CURSOR X POSITION }
YPOS : SHORTINT; { CURSOR Y POSITION }
CURRENTCRT : CRTKINDS; { ACTIVE ALPHA DRIVER TYPE }
BITMAPADDR : INTEGER; { ADDRESS OF BITMAP CONTROL SPACE }
FRAMEADDR : INTEGER; { ADDRESS OF BITMAP FRAME BUFFER }
REPLREGCOPY : SHORTINT; { REGISTER COPIES FOR BITMAP DISPLAY }
WINDOWREGCOPY : SHORTINT; { MUST BE IN GLOBALS BECAUSE REGISTERS }
WRITEREGCOPY : SHORTINT; { ARE NOT READABLE -- MAY BE UNDEFINED }
{* KEYBOARD *******************************************}
CONST
KBD_ENABLE = 0; KBD_DISABLE = 1;
SET_AUTO_DELAY = 2; SET_AUTO_REPEAT= 3;
GET_AUTO_DELAY = 4; GET_AUTO_REPEAT= 5;
SET_KBDTYPE = 6; SET_KBDLANG = 7;
TYPE
STRING80PTR = ^STRING80;
KEYBOARDTYPE = (NOKBD,LARGEKBD,SMALLKBD,ITFKBD,SPECIALKBD1,SPECIALKBD2);
LANGTYPE = (NO_KBD,FINISH_KBD,BELGIAN_KBD,CDN_ENG_KBD,CDN_FR_KBD,
NORWEGIAN_KBD,DANISH_KBD,DUTCH_KBD,SWISS_GR_KBD,SWISS_FR_KBD,
SPANISH_EUR_KBD,SPANISH_LATIN_KBD,UK_KBD,ITALIAN_KBD,
FRENCH_KBD,GERMAN_KBD,SWEDISH_KBD,SPANISH_KBD,
KATAKANA_KBD,US_KBD,ROMAN8_KBD,NS1_KBD,NS2_KBD,NS3_KBD,
SWISS_GR_B_KBD,SWISS_FR_B_KBD {ADDED FOR 3.1--SFB-5/22/85} );
MENUTYPE = (M_NONE,M_SYSNORM,M_SYSSHIFT,M_U1,M_U2,M_U3,M_U4);
VAR
KBDREQHOOK : REQUEST1TYPE;
KBDIOHOOK : AMTYPE;
KBDISRHOOK : KBDHOOKTYPE;
KBDPOLLHOOK : BOOLPROC;
KBDTYPE : KEYBOARDTYPE;
KBDCONFIG : BYTE; { KEYBOARD CONFIGURATION JUMPER }
KBDLANG : LANGTYPE;
SYSMENU : STRING80PTR;
SYSMENUSHIFT : STRING80PTR;
MENUSTATE : MENUTYPE;
{* ENABLE / DISABLE ************************************}
CONST
KBDMASK=1;RESETMASK=2;TIMERMASK=4;PSIMASK=8;FHIMASK=16;
VAR
MASKOPSHOOK : OUT2TYPE; { ENABLE, DISABLE }
{* BEEPER **********************************************}
VAR
BEEPERHOOK: OUT2TYPE;
BFREQUENCY, BDURATION: BYTE;
{* RPG *************************************************}
CONST
RPG_ENABLE = 0; RPG_DISABLE = 1;
SET_RPG_RATE = 2; GET_RPG_RATE =3;
VAR
RPGREQHOOK: REQUEST1TYPE;
RPGISRHOOK: KBDHOOKTYPE;
{* BATTERY *********************************************}
TYPE
BATCMDTYPE = PROCEDURE(CMD: BYTE; NUMDATA: INTEGER;
B1, B2, B3, B4, B5: BYTE);
BATREADTYPE= PROCEDURE(VAR DATA: BYTE);
VAR
BATTERYPRESENT[-563]: BOOLEAN;
BATCMDHOOK : BATCMDTYPE;
BATREADHOOK: BATREADTYPE;
{* CLOCK ***********************************************}
TYPE
RTCTIME = PACKED RECORD
PACKEDTIME,PACKEDDATE:INTEGER;
END;
CLOCKFUNC = (CGETDATE,CGETTIME,CSETDATE,CSETTIME);
CLOCKOP = (CGET,CSET,CUPDATE); {CUPDATE ADDED FOR BOBCAT 4/11/85 SFB}
CLOCKDATA = RECORD
CASE BOOLEAN OF
TRUE :(TIMETYPE:TIMEREC);
FALSE:(DATETYPE:DATEREC);
END;
CLOCKREQTYPE = PROCEDURE(CMD:CLOCKFUNC; ANYVAR DATA:CLOCKDATA);
CLOCKIOTYPE = PROCEDURE(CMD:CLOCKOP ; VAR DATA:RTCTIME);
VAR
CLOCKREQHOOK : CLOCKREQTYPE; { CLOCK MODULE INTERFACE }
CLOCKIOHOOK : CLOCKIOTYPE; { CARD DRIVER INTERFACE }
{* TIMER ***********************************************}
TYPE
TIMERTYPES = (CYCLICT,PERIODICT,DELAYT,DELAY7T,MATCHT);
TIMEROPTYPE = (SETT,READT,GETTINFO);
TIMERDATA = RECORD
CASE INTEGER OF
0: (COUNT: INTEGER);
1: (MATCH: TIMEREC);
2: (RESOLUTION,RANGE:INTEGER);
END;
TIMERIOTYPE = PROCEDURE(TIMER: TIMERTYPES;OP: TIMEROPTYPE;VAR TD: TIMERDATA);
VAR
TIMERIOHOOK : TIMERIOTYPE;
TIMERISRHOOK : KBDHOOKTYPE;
{* KEYBUFFER *******************************************}
CONST
KMAXBUFSIZE = 255;
TYPE
KOPTYPE = (KGETCHAR,KAPPEND,KNONADVANCE,KCLEAR,KDISPLAY,
KGETLAST,KPUTFIRST);
KBUFTYPE= PACKED ARRAY[0..KMAXBUFSIZE] OF CHAR;
KBUFPTR = ^KBUFTYPE;
KBUFRECPTR = ^KBUFREC;
KBUFREC = RECORD
ECHO: BOOLEAN;
NON_CHAR: CHAR;
MAXSIZE,SIZE,INP,OUTP: INTEGER;
BUFFER: KBUFPTR;
END;
VAR
KEYBUFFER : KBUFRECPTR;
KBDWAITHOOK: PROCEDURE;
KBDRELEASEHOOK: PROCEDURE;
STATUSLINE: PACKED ARRAY[0..7] OF CHAR;
{0 s or f = STEP/FLASH IN PROGRESS (WAITING FOR TRAP #0)}
{1..5 last executed/current line number }
{6 S=SYSTEM U=USER DEFINITION FOR ITF SOFT KEYS}
{ BLANK FO