home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / TRIDV183.ZIP / TRIDOOR.DOC < prev    next >
Encoding:
Text File  |  1991-01-30  |  41.8 KB  |  1,134 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                        T R I U M P H   S O F T W A R E
  13.  
  14.  
  15.                                   Presents
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.            ░██████████        ░██   ░███████
  23.            ░█  ░██  ░█               ░██  ░██
  24.                ░██     ░█░██  ░██    ░██  ░██  ░███   ░███  ░█░██
  25.                ░██      ░█ ░█  ░█    ░██  ░██ ░█  ░█ ░█  ░█  ░█ ░█
  26.               ░████    ░██    ░███  ░███████   ░███   ░███  ░██
  27.  
  28.  
  29.  
  30.  
  31.                           An On-Line Door Support Unit
  32.                       For use with Turbo Pascal 5.5 and 6.0
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                     TriDoor Written by Christopher M. Russo
  39.            TriComm Communications Support Written by Jeremy H. DuBois
  40.  
  41.          TriDoor, TriComm (c)1991 Triumph Software, All Rights Reserved.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.            QuickBBS is a Registered Trademark of the QuickBBS Group.
  48.             Turbo Pascal is a Registered Trademark of Borland, Inc.
  49.  
  50.  
  51.  
  52.               Triumph Software is not affiliated in any way with
  53.                  either The QuickBBS Group or Borland, Inc.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. Triumph Software - TriDoor Documentation                                  pg. i
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                  DISCLAIMER
  68.  
  69.  
  70.      Triumph Software and  the  employees/programmers  in  conjunction with
  71.   and/or affiliated  with Triumph Software  can  not  be  held  responsible
  72.   for  the  condition  of any  software  received  through any  non-postal/
  73.   non-parcel means.  
  74.  
  75.      Nor  can  said persons  be held  responsible for  any damage caused to
  76.   media or hardware as a result of the use of any of our products.
  77.  
  78.      Triumph Software and  it's employees and  associates would like  it to
  79.   be known,  however, that  all of  their  products are  thoroughly  tested
  80.   before  leaving  our  offices.  It  is  only  in the deepest faith in our
  81.   own product that any such software is released to the public.
  82.  
  83.      Triumph  Software reserves  the right  to  change  any  documentation,
  84.   disclaimer,  licensing information  or registration  procedures and costs
  85.   at any time for any reason with no prior warning or notice.
  86.  
  87.  
  88.  
  89. Triumph Software - TriDoor Documentation                                pg. ii
  90.  
  91.  
  92.  
  93.  
  94.  
  95.                          LIMITED LICENSING AGREEMENT
  96.  
  97.  
  98.      The holder of  the  unregistered TriDoor package  is allowed a limited
  99.    usage period of 30 (thirty)  days,  wherein  he  or she  may incorporate
  100.    the unit  in any program  that he or she develops as long as the program 
  101.    incorporating the  TriDoor unit is not distributed  in any manner at any 
  102.    time.  After  the thirty day period, the holder of the unregistered copy
  103.    of the TriDoor  package must register the software to be allowed further
  104.    use of TriDoor.
  105.  
  106.      A private registered  copy may be obtained by filling  out the TriDoor
  107.    registration form and sending both the registration form and  $30.00, in
  108.    the form  of a  check or  money order, to Triumph Software.  The private
  109.    copy will  allow the registered  owner  to produce  programs  using  the
  110.    TriDoor  unit  and  distribute  them  as long as  the registered copy of
  111.    TriDoor  is  not  included  in  the  the  package,  no  compensation  is
  112.    obtained in any way from the distribution of the  software incorporating
  113.    the TriDoor unit, and Triumph Software is given ample credit as depicted
  114.    in the  final chapter  of  this document.  The  registered  copy  of the
  115.    TriDoor unit must not be distributed in any way other than as a compiled
  116.    portion of a program or software produced by the registered copy holder.
  117.  
  118.      A  commercial  registered  copy  may  be  obtained  by filling out the
  119.    TriDoor  registration  form and sending  both the registration  form and
  120.    $100.00, in the form of  check or  money order, to Triumph Software. The
  121.    commercial copy  will allow  the registered  owner  to  produce programs
  122.    using the TriDoor unit and distribute them.  This  copy  also allows the
  123.    holder of  the  registered  copy to  obtain legal  compensation  for the
  124.    program incorporating the TriDoor package.  The holder of the commercial
  125.    registered  copy  must include  acceptable credit  in  the documentation
  126.    of his or  her  program as  further  explained  in  the final chapter of
  127.    this document.  The  registered copy  of the  TriDoor unit  must  not be
  128.    distributed in any way other than as a compiled  portion of a program or
  129.    software produced by the registered copy holder.
  130.  
  131.      An individual copy must be registered for each  individual company and
  132.    person.  The  only exception  is in  the case  of a  company  owned by a
  133.    person in  which case the copy may be registered for both in the case of
  134.    a commercial copy.
  135.  
  136.      Triumph Software reserves the right to  revoke registration priviliges
  137.    either temporarily  or permanently if the conditions of the registration
  138.    are not properly met by the holder of the registered TriDoor package.
  139.  
  140.      Triumph Software reserves the right to use the registered owners name,
  141.    company and/or product  created incorporating the TriDoor unit in any of
  142.    Triumph Software's advertising of any type.
  143.  
  144.      Registered  copy holders  will be  entitled to  minor  upgrades of the
  145.    TriDoor package at a minimal processing  and materials fee  of $6.00 per
  146.    upgrade.  Major upgrades can be obtained at a cost of $12.00 for private
  147.    copies and $24.00 for commercial copies.
  148.  
  149.  
  150.  
  151. Triumph Software - TriDoor Documentation                                pg. iii
  152.  
  153.  
  154.  
  155.  
  156.  
  157.                               TABLE OF CONTENTS
  158.  
  159.  
  160.      Why Use Tridoor?. . . . . . . . . . . . . . . . . . . . . . . . .001
  161.  
  162.      Features of TriDoor . . . . . . . . . . . . . . . . . . . . . . .002
  163.  
  164.      Command Summary . . . . . . . . . . . . . . . . . . . . . . . . .003    
  165.  
  166.      Accessible Variables. . . . . . . . . . . . . . . . . . . . . . .009
  167.  
  168.      Incoporating Support for Other BBS Software . . . . . . . . . . .010
  169.  
  170.      Programming With TriDoor. . . . . . . . . . . . . . . . . . . . .012
  171.  
  172.      Reserved Words. . . . . . . . . . . . . . . . . . . . . . . . . .013
  173.  
  174.      Tested Limits of TriDoor. . . . . . . . . . . . . . . . . . . . .014
  175.  
  176.      Programming Hint(s) . . . . . . . . . . . . . . . . . . . . . . .015
  177.  
  178.      Things to Come ("The Workbench"). . . . . . . . . . . . . . . . .016
  179.  
  180.      Who to Contact. . . . . . . . . . . . . . . . . . . . . . . . . .017
  181.  
  182.      History of TriDoor. . . . . . . . . . . . . . . . . . . . . . . .018
  183.  
  184.      Other Products by Triumph Software. . . . . . . . . . . . . . . .019
  185.  
  186.      A Comment on Quality. . . . . . . . . . . . . . . . . . . . . . .020
  187.  
  188.      Acceptable Credit in Programs and Documentation . . . . . . . . .021
  189.  
  190.  
  191.  
  192. Triumph Software - TriDoor Documentation                                pg. 001
  193.  
  194.  
  195.  
  196.  
  197.  
  198.                               WHY USE TRIDOOR?
  199.  
  200.  
  201.      The TriDoor communications package provides the programmer with a list
  202.    of many commands and features that I have found extremely useful, if not
  203.    invaluable while  writing  various on-line  doors  for  both  my BBS and 
  204.    others.
  205.  
  206.      No longer is the value of any door program you write hinging upon your
  207.    abilities  to write the  communications drivers and  commands to support 
  208.    them!  Now, with communications equivalents of standard Pascal commands,
  209.    such  as  print()  which  almost  mirrors  Turbo  Pascal's  write()  and
  210.    writeln(), you can sit at your terminal and write  any program for a BBS
  211.    in the same amount of  time and with  the same amount of effort it would
  212.    take to write one for local usage!
  213.  
  214.      The  possibilities are endless- I have written  on-line games, archive
  215.    viewing utilities, text/ansi  file viewers, "top-ten" user-list creators
  216.    and  many more.
  217.  
  218.      How many times have you said to yourself, "Wow, this is a great system
  219.    I  have here, if only  I  could add..." One solution: you can go out and 
  220.    download programs to do some of the  things you  need to do; but none of
  221.    them  are  ever exactly  what  you want, and  you have to pay all  those  
  222.    shareware fees.  What  do you  do about all the things that you couldn't
  223.    find anywhere? Hire an expensive programmer?
  224.  
  225.      I  frequently find myself saying "If you can't do it with TriDoor, YOU 
  226.    CAN'T DO IT!"  It  is the  easiest  way to  create  a  door. This is the 
  227.    best software  package available  of this kind.  It's  easy,  quick, and 
  228.    powerful and you  hold the  power  to make the  doors  and on-line games
  229.    that  you have always wanted!
  230.  
  231.      
  232.  
  233.  
  234. Triumph Software - TriDoor Documentation                                pg. 002
  235.  
  236.  
  237.  
  238.  
  239.  
  240.                              FEATURES OF TRIDOOR
  241.  
  242.  
  243.      TriDoor  has many advanced,  easy to use  features and I intend to add
  244.    more.  Any  additional features will  be tacked on to the actual program 
  245.    commands  explanations with  their appropriate version numbers.
  246.  
  247.            * Automatic set-up and support of communications ports.
  248.            * Automatic reading and processing of the file DORINFO1.DEF.
  249.            * Easy to use commands such as PRINT and GETINPUT which will 
  250.              print to the local screen, and the comport if a carrier is 
  251.              detected.
  252.            * Built-in chat mode with word-wrap and highlighted user-
  253.              entered text on the local screen.
  254.            * Boolean variable QUIT which is set to TRUE if ALT-H is
  255.              hit from the local keyboard- allows for programmer-defined
  256.              or non-existent "hang-up" procedures.
  257.            * Easy "caps-lock", and "password-entry" (see "***" instead of
  258.              "hey") modes.
  259.            * Length restriction on input fields.
  260.            * Built-in string capitalization and easy integer/longint to
  261.              string conversion.
  262.            * Built-in direct screen write functions.
  263.            * Automatic status bar displaying time, name and baud rate.
  264.            * Automatic handling of user's time.
  265.            * Built-in routines for clearing user's and local screen.
  266.            * Built-in boolean response "Are you sure?" function.
  267.      V1.26 * Built-in User-Pager.
  268.      V1.26 * Automatic but disablable, "Last Printed" Memory.
  269.      V1.26 * Help Status Bar on Local Screen.
  270.      V1.28 * Auto-sensing of color/monochrome mode.
  271.      V1.30 * Turbo Pascal 5.5 AND 6.0 support.
  272.      V1.38 * ANSI Support.
  273.      V1.40 * Ability to change User time    
  274.      V1.40 * Auto-hangup (QUIT := TRUE) at time<1  (can be disabled).
  275.      V1.40 * System messages in status bar.
  276.      V1.80 * Ability to add support for ANY BBS System
  277.  
  278.  
  279.  
  280. Triumph Software - TriDoor Documentation                                pg. 003
  281.  
  282.  
  283.  
  284.  
  285.  
  286.                                COMMAND SUMMARY
  287.  
  288.  
  289.    * NOTE : All  accessable  variables will be discussed  in more detail in
  290.             the Accessable Varibles portion of this document.
  291.  
  292.             All commands marked with a signle * (asterix) are automatically
  293.             executed in the setup procedure.
  294.  
  295.  
  296.    <01> function  offline : boolean;
  297.  
  298.         This function will return a TRUE if there is no user "on-line".
  299.         This function automatically accounts for local users.
  300.  
  301.    <02> procedure recordtimeon; *
  302.  
  303.         This procedure records the time  that the user enters the door.
  304.  
  305.    <03> function  timeleft : integer;
  306.  
  307.         The timeleft  function will check  the user's  time left in the
  308.         door. If the boolean variable AUTOHANG is set  to TRUE  and the
  309.         user's time runs  out, the boolean QUIT  variable  will also be 
  310.         set to TRUE.
  311.  
  312.    <04> procedure puttime;
  313.  
  314.         This  procedure will  put the user's  time left  in  the  lower
  315.         righthand  area of  the screen as  long as  the boolean TIMEOFF
  316.         variable is set to false.
  317.  
  318.    <05> function  strg( i : integer ) : string;
  319.  
  320.         This function will return the string of any integer.
  321.  
  322.    <06> function  bstrg( li : longint ) : string;
  323.  
  324.         This function is the same as the strg() function except that it
  325.         will accept long integers as well.
  326.  
  327.    <07> function  ucase( strg : string ) : string;
  328.  
  329.         This  function  will  return  the  string  given it  in capital
  330.         letters.
  331.  
  332.    <08> procedure dwrite( outchr : char; attr : integer );
  333.  
  334.         The dwrite() procedure will write the character outchr directly
  335.         to screen memory at position scrnpos.
  336.  
  337.  
  338.  
  339. Triumph Software - TriDoor Documentation                                pg. 004
  340.  
  341.  
  342.    <09> procedure gotopos( x,y : integer );
  343.  
  344.         The  gotopos()  procedure  will set  the  variable  SCRENPOS in
  345.         accordance to the standard x,y position.
  346.  
  347.    <10> procedure dstr( outstr : string; attr : integer );
  348.  
  349.         This procedure writes a string to screen memory at the position
  350.         of SCRENPOS.
  351.  
  352.    <11> procedure statusbar; *
  353.  
  354.         The statusbar() procedure will print a bar at the bottom of the
  355.         local  screen with  with the  user 's name , time left and baud
  356.         rate.   This is  also  where  the  variable PROGRAMNAME will be 
  357.         displayed.
  358.  
  359.    <12> procedure sysmessage( strng : string );
  360.  
  361.         The sysmessage() procedure will  print a message (strng) in the
  362.         statusbar on the local screen.
  363.  
  364.    <13> function  readquick : boolean;
  365.  
  366.         This   function   will   read  the  necessary   door  operation
  367.         information  from  the door support file DORINFO1.DEF.  TriDoor
  368.         MUST get it's essential information from a door support file in
  369.         order to be able to operate properly.  This  will also return a
  370.         TRUE if the file was successfully read.
  371.  
  372.    <14> function  readpcboard : boolean;
  373.  
  374.         This function is the PCBOARD.SYS equivelant of  the readquick()
  375.         function.  This will return a TRUE if the file was successfully
  376.         read.
  377.  
  378.    <15> procedure clearcom;
  379.  
  380.         This function will clear the local screen and the remote screen
  381.         if a user is online.
  382.  
  383.    <16> procedure angotoxy( x, y : integer );
  384.  
  385.         This is the ANSI  equivalent of the  Pascal procedure gotoxy().
  386.         If ANSI is disabled, this function will NOT work.
  387.  
  388.    <17> procedure anleft( ls : integer );
  389.  
  390.         This is  an ANSI  procedure that will  move left the  number of
  391.         spaces specified in the variable ls.
  392.  
  393.  
  394.  
  395. Triumph Software - TriDoor Documentation                                pg. 005
  396.  
  397.  
  398.    <18> procedure anright( rs : integer );
  399.  
  400.         This is identical to anleft() except that it goes right instead
  401.         of left.
  402.  
  403.    <19> procedure anup( us : integer );
  404.  
  405.         This procedure is similar to anleft() and anright() except that
  406.         it goes up the number of spaces passed as the variable us.
  407.  
  408.    <20> procedure andown( ds : integer );
  409.  
  410.         This procedure is identical to anup() except  that it goes down
  411.         instead of up.
  412.  
  413.    <21> procedure aneraseln;
  414.  
  415.         This is  the  ANSI procedure  to erase  an  entire line  in the
  416.         current ANSI color as set by ancolor().
  417.  
  418.    <22> procedure anclear;
  419.  
  420.         The  anclear() procedure is the ANSI equivalent of clearing the
  421.         screen.  Like all ANSI  functions and procedures, this does not 
  422.         function if ANSI is disabled.
  423.  
  424.    <23> procedure ancolor( bl, br, fg, bg : integer );
  425.  
  426.         This function will set the ANSI color.  The following constants
  427.         have been provided for easy access :
  428.  
  429.            bl    : BLINK      
  430.  
  431.            br    : INTENSITY
  432.  
  433.            fg/bg : BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA,
  434.                    CYAN, WHITE
  435.  
  436.         The following are some examples :
  437.  
  438.         ancolor(0,0,WHITE,BLACK)           white/black background
  439.         ancolor(BLINK,0,CYAN,BLACK)        blinking cyan/black background
  440.         ancolor(0,INTENSITY,WHITE,BLACK)   bright white/black background
  441.  
  442.    <24> function  getkey : char;
  443.  
  444.         This function will wait for a key to be pressed either locally,
  445.         or over the communications port if a carrier is present.
  446.  
  447.    <25> function  comwait : boolean;
  448.  
  449.         This will tell  you if there  is a  character  waiting  in  the
  450.         input buffer of the communications port waiting to be read.
  451.  
  452.  
  453.  
  454. Triumph Software - TriDoor Documentation                                pg. 006
  455.  
  456.  
  457.    <26> function  getinput( wrdsize : word ) : string;
  458.  
  459.           The  getinput()  function is  similar to getkey() except that
  460.           this  function  allows  for  a  string  to  be  entered.  The 
  461.           following variables also apply :
  462.  
  463.             CAPS := TRUE/FALSE    --  will convert all typed to
  464.                                       uppercase if TRUE.
  465.  
  466.             CODE := TRUE/FALSE    --  will  show all characters
  467.                                       typed as *'s if TRUE.
  468.  
  469.             wrdsize := (1-255)    --  maximum characters accepted
  470.                                       as input.
  471.  
  472.  
  473.    <27> function  readphone : string;
  474.  
  475.         This function reads and returns a phone number in the format of
  476.         (###)###-####.
  477.  
  478.    <28> function  readdate  : string;
  479.  
  480.         This function reads amd returns a date  in the format XX/XX/XX.
  481.  
  482.    <29> procedure printchar( ch : char );
  483.  
  484.         The printchar() procedure will  print a  character to the local
  485.         screen and the comport  if a carrier  is detected.  There is no
  486.         calculated delay  between characters  in this function as there 
  487.         is in the print() procedure.
  488.  
  489.    <30> procedure print( strng : string );
  490.  
  491.         The print() procedure will print a string to  the local screen,
  492.         as well as to the communications port if a carrier is detected.
  493.  
  494.         To create a  carriage return, simply  plug in a  || anywhere in
  495.         the string to be printed.
  496.  
  497.         For example...
  498.  
  499.            print('My name is george.||Who are you?||||BLAH! ');
  500.            would print...
  501.  
  502.              My name is george.
  503.              Who are you?
  504.  
  505.              BLAH! ( <-- cursor would remain here! )
  506.  
  507.  
  508.  
  509. Triumph Software - TriDoor Documentation                                pg. 007
  510.  
  511.  
  512.  
  513.         NOTE : When plugging variables, substitute +'s  where you would
  514.                normally place ,'s in a write()/writeln().
  515.  
  516.         For example...
  517.  
  518.           print('My name is '+mynamevar+'.||');
  519.  
  520.         When printing  Numerical  Variables, use  the STRG  function to
  521.         convert them to a string format.
  522.  
  523.         For example...
  524.  
  525.           print('My age is '+STRG(age)+'.||);      
  526.  
  527.         Also note that as of  V1.26 there is a  boolean variable called
  528.         queueoff.  If   this  variable  is set  to  false,  the print() 
  529.         command  will  always  remember the last  thing printed. (Comes
  530.         in handy when exiting chat-modes and so-forth.)
  531.  
  532.         The  variable  that  the  last thing  printed  is  stored in is
  533.         queueone. (a string)
  534.  
  535.    <31> procedure comprint( strng : string );
  536.  
  537.         The comprint() procedure  is  identical  to print, except  that
  538.         it prints  SOLELY to the communications  port and  that it does
  539.         not have a queue like print does.
  540.  
  541.    <32> procedure setup;
  542.  
  543.         This  function  MUST  be  run  in  order for TriDoor to operate
  544.         properly.  It  is to be  placed  in  your  program's code right
  545.         after the reading of the chosen door support files.
  546.  
  547.    <33> function  aysure( s : string; [Yes/No] ) : boolean;
  548.  
  549.         The aysure() function will  print the string s accompanied by a
  550.         '? (Y/[N])' and  return  a boolean TRUE or FALSE depending on a 
  551.         choice of yes or no respectively.
  552.  
  553.         The Yes/No is to specify which choice you would like to have as
  554.         the default setting for if the user hits RETURN.
  555.  
  556.         An example of this is as follows-
  557.  
  558.            if aysure('Proceed to next procedure',Yes) then gonext;
  559.  
  560.  
  561.  
  562. Triumph Software - TriDoor Documentation                                pg. 008
  563.  
  564.  
  565.    <33> function  showfile( fname : string; len : word ) : boolean;
  566.  
  567.         The showfile()  function will display  a file  to both the user
  568.         on-line (if present) and to the local screen.  The len variable
  569.         is  the  number  of  lines of the  file that  should be printed
  570.         before a 'More? ([Y]/N)' appears.
  571.  
  572.  
  573.  
  574.  
  575. Triumph Software - TriDoor Documentation                                pg. 009
  576.  
  577.  
  578.  
  579.  
  580.  
  581.                            ACCESSIBLE VARIABLES
  582.  
  583.  
  584.      Here is a  list  of accessible variables and  their descriptions.  You
  585.    may  work with these as you  like at  any time during program operation.
  586.  
  587.  
  588.     statrec =
  589.       record
  590.         name       : string[50];          name of user online
  591.         baud,                             baud rate
  592.         time       : word;                time left in minutes
  593.         comstr     : string[20];          i.e. "2400 BAUD,N,8,1"
  594.         comport    : integer;             communications port (i.e. "COM1")
  595.         ansi       : boolean;             ansi is on if true
  596.       end;
  597.  
  598.      
  599.      The above record  is necessary  to support the  various bulletin board
  600.    systems.  This will be further explained in the next section.
  601.  
  602.  
  603.       var
  604.         stats       : statrec;         record of starec
  605.         local,                         local if true
  606.         code,                          "***" at getinput() if true
  607.         quit,                          set to true at ALT-H and timeout
  608.         caps,                          caps at getinput() if true
  609.         queueoff,                      turn off print queue if true
  610.         timeoff,                       display time in status bar if false
  611.         ansi,                          ANSI active if true
  612.         autohang    : boolean;         sets quit to true at time<1 if true
  613.         queueone    : string;          queue store for print queue
  614.         programname : string[80];      name of program (shown in status bar)
  615.  
  616.  
  617.  
  618.  
  619. Triumph Software - TriDoor Documentation                                pg. 010
  620.  
  621.  
  622.  
  623.  
  624.  
  625.                 INCORPORATING SUPPORT FOR OTHER BBS SOFTWARE
  626.  
  627.  
  628.      Due to  the  variety  of  bulletin  board systems  available today  we
  629.    have made TriDoor easily adaptable for any system.  The variables in the
  630.    record STAT  which  is of  the type  STATREC must be  filled in with the 
  631.    data from the door  support file  which you  are reading.  The following
  632.    is an example of how TriDoor reads this data from the  file DORINFO1.DEF
  633.    which is created by QuickBBS and it's clones.
  634.  
  635.  
  636.         {* * * * * * * * *}
  637.  
  638.         function readquick : boolean;
  639.    
  640.         { reads a users stats from the file DORINFO1.DEF and returns
  641.           false if the file was not found                             }
  642.  
  643.         var
  644.           deffile : text;
  645.           i,
  646.           loop    : integer;
  647.           comst,
  648.           filler  : string;
  649.           work1,
  650.           work2   : string[40];
  651.  
  652.         begin
  653.           if fsearch('DORINFO1.DEF','') <> '' then
  654.             begin
  655.               assign(deffile,'DORINFO1.DEF');
  656.               reset(deffile);
  657.               for loop := 1 to 4 do
  658.                  readln(deffile,filler);
  659.               case filler[4] of
  660.                 '0' : stats.comport := 0;
  661.                 '1' : stats.comport := COM1;
  662.                 '2' : stats.comport := COM2;
  663.               end;
  664.               readln(deffile,stats.comstr);
  665.               readln(deffile,stats.baud);
  666.               readln(deffile,work1);
  667.               readln(deffile,work2);
  668.               readln(deffile,filler);
  669.               readln(deffile,i);
  670.               readln(deffile,filler);
  671.               readln(deffile,stats.time);
  672.               close(deffile);
  673.               if i = 1 then stats.ansi := TRUE
  674.                 else stats.ansi := FALSE;
  675.  
  676.  
  677.  
  678. Triumph Software - TriDoor Documentation                                pg. 011
  679.  
  680.  
  681.               stats.name := work1 + work2;
  682.               readquick := true;
  683.             end
  684.           else
  685.             readquick := false;
  686.         end;
  687.  
  688.         {* * * * * * * * *}
  689.  
  690.  
  691.      Once either this  or your customized  function has  been executed, the
  692.    setup() procedure  must also  be run.  This will be further explained in
  693.    the next chapter, "Programming With TriDoor".     
  694.  
  695.      Please note that if  your BBS software is not supported  and you write
  696.    a procedure  to handle it that  we will  put it  in  future  versions of
  697.    TriDoor if you send it to us.
  698.  
  699.  
  700.  
  701. Triumph Software - TriDoor Documentation                                pg. 012
  702.  
  703.  
  704.  
  705.  
  706.  
  707.                           PROGRAMMING WITH TRIDOOR
  708.  
  709.  
  710.      Creating doors  with TriDoor is  an astoundingly simple  process but a
  711.    couple  steps must  be taken in  each program you write in order for the 
  712.    program to function  normally.  The  computer may  physically  "hang" if 
  713.    these few following procedures are not completed.
  714.  
  715.      First of all  you must fill in  the STAT  record with  the appropriate
  716.    data  either using procedures  already incorporated in TriDoor or with a
  717.    procedure or  function of  your  own.  The  STAT record  is shown in the
  718.    "Accessable Variables" chapter with it's record type, STATREC.
  719.  
  720.      If your BBS is not  currently supported  by TriDoor  then you  need to
  721.    create  your  own  support  file  which  is  explained  in  the previous
  722.    chapter, "Incorporating Support for Other BBS Software".
  723.  
  724.      Then  you  must call  on the  setup() procedure  which will set up the
  725.    communications port and initialize the system for door support.
  726.  
  727.      After  these  two or  three things have been completed you may proceed
  728.    with using any of TriDoor's commands and features to write your door.
  729.  
  730.      Remember  that due to  the nature of Turbo Pascal's units, any TriDoor
  731.    function or procedure that  you do not use will  not be built  into your
  732.    software.  This is  good for two  reasons- one is  that  memory will not
  733.    be used unecessarily and the other is that you may create substuitutions
  734.    for TriDoor commands that you would prefer to write yourself.
  735.  
  736.  
  737.  
  738. Triumph Software - TriDoor Documentation                                pg. 013
  739.  
  740.  
  741.  
  742.  
  743.  
  744.                                RESERVED WORDS
  745.  
  746.  
  747.      The following list of words are  reserved (used by TriDoor) and not to
  748.    be re-defined  by any program incorporating  TriDoor as  a conflict will 
  749.    arise that will  result  in non-functionality,  to some  degree,  of the 
  750.    final resultant program/software.
  751.  
  752.  
  753.         tridr55?          tridr60?          buffptr          buffrec
  754.         statrec           stats             scrnpos          logontime
  755.         comintvec         screnmode         local            code
  756.         quit              caps              queueoff         buffertop
  757.         head              tail              oldint           exitsave
  758.         programname       tdver             tddate           CR
  759.         BS                BLACK             RED              GREEN
  760.         YELLOW            BLUE              MAGENTA          CYAN
  761.         WHITE             INTENSITY         BLINK            IER
  762.         IIR               LCR               MCR              LSR
  763.         MSR               RLS               RDA              TRE
  764.         MSI               PIC               EOI              PICMASK
  765.         ENABLE1           ENABLE2           DISABLE1         DISABLE2
  766.         BIOSSEG           KEYHEAD           KEYTAIL          EVEN
  767.         ODD               NONE              COM1             COM2
  768.         COM3              COM4              IRQ2             IRQ3
  769.         IRQ4              offline           recordtimeon     timeleft
  770.         puttime           strg              bstrg            ucase
  771.         dwrite            gotopos           dstr             statusbar
  772.         sysmessage        readquick         clearcom         angotoxy
  773.         anleft            anright           anup             andown
  774.         aneraseln         anclear           ancolor          getkey
  775.         comwait           getinput          readphone        readdate
  776.         printchar         print             comprint         checkkey
  777.         setup             aysure            Yes              No
  778.  
  779.  
  780.    
  781. Triumph Software - TriDoor Documentation                                pg. 014
  782.  
  783.  
  784.  
  785.  
  786.  
  787.                           TESTED LIMITS OF TRIDOOR
  788.  
  789.  
  790.      TriDoor has been run and tested, successfully, on a variety of systems
  791.    ranging from a 15MHz IBM XT with  a 2400 baud modem to  a 25MHz 386 with
  792.    a 9600 baud HST modem.  As far as we know, if your system is fast enough
  793.    to handle your modem, this unit will function without a hitch.
  794.  
  795.      There  are a  few limitations, however, that  we are  aware of at this
  796.    time.  The constraints are as follows :
  797.  
  798.        * The  only communications  ports supported are COM1 and COM2.
  799.  
  800.        * The Turbo Pascal  commands of  blockread and blockwrite will
  801.          do awful,  unfriendly things.  DO NOT USE THEM until we have
  802.          made a correction to allow for this problem.
  803.  
  804.  
  805.      Those are all of them as far as we are aware.  If you find any new 
  806.    problems, please contact us immediately .
  807.  
  808.  
  809.  
  810.  
  811. Triumph Software - TriDoor Documentation                                pg. 015
  812.  
  813.  
  814.  
  815.  
  816.  
  817.                             PROGRAMMING HINT(S)
  818.  
  819.  
  820.      Here  are a  few  ideas  to  get you  going.  TriDoor  is written very
  821.   flexibly to allow for you to do essentially as you like with the commands
  822.   However,  due  to  this flexibility, some things may  seem  confusing, or 
  823.   just not  occur to you right away. Over time, as I think of these things,
  824.   I will place them in this area, and  feel free to send  us any hints that
  825.   you've discovered while programming with TriDoor.
  826.  
  827.       * REMEMBER to  put online and quit  checks in all  of your while
  828.         loops and repeat untils and so on.  If you do not put these in
  829.         and you hit ALT-H or the user drops  carrier then your program 
  830.         will hang!
  831.  
  832.       * Program all of your door support file reading functions with a
  833.         boolean return.  This  not only  allows you to  know if it was
  834.         successful but will also allow you to program a procedure that
  835.         automatically reads whatever door support file is available.
  836.  
  837.       * Do you want the SysOp to see something that the user will not?
  838.         Simply  use a writeln() instead  of print().  It's always good
  839.         to make it  obvious to  the SysOp  that the user is not seeing
  840.         that text, though!  A standard  way of doing  this is by using
  841.         a small block (ASCII 254) before the text and high-lighting it.
  842.  
  843.       * Try not to exclude non-ANSI users from your door.  It's a sign
  844.         of a lazy/unthinking programmer.  Better than 35% of BBS users
  845.         DO NOT have ANSI capabilities- don not limit yourself and your
  846.         program!
  847.  
  848.       * Remember that many  bulletin board systems  run better if they
  849.         stay in memory  while dropping to dos  to run a door, and many
  850.         systems  do not have more  than 640k-1 meg  of RAM.   If your
  851.         program  requires more, try to  break it up into pieces to run
  852.         more efficiently.  If you  have an  update program  that needs
  853.         to be run but once per day, make it a separate one.
  854.  
  855.  
  856.  
  857. Triumph Software - TriDoor Documentation                                pg. 016
  858.  
  859.  
  860.  
  861.  
  862.  
  863.                      THINGS TO COME ("THE WORKBENCH")
  864.  
  865.  
  866.      The  following is  a list of some  of the things that  are most likely
  867.    going to be  added in future  versions  of this  software.  Or  they are
  868.    things that we are,  at the very least,  seriously  considering. This is
  869.    a far from complete list, but it gives you an idea of what we are up to.
  870.    If you have any further ideas or suggestions, please contact us and tell
  871.    us what you think.
  872.  
  873.  
  874.            * Config file for directory paths/chat color settings/etc
  875.            * Support for other BBS software such as PCBoard and Fido
  876.            * COM3 and COM4 support
  877.            * Ability to force-capitalize first letter of every word
  878.              in getinput() function
  879.  
  880.  
  881.  
  882. Triumph Software - TriDoor Documentation                                pg. 017
  883.  
  884.  
  885.  
  886.  
  887.  
  888.                                 WHO TO CONTACT
  889.  
  890.  
  891.      Did  your machine swear in protest  at our software?  Are  you missing
  892.    files  that  should  be  included  in this  release?  Do  you have   any 
  893.    questions  you  would  like  to  ask  us?  Do  you  have any comments or
  894.    suggestions?
  895.  
  896.      Well, then- you  may  get  in contact with us  at any of the following
  897.    places/numbers :
  898.  
  899.  
  900.  
  901.             Christopher M. Russo          Voice : (508)264-4376
  902.             Jeremy H. DuBois              Voice : (508)263-7004
  903.                           (716)274-0215
  904.  
  905.             Triumph BBS                   Data  : (508)263-4247
  906.  
  907.  
  908.               * If you call our BBS (best way to get in touch 
  909.                 with either  of us) our handles/positions are
  910.                 as follows :
  911.  
  912.             Christopher M. Russo,  a.k.a. "Seymoore"     (SysOp)
  913.             Jeremy H. DuBois,  a.k.a. "Particle Man"  (Co-SysOp)
  914.  
  915.  
  916.      Remember  that those voice  phones are our  HOME phones as  we do  not
  917.    yet have a business line- please  refrain from hassling the other people
  918.    that live there-  NONE of  us will answer "Hello, Triumph Software."  We
  919.    will tell you when we get the business line.
  920.  
  921.      Also  note  that it  is MUCH  easier to get  in contact with me, Chris
  922.    Russo during the school year then it is to get in touch with Jeremy.
  923.  
  924.      We are  also looking out for potential support boards and beta-testing
  925.    systems, so if  you  have  a system  and are  interested, make sure  you 
  926.    inform us of your desire and eligibility.
  927.  
  928.  
  929.  
  930.  
  931.  
  932. Triumph Software - TriDoor Documentation                                pg. 018
  933.  
  934.  
  935.  
  936.  
  937.  
  938.                              HISTORY OF TRIDOOR
  939.  
  940.  
  941.      TriDoor and  it's  communications support is the  end result of almost
  942.    three  years  of effort by  both Jeremy DuBois  and myself. (Christopher
  943.    M. Russo)  We  started one rainy  day when Jeremy  had  informed me that
  944.    he had  managed to  write   some  basic  polling  Pascal  communications 
  945.    routines.  As  Jeremy already  had a  bulletin  board  system running at
  946.    that time, I suggested that we write an on-line game for it.
  947.  
  948.      And that  is when it all began.  We went from  writing a semi-complete
  949.    and not-too-awful  on-line game  to writing DoorBase,  our first version
  950.    of an  on-line  door  supporting  unit.  Then  I wrote a game on my own-
  951.    Monopolistic  Competition,  followed shortly  thereafter by Monopolistic
  952.    Competition II which was running off  of a  newer, but  still bedraggled
  953.    version of DoorBase.
  954.  
  955.      Then one  day while  trying to write  a terminal program,  we realized
  956.    that the  communications routines  that Jeremy had  made were simply not
  957.    fast enough  to  handle all  the  tasking  necessary,  and  at  anything
  958.    above  2400 baud, was  a miserable failure.  Thus,  Jeremy set  out once
  959.    again to create newer, faster, interrupt driven routines.
  960.  
  961.      I had  quite  a lot  of trouble  dealing with  the  newer routines for
  962.    reasons  which,  I  admit,  are  beyond  my  knowledge.  After time  and
  963.    perseverance,  however,  I mastered  the  new  routines and re-wrote the
  964.    newest version of DoorBase,  now  called TriDoor  in the interest of our
  965.    newly-founded company.
  966.  
  967.      And thus,  I present  to you  said software and complete documentation
  968.    for the easy usage  and incorporation of  communication and door support
  969.    in your Pascal programs for QuickBBS and clones. I strongly believe that  
  970.    using TriDoor is the easiest, most  user-friendly  way  of writing doors  
  971.    and on-line games available today.
  972.  
  973.      Finally, before  we  commence, I would like  to take a moment to thank
  974.    Jeremy for  all his help and  patience with my  quirky little habits and
  975.    programming nit-picks.  I  have never  given  another  teacher more of a 
  976.    hard time than I  gave him.  Ridiculous  as  this  may sound, he  is  an
  977.    inspiration  to me,  and I  thank him  for all he's taught me and all he
  978.    will, undoubtedly, teach me in the future.
  979.  
  980.  
  981.  
  982.  
  983. Triumph Software - TriDoor Documentation                                pg. 019
  984.  
  985.  
  986.  
  987.  
  988.  
  989.                     OTHER PRODUCTS BY TRIUMPH SOFTWARE
  990.  
  991.  
  992.      The  following  products  are  also  available from  Triumph Software.
  993.    For  more information on these products or specific consulting services,
  994.    please contact us.
  995.  
  996.  
  997.        TriComm . . . . . . . . . . . . . . . . . . . .Registered : $30
  998.  
  999.           TriComm is the original communications unit compiled for
  1000.           Turbo Pascal 5.5 and used in the creation of TriDoor. It
  1001.           currently  supports COM1 and  COM2 and  runs at all baud
  1002.           rates.  (Has been tested up to and over 9600 baud)
  1003.  
  1004.  
  1005.        TriUser . . . . . . . . . . . . . . . . . . . .Registered : $25
  1006.  
  1007.           TriUser is an on-line QuickBBS user editor written using
  1008.           the TriDoor  on-Line  door support  unit.  It also takes
  1009.           advantage of TriDoor's ANSI support features.
  1010.  
  1011.  
  1012.        Moochie . . . . . . . . . . . . . . . . . . . . . . Coming Soon
  1013.  
  1014.           The Moochie Enhanced QuickBBS Message system  is an all-
  1015.           new concept in message handling.  Based on large network
  1016.           news groups and  mail readers, this program allows for a 
  1017.           whole new level of power  and versatility in reading and 
  1018.           writing to the QuickBBS standard message system.
  1019.  
  1020.  
  1021.  
  1022.  
  1023. Triumph Software - TriDoor Documentation                                pg. 020
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.                            A COMMENT ON QUALITY
  1030.  
  1031.  
  1032.      To finalize,  I would  like to take  a moment to voice  my thoughts on
  1033.    quality in programs and programming.
  1034.  
  1035.      I  have spent  over eight  years working  on and  with bulletin  board
  1036.    systems,  an equal  amount  of time  programming both  at an amateur and
  1037.    a professional level,  and three years or  more programming for bulletin 
  1038.    board systems.
  1039.  
  1040.      In that time I  have seen many  doors and many bulletin board systems,
  1041.    and  I have noticed so many sloppy doors and on-line games that if I had
  1042.    a computer for every  one I have ever seen,  I would be able to put them 
  1043.    together and  form a top-of-the-line Sun SPARCStation with tint-control,
  1044.    a built-in microwave and a television.
  1045.  
  1046.      I can't  tell you how many  times I have run  a program  and then been
  1047.    asked,  infuriatingly, "Cannot  find  BRUNxx.EXE.  New  Path?" or  found 
  1048.    that a program would literally crash inside of two  minutes of operation
  1049.    on any machine that I could try it on. 
  1050.  
  1051.      And  all the programs  that I  saw grinding  away at the disk-drive as
  1052.    they  either accessed a massive load of disorganized data or simply were 
  1053.    running in the  slowest possible languages and needed three days to load 
  1054.    360k of marginally organized data.
  1055.  
  1056.      Then  there were the programs  that simply crashed  without a peep, or
  1057.    crashed and  threw some  sickening statement  like "KILLROY DEATH NOTICE
  1058.    #093284AF84UAREDEAD" at you as you sat in bewilderment.
  1059.  
  1060.      I am  the pickiest person on  earth when  it comes  to programming, so
  1061.    you can be  assured  that any  product that  you ever  get  from Triumph
  1062.    Software  has been  brutally  criticized  and abused  to make sure it is
  1063.    doing everything it should be doing, doing it well, and then some.
  1064.  
  1065.      If  I missed  something, I will be  ever amazed, but I assure you that
  1066.    I literally don't sleep until the problem is fixed. 
  1067.  
  1068.      I hope  you enjoy  this and all of our programs and  find them easy to
  1069.    use and  well-written.  If you  have  suggestions or  complaints, please
  1070.    contact  us/me as  we/I  are/am always  happy  to hear  them  and try to
  1071.    incorporate them.
  1072.  
  1073.  
  1074.                                 Happy Programming!
  1075.  
  1076.                                  -Christopher M. Russo
  1077.  
  1078.  
  1079. Triumph Software - TriDoor Documentation                                pg. 021
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.                ACCEPTABLE CREDIT IN PROGRAMS AND DOCUMENTATION
  1086.  
  1087.  
  1088.      On  the title-page  of  your documentation  where  your  program  name
  1089.    appears, or if  you do  not have such  a page,  wherever your  "credits"
  1090.    are (Written by... ) you should include the following :
  1091.  
  1092.  
  1093.                 TriDoor Communications and On-line Door Driver
  1094.              Written by Christopher M. Russo and Jeremy H. DuBois
  1095.                 (c)1991 Triumph Software, All Rights Reserved. 
  1096.             (508)263-7004    BBS : (508)263-4247    (508)264-4376 
  1097.  
  1098.  
  1099.      The  above listed  credit lines  MUST be  placed within  the  first  3
  1100.    (three)  pages  of  your documentation  to  be considered  as acceptable
  1101.    credit.  A disclaimer  must also  be in the  documentation  stating that
  1102.    Triumph Software is not affiliated with  you or  your company in any way
  1103.    and that Triumph  Software  can not be held responsible for any programs
  1104.    created using the TriDoor package.
  1105.  
  1106.      If no documentation is included in the package that you have produced,
  1107.    then a file giving Triumph Software credit for TriDoor  must be included
  1108.    in the package.  This  credit must also include  the disclaimer as noted  
  1109.    in the previous paragraph.
  1110.  
  1111.      Triumph Software reserves the right to temporarily revoke registration
  1112.    privelleges  until  proper credit  for Triumph Software  is given in any 
  1113.    software/programs created using the TriDoor unit.
  1114.  
  1115.      The following lines will AUTOMATICALLY appear VERY BRIEFLY upon bootup
  1116.    of any program using a registered copy of TriDoor :
  1117.  
  1118.  
  1119.            TriDoor Vx.xx - On-line Door and Communications Support 
  1120.            (c)1991 by Triumph Software, All Rights Reserved.
  1121.            Voice : (508)264-4376   BBS : (508)263-4247
  1122.            Reg No : xxxxxxxxxx  Reg To : John Q. Programmer
  1123.  
  1124.  
  1125.      A special copy of the  package without this notice may  be obtained by
  1126.    special   arrangements   with  Triumph  Software.  Different   licensing 
  1127.    agreements and disclaimers may apply.
  1128.  
  1129.      Removal of  this notice  or any of it's  information without prior and
  1130.    valid  written  approval by  Triumph Software voids  the registration of
  1131.    the TriDoor package. 
  1132.  
  1133.  
  1134.