home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TOOLKIT.ZIP / DECL.TTT < prev    next >
Encoding:
Text File  |  1986-09-28  |  6.9 KB  |  177 lines

  1. {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  2. {                                                                           }
  3. {           T E C H N O J O C K S     T U R B O    T O O L K I T            }
  4. {                                                                           }
  5. {                      Module   :   Decl.TTT                                }
  6. {                                                                           }
  7. {                      Version  :   3.0 , October 1, 1986                   }
  8. {                                                                           }
  9. {                      Purpose  :   Declaration of Type, Const and Var.     }
  10. {                                                                           }
  11. {                 Requirements  :   N/A                                     }
  12. {                                                                           }
  13. {                                                                           }
  14. {     This is the first file which must always be included whenever         }
  15. {     you want to use any of the  Technojocks Turbo Toolkit procedures      }
  16. {     and functions.                                                        }
  17. {                                                                           }
  18. {                                                                           }
  19. {                                                Bob Ainsbury               }
  20. {                                                Technojock                 }
  21. {                                                Houston                    }
  22. {                                                (713) 293-2760             }
  23. {+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  24. Const
  25. Max_choices = 25;          {No of prompts in menu system see Menu.TTT}
  26. Max_WindowsandScreens = 8; {used in Window.TTT}
  27. Max_screens = 4;           {used in Window.TTT}
  28. WindowCounter : byte = 0;  {used in Window.TTT}
  29. MaxInputFields = 40;       {used in IO.TTT}
  30. {
  31. ***************
  32. *   T Y P E   *
  33. ***************
  34. }
  35. TYPE
  36. Regpack = record
  37.            Ax,Bx,Cx,Dx,Bp,Si,Di,Ds,Es,Flags:integer
  38.           end;
  39. String80 = string[80];
  40. String20 = string[20];
  41. string30 = string[30];
  42. string4  = string[4];
  43. string3  = string[3];
  44. string2  = string[2];
  45. Pixel = record
  46.          C : char;
  47.          A : byte;
  48.         end;
  49. Line = array[1..80] of pixel;            {Fastwrit.TTT}
  50. Image = array [1..4096] of char;
  51. ScreenImage = record
  52.                ScreenSnap: Image;
  53.                CursorX : integer;
  54.                CursorY : integer;
  55.               end;
  56. ScreenPtr = ^ScreenImage;               {Window.TTT}
  57. Menu_record = record
  58.                 Heading      : string80;                { '' for no heading}
  59.                 Text         : array[1..Max_Choices] of string80;
  60.                 TotalPicks   : integer;
  61.                 PicksPerLine : byte;
  62.                 AddPrefix    : byte;                    {0 no, 1 No.'s, 2 Lets}
  63.                 TopLeftXY    : array[1..2] of byte;     {X,Y}
  64.                 Boxtype      : byte;                    {0,1,2,3, >3}
  65.                 Colors       : array[1..5] of byte;     {HF,HB,LF,LB,Box}
  66.                 AllowEsc     : boolean;                 {true if Esc will exit}
  67.               end;
  68. Str_Field_Defn = record
  69.                   Upfield   : byte;
  70.                   Downfield : byte;
  71.                   Leftfield : byte;
  72.                   Rightfield: byte;
  73.                   X         : byte;
  74.                   Y         : byte;
  75.                   InString  : ^string80;
  76.                   StrLength : byte;
  77.                   Format    : string80;
  78.                   Message   : string80;
  79.                   MsgX      : byte;
  80.                   MsgY      : byte;
  81.                   CursorX   : byte;
  82.                   CursorInit: byte;
  83.                   StrLocX   : byte;
  84.                 end;
  85. Str_Field_Ptr = ^Str_Field_Defn;
  86. InputZone = record
  87.              HiF  : byte;
  88.              HiB  : byte;
  89.              LoF  : byte;
  90.              LoB  : byte;
  91.              MsgF : byte;
  92.              MsgB : byte;
  93.              TotalFields: byte;
  94.              CurrentField : byte;
  95.              IOEsc : boolean;
  96.              IO_FieldsSet : boolean;
  97.              Displayed   : boolean;
  98.              IO_Beepon : boolean;
  99.              HelpAddress : integer;
  100.              IO_Putunderline : boolean;
  101.              IO_Insert : boolean;
  102.             end;
  103.  
  104. {
  105. ***************
  106. *  C O N S T  *
  107. ***************
  108. }
  109. Const
  110.  
  111. Snow : boolean = false;             {indicates if snowy IBM CGA installed}
  112. F1  = #59;       CursorUp     = #72;    InsKey      = #82;
  113. F2  = #60;       CursorDown   = #80;    DelKey      = #83;
  114. F3  = #61;       CursorLeft   = #75;    ShiftTabKey = #15;
  115. F4  = #62;       CursorRight  = #77;
  116. F5  = #63;                                 { Non extended below }
  117. F6  = #64;       HomeKey      = #71;            EscKey    = #27;
  118. F7  = #65;       EndKey       = #79;            Backspace = #8;
  119. F8  = #66;       PgUp         = #73;            EnterKey  = #13;
  120. F9  = #67;       PgDn         = #81;            TabKey    = #9;
  121. F10 = #68;                                      MinusKey  = #45;
  122.                                                 PlusKey   = #43;
  123.  
  124. IO_Settings : InputZone= (HiF:white;
  125.                           HiB:blue;
  126.                           LoF:blue;
  127.                           LoB:lightgray;
  128.                           MsgF:yellow;
  129.                           MsgB:red;
  130.                           TotalFields:MaxInputFields;
  131.                           CurrentField : 1;
  132.                           IOEsc : false;
  133.                           IO_FieldsSet : false;
  134.                           Displayed    : false;
  135.                           IO_BeepOn    : true;
  136.                           HelpAddress  : 0;
  137.                           IO_PutUnderline: true;
  138.                           IO_Insert : false);
  139. FmtChars  : set of char = ['!','#','@','*'];
  140. IOUp       = #72;
  141. IODown     = #80;
  142. IORight    = #77;
  143. IOLeft     = #75;
  144. IODel      = #83;
  145. IOTotErase = #18;    {Alt-E}
  146. IOErase    = #32;    {Alt-D}
  147. IOFinish   = #79;    {End}   {maybe change to F10}
  148. IOEsc1     = #27;
  149. IOEsc2     = #27;
  150. IOTab      = #9;
  151. IOShiftTab = #15;
  152. IOEnter    = #13;
  153. IOIns      = #82;
  154. IOBackSp   = #8;
  155. IORightFld = #116;
  156. IOLeftFld  = #115;
  157. IOHelp     = #59;
  158. {
  159. ***************
  160. *    V A R    *
  161. ***************
  162. }
  163. Var
  164. recpack :regpack;
  165. Funckey: boolean;
  166. Ch: Char;
  167. Crtmode : byte       absolute $0040:$0049;  {7 is mono, else assumed color}
  168. Monobuffer : image   absolute $B000:$0000;  {mono screen memory loc}
  169. Colorbuffer: image   absolute $B800:$0000;  {color screen memory loc}
  170. CRTadapter : integer absolute $0040:$0063;  {current display adapter}
  171. VideoMode  : byte    absolute $0040:$0065;  {video port mode byte}
  172. SavedLine : line;
  173. Screen : array[1..Max_WindowsandScreens] of ScreenPtr;
  174. FieldDefn : array[0..MaxInputFields] of Str_Field_Ptr;
  175.  
  176.  
  177.