home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / dev / misc / p2c / hp / import / sysdevs.imp < prev    next >
Text File  |  1993-12-21  |  16KB  |  433 lines

  1.  
  2.  
  3. {IncludeFrom=sysdevs <p2c/sysdevs.h>}
  4.  
  5.  
  6. {*VarStrings=1} {*ExportSymbol=}
  7.  
  8.  
  9. MODULE SYSDEVS;
  10.  
  11. $SEARCH 'INITLOAD'$ 
  12.  
  13.  
  14. IMPORT SYSGLOBALS;
  15. EXPORT
  16.  {* DUMMY DECLARATIONS **********************************}
  17.  TYPE
  18.    KBDHOOKTYPE  = PROCEDURE(VAR STATBYTE,DATABYTE: BYTE;
  19.                             VAR DOIT: BOOLEAN);
  20.    OUT2TYPE     = PROCEDURE(VALUE1,VALUE2: BYTE);
  21.    REQUEST1TYPE = PROCEDURE(CMD: BYTE; VAR VALUE: BYTE);
  22.    BOOLPROC     = PROCEDURE(B:BOOLEAN);
  23.    
  24. {* CRT *************************************************}
  25. {***** THIS SECTION HAS HARD OFFSET REFERENCES *********}
  26. {      IN MODULES CRTB (ASSY FILE GASSM)                }
  27. TYPE
  28.   CRTWORD = RECORD CASE INTEGER OF
  29.             1:(HIGHLIGHTBYTE,CHARACTER: CHAR);
  30.             2:(WHOLEWORD: SHORTINT);
  31.             END;
  32.   CRTLLOPS =(CLLPUT,CLLSHIFTL,CLLSHIFTR,CLLCLEAR,CLLDISPLAY,PUTSTATUS);
  33.   CRTLLTYPE=PROCEDURE(OP:CRTLLOPS; ANYVAR POSITION:INTEGER; C:CHAR);
  34.   DBCRTOPS =(DBINFO,DBEXCG,DBGOTOXY,DBPUT,DBINIT,DBCLEAR,DBCLINE,DBSCROLLUP,
  35.              DBSCROLLDN,DBSCROLLL,DBSCROLLR,DBHIGHL);
  36.   DBCINFO  = RECORD
  37.                SAVEAREA : WINDOWP;
  38.                SAVESIZE : INTEGER;
  39.                DCURSORADDR : INTEGER;
  40.                XMIN,XMAX,YMIN,YMAX : SHORTINT;
  41.                CURSX,CURSY         : SHORTINT;
  42.                C : CHAR;
  43.                AREAISDBCRT : BOOLEAN;
  44.                CHARISMAPPED: BOOLEAN; { 3/25/85 }
  45.                DEBUGHIGHLIGHT: SHORTINT;  { 3/25/85 }
  46.              END;
  47.   DBCRTTYPE=PROCEDURE(OP:DBCRTOPS; VAR DBCRT:DBCINFO);
  48.   
  49.   crtconsttype = packed array [0..11] of byte;
  50.   
  51.   crtfrec = packed record
  52.                nobreak,stupid,slowterm,hasxycrt,
  53.                haslccrt{built in crt},hasclock,
  54.                canupscroll,candownscroll      :    boolean;
  55.              end;
  56.                            
  57.   b9 = packed array[0..8] of boolean;
  58.   b14= packed array[0..13] of boolean;
  59.   crtcrec = packed record                               (* CRT CONTROL CHARS *)
  60.                rlf,ndfs,eraseeol,
  61.                eraseeos,home,
  62.                escape             : char;
  63.                backspace          : char;
  64.                fillcount          : 0..255;
  65.                clearscreen,
  66.                clearline          : char;
  67.                prefixed           : b9
  68.             end;
  69.                                   
  70.   crtirec = packed record                          (* CRT INFO & INPUT CHARS *)
  71.                width,height      : shortint;
  72.                crtmemaddr,crtcontroladdr,
  73.                keybufferaddr,progstateinfoaddr:integer;
  74.                keybuffersize: shortint;
  75.                crtcon            : crtconsttype;
  76.                right,left,down,up: char;
  77.                badch,chardel,stop,
  78.                break,flush,eof   : char;
  79.                altmode,linedel   : char;
  80.                backspace,
  81.                etx,prefix        : char;
  82.                prefixed          : b14 ;
  83.                cursormask        : integer;
  84.                spare             : integer;
  85.             end;
  86.  
  87.   environ = record
  88.               miscinfo: crtfrec;
  89.               crttype: integer;
  90.               crtctrl: crtcrec;
  91.               crtinfo: crtirec;
  92.             end; 
  93.  
  94.   environptr    = ^environ; 
  95.   
  96.   crtkinds = (NOCRT, ALPHATYPE, BITMAPTYPE, SPECIALCRT1, SPECIALCRT2);
  97.   
  98. VAR
  99.   SYSCOM: ENVIRONPTR;
  100.   ALPHASTATE['ALPHAFLAG']       : BOOLEAN;
  101.   GRAPHICSTATE['GRAPHICSFLAG']  : BOOLEAN;
  102.   CRTIOHOOK             : AMTYPE;
  103.   TOGGLEALPHAHOOK       : PROCEDURE;
  104.   TOGGLEGRAPHICSHOOK    : PROCEDURE;
  105.   DUMPALPHAHOOK         : PROCEDURE;
  106.   DUMPGRAPHICSHOOK      : PROCEDURE;
  107.   UPDATECURSORHOOK      : PROCEDURE;
  108.   CRTINITHOOK           : PROCEDURE;
  109.   CRTLLHOOK             : CRTLLTYPE;
  110.   DBCRTHOOK             : DBCRTTYPE;
  111.   XPOS                  : SHORTINT; { CURSOR X POSITION }
  112.   YPOS                  : SHORTINT; { CURSOR Y POSITION }
  113.   CURRENTCRT            : CRTKINDS; { ACTIVE ALPHA DRIVER TYPE }
  114.   BITMAPADDR            : INTEGER;  { ADDRESS OF BITMAP CONTROL SPACE }
  115.   FRAMEADDR             : INTEGER;  { ADDRESS OF BITMAP FRAME BUFFER }
  116.   REPLREGCOPY           : SHORTINT; { REGISTER COPIES FOR BITMAP DISPLAY }
  117.   WINDOWREGCOPY         : SHORTINT; { MUST BE IN GLOBALS BECAUSE REGISTERS }
  118.   WRITEREGCOPY          : SHORTINT; { ARE NOT READABLE -- MAY BE UNDEFINED }
  119.  
  120.  {* KEYBOARD *******************************************}
  121.  CONST
  122.    KBD_ENABLE     = 0; KBD_DISABLE    = 1;
  123.    SET_AUTO_DELAY = 2; SET_AUTO_REPEAT= 3;
  124.    GET_AUTO_DELAY = 4; GET_AUTO_REPEAT= 5;
  125.    SET_KBDTYPE    = 6; SET_KBDLANG    = 7;
  126.  TYPE
  127.    STRING80PTR = ^STRING80;
  128.    KEYBOARDTYPE = (NOKBD,LARGEKBD,SMALLKBD,ITFKBD,SPECIALKBD1,SPECIALKBD2);
  129.    LANGTYPE = (NO_KBD,FINISH_KBD,BELGIAN_KBD,CDN_ENG_KBD,CDN_FR_KBD,
  130.                NORWEGIAN_KBD,DANISH_KBD,DUTCH_KBD,SWISS_GR_KBD,SWISS_FR_KBD,
  131.                SPANISH_EUR_KBD,SPANISH_LATIN_KBD,UK_KBD,ITALIAN_KBD,
  132.                FRENCH_KBD,GERMAN_KBD,SWEDISH_KBD,SPANISH_KBD,
  133.                KATAKANA_KBD,US_KBD,ROMAN8_KBD,NS1_KBD,NS2_KBD,NS3_KBD,
  134.                SWISS_GR_B_KBD,SWISS_FR_B_KBD {ADDED FOR 3.1--SFB-5/22/85} );
  135.    MENUTYPE = (M_NONE,M_SYSNORM,M_SYSSHIFT,M_U1,M_U2,M_U3,M_U4);
  136.  VAR
  137.    KBDREQHOOK   : REQUEST1TYPE;
  138.    KBDIOHOOK    : AMTYPE;
  139.    KBDISRHOOK   : KBDHOOKTYPE;
  140.    KBDPOLLHOOK  : BOOLPROC;
  141.    KBDTYPE      : KEYBOARDTYPE;
  142.    KBDCONFIG    : BYTE;         { KEYBOARD CONFIGURATION JUMPER }
  143.    KBDLANG      : LANGTYPE;
  144.    SYSMENU      : STRING80PTR;
  145.    SYSMENUSHIFT : STRING80PTR;
  146.    MENUSTATE    : MENUTYPE;
  147.  
  148. {* ENABLE / DISABLE ************************************}
  149.  CONST
  150.    KBDMASK=1;RESETMASK=2;TIMERMASK=4;PSIMASK=8;FHIMASK=16;
  151.  VAR
  152.    MASKOPSHOOK : OUT2TYPE; { ENABLE, DISABLE }
  153.  
  154. {* BEEPER **********************************************}
  155.  VAR
  156.    BEEPERHOOK: OUT2TYPE;
  157.    BFREQUENCY, BDURATION: BYTE;
  158.  
  159. {* RPG *************************************************}
  160.  CONST
  161.    RPG_ENABLE   = 0; RPG_DISABLE = 1;
  162.    SET_RPG_RATE = 2; GET_RPG_RATE =3;
  163.  VAR
  164.    RPGREQHOOK: REQUEST1TYPE;
  165.    RPGISRHOOK: KBDHOOKTYPE;
  166.    
  167. {* BATTERY *********************************************}
  168. TYPE
  169.   BATCMDTYPE = PROCEDURE(CMD: BYTE; NUMDATA: INTEGER;
  170.                          B1, B2, B3, B4, B5: BYTE); 
  171.   BATREADTYPE= PROCEDURE(VAR DATA: BYTE);
  172. VAR
  173.   BATTERYPRESENT[-563]: BOOLEAN;
  174.   BATCMDHOOK : BATCMDTYPE;
  175.   BATREADHOOK: BATREADTYPE;
  176.  
  177. {* CLOCK ***********************************************}
  178. TYPE
  179.   RTCTIME = PACKED RECORD 
  180.                PACKEDTIME,PACKEDDATE:INTEGER;
  181.             END;
  182.   CLOCKFUNC = (CGETDATE,CGETTIME,CSETDATE,CSETTIME);
  183.   CLOCKOP   = (CGET,CSET,CUPDATE);      {CUPDATE ADDED FOR BOBCAT 4/11/85 SFB}
  184.   CLOCKDATA = RECORD
  185.                 CASE BOOLEAN OF
  186.                 TRUE :(TIMETYPE:TIMEREC);
  187.                 FALSE:(DATETYPE:DATEREC);
  188.               END;
  189.   CLOCKREQTYPE = PROCEDURE(CMD:CLOCKFUNC; ANYVAR DATA:CLOCKDATA);
  190.   CLOCKIOTYPE  = PROCEDURE(CMD:CLOCKOP  ; VAR DATA:RTCTIME);
  191. VAR
  192.   CLOCKREQHOOK : CLOCKREQTYPE;  { CLOCK MODULE INTERFACE }
  193.   CLOCKIOHOOK  : CLOCKIOTYPE;   { CARD DRIVER INTERFACE }
  194.  
  195. {* TIMER ***********************************************}
  196. TYPE
  197.   TIMERTYPES = (CYCLICT,PERIODICT,DELAYT,DELAY7T,MATCHT);
  198.   TIMEROPTYPE = (SETT,READT,GETTINFO);
  199.   TIMERDATA = RECORD
  200.                CASE INTEGER OF
  201.                0: (COUNT: INTEGER);
  202.                1: (MATCH: TIMEREC);
  203.                2: (RESOLUTION,RANGE:INTEGER);
  204.                END;
  205.   TIMERIOTYPE = PROCEDURE(TIMER: TIMERTYPES;OP: TIMEROPTYPE;VAR TD: TIMERDATA);
  206. VAR 
  207.   TIMERIOHOOK  : TIMERIOTYPE; 
  208.   TIMERISRHOOK : KBDHOOKTYPE;
  209.  
  210.  
  211. {* KEYBUFFER *******************************************}
  212. CONST
  213.   KMAXBUFSIZE = 255;
  214. TYPE
  215.  
  216.   KOPTYPE = (KGETCHAR,KAPPEND,KNONADVANCE,KCLEAR,KDISPLAY,
  217.              KGETLAST,KPUTFIRST);
  218.   KBUFTYPE= PACKED ARRAY[0..KMAXBUFSIZE] OF CHAR;
  219.   KBUFPTR = ^KBUFTYPE;
  220.   KBUFRECPTR = ^KBUFREC;
  221.   KBUFREC = RECORD
  222.               ECHO: BOOLEAN;
  223.               NON_CHAR: CHAR;
  224.               MAXSIZE,SIZE,INP,OUTP: INTEGER;
  225.               BUFFER: KBUFPTR;
  226.             END;
  227.   
  228. VAR
  229.   KEYBUFFER : KBUFRECPTR;
  230.   KBDWAITHOOK: PROCEDURE;
  231.   KBDRELEASEHOOK: PROCEDURE;
  232.   STATUSLINE: PACKED ARRAY[0..7] OF CHAR;
  233.   {0  s or f = STEP/FLASH IN PROGRESS (WAITING FOR TRAP #0)}
  234.   {1..5  last executed/current line number }
  235.   {6  S=SYSTEM  U=USER  DEFINITION FOR ITF SOFT KEYS}
  236.   {   BLANK FO