home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bbskt20e.zip / BBSKIT.DOC < prev    next >
Text File  |  1992-05-06  |  74KB  |  1,875 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                                              BBSkit version 2.00
  27.                                                                 
  28.                          Communications toolkit for Turbo Pascal
  29.                                                                 
  30.                                                  by Steve Madsen
  31.  
  32.                                                        Copyright
  33.                                                                 
  34. BBSkit, associated utilities, source code, and documentation are
  35. copyright (c) 1991, 1992 by Steven Madsen.  All rights reserved.
  36.  
  37. Other  brand  and  product  names are trademarks  or  registered
  38. trademarks of their respective holders.
  39.                                                                 
  40.                                                 Shareware Policy
  41.                                                                 
  42. This  software  is  provided to you subject  to  the  terms  and
  43. conditions  of  this agreement.  In the event  that  you  cannot
  44. accept  these terms and conditions, you must destroy all  copies
  45. of the software you have made.
  46.  
  47. BBSkit is being distributed under the shareware (try before  you
  48. buy)  system to insure that users have a fair chance to  see  if
  49. this  product will suit their needs before having to spend money
  50. on  it.   I  feel  that  this is a good way  to  distribute  new
  51. software  of  use to programmers.  If you use this  product  and
  52. find  it  a  good  thing to keep around,  you  are  expected  to
  53. register the package with the author.
  54.  
  55. Registration is currently $40 in United States funds.   You  may
  56. pay  by  check  or money order (payable to "Steven  Madsen")  by
  57. sending a printed copy of ORDER.FRM to:
  58.  
  59.           Steven Madsen
  60.           1888 Edith Marie Drive
  61.           Beavercreek, OH  45431-3377
  62.  
  63. Please   remember   to  specify  5.25"  or  3.5"   disk   media.
  64. Registration entitles you to free technical support,  a  printed
  65. manual, source code, example code, and low cost upgrades.
  66.  
  67.                                Chapter 1: Introduction to BBSkit
  68.                                                                 
  69.  
  70. About this manual
  71.  
  72.       Welcome to BBSkit!  As the author of this package, I  feel
  73. that  you  have  purchased the most powerful unit  available  to
  74. Turbo  Pascal  programmers who wish to manipulate  their  serial
  75. port  hardware in any way they wish.  BBSkit makes it  realistic
  76. to  start drafting plans for a BBS or terminal program  to  suit
  77. your particular needs.  Many hours of work have gone into making
  78. BBSkit   a   well-written,  well-documented  and  well-supported
  79. shareware package.  This manual is designed with getting you off
  80. the ground and programming with BBSkit as quickly as possible.
  81.  
  82.      Note: this shareware version of the manual is actually just
  83. a  scaled-down version of the real manual.  The real manual will
  84. include  all  of  the  chapters and appendices  listed  in  this
  85. introduction.
  86.  
  87. Chapter  1  provides a brief overview of the BBSkit package  and
  88. the style conventions that will be used in this manual.
  89.  
  90. Chapter  2  provides  a basic introduction to telecommunications
  91. and  describes  the  need  for  software  in  today's  world  of
  92. telecommunications.
  93.  
  94. Chapter   3  gives  a  brief  introduction  to  object  oriented
  95. programming as it is used by a BBSkit programmer.  Objects  make
  96. it  possible for your programs to do a lot in very little  code,
  97. and makes it easier to maintain such programs.
  98.  
  99. Chapter  4  presents  some ideas on the  development  of  a  BBS
  100. application with BBSkit.  Design of a BBS application is covered
  101. in-depth in this chapter to give you a good idea about  what  is
  102. needed in a solid BBS package.
  103.  
  104. Chapter  5 presents some ideas on the development of a  terminal
  105. application.  Terminal programs are used worldwide to connect to
  106. a  variety of systems, not just BBSes.  This chapter focuses  on
  107. some of these design ideas.
  108.  
  109. Chapter  6  presents  the  BBS  Session  Protocol,  which   will
  110. radically  change  your views of how a user-to-host  session  is
  111. serviced.  BSP functions allow you to bring graphically oriented
  112. interfaces to your remote users when they are also running  BSP-
  113. aware terminal packages.
  114.  
  115. Chapter 7 provides an alphabetical listing of all of the methods
  116. provided in the BBSkit Turbo Pascal unit.
  117.  
  118. Chapter 8 provides an alphabetical listing of all of the methods
  119. provided in the objects contained in the Protocol unit.
  120.  
  121. Chapter 9 provides an alphabetical listing of the procedures and
  122. functions supplied in the BBSkit unit.  These are the  heart  of
  123. communicating with your serial port.
  124.  
  125. Appendix  A  gives an very in-depth presentation of  programming
  126. interrupt driven serial communications under Turbo Pascal.  This
  127. appendix is provided to help make the source code a little  more
  128. understandable.
  129.  
  130. Appendix  B  covers  the EmuMaker utility,  which  is  used  for
  131. maintaining  emulation templates used during a  session  with  a
  132. multitude  of host computers, from ANSI capable BBSes to  VT-100
  133. mainframes.
  134.  
  135. Appendix   C   is  a  glossary  covering  terms  used   in   the
  136. telecommunications  field.  If you don't know  what  a  word  or
  137. acronym means, try looking in here.
  138.  
  139. Appendix  D  discusses  how  to go  about  contacting  Technical
  140. Support if you have problems with BBSkit.
  141.  
  142. Appendix E is a simple table of ASCII values.
  143.  
  144.       The  following  tools were used to create BBSkit  and  the
  145. documentation:
  146.  
  147.        o Turbo Pascal v6.0 from Borland International
  148.        o Turbo Assembler v2.0 from Borland International
  149.        o Microsoft Word for Windows v2.0
  150.  
  151. Style conventions
  152.  
  153.       This  manual  will  make  use of  some  style  conventions
  154. throughout the text which you should be aware of.  Some of  this
  155. text  is  merely  for  information, while other  text  may  mean
  156. serious trouble for certain situations.
  157.  
  158.           Indented text shows something that will appear on your
  159.           screen, example program text, or text your should type
  160.           into your computer.
  161.  
  162. The purpose of BBSkit
  163.  
  164.      Ever since I became involved with telecommunications in the
  165. mid  1980's, I have been very interested in writing applications
  166. that  work  with the serial port.  Particularly, I like  writing
  167. bulletin  board systems.  The only problem was that I  found  no
  168. communications  packages that met my standards,  which  included
  169. being usable under Turbo Pascal 6.0.  Thus, BBSkit was born.
  170.       My  main  idea in creating BBSkit was to provide the  most
  171. seamless  environment  for a BBS author to  create  his  or  her
  172. application.   BBS  applications  require  certain  things  that
  173. terminal programs do not, such as being able to route input  and
  174. output,  having  support to handle all kinds of terminals,  from
  175. slow  terminals  requring nulls to keep up with transmission  to
  176. new  ones  that  have  advanced terminal emulation  as  standard
  177. equipment.   Users  have grown along with the technology.   They
  178. want  power, speed and beauty in the systems that they frequent.
  179. But  the most important thing was creating a toolkit that  would
  180. meet  my needs, and also meet those of people like me that  were
  181. having  the same difficulty finding toolkits that would  do  the
  182. job for them.
  183.      Think of BBSkit as a shell program.  Everything you need to
  184. use  your  modem  or  communicate through your  serial  port  is
  185. already there.  You can route input and output, send and receive
  186. files,  emulate  over  10  different  terminals.   Now  you  can
  187. concentrate  on  writing your application, not on  communicating
  188. with your serial port.
  189.  
  190. What's new in version 2.0?
  191.  
  192.       Version  2.0  is a tremendous enhancement to the  original
  193. package.   Version 1.0 was robust when compared to many  of  the
  194. other  shareware  or freeware packages I still find  on  systems
  195. today, but 2.0 will easily surpass that.  With 2.0 I have  added
  196. more complete VT-100 style terminal emulation directly into  the
  197. package.  This means no more ANSI.SYS!  All of the file transfer
  198. protocols  have  been  recoded  and  are  now  much  easier   to
  199. understand since the source follows the same style as  the  main
  200. units.  Ymodem and Ymodem-G have also been added to our list  of
  201. protocols.  To keep things more close to home, I have  rewritten
  202. my serial support in 100% assembly language.  You no longer need
  203. a  FOSSIL  driver  to  communicate with your  system,  and  that
  204. reduces  the  amount  of memory taken up by device  drivers  and
  205. leaves more for your app.  Of course, as a registered user,  you
  206. have  all  of  the  source  code to  BBSkit  available  on  your
  207. registration disks.
  208.       Perhaps the most important announcement comes in the  form
  209. of  the  BBS  Session Protocol.  Lately everyone has been  going
  210. crazy  over  the  incredible changes user interfaces  are  going
  211. through.  Mouse support is becoming standard, graphics are being
  212. found everywhere.  And Windows is responsible.  Well... wouldn't
  213. it be great to have this kind of support over a normal telephone
  214. line?   BSP gives it to you!  Mouse support and graphics,  in  a
  215. form  of terminal emulation that can be used in conjunction with
  216. any  of  the  provided templates.  Now you  can  add  mouse  and
  217. graphics  support  to  your app, and the remote  end  will  take
  218. advantage  of it if it can.  Otherwise, the user will experience
  219. no change from a normal session.
  220.  
  221. Where's Zmodem?
  222.  
  223.      Some of you who saw or used the first version of BBSkit may
  224. be  wondering where Zmodem is in the new package.  The reason is
  225. actually quite simple, although it is a very disappointing  one.
  226. During the development of BBSkit 2.00 I looked long and hard for
  227. the  latest Zmodem specifications, to be assured that  my  users
  228. would  receive the latest Zmodem implementation, coded according
  229. to  Omen  Technology's  most current  Zmodem  documentation.   I
  230. became  very  disappointed  when I could  not  find  any  recent
  231. specifications on local BBSes, or anywhere in the world  through
  232. Internet ftp access.  This led me to actually call Omen's BBS  a
  233. few  times,  searching diligently for these  specifications.   I
  234. could  not find any later than 1987, and these were done in  the
  235. typical  Omen  fashion, which pretty much kept me from  doing  a
  236. good  implementation of their protocol.  To top things off, when
  237. I  read  through Omen's BBS, I found something called the Zmodem
  238. Developer's Kit (which convienently comes with C source  code!).
  239. Apparently  Omen has taken Zmodem out of the public domain  with
  240. their  introduction of MobyTurbo.  So, sorry, but Zmodem is  not
  241. going to be included in this (or probably any future) release of
  242. BBSkit.   If  you  don't  like this (I don't),  please  complain
  243. directly to Omen Technology, because I cannot do anything  about
  244. it from where I stand.
  245.       As the author of whatever software you write using BBSkit,
  246. I would suggest that you do your utmost to promote Ymodem-batch.
  247. This protocol is fast, safe (CRC-16 error checking) and probably
  248. more  efficient than Zmodem.  The reason for this is that Zmodem
  249. is  one of those "do everything" protocols, so it tries to  make
  250. file  transfers safe across all platforms.  This includes packet
  251. switching  networks which gobble up certain characters.   Zmodem
  252. protects  these  characters by prefixing them.  The  problem  is
  253. that  it  turns  one offending character into two  non-offending
  254. characters, which slows down the overall speed of the  transfer.
  255. Ymodem  doesn't even try to do this, so it sends all  characters
  256. as  they are, which can speed up transfers.  Plus, you still get
  257. batching  capability.   The  only thing  you  lose  is  transfer
  258. recovery,  but  this could be fixed with a proprietary  protocol
  259. for all BBSkit applications.  If there is any interest in such a
  260. thing,  please  let  me know.  I would make  all  specifications
  261. public domain and implementations of the protocol royalty  free,
  262. without the complexity of Zmodem.
  263.  
  264.                                 Chapter 7: BBSkit Method Listing
  265.                                                                 
  266.        This  chapter  will  do  its  best  to  provide  complete
  267. information  on every method available in the TBBS  object.   In
  268. general, they will all follow this format:
  269.  
  270.  
  271.  
  272. Dummy1
  273. Declaration: PROCEDURE Dummy(Variable : Integer);2
  274.  
  275.      Dummy does something useful.3
  276.  
  277. See Also: Something.4
  278.  
  279.  
  280.      1: Name of the method.
  281.      2: Formal definition in Pascal format.
  282.      3: Brief description.
  283.      4: Other methods which may be of interest to this one.
  284.  
  285.  
  286. Init
  287. Declaration: CONSTRUCTOR Init;
  288.  
  289.       Init  sets up the TBBS object for use.  It resets  several
  290. internal variables, clears out some memory allocated to  arrays,
  291. and  fixes up the virtual method table.  Init must be called  in
  292. every application that uses TBBS, or your system will lock up.
  293.       Code contained in Init should be "do once" code.  That is,
  294. code in Init should not be called more than once, only when Init
  295. itself  is  called.   Don't  call Init  multiple  times  to  get
  296. something done.
  297.       This  method  can be overridden without a  virtual  clause
  298. because  it  is a constructor.  Descendant objects should  still
  299. call TBBS.Init within their Init constructors.
  300.  
  301. See Also: Done, Run.
  302.  
  303.  
  304. Done
  305. Declaration: DESTRUCTOR Done; VIRTUAL;
  306.  
  307.       Done is the general destructor method for the TBBS object.
  308. If  the communications port is still open, it will close  it  as
  309. well  as deallocate internal variables.  Done, like Init, should
  310. be called in every application that makes use of TBBS.
  311.       Code  in Done should only be shutdown code, and should  be
  312. executed only once each time the application is run.
  313.       Descendant  objects should call TBBS.Done  in  their  Done
  314. destructors.
  315.  
  316. See Also: Init, Run.
  317.  
  318.  
  319. Run
  320. Declaration: PROCEDURE Run; VIRTUAL;
  321.  
  322.       Run  is  an  empty  method designed  to  be  used  by  all
  323. descendant TBBS objects.  All time spent between Init  and  Done
  324. should be spent somewhere in Run.
  325.       Descendant  objects do not need to call  TBBS.Run,  as  it
  326. doesn't do anything.
  327.  
  328. See Also: Init, Done.
  329.  
  330.  
  331. AddIntChar
  332. Declaration: PROCEDURE AddIntChar(Code : Char);
  333.  
  334.      AddIntChar will add the character Code to the internal list
  335. of  characters  which  can  interrupt  a  TypeFile  call.   When
  336. TBBS.Init is called, the internal list, which is maintained by a
  337. simple set of char, is empty.  This means that no characters can
  338. interrupt  the  output.   This  is  not  always  desireable   in
  339. situations  such as outputting menu, or reading  messages.   The
  340. user  may wish to get a jump on things and just get to the  next
  341. part of his session.
  342.        Depending   on   the  value  of  the   boolean   variable
  343. CaseSensitive, AddIntChar('A') and AddIntChar('a')  may  or  may
  344. not do the same thing.
  345.      The only output that can be stopped by one of these keys is
  346. a  file being dumped to the console/modem with TypeFile.   Other
  347. methods, such as ComWriteLn, are not affected in any way.
  348.  
  349. See Also: ClearIntChars, SetCaseSensitivity, TypeFile.
  350.  
  351.  
  352. AddVirtualKey
  353. Declaration: PROCEDURE AddVirtualKey(Code : Char);
  354.  
  355.      AddVirtualKey is used to maintain the list of keys that the
  356. local  console can handle to do special things while a  user  is
  357. online with your system.  All keys that are handled through  the
  358. HandleVirtualKey  method must first be  defined  by  a  call  to
  359. AddVirtualKey.  Legal keys are those found in the back  of  your
  360. Turbo  manuals.   These keys are also known  as  extended  keys.
  361. Examples  are  the  arrows, F1 through F10,  and  any  Alt-  key
  362. combination.
  363.       Typically,  these kinds of keys should be used  to  change
  364. what  is  happening in the user's session.  On a BBS, you  could
  365. have  the  up and down arrows adjust his time limit without  his
  366. knowledge.   Alt-C,  for example, could  enter  into  your  chat
  367. routine.   Alt-L could instantly logoff an offending user.   The
  368. possibilities  are limited only by the number of  keys  you  can
  369. define and the functions you code for them.
  370.       These keys are always active during any kind of input that
  371. BBSkit  is  told to accept.  The code to figure out what  to  do
  372. with  a  virtual key is contained in ComReadKey, which the  base
  373. method  for accepting input of any kind.  Note that if you  call
  374. one  of Turbo's input procedures, such as ReadLn, BBSkit has  no
  375. way of intercepting virtual keys.
  376.  
  377. See Also: ClearVirtualKeys, HandleVirtualKey.
  378.  
  379.  
  380. CarrierLost
  381. Declaration: FUNCTION CarrierLost : Boolean
  382.  
  383.       CarrierLost easily checks to see if the comport  has  lost
  384. carrier since the last time you checked.  This is much different
  385. than  checking  to  see  if  the line  has  a  carrier,  because
  386. CarrierLost will not bomb if there was no carrier to begin with.
  387. It  only returns a true value if a carrier was not found when it
  388. previously existed.
  389.       This  is done by checking one of the UART registers, which
  390. maintains  a  "delta" data carrier detect bit.  If this  bit  is
  391. true  while  the  data carrier detect bit is false,  we've  lost
  392. carrier  because the state has changed from true to the  current
  393. false.  Therefore, someone hung up on us.
  394.       Checking  these  bits  is done in the  internal  assembler
  395. routine.   When such a situation occurs, it sets a  bit  in  the
  396. ErrorFlg  variable,  which  is  then  checked  and  reported  by
  397. CarrierLost.
  398.  
  399. See Also: Carrier (procedural).
  400.  
  401.  
  402. ClearIntChars
  403. Declaration: PROCEDURE ClearIntChars;
  404.  
  405.       ClearIntChars wipes the internal list of of  interruptable
  406. characters.  This is the equivalent of executing IntChars := [].
  407.       After  this call, a call to TypeFile cannot be interrupted
  408. by any characters coming in from the console or comport.
  409.  
  410. See Also: AddIntChar, TypeFile.
  411.  
  412.  
  413. ClearVirtualKeys
  414. Declaration: PROCEDURE ClearVirtualKeys;
  415.  
  416.       Clears  the  internal set of virtual  keys.   This  simply
  417. causes  no extended keys to be handled, and are passed  straight
  418. through ComReadKey.  Their values will be returned exactly  like
  419. Turbo returns them in ReadKey (#0 followed by their code).
  420.  
  421. See Also: AddVirtualKey.
  422.  
  423.  
  424. ClosePort
  425. Declaration: PROCEDURE ClosePort(LowerDTR : Boolean);
  426.              VIRTUAL;
  427.  
  428.       Closes  down the comport if it has already been opened  by
  429. calling the shutdown procedure DeInitPort.  If LowerDTR is true,
  430. the DTR line will be lowered before shutting the port down.
  431.       DTR  is usually kept high if the connection should be kept
  432. active  after  the  application has been terminated.   Most  new
  433. modems  will interpret a low DTR line as a command to make  sure
  434. the modem is on-hook, and will hang up the phone line.
  435.  
  436. See Also: OpenPort.
  437.  
  438.  
  439. Cls
  440. Declaration: PROCEDURE Cls; VIRTUAL;
  441.  
  442.       Cls clears the screen on the local end and the remote end.
  443. This  method  may  not always be successful  when  clearing  the
  444. screen  on  the  remote  end  if the remote  terminal  does  not
  445. understand  a  formfeed (#12) character as a clear screen  code.
  446. Most terminals, including the TTY template supplied with BBSkit,
  447. do understand this code.
  448.  
  449.  
  450. ComReadKey
  451. Declaration: FUNCTION ComReadKey : Char; VIRTUAL;
  452.  
  453.       ComReadKey will wait for a keypress to come in over one of
  454. the  allowed  input devices.  These are defined by the  SetInput
  455. method.   ComReadKey  will handle virtual keys  that  have  been
  456. defined  with  AddVirtualKey as well as inactivity  timeouts  if
  457. they have been enabled.
  458.  
  459. See Also: AddVirtualKey, ComReadKeyE, SetInput, SetTimer.
  460.  
  461.  
  462. ComReadKeyE
  463. Declaration: FUNCTION ComReadKeyE : Char; VIRTUAL;
  464.  
  465.       This method performs the same function as ComReadKey,  but
  466. when  a  key is finally received it is outputted using ComWrite.
  467. The two methods do not differ except in this respect.
  468.      ComReadKeyE still checks inactivity and virtual keys.
  469.  
  470. See Also: ComReadKey.
  471.  
  472.  
  473. ComReadLn
  474. Declaration: PROCEDURE ComReadLn(var Inp : String; Max :
  475.              Byte); VIRTUAL;
  476.  
  477.       ComReadLn  is the BBSkit version of ReadLn.  ComReadLn  is
  478. enhanced  in  many  ways over the standard  ReadLn  provided  in
  479. Pascal.
  480.       Perhaps  the  most obvious is the second  parameter,  Max.
  481. This  byte value determines the maximum number of characters  to
  482. accept  on the input line.  When the maximum is reached, further
  483. characters  will  be  discarded  until  one  of  the  previously
  484. accepted ones is deleted using the backspace key.
  485.       The  following characters have special meaning  when  used
  486. somewhere on the input line:
  487.  
  488.      #8, Control-H: Backspace (erases previous character)
  489.      #9, Tab: Advance to next tabstop (modulo 8)
  490.      #12, Enter: Terminates current input line
  491.      #24, Control-X: Erase line and start over
  492.  
  493.      Only backspace, enter, and control-X are permitted when the
  494. maximum input length has been reached.  Other control characters
  495. in  the  range  [#0..#31]  not  defined  here  are  ignored  and
  496. discarded.   All  other characters in the range [#32..#255]  are
  497. accepted without question and placed in the input line, provided
  498. there is room for them.
  499.       ComReadLn  is subject to the same input restrictions  that
  500. ComReadKey has.
  501.  
  502. See Also: ComReadKey, ComReadLnWrap.
  503.  
  504.  
  505. ComReadLnWrap
  506. Declaration: PROCEDURE ComReadLnWrap(var Inp : String; Max
  507.              : Byte; var Wrap : String); VIRTUAL;
  508.  
  509.       ComReadLnWrap is a modified version of ComReadLn  intended
  510. specifically for line based editors.  ComReadLn will not  permit
  511. any  input  past  the  Max value passed in the  parameter  list.
  512. ComReadLnWrap improves on this idea when used in a  line  editor
  513. format  by  saving  the last incomplete word in  the  additional
  514. variable Wrap.  When called over and over, this method  is  used
  515. to  perform word wrapping at the margin, which is defined by the
  516. Max variable.
  517.       The  following example shows how word wrap is  done.   The
  518. user  can type all he/she wants, without having to press [Enter]
  519. at the end of each line, until a blank line is entered.
  520.           
  521.           Var
  522.             Inp, Wrap : String;
  523.           
  524.           begin
  525.             Wrap := '';
  526.             Repeat
  527.               ComReadLnWrap(Inp, 79, Wrap);
  528.             Until (Inp = '');
  529.           end;
  530.           
  531.       There are two things that need to be quickly pointed  out.
  532. First,  note  that  Wrap is initialized to a  null  string  ("")
  533. before  the  first time ComReadLnWrap is called.  What  actually
  534. happens  inside ComReadLnWrap is that whatever is  contained  in
  535. Wrap at the beginning of the call is actually placed into Inp as
  536. the  first few characters.  When the margin is reached (in  this
  537. case,  79), ComReadLnWrap searches back for a character  allowed
  538. to  break a line, such as a space, and places everything to  the
  539. right (but not including the break character) into Wrap for  the
  540. next call to ComReadLnWrap.
  541.       It  may  occur to you that you could use this  method  for
  542. prompting the user with default values for various things,  such
  543. as  a default subject in a message.  This would work great,  but
  544. the only problem is that if the user typed too far, the last bit
  545. of  his typing would be lost due to ComReadLnWrap trying to wrap
  546. this  text.   This  may  or  may  not  be  reasonable  for  your
  547. application.  The possibility is there, however.
  548.  
  549. See Also: ComReadLn.
  550.  
  551.  
  552. ComWrite
  553. Declaration: PROCEDURE ComWrite(Strn : String); VIRTUAL;
  554.  
  555.       Outputs a string of text exactly like Write to the  output
  556. device(s).  The output devices are controlled with the SetOutput
  557. method.
  558.  
  559. See Also: ComWriteLn, SetOutput.
  560.  
  561.  
  562. ComWriteLn
  563. Declaration: PROCEDURE ComWriteLn(Strn : String); VIRTUAL;
  564.  
  565.       Outputs a string of text exactly like WriteLn.  ComWriteLn
  566. is  also  subject to the same output restrictions that  ComWrite
  567. has.
  568.      ComWriteLn is actually just a call to ComWrite:
  569.           
  570.           ComWrite(Strn + #13#10);
  571.           
  572.       If  this causes problems on your system or for your  users
  573. (such  as  a  blank line always between two normal lines),  then
  574. override this method to only tack on a carriage return character
  575. (#13)  instead  of  the  carriage return/line  feed  combination
  576. (#13#10).
  577.  
  578. See Also: ComWrite.
  579.  
  580.  
  581. Dial
  582. Declaration: PROCEDURE Dial(Number : String); VIRTUAL;
  583.  
  584.       Attempts  to  dial  Number by sending  a  Hayes-style  ATD
  585. command to your serial port.  A modem is expected to be  on  the
  586. other end to receive and execute the command.
  587.      Please note that it does not specify tone or pulse dialing.
  588. If  you  need to do this, place a T or P before the  number  for
  589. tone or pulse, respectively.
  590.      If your modem is not Hayes-compatible, please override this
  591. method to give specific support to your modem.
  592.  
  593. See Also: SendAT.
  594.  
  595.  
  596. FilterWrite
  597. Declaration: PROCEDURE FilterWrite(Strn : String); VIRTUAL;
  598.  
  599.      Writes Strn to the console screen only, after first passing
  600. it  through the emulation filter defined by the record Emu.  Emu
  601. contains the legal codes for several emulation functions.   When
  602. a  string  matching  one of these functions  is  passed  through
  603. FilterWrite  (and it must match exactly), then the  function  is
  604. executed instead of the characters simply being written  to  the
  605. screen.
  606.       Please  note  that the emulation supported  by  BBSkit  is
  607. rudimentary.  BBSkit is primarily concerned with giving  a  base
  608. for   writing  communications  applications.   There  are   some
  609. terminals,  such  as  the  VT-100/102/220/320  that  have   many
  610. commands  that are not supported by BBSkit.  Most of these  deal
  611. with setting modes not supported by BBSkit.  If your application
  612. needs to support these codes, you are responsible for them.
  613.       Also,  there  can be more than one code contained  in  the
  614. string  sent  to FilterWrite.  As long as the codes  are  legal,
  615. they will be interpreted.
  616.  
  617.  
  618. FilterWriteLn
  619. Declaration: PROCEDURE FilterWriteLn(Strn : String);
  620.              VIRTUAL;
  621.  
  622.      Performs the same function as FilterWrite, but also appends
  623. a CR/LF to the end of the string.
  624.  
  625. See Also: FilterWrite.
  626.  
  627.  
  628. GetAnswerMode
  629. Declaration: FUNCTION GetAnswerMode : TAnswerMode;
  630.  
  631.       Returns the answer mode that was previously set using  the
  632. SetAnswerMode method.  The default value is originate mode.
  633.      The answer mode only affects the way that the modem is told
  634. to answer the phone when a call to PickupPhone is made.
  635.  
  636. See Also: PickupPhone, SetAnswerMode.
  637.  
  638.  
  639. GetInput
  640. Declaration: PROCEDURE GetInput(var Con, Rem : Boolean);
  641.  
  642.       Returns boolean variables defining whether or not input is
  643. accepted from the two devices.  If Con is true, input is allowed
  644. from  the  console.  If Rem is true, input is allowed  from  the
  645. comport.
  646.  
  647. See Also: SetInput.
  648.  
  649.  
  650. GetOutput
  651. Declaration: PROCEDURE GetOutput(var Con, Rem : Boolean);
  652.  
  653.      Returns boolean variables defining whether or not output is
  654. directed to the two devices.  If Con is true, all output  routed
  655. through  ComWrite  or  ComWriteLn is also  put  to  the  console
  656. screen.  If Rem is true, all output will go to the comport.
  657.  
  658. See Also: SetOutput.
  659.  
  660.  
  661. HandleVirtualKey
  662. Declaration: FUNCTION HandleVirtualKey(Code : Char) :
  663.              Boolean; VIRTUAL;
  664.  
  665.      HandleVirtualKey is designed to allow you to define virtual
  666. keys for use during any session and to handle them using code of
  667. your own choosing.  HandleVirtualKey will be called whenever any
  668. extended key is found at the local console which matches one  of
  669. the virtual keys BBSkit knows about.
  670.       The  default HandleVirtualKey method is empty  because  no
  671. virtual  keys  are defined in the TBBS object.   It  is  up  the
  672. programmer  to  override  this method and  provide  support  for
  673. virtual keys that the application defines.
  674.       The  return  value of HandleVirtualKey is  important.   It
  675. determines   whether  the  current  input  session   should   be
  676. terminated  or not.  For example, if you are just  changing  the
  677. time  left  for a user's session, you want to return False  from
  678. this  method.  If are actually interacting with the user or part
  679. of your BBS, you will want to return True.  In general, if there
  680. is  any  chance that the user's screen has changed  in  any  way
  681. during  the handling of your key, return True.  Otherwise return
  682. False and the user won't know anything happened.
  683.  
  684.  
  685. Hangup
  686. Declaration: FUNCTION Hangup : Boolean; VIRTUAL;
  687.  
  688.       Attempts to hangup the modem.  It first attempts to hangup
  689. using  an  on-to-off  transition of DTR.  Most  new  modems  are
  690. capable  of  recognizing  this DTR  transition  by  issuing  the
  691. command ATX3 to the modem.  If this fails to hang the modem  up,
  692. Hangup  will  send the attention sequence (+++)  to  the  modem,
  693. followed  by  the hangup command (ATH0).  If this  still  fails,
  694. your  modem will probably require some special tweaking.  Hangup
  695. can be overridden to provide support for tempermental modems.
  696.       The return value is not Carrier.  Hangup returns the false
  697. (failed) value if there is still a carrier after trying to  hang
  698. the  modem  up.  It returns true if there is no carrier  present
  699. and the line is clear.
  700.      Hangup also resets the inactivity error bit in ErrorFlg.
  701.  
  702. See Also: Dial.
  703.  
  704.  
  705. Incoming
  706. Declaration: FUNCTION Incoming : Boolean;
  707.  
  708.       Returns true if any keys are present at the allowed  input
  709. devices.  If console input is accepted, it checks Keypressed  in
  710. the   CRT   unit.   If  modem  input  is  accepted,  it   checks
  711. ReceiveBufferEmpty.  If either of these are  true,  Incoming  is
  712. true.
  713.  
  714. See Also: Keypressed (CRT), ReceiveBufferEmpty
  715. (procedural).
  716.  
  717.  
  718. IntegerVal
  719. Declaration: FUNCTION IntegerVal(Strn : String; Index :
  720.              Byte) : Integer;
  721.  
  722.       Converts the two bytes starting at Strn[Index] into a full
  723. integer  value.  These two bytes are actually the high  and  low
  724. bytes in character form, high byte first.
  725.       This  method is primarily used by BSP but can be  used  by
  726. other applications for whatever purpose you wish.
  727.  
  728. See Also: SendInteger.
  729.  
  730.  
  731. LoadEmulation
  732. Declaration: FUNCTION LoadEmulation(Fname : String) :
  733.              Boolean;
  734.  
  735.       Loads the emulation template defined by Fname.  Fname  can
  736. be  any  filename, but should be a valid emulation file  if  you
  737. don't want strange things happening.
  738.       LoadEmulation returns true if the file was loaded  without
  739. errors, false if the file could not be found.
  740.  
  741. See Also: LoadEmulationLib.
  742.  
  743.  
  744. LoadEmulationLib
  745. Declaration: FUNCTION LoadEmulationLib(ID, Fname : String)
  746.              : Boolean;
  747.  
  748.       Loads  the  emulation template stored as ID  in  the  file
  749. Fname.   If  Fname is not found or the ID isn't in the  file,  a
  750. false  value is returned.  If the emulation template  is  loaded
  751. without errors, true is returned.
  752.  
  753. See Also: LoadEmulation.
  754.  
  755.  
  756. OpenPort
  757. Declaration: FUNCTION OpenPort(Comport : Byte) : Boolean;
  758.  
  759.       Opens the specified comport by calling InitPort at setting
  760. up  some default values.  By default, the port is opened at 2400
  761. bits per second, 8 data bits, 1 stop bit, no parity.  Input  and
  762. output  buffers are set to 2048 bytes each.  No flow control  is
  763. enabled.
  764.  
  765. See Also: ClosePort.
  766.  
  767.  
  768. PickupPhone
  769. Declaration: PROCEDURE PickupPhone; VIRTUAL;
  770.  
  771.       Attempts  to pick the phone up by issuing the  appropriate
  772. command  to the modem.  You can set originate or answer mode  by
  773. calling SetAnswerMode.
  774.       PickupPhone supports Hayes-compatible modems  (those  with
  775. the  AT  command  set) only.  If you have a non-standard  modem,
  776. please override PickupPhone to provide support to your modem.
  777.       If  the  answer mode is set to answer, the answer  carrier
  778. tone  will be sent across the phone line.  Otherwise, the  modem
  779. will  attempt  to connect with the remote modem by  issuing  the
  780. dial command with no number.
  781.  
  782. See Also: SetAnswerMode.
  783.  
  784.  
  785. SetBSP
  786. Declaration: PROCEDURE SetBSP(Level : Byte);
  787.  
  788.       Sets the allowed level of BSP according to the Level mask.
  789. Level is constructed according to these rules:
  790.  
  791.           bit 0: 0=no support for BSP; 1=buffering support
  792.           bit 1: 0=no mouse; 1=mouse available
  793.           bit 2: 0=no graphics; 1=graphics (EGA+) available
  794.  
  795.        Buffering  includes  the  most  basic  functions  of  BSP
  796. including simple file transfers and spooling disk files directly
  797. to  the  screen for very fast text display.  Graphics  are  only
  798. supported  if a high resolution mode (640x350 EGA) or better  is
  799. found.   The only exception is the 256 color 320x200 mode  found
  800. in  VGA  cards, which is also supported due to the higher number
  801. of  colors  available  and  the fact that  the  high  resolution
  802. 640x480 mode is also available.
  803.  
  804.      BSP is only available in the registered version of BBSkit.
  805.  
  806. See Also: BSP_xxxx methods.
  807.  
  808.  
  809. SetCaptureFile
  810. Declaration: PROCEDURE SetCaptureFile(Path : ComStr);
  811.  
  812.       Sets  the  default file pathname for any capture  to  disk
  813. commands.  If disk capturing is set, all characters displayed by
  814. the  ComWrite and ComWriteLn methods will be sent  to  the  disk
  815. file for a permanent record.
  816.       This  method  does  not actually turn disk  capturing  on.
  817. SetCaptureStatus either opens or closes the file defined by this
  818. method.  The default file is CAPTURE.TXT, and is placed  in  the
  819. current directory.
  820.  
  821. See Also: SetCaptureStatus.
  822.  
  823.  
  824. SetCaptureStatus
  825. Declaration: PROCEDURE SetCaptureStatus(Status : Boolean);
  826.  
  827.       Either  turns  on disk capturing, turns it  off,  or  does
  828. nothing.  If disk capturing is not on, and Status is true,  disk
  829. capturing  is  turned  on  and all further  characters  sent  to
  830. ComWrite  or  ComWriteLn will be appended  to  the  end  of  the
  831. capture file.  If disk capturing is on and Status is false,  the
  832. file  will  be  closed and disk capturing will  stop.   If  disk
  833. capturing is on and Status is true, or if disk capturing is  off
  834. and Status is false, nothing happens.
  835.  
  836. See Also: SetCaptureFile.
  837.  
  838.  
  839. SetCaseSensitivity
  840. Declaration: PROCEDURE SetCaseSensitivity(Status :
  841.              Boolean);
  842.  
  843.       Sets  case sensitivity for two methods in TBBS.  The first
  844. is  AddIntChar.  When case sensitivity is true, 'A' and 'a'  are
  845. equal,  so  only  'A'  is  stored in the  set  of  interruptable
  846. characters.   WaitFor  also  makes use  of  the  state  of  case
  847. sensitivity.  When true, all characters will first be  converted
  848. to  uppercase  before being compared to the string being  sought
  849. after.
  850.  
  851. See Also: AddIntChar, WaitFor.
  852.  
  853.  
  854. SetEcho
  855. Declaration: PROCEDURE SetEcho(Ch : Char);
  856.  
  857.      Sets the echo character used for all input also directed to
  858. the  screen  or modem.  Usually, every character typed  is  also
  859. echoed  back to show the user what he/she is typing.  Sometimes,
  860. such  as  during  password entry, this  is  undesirable  because
  861. others  may  be  watching.  A call to SetEcho will  cause  every
  862. character normally sent back the user to be Ch.  For example,
  863.           
  864.           SetEcho('*');
  865.           
  866.      will cause every character typed to be seen as an asterisk.
  867. A  call  to SetEcho with a null (#0) as the parameter will  turn
  868. echoing off and cause each character to be echoed back normally.
  869.  
  870.  
  871. SetInput
  872. Declaration: PROCEDURE SetInput(Con, Rem : Boolean);
  873.  
  874.       Tells  BBSkit where to accept input from during a call  to
  875. ComReadKey, ComReadKeyE, ComReadLn, or ComReadLnWrap.
  876.       If Con is true, console input will be accepted.  If Rem is
  877. true, input from the remote user will be accepted.
  878.       Be  careful with this procedure.  If you turn off  console
  879. input  but  still allow remote input, the user will be  able  to
  880. type  things and you won't be able to do anything.   In  effect,
  881. this  can  lock  your local keyboard.  Virtual  keys  will  work
  882. regardless of this setting.
  883.  
  884. See Also: GetInput.
  885.  
  886.  
  887. SetInputCap
  888. Declaration: PROCEDURE SetInputCap(Style : TCapStyle);
  889.  
  890.       SetInputCap allows you to change the way input is modified
  891. when using ComReadLn or ComReadLnWrap.
  892.  
  893.      NoCaps makes no modification to input text.
  894.      UpperCase turns all lowercase letters into uppercase.
  895.      LowerCase turns all uppercase letters into lowercase.
  896.      Proper turns all letters after puncuation into
  897.       uppercase, while all other letters remain in
  898.       lowercase.
  899.  
  900.      The default value is NoCaps.
  901.  
  902.  
  903. SetLF
  904. Declaration: PROCEDURE SetLF(Status : Boolean);
  905.  
  906.       Some  terminals, such as the IBM and compatible,  like  to
  907. have a carriage return followed immediately by a line feed.  For
  908. such terminals, SetLF allows you to tell BBSkit to insert a line
  909. feed each time it runs across a carriage return in a ComWrite or
  910. ComWriteLn call.  In this sense, it turns each CR into  a  CR/LF
  911. combination.
  912.       Other terminals do not require the line feed to advance to
  913. the next line.  For these terminals, turn off automatic addition
  914. of the line feed with SetLF.
  915.  
  916.  
  917. SetNulls
  918. Declaration: PROCEDURE SetNulls(Num : Byte);
  919.  
  920.       Some  older terminals require null padding at the  end  of
  921. each  line to give the display hardware time to catch  up.   For
  922. these terminals, you can specify that each CR be followed  by  a
  923. certain  amount  of null (#0) characters.  These characters  are
  924. non-printing  characters  which  are  never  used  by   terminal
  925. emulation,  so  they make ideal time-wasting characters.   Newer
  926. terminals do not need nulls, so this can usually be left to  the
  927. default, which is no nulls after CR.
  928.  
  929.  
  930. SetOutput
  931. Declaration: PROCEDURE SetOutput(Con, Rem : Boolean);
  932.  
  933.       Sets  up  output redirection for ComWrite  and  ComWriteLn
  934. calls.   If  Con  is  set  to true, text sent  to  ComWrite  and
  935. ComWriteLn  will appear on the local console. If  Rem  is  true,
  936. text will be sent out the comport.
  937.       Again,  be careful here.  You can inadvertently send  text
  938. out the comport and not out the screen.  This can cause problems
  939. if you are using your own system and can't see things you should
  940. be seeing.
  941.  
  942. See Also: GetOutput.
  943.  
  944.  
  945. SetPaging
  946. Declaration: PROCEDURE SetPaging(Status : Boolean);
  947.  
  948.       This  method allows you to turn paging on or off  for  the
  949. session.   When  paging is on, it causes  each  line  output  to
  950. increment  a  "line out" counter.  When this counter  reaches  a
  951. predetermined  limit, a full screen has been displayed  and  the
  952. user  is prompted for more output with a simple "More..."  style
  953. prompt.  After a key is pressed, the counter is reset and output
  954. will continue.
  955.       This  paging  is active during all output to ComWrite  and
  956. ComWriteLn, and is not restricted to something such as TypeFile.
  957.  
  958. See Also: SetPagingLines, SetPagingMsg.
  959.  
  960.  
  961. SetPagingLines
  962. Declaration: PROCEDURE SetPagingLines(Num : Byte);
  963.  
  964.       Sets  a  limit on the number of lines that can  be  output
  965. before  the  "More..." prompt is displayed.  Whenever  a  CR  is
  966. found  during  a  ComWrite or ComWriteLn, the  line  counter  is
  967. incremented.  This counter is not incremented if a line is  more
  968. than  80  characters long and happens to wrap to the next  line.
  969. For  this  reason,  make sure that your  text  wraps  with  hard
  970. returns so that paging (if active) will work correctly.
  971.  
  972. See Also: SetPaging, SetPagingMsg.
  973.  
  974.  
  975. SetPagingMsg
  976. Declaration: PROCEDURE SetPagingMsg(Msg : String);
  977.  
  978.       This method allows you to define what the message that  is
  979. displayed  to  the  user at the end of a screen  page  will  be.
  980. Default value is "More...".  This string should not contain  any
  981. characters  that could cause a line break, such  as  CR  or  LF.
  982. After  a  user presses a key, the message is erased.   This  can
  983. only  be  done if the cursor is still on the same  line  as  the
  984. message.
  985.  
  986. See Also: SetPaging, SetPagingLines.
  987.  
  988.  
  989. SetPrinter
  990. Declaration: PROCEDURE SetPrinter(Status : Boolean);
  991.  
  992.       This  method controls whether or not text sent to ComWrite
  993. and  ComWriteLn  will be sent to the printer.   When  Status  is
  994. true,  the  printer will print every character sent to  ComWrite
  995. and ComWriteLn.  When false, printing stops.
  996.       The  printer used is the one provided in the Printer unit.
  997. If  your  printer works with Turbo Pascal programs of  your  own
  998. design, it will work with BBSkit.  If your printer doesn't work,
  999. it won't work here either.
  1000.  
  1001.  
  1002. SetTimer
  1003. Declaration: PROCEDURE SetTimer(Status : Boolean);
  1004.  
  1005.       Built  into  BBSkit is a simple timer routine which  keeps
  1006. track of inactivity while waiting for a key using ComReadKey  or
  1007. ComReadKeyE.  If the limit of this timer is reached,  a  message
  1008. is  displayed and the user has a short time to press a key or be
  1009. logged  off.  This timer can be enabled or disabled with a  call
  1010. to  this  method.   When Status is true, the timer  is  enabled.
  1011. When Status is false, the timer is disabled and the terminal can
  1012. be idle for an indefinite period of time.
  1013.       Inactivity timeouts are usually used to keep one user from
  1014. hogging your board while he/she isn't doing anything with it.
  1015.  
  1016. See Also: SetTimerDelay, SetTimerMsg.
  1017.  
  1018.  
  1019. SetTimerDelay
  1020. Declaration: PROCEDURE SetTimerDelay(Dly : Word);
  1021.  
  1022.       Sets  the period of inactivity allowed before the  timeout
  1023. message  is  displayed.   The  Dly  parameter  is  expressed  in
  1024. seconds,  so  a  value  of  180 is  equal  to  three  minute  of
  1025. inactivity before a logout occurs.
  1026.      This value should be long enough to give a user a chance to
  1027. get  something done quickly without keeping your board idle  for
  1028. an extended period of time.
  1029.  
  1030. See Also: SetTimer, SetTimerMsg.
  1031.  
  1032.  
  1033. SetTimerMsg
  1034. Declaration: PROCEDURE SetTimerMsg(Msg : String);
  1035.  
  1036.       When  an inactivity timeout occurs, a message is displayed
  1037. to  the  user telling him/her than they have a very short period
  1038. of time to press a key or they will be logged out.  This message
  1039. should  be  very obvious and could contain a few beep characters
  1040. (#7) to get the user's attention.
  1041.      The default message is "Hello?" followed by a beep.
  1042.  
  1043. See Also: SetTimer, SetTimerDelay.
  1044.  
  1045.  
  1046. SetVirtualKeys
  1047. Declaration: PROCEDURE SetVirtualKeys(Status : Boolean);
  1048.  
  1049.      SetVirtualKeys allows you to temporarily turn off or on the
  1050. handling  of  the  virtual keys.  By default, virtual  keys  are
  1051. not allowed and are  not handled by HandleVirtualKey.    Calling
  1052. SetVirtualKeys when Status is true will enable the virtual keys,
  1053. while  calling it when Status is false will disable them.   This
  1054. does  not clear the list of virtual keys, but rather just  stops
  1055. checking  for  them.   The  same  virtual  keys  can  again   be
  1056. interpreted  after  virtual  keys  have  been  re-enabled  using
  1057. SetVirtualKeys(True).
  1058.  
  1059. See Also: AddVirtualKey, ClearVirtualKeys.
  1060.  
  1061.  
  1062. TerminalMode
  1063. Declaration: FUNCTION TerminalMode(Duplex : TDuplex;
  1064.              ShowControls : Boolean) : Char;
  1065.  
  1066.       TerminalMode  provides  a rudimentary  terminal  mode  for
  1067. BBSkit  applications.   TerminalMode  allows  you  to  send  and
  1068. receive   characters  from  the  modem  without  the  additional
  1069. features found in real terminal programs.
  1070.       Duplex defines whether or not characters you type will  be
  1071. echoed  back  to  the  screen.   Duplex  can  be  one  of  these
  1072. enumerated values:
  1073.  
  1074.      Full: characters are not echoed.
  1075.      Half: characters are echoed.
  1076.      Chat: characters are echoed, and CR is turned into
  1077.           CR/LF.
  1078.  
  1079.       ShowControls allows you to have control characters show up
  1080. in  a  different way from the rest of the text.   If  a  control
  1081. character  is received while ShowControls is true,  it  will  be
  1082. displayed as the character in reverse video.  That is, control-A
  1083. is displayed as an uppercase 'A' in reverse video.
  1084.       The return value from TerminalMode is the last half of  an
  1085. extended  key.   TerminalMode exists whenever any extended  key,
  1086. such  as  F1,  is  pressed.  The first half  that  Turbo  Pascal
  1087. receives  (the #0), is thrown away, and the second  is  returned
  1088. through the function.  In this way, you could implement  a  more
  1089. powerful TerminalMode simply by having certain extended keys  do
  1090. things   that  TerminalMode  doesn't  already  do,   like   file
  1091. transfers.
  1092.  
  1093.  
  1094. TimeOut
  1095. Declaration: FUNCTION TimeOut : Boolean;
  1096.  
  1097.       TimeOut  will  return  true if an inactivity  timeout  has
  1098. occurred  during the last wait for a key.  It  is  best  to  use
  1099. TimeOut after important prompts.  If a user times out during one
  1100. prompt,  a flag is set which will cause him to timeout of  every
  1101. prompt after that, so it should be easy to have this "pop"  back
  1102. to the main level, log the user out, and reset your BBS.
  1103.      The flag is not automatically reset except during a call to
  1104. Hangup, so if you don't make a call to Hangup, you will have  to
  1105. reset the flag yourself with the command
  1106.           
  1107.           ErrorFlg := ErrorFlg AND (NOT ErrInactivity);
  1108.           
  1109.  
  1110.  
  1111. TypeFile
  1112. Declaration: PROCEDURE TypeFile(Fname : String);
  1113.  
  1114.       TypeFile displays the file defined by Fname to the outputs
  1115. defined  by  SetOutput by passing each line through  ComWriteLn.
  1116. TypeFile  can  be  interrupted by one of the characters  in  the
  1117. interrupt  list, which is constructed using AddIntChar.   If  an
  1118. interrupt character is received, it will not be removed from the
  1119. buffer, and can act as an immediate keypress for such things  as
  1120. menus.   Using  TypeFile  in this way  makes  it  very  easy  to
  1121. construct menus with "hot-keys."
  1122.      If case sensitivity is currently set, all lowercase letters
  1123. are  converted  to  uppercase before being  tested  against  the
  1124. interrupt list.
  1125.  
  1126. See Also: AddIntChar, ClearIntChars.
  1127.  
  1128.  
  1129. VersionID
  1130. Declaration: FUNCTION VersionID : String;
  1131.  
  1132.       Returns  a  string  containing the BBSkit  identification,
  1133. version number, and release date.
  1134.       It  would be nice if you could use this function somewhere
  1135. in  your  code to let the world know you used BBSkit to  develop
  1136. your application.  This is not required, but it would be nice!
  1137.  
  1138.  
  1139. WaitFor
  1140. Declaration: FUNCTION WaitFor(Strn : String; Timeout :
  1141.              Word) : Boolean;
  1142.  
  1143.       WaitFor  will wait for a specified number of  seconds  for
  1144. Strn  to  be  seen  at the comport.  Characters  received  while
  1145. waiting  for this string are discarded, as is the string  itself
  1146. when (and if) it is found.  A true value is returned only if the
  1147. string  was  seen.   A  false value is returned  when  too  many
  1148. seconds have elapsed without seeing the string.
  1149.       If  Timeout  is  set  to  zero,  then  WaitFor  will  wait
  1150. indefinitely for Strn to be seen at the comport.   There  is  no
  1151. timeout value.
  1152.       If  case  sensitivity is set, then all characters received
  1153. will be converted to uppercase before being tested against Strn.
  1154. Strn  is  also converted to uppercase.  Thus, "ok" and "OK"  are
  1155. the same thing.
  1156.  
  1157. See Also: SetCaseSensitivity.
  1158.                                 Chapter 8: Protocol Unit Listing
  1159.                                                                 
  1160.  
  1161.  
  1162. ReceiveXmodem
  1163. Declaration: FUNCTION ReceiveXmodem(Mode : Byte; Fname :
  1164.              PathStr) : TError;
  1165.  
  1166.       ReceiveXmodem prepares to receive a single file into Fname
  1167. using the Xmodem protocol.  The other end must be ready to  send
  1168. using Xmodem or nothing is going to get transferred.
  1169.       Mode  is  a  single  byte bit mask  constructed  from  the
  1170. following  constants.  If you construct a bit  mask  using  more
  1171. than  one  of Checksum, CRC, or OneK, you will most  likely  get
  1172. unpredictable results.
  1173.  
  1174.           Checksum  = $01
  1175.           CRC       = $02
  1176.           OneK      = $06
  1177.           Turbo     = $80
  1178.  
  1179.       Checksum uses 128 byte packets with an 8-bit checksum  for
  1180. error  checking.   CRC  uses  128 byte  packets  with  a  16-bit
  1181. cyclical redundancy check.  OneK uses 1024 byte packets and  the
  1182. same 16-bit CRC.  Turbo speeds up receiving of files at the cost
  1183. of  no  error  checking.   Instead  of  actually  computing  the
  1184. checksum  or CRC, it will automatically acknowledge  the  packet
  1185. and  proceed to the next.  In this way, it can be used with  any
  1186. Xmodem sender, even if they do not support a "Turbo" mode.  This
  1187. mode  is  also best if used on error-correcting modems,  as  the
  1188. protocol no longer does any error checking of its own.
  1189.      Fname specifies where the received file will be put and its
  1190. name.   Unless you want an error generated, make sure this  file
  1191. doesn't already exist.
  1192.       ReceiveXmodem returns a value reporting the status of  the
  1193. transfer.   If no errors or problems were detected,  NoError  is
  1194. returned, signifying that the transfer was successful.   One  of
  1195. the  following  corresponds to the appropriate error  condition:
  1196. TimeOut   (timed   out   while  waiting   for   the   receiver),
  1197. TooManyErrors,   Aborted  (by  the  user  or  local   operator),
  1198. DiskError (error reading/writing to disk), NoCarrier (there  was
  1199. nothing  to send a file to), FileExists (file already exists  so
  1200. we can't receive it again).
  1201.  
  1202. See Also: SendXmodem.
  1203.  
  1204.  
  1205. SendXmodem
  1206. Declaration: FUNCTION SendXmodem(Mode : Byte; Fname :
  1207.              PathStr) : TError;
  1208.  
  1209.       SendXmodem sends a single file using the Xmodem  protocol.
  1210. The  other end must be ready to receive using Xmodem or  nothing
  1211. will get transferred.
  1212.       Mode  is  a  byte  bit mask constructed from  one  of  the
  1213. following  constants.  If you use more than one, you  will  most
  1214. likely get unpredictable results.
  1215.  
  1216.           Checksum  = $01
  1217.           CRC       = $02
  1218.           OneK      = $06
  1219.  
  1220.       Checksum uses simple checksum error checking with 128 byte
  1221. packets.  CRC upgrades the error checking to use 16-bit cyclical
  1222. redundancy checks, which catch more errors.  CRC still uses  128
  1223. byte packets.  OneK improves throughput by increasing the packet
  1224. size  to 1K, or 1024 bytes.  CRC error checking is also utilized
  1225. to make the protocol more foolproof.
  1226.       Please note that Xmodem-1K is sometimes misrepresented  as
  1227. Ymodem.  Ymodem is a batching protocol, even though both use the
  1228. exact  same  method of transfers.  Xmodem-1K is not  a  batching
  1229. protocol and will not work with Ymodem.
  1230.      Fname is simply the path to the file you wish to send.
  1231.       SendXmodem  returns a value reporting the  status  of  the
  1232. transfer.   If no errors or problems were detected,  NoError  is
  1233. returned, signifying that the transfer was successful.   One  of
  1234. the  following  corresponds to the appropriate error  condition:
  1235. TimeOut   (timed   out   while  waiting   for   the   receiver),
  1236. TooManyErrors,   Aborted  (by  the  user  or  local   operator),
  1237. DiskError (error reading/writing to disk), NoCarrier (there  was
  1238. nothing to send a file to).
  1239.  
  1240. See Also: ReceiveXmodem.
  1241.                            Chapter 9: Procedure/Function Listing
  1242.                                                                 
  1243.  
  1244.  
  1245. BpsRate
  1246. Declaration: FUNCTION BpsRate : Longint;
  1247.  
  1248.       Returns  the bits per second rate of the currently  opened
  1249. comport.  This function should not be called if a port  has  not
  1250. already been initialized through InitPort.  The results you  get
  1251. would most likely be garbage.
  1252.  
  1253. See Also: SetBpsRate.
  1254.  
  1255.  
  1256. Carrier
  1257. Declaration: FUNCTION Carrier : Boolean;
  1258.  
  1259.       Returns  the  carrier status of the current  comport.   If
  1260. there  is  a  carrier  present on the line,  true  is  returned.
  1261. Otherwise it will return a false value.
  1262.  
  1263. See Also: TBBS.CarrierLost.
  1264.  
  1265.  
  1266. ClearPort
  1267. Declaration: PROCEDURE ClearPort;
  1268.  
  1269.       Clears  some of the registers of the UART on  the  current
  1270. comport.   The line status register, the modem status  register,
  1271. and  the  receive buffer register are all read. This will  clear
  1272. any pending event from each register, effectively clearing them.
  1273.  
  1274.  
  1275. ClearReceiveBuffer
  1276. Declaration: PROCEDURE ClearReceiveBuffer;
  1277.  
  1278.       Destroys  all characters currently in the receive  buffer.
  1279. After  this call, no characters will be available in the  buffer
  1280. until they are received at the comport.
  1281.  
  1282. See Also: ClearSendBuffer, FlushSendBuffer.
  1283.  
  1284.  
  1285. ClearSendBuffer
  1286. Declaration: PROCEDURE ClearSendBuffer;
  1287.  
  1288.       Destroys  all characters waiting in the send buffer.   Any
  1289. characters which were waiting to be sent are cleared  out.   The
  1290. send  buffer  will then be ready to send out any new  characters
  1291. placed in the buffer with Send, SendString, or SendW.
  1292.  
  1293. See Also: ClearReceiveBuffer, FlushSendBuffer.
  1294.  
  1295.  
  1296. ClearToSend
  1297. Declaration: FUNCTION ClearToSend : Boolean;
  1298.  
  1299.       Returns a boolean based on the CTS bit in the modem status
  1300. register.   This bit is primarily used by hardware  handshaking.
  1301. If the bit is high (true), the other end is capable of receiving
  1302. data.   If  the bit is low (false), then the other end does  not
  1303. want to receive any data at that time.
  1304.  
  1305. See Also: SetFlowControl, SetRTS.
  1306.  
  1307.  
  1308. DataTerminalReady
  1309. Declaration: FUNCTION DataTerminalReady : Boolean;
  1310.  
  1311.       Returns the state of the data terminal ready (DTR) line in
  1312. the  modem  status  register.   If  the  DTR  line  is  low,  no
  1313. characters can be read from or sent to the modem.
  1314.       A  low DTR line also causes most new modems to hang up the
  1315. line if you are connected with another computer.
  1316.  
  1317. See Also: SetDTR.
  1318.  
  1319.  
  1320. DeInitPort
  1321. Declaration: PROCEDURE DeInitPort;
  1322.  
  1323.       Shuts  the current comport down by clearing the  interrupt
  1324. flags,  resetting the interrupt vector, and deallocating  memory
  1325. used by the comport.
  1326.       This procedure should be called after you are done using a
  1327. comport or when your application is about to terminate.
  1328.  
  1329. See Also: InitPort.
  1330.  
  1331.  
  1332. DetectPort
  1333. Declaration: FUNCTION DetectPort(AtPort : Byte) : Boolean;
  1334.  
  1335.       Returns a true or false value depending on whether or  not
  1336. it  could  find a National based UART at the specified  comport.
  1337. It  runs  a simple test to check to see if the specified comport
  1338. is run by a National compatible UART.  If this test succeeds, it
  1339. returns true.  Otherwise it will return false.
  1340.  
  1341. See Also: DetectUART.
  1342.  
  1343.  
  1344. DetectUART
  1345. Declaration: FUNCTION DetectUART : String;
  1346.  
  1347.       Tries to determine which National-based UART is located on
  1348. the  specified  comport.   The comport must  already  have  been
  1349. initialized  through  a call to InitPort to  make  sure  that  a
  1350. National-based UART is actually at the comport.
  1351.       This  function  will return a string describing  the  UART
  1352. found.
  1353.  
  1354.           8250B    = National 8250B (PC, XT)
  1355.           16450    = National 16450 (80286)
  1356.           16550    = National 16550 (early PS/2s, no FIFOs)
  1357.           16550A   = National 16550A (working FIFOs)
  1358.  
  1359. See Also: DetectPort.
  1360.  
  1361.  
  1362. FlushSendBuffer
  1363. Declaration: PROCEDURE FlushSendBuffer;
  1364.  
  1365.      FlushSendBuffer will wait for the send buffer to completely
  1366. empty  itself.  Note that this is different than ClearSendBuffer
  1367. because  it  actually allows the buffer to  be  sent.   The  end
  1368. result (send buffer is empty) is the same for both procedures.
  1369.  
  1370. See Also: ClearSendBuffer.
  1371.  
  1372.  
  1373. GetFlowControl
  1374. Declaration: PROCEDURE GetFlowControl(var XonXoff, RTSCTS :
  1375.              Boolean);
  1376.  
  1377.       Returns the status of flow control as previously set using
  1378. SetFlowControl.  These two booleans do not report the  state  of
  1379. flow  control being active or not, but rather report the ability
  1380. to use each type of flow control.
  1381.       It  is advised to keep XonXoff (software) flow control  on
  1382. during any host-type application.  This will give the user a way
  1383. to stop transmission if he/she wishes to.
  1384.  
  1385. See Also: SetFlowControl, SetFlowLimits.
  1386.  
  1387.  
  1388. InitPort
  1389. Declaration: FUNCTION InitPort(AtPort : Byte; BufferSize :
  1390.              Word) : Boolean;
  1391.  
  1392.       InitPort  will set up the specified comport for  activity.
  1393. It  will  first check to make sure that the comport is  a  valid
  1394. National-based UART, and that there is enough memory to allocate
  1395. for  the  send  and  receive  buffers.   If  any  of  these  two
  1396. conditions prove to be false, InitPort will abort and  return  a
  1397. false value.
  1398.       If  all goes well, on the other hand, InitPort will return
  1399. true  after first setting up the port.  All defaults values  are
  1400. set  in  this  function, as well as the interrupt handler  being
  1401. activated.
  1402.       This  function  must  be  called before  any  other  port-
  1403. intensive procedure or function.
  1404.  
  1405. See Also: DeInitPort.
  1406.  
  1407.  
  1408. LineRinging
  1409. Declaration: FUNCTION LineRinging : Boolean;
  1410.  
  1411.       Checks  the  current comport to see if the phone  line  is
  1412. ringing.   If it is, this function will return true.  If  it  is
  1413. silent, the function will return false.
  1414.       The  phone company sends a special voltage level down  the
  1415. phone  line  when the line is ringing.  The UART is  capable  of
  1416. detecting this signal and reporting it.
  1417.  
  1418.  
  1419. ModemError
  1420. Declaration: FUNCTION ModemError : Byte;
  1421.  
  1422.      The internal assembler routines keep track of various error
  1423. conditions and set bits in ErrorFlg when they occur.  ModemError
  1424. is  capable  of  reporting these errors and  then  clearing  the
  1425. internal ErrorFlg variable.
  1426.       The byte value returned by ModemError in made up of a  bit
  1427. mask  constructed  from  the  following  constants.   The  error
  1428. condition  exists if the bit mask is true when  ANDed  with  the
  1429. value returned by ModemError.
  1430.  
  1431.           errInputOverflow  = $01
  1432.           errOutputOverflow = $02
  1433.           errInactivity  = $04
  1434.           errOverrun     = $08
  1435.           errParity      = $10
  1436.           errFraming     = $20
  1437.           errCarrierLost = $40
  1438.           errBreakSignal = $80
  1439.  
  1440.      A few of these constants need to be further explained here.
  1441. Overflow  errors occur when the incoming characters or  outgoing
  1442. characters  are placed in the buffer when there is no  room  for
  1443. them.
  1444.       Inactivity  errors occur in two situations.  Both  require
  1445. that the BBS mode be set using SetBBSMode.  First, when SendW is
  1446. trying to send a character and flow control is active.  If  flow
  1447. control  stays active too long, a timeout is considered to  have
  1448. occurred,  and  this error condition will be  set.   The  second
  1449. situation  is  when TBBS.ComReadKey is being used and  the  user
  1450. does  nothing  for an extended period of time.  This  will  also
  1451. cause an inactivity timeout.
  1452.        errOverrun,  errParity  and  errFraming  are  all  errors
  1453. reported by the UART.  errCarrierLost is set when DCD goes  from
  1454. high  to  low.   errBreakSignal is set when a  break  signal  is
  1455. detected at the UART.
  1456.  
  1457. See Also: TBBS.CarrierLost, TBBS.Timeout.
  1458.  
  1459.  
  1460. Parity
  1461. Declaration: FUNCTION Parity : TParity;
  1462.  
  1463.       Returns  the  current parity as set  at  the  UART.   This
  1464. function  will return one of the types defined in the enumerated
  1465. type TParity:
  1466.           
  1467.           TParity = (NoParity, OddParity, EvenParity,
  1468.           MarkParity, SpaceParity);TParity type
  1469.           
  1470. See Also: SetParity.
  1471.  
  1472.  
  1473. PeekNextChar
  1474. Declaration: FUNCTION PeekNextChar : Char; EXTERNAL;
  1475.  
  1476.       This  external assembler routine quickly checks  the  next
  1477. character  in the receive buffer and returns it.   It  does  not
  1478. remove  the character from the buffer, but simply checks to  see
  1479. what it is.
  1480.       You should make sure that there is actually a character to
  1481. be  checked  before  calling this routine.   Otherwise  it  will
  1482. return garbage.
  1483.  
  1484. See Also: Receive, ReceiveW.
  1485.  
  1486.  
  1487. Receive
  1488. Declaration: FUNCTION Receive : Char; EXTERNAL;
  1489.  
  1490.       This  routine acts much like PeekNextChar, except that  it
  1491. also  removes  the character from the buffer.  In doing  so,  it
  1492. checks flow control to see if any of it needs to be deactivated.
  1493.      This routine does not wait for a character to appear in the
  1494. buffer,  so  you  should make sure there  is  one  there  before
  1495. calling Receive.
  1496.  
  1497. See Also: PeekNextChar, ReceiveW.
  1498.  
  1499.  
  1500. ReceiveBufferEmpty
  1501. Declaration: FUNCTION ReceiveBufferEmpty : Boolean;
  1502.  
  1503.      Reports the status of the receive buffer.  If the buffer is
  1504. completely empty, it will return true.  Otherwise it will return
  1505. a false value.
  1506.  
  1507. See Also: ReceiveBufferFull.
  1508.  
  1509.  
  1510. ReceiveBufferFull
  1511. Declaration: FUNCTION ReceiveBufferFull : Boolean;
  1512.  
  1513.      Reports the status of the receive buffer.  If the buffer is
  1514. completely full, it will return true.  Otherwise it will  return
  1515. a false value.
  1516.  
  1517. See Also: ReceiveBufferEmpty.
  1518.  
  1519.  
  1520. ReceiveW
  1521. Declaration: FUNCTION ReceiveW : Char; EXTERNAL;
  1522.  
  1523.       This  function acts exactly like Receive, except  that  if
  1524. there  are  no  characters waiting in the buffer, it  will  wait
  1525. indefinitely for one to appear.
  1526.       It  is guaranteed to always return a valid character.   It
  1527. never grabs things from the buffer unless there is something  to
  1528. grab.
  1529.  
  1530. See Also: PeekNextChar, Receive.
  1531.  
  1532.  
  1533. Send
  1534. Declaration: PROCEDURE Send(Ch : Char); EXTERNAL;
  1535.  
  1536.       Sends  a single character out the comport.  This procedure
  1537. does  not check to see if there is room left in the send buffer.
  1538. If  there  isn't,  the appropriate error  bit  will  be  set  in
  1539. ErrorFlg.
  1540.  
  1541. See Also: SendString, SendW.
  1542.  
  1543.  
  1544. SendBufferEmpty
  1545. Declaration: FUNCTION SendBufferEmpty : Boolean;
  1546.  
  1547.      Reports the status of the send buffer.  If it is completely
  1548. empty, it will return true.  Otherwise it will return false.
  1549.  
  1550. See Also: SendBufferFull.
  1551.  
  1552.  
  1553. SendBufferFull
  1554. Declaration: FUNCTION SendBufferFull : Boolean;
  1555.  
  1556.       Reports  the status of the send buffer.  If the buffer  is
  1557. completely full, it will return true.  Otherwise it will  return
  1558. false.
  1559.  
  1560. See Also: SendBufferEmpty.
  1561.  
  1562.  
  1563. SendString
  1564. Declaration: PROCEDURE SendString(Strn : String);
  1565.  
  1566.       Sends  a  complete  string out the comport  by  repeatedly
  1567. calling SendW.  This is a quick way to send an entire string out
  1568. the port without using the TBBS object.
  1569.  
  1570. See Also: Send, SendW.
  1571.  
  1572.  
  1573. SendW
  1574. Declaration: PROCEDURE SendW(Ch : Char); EXTERNAL;
  1575.  
  1576.      Sends a single character out the comport.  SendW will check
  1577. the  send  buffer to make sure there is room before sending  the
  1578. character.  If there isn't room, it will wait until there is.
  1579.  
  1580. See Also: Send, SendString.
  1581.  
  1582.  
  1583. SetBBSMode
  1584. Declaration: PROCEDURE SetBBSMode(Status : Boolean);
  1585.  
  1586.       Sets  BBS  mode  either on or off.  BBS  mode  allows  the
  1587. assembler routines to keep track of a couple more things than it
  1588. can when BBS mode is not set.
  1589.       The  first  is inactivity when trying to send a  character
  1590. using  SendW.   The second is the ability to clear  the  receive
  1591. buffer  from the remote terminal either by receiving  a  special
  1592. character, or optionally allowing the break signal to clear it.
  1593.  
  1594. See Also: SetBreakClearBuffer, SetClearBufferChar.
  1595.  
  1596.  
  1597. SetBpsRate
  1598. Declaration: PROCEDURE SetBpsRate(Bps : Longint);
  1599.  
  1600.      Sets the bits per second (bps) rate of the current comport.
  1601. This  value  can range anywhere from 50 to 115,200.   Typically,
  1602. this value is one of 300, 1200, 2400, 9600, 19200, 38400, 57600,
  1603. or 115200.
  1604.  
  1605. See Also: BpsRate.
  1606.  
  1607.  
  1608. SetBreakClearBuffer
  1609. Declaration: PROCEDURE SetBreakClearBuffer(Status :
  1610.              Boolean);
  1611.  
  1612.      If BBS mode is set, this command can cause the receive of a
  1613. break signal to clear the receive buffer.
  1614.       There  may be times when characters have built up  in  the
  1615. receive  buffer  and the remote user would want to  cancel  them
  1616. before  they are processed.  This command would then  allow  the
  1617. break signal to clear the characters from the buffer before your
  1618. application could handle them.
  1619.  
  1620. See Also: SetBBSMode, SetClearBufferChar.
  1621.  
  1622.  
  1623. SetClearBufferChar
  1624. Declaration: PROCEDURE SetClearBufferChar(Ch : Char);
  1625.  
  1626.       This  procedure acts much like SetBreakClearBuffer.   When
  1627. BBS  mode  is set, you may also want certain control characters,
  1628. for example control-^, to clear the receive buffer.
  1629.       Once  the character is set, it would then clear the buffer
  1630. each  time  it was received, without being placed in the  buffer
  1631. itself.  For this reason, don't use characters that are typable,
  1632. and  don't  use  characters that need  to  be  received  by  any
  1633. terminal emulation in use.
  1634.  
  1635. See Also: SetBBSMode, SetBreakClearBuffer.
  1636.  
  1637.  
  1638. SetDTR
  1639. Declaration: PROCEDURE SetDTR(Status : Boolean);
  1640.  
  1641.       SetDTR  allows  you  to control the  status  of  the  data
  1642. terminal ready (DTR) line of your serial port.  DTR must be high
  1643. at all times to send and receive data.
  1644.       Most  new modems are capable of hanging up the modem  when
  1645. DTR goes low, so this can also be used to hang some modems up.
  1646.  
  1647. See Also: DataTerminalReady.
  1648.  
  1649.  
  1650. SetFIFO
  1651. Declaration: PROCEDURE SetFIFO(Status : Boolean);
  1652.  
  1653.       SetFIFO  allows  you to control the FIFO  buffers  on  the
  1654. 16550A  UART.  (On older UARTs that do not support  FIFOs,  this
  1655. command  is ignored.)  The FIFOs are additional buffers  on  the
  1656. UART  that  allow multiple characters to be received  before  an
  1657. overrun  error would be generated.  They can drastically improve
  1658. throughput on high speed modems.
  1659.  
  1660. See Also: DetectUART.
  1661.  
  1662.  
  1663. SetFlowControl
  1664. Declaration: PROCEDURE SetFlowControl(XonXoff, RTSCTS :
  1665.              Boolean);
  1666.  
  1667.       Flow  control allows each end to control when transmission
  1668. should  stop  to  give the application time  to  catch  up  with
  1669. incoming  characters.  The two styles supported  by  BBSkit  are
  1670. Xon/Xoff (software) and RTS/CTS (hardware) flow control.
  1671.       Xon/Xoff works by sending characters to the other  end  to
  1672. turn  flow  control  on and off.  ^S always stops  transmission,
  1673. while ^Q restarts it.  The good thing about this method is  that
  1674. the  user  has the ability to stop transmission when  reading  a
  1675. message,  for  example.   The  bad  thing  is  that  these   two
  1676. characters can interfere with some terminal emulations.
  1677.       RTS/CTS works by maintaining bits in the UART of each end.
  1678. RTS,  which  stands for Ready To Send, is set when the  UART  is
  1679. able to receive more data.  CTS, which stands for Clear To Send,
  1680. is  set  when the remote UART is able to receive more data.   In
  1681. this  way, each UART can manipulate bits and keep the other  end
  1682. from sending when a buffer is getting full.  This style does not
  1683. intefere with any terminal emulation, but it also does not allow
  1684. the user to manually turn flow control on or off.
  1685.  
  1686. See Also: GetFlowControl, SetFlowLimits, SetRTS.
  1687.  
  1688.  
  1689. SetFlowLimits
  1690. Declaration: PROCEDURE SetFlowLimits(Xon, Xoff : Word);
  1691.  
  1692.       This  procedure  allows you to define  when  flow  control
  1693. should be activated.  If the number of characters in the receive
  1694. buffer  meets or excess the value of Xon, flow control  will  be
  1695. activated until the level drops below Xoff, at which point  flow
  1696. control will be turned off.
  1697.       Usually,  this  value can be left to the defaults  set  by
  1698. InitPort.  Flow control will be turned on when there are  16  or
  1699. less  characters left in the buffer, and turned off  once  there
  1700. are at least 32 characters left.
  1701.  
  1702. See Also: GetFlowControl, SetFlowControl.
  1703.  
  1704.  
  1705. SetInactiveLimit
  1706. Declaration: PROCEDURE SetInactiveLimit(Sec : Word);
  1707.  
  1708.      This procedure sets the number of seconds that the user can
  1709. have  flow control on while SendW is trying to send a character.
  1710. If  this limit is reached, an inactivity error will be generated
  1711. and SendW will abort.
  1712.  
  1713. See Also: TBBS.SetTimer, TBBS.SetTimerDelay, TBBS.SetTimerMsg.
  1714.  
  1715.  
  1716. SetParity
  1717. Declaration: PROCEDURE SetParity(Mode : TParity);
  1718.  
  1719.       Sets the parity for the UART.  Most 8-bit connections  use
  1720. no parity, but some mainframes still use even parity.
  1721.       No  parity, even parity, odd parity, mark parity and space
  1722. parity  are all supported.  These are the only modes support  by
  1723. the UART.
  1724.  
  1725. See Also: Parity.
  1726.  
  1727.  
  1728. SetRTS
  1729. Declaration: PROCEDURE SetRTS(Status : Boolean);
  1730.  
  1731.       Sets  the  Ready  To Send bit in the UART.   This  bit  is
  1732. usually maintained by the assembler routines using hardware flow
  1733. control,  but  can be manipulated by your Pascal  code.   It  is
  1734. recommended that you leave this alone when hardware flow control
  1735. is in use.
  1736.  
  1737. See Also: SetFlowControl.
  1738.  
  1739.  
  1740. SetSoftHandshake
  1741. Declaration: PROCEDURE SetSoftHandshake(Xon, Xoff : Char);
  1742.  
  1743.       There  is  the ability here to set up different characters
  1744. than ^S and ^Q for software flow control.  Be careful with this,
  1745. though.  Your end will know what it is using, but the other  end
  1746. will not.  This ability is meant for applications that will only
  1747. be  used  for  private purposes, because the rest of  the  world
  1748. won't understand non-standard characters.
  1749.  
  1750. See Also: SetFlowControl.
  1751.  
  1752.  
  1753. SetStopBits
  1754. Declaration: PROCEDURE SetStopBits(Bits : TStopBits);
  1755.  
  1756.       Sets  the number of stop bits required at the end of  each
  1757. character received or sent by the UART.  In a standard 8-bit  or
  1758. 7-bit  connection, one stop bit is used.  The possibility exists
  1759. for two stop bits as well.
  1760.       To  set  1  or  2  stop bits, just call SetStopBits(1)  or
  1761. SetStopBits(2).   The  1.5  stop bits option  is  not  supported
  1762. mainly because I have never seen it used.
  1763.  
  1764. See Also: StopBits.
  1765.  
  1766.  
  1767. SetWordLength
  1768. Declaration: PROCEDURE SetWordLength(WordLen :
  1769.              TWordLength);
  1770.  
  1771.      UARTs are capable of supporting word lengths from 5 bits up
  1772. to  8  bit.  Most standard connections use 8 bits, although some
  1773. connections to mainframe computers use 7 bit connections.
  1774.      BBSkit supports word lengths from 5 to 8.
  1775.  
  1776. See Also: WordLength.
  1777.  
  1778.  
  1779. StopBits
  1780. Declaration: FUNCTION StopBits : TStopBits;
  1781.  
  1782.      Returns the number of stop bits currently being used by the
  1783. UART.  This number will be in the range 1..2.
  1784.       The  number  of  stop bits used can  be  set  through  the
  1785. SetStopBits procedure.
  1786.  
  1787. See Also: SetStopBits.
  1788.  
  1789.  
  1790. WaitForRingTrailer
  1791. Declaration: PROCEDURE WaitForRingTrailer;
  1792.  
  1793.      While the UART has the ability to detect a ringing line, it
  1794. also  has  the  ability  to detect when the  ring  has  stopped.
  1795. WaitForRingTrailer will simply wait until a ring has stopped and
  1796. then  exit.  This is different than checking to see if the  line
  1797. is ringing and getting a false result.
  1798.  
  1799. See Also: LineRinging.
  1800.  
  1801.  
  1802. WordLength
  1803. Declaration: FUNCTION WordLength : TWordLength;
  1804.  
  1805.       Returns  the  current word length as  set  in  the  UART's
  1806. registers.  This value will be in the range 5..8.
  1807.  
  1808. See Also: SetWordLength.
  1809.                         Appendix D: Contacting Technical Support
  1810.                                                                 
  1811.  
  1812.      Technical support is available to all registered users free
  1813. of charge from the time that registration is received.  By "free
  1814. of  charge" I mean that I will provide as much help as I can  in
  1815. any  way  that  I can, so long as it does not cost  me  lots  of
  1816. money.   Support is available over the phone (no  collect  calls
  1817. will   be   accepted),  through  United  States  Mail,   through
  1818. CompuServe, through the Internet, or through BITNET.
  1819.       As  a  college student, my address away at school  changes
  1820. with  each  year.  Since this something that can be a bother  to
  1821. users, I am taking it upon myself to inform registered users  of
  1822. my  change of address at the beginning of each school year.  The
  1823. address  for that school year and the telephone number  will  be
  1824. provided  in  a  mailing sent to all users  through  U.S.  Mail.
  1825. Additional  information may be included with this mailing  about
  1826. technical support.
  1827.  
  1828.      Current addresses are as follows:
  1829.  
  1830. U.S. Mail (at home): Steve Madsen
  1831.                   BBSkit Technical Support
  1832.                   1888 Edith Marie Drive
  1833.                   Beavercreek, OH  45431-3377
  1834. CompuServe:       INTERNET>sjmadsen@miavx1.acs.muohio.edu
  1835. Internet:         sjmadsen@miavx1.acs.muohio.edu
  1836. BITNET:           sjmadsen@miavx1
  1837.  
  1838.       As an added convenience, I will accept calls for technical
  1839. support.   As  a  private  developer, there  are  no  hours  for
  1840. technical support.  Instead, I would like to simply ask my users
  1841. to call at a reasonable hour.  "Reasonable" is anywhere from 8am
  1842. to 11pm, but remember that I have a "normal" job, too.  The best
  1843. time to reach me would probably be from 6pm to 11pm.
  1844.       If  for some reason I am not home, please leave a message.
  1845. To  make  sure that I receive this message, let whoever  answers
  1846. know that it is about BBSkit.  That way, I'll see it as soon  as
  1847. I  get  in.  I will return calls for tech support provided  that
  1848. the  calls  don't  start costing too much.   However,  the  most
  1849. reliable  method for reaching me for technical support would  be
  1850. through some means electronic.
  1851.  
  1852.       When  calling technical support, please have the following
  1853. information  available in the event that it is  needed  to  help
  1854. diagnose your problem:
  1855.  
  1856.        o Version of BBSkit being run  (use VersionID)
  1857.        o Version of Turbo Pascal
  1858.        o Version of DOS
  1859.        o Computer make & model
  1860.        o Modem make & model
  1861.  
  1862.       I will do my best to help you with any problems you may be
  1863. having  getting BBSkit to work with your hardware.   However,  I
  1864. cannot  debug your code for you.  Technical support is primarily
  1865. a  means to getting BBSkit to work with your particular hardware
  1866. configuration.
  1867.  
  1868.       In general, upgrades to new versions of BBSkit will be $20
  1869. in  U.S.  funds.  This will include the new printed manual,  new
  1870. disks, and postage.  If there isn't a new manual, the cost  will
  1871. be  considerably less, of course.  When an upgrade is ready  for
  1872. release, registered users will receive postcards informing  them
  1873. of  the  upgrade and giving a short list of new features or  bug
  1874. fixes.
  1875.