home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / qbasic / fossc004.arc / FOSSCOMM.DOC next >
Text File  |  1988-10-31  |  28KB  |  833 lines

  1.           .FQ
  2. l-@10i--TL----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----C--T-+----r
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.          
  14.          
  15.          
  16.          
  17.                                     FossComm
  18.          
  19.                                   version 0.04
  20.          
  21.  
  22.                                   August 22, 1988
  23.  
  24.          
  25.                              Program Documentation
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                      Copyright (C) 1988  Daan van der Weide
  32.                               All rights reserved
  33.  
  34. l-@10i--TL----+-T--2----T----3--T-+----4T---+---T5----+-T--6----T----J--T-+----r
  35.           .N:2
  36.           .F:------------------------------------------------------------
  37.           .F:FossComm...page $$$...FossComm
  38.           .F:
  39.           
  40.  
  41.            FosComm  is  an interface between a compiled BASIC  program 
  42.          and a so-called FOSSIL  driver.  It enables the  user to take 
  43.          advantage  of  all the functions regarding the  communication 
  44.          ports,  from  a BASIC program.  In this way it is possible to 
  45.          avoid  the problems/shortcomings of the  BASIC communications 
  46.          handler. 
  47.  
  48.            FossComm  is based on the document 'Fundamentals of  FOSSIL 
  49.          implementation and use,  draft version 5, February 11,  1988' 
  50.          by Rick Moor.  Please make sure that your fossil driver meets 
  51.          this draft. 
  52.          
  53.          
  54.            FossComm can be used with any of the following compilers :
  55.  
  56.                 MicroSoft Quickbasic 1.00, 2.00, 3.00 and 4.00, 6.00
  57.                 IBM BasCom           1.00, 2.00
  58.  
  59.          
  60.          LICENSE AND REGISTRATION
  61.          ------------------------
  62.  
  63.            FossComm is distributed as a 'shareware'  program.   Please 
  64.          help  me get it known by giving away unmodified copies of the 
  65.          program and documentation to other people,  either by copying 
  66.          the  disk  or  making it available for downloading on  a  BBS 
  67.          system. 
  68.  
  69.            FossComm is copyright (C) 1988 by Daan van der Weide. It is 
  70.          not public domain or free software.  Non-registered users are 
  71.          granted  a limited license to use FossComm on a  trial  basis 
  72.          for  determining  whether  or not it is  suitable  for  their 
  73.          needs.   Registration allows the use of FossComm in  programs 
  74.          for sale and/or distribution. 
  75.          
  76.            The registration fee is 50 guilders (25 US$). Users who pay 
  77.          the  registration  fee  will be sent a disk woth  the  latest 
  78.          version and documentation ans some example programs. 
  79.  
  80.            It  is  also  possible  to  obtain  the  source  codes  for 
  81.          FossComm.  In that case the registration fee is 100  guilders 
  82.          (50 US$). 
  83.          
  84.            Register your usage of FossComm by sending the registration 
  85.          fee to :
  86.  
  87.                         Daan van der Weide
  88.                         Kastelenstraat 229-3
  89.                         1082 EG  Amsterdam
  90.                         the Netherlands
  91.  
  92.                         telephone : (0)20 463647
  93.  
  94.            Your   comments  regarding  the  FossComm  program  or  any 
  95.          suggestions  you  have for extensions or for  other  programs 
  96.          that would be useful to you are welcome. 
  97.  
  98.            Daan van der Weide makes no warranties whatsoever regarding 
  99.          the FossComm computer program or the documentation. 
  100.          
  101.  
  102.          USING FOSSCOMM IN YOUR PROGRAMS
  103.          -------------------------------
  104.  
  105.            The  FossComm  module contains a number of  functions  that 
  106.          handle the access of RS232  communication boards as  provided 
  107.          by a driver conform the FOSSIL standard. 
  108.  
  109.            Below follows a list of the functions supported and the 
  110.          parameters that should be specified, as well as the eventual 
  111.          return values. To incorporate the module within your compiled 
  112.          program specify the name FOSSCOMM.OBJ when linking your 
  113.          program. Example : 
  114.          
  115.            LINK MYPROG+FOSSCOMM,MYPROG;
  116.  
  117.          
  118.          CREDITS
  119.          -------
  120.  
  121.            I would like to mention a few people who have supported and 
  122.          still are supporting the development :
  123.  
  124.            Ronald Koridon who adapted RBBS 16.1a to run using FossComm 
  125.          and who is my primary 'guinea-pig'; Arjen Lentz, John Janssen 
  126.          sysops  that are using the RBBS 16.1a FOSSIL version as well. 
  127.          the RBBS version as well to run. (they've probably upgraded 
  128.          by now ...)
  129.  
  130.  
  131.          FEEDBACK
  132.          --------
  133.  
  134.            As you may know, any software developer depends on his 
  135.          users to modify, adjust and extend his product. Therefore 
  136.          I'm very interested in all comments, notes and critics 
  137.          towards the FossComm product. I can be reached either by 
  138.          telephone or, better, at the RBBS system listed below. Thank 
  139.          you very much !
  140.  
  141.                               RBBS Gaasperdam (4 lines)
  142.                               sysop Ronald Koridon
  143.                               Amsterdam, the Netherlands
  144.  
  145.                               31  (0)20 978493  node 1
  146.                                         913890  node 2
  147.                                         974420  node 3
  148.                                         972763  node 4
  149.  
  150.           
  151.          Revision history
  152.          ----------------
  153.  
  154.          v0.01
  155.  
  156.                 This is the first alpha-test version only released to
  157.          people involved in testing.
  158.  
  159.          
  160.          v0.02
  161.  
  162.                 Extended FOSSIL calls implemented to access keyboard 
  163.          and to do video I/O etc. Not released.
  164.  
  165.          
  166.          v0.03
  167.  
  168.                 Adaptions  according  to draft 5 are  made.   FOSSPEED 
  169.          changed, so that parity,  databits and the number of stopbits 
  170.          may be specified as well.  The documentation is extended, and 
  171.          a number of functions was added. 
  172.  
  173.          v0.04
  174.          
  175.                 I  think  the  product is solid enough to  release  it 
  176.          generally, especially because there's 'official' RBBS support 
  177.          for FossComm.  A  number of BBS systems are running for a few 
  178.          months now without any problems. 
  179.          
  180.           
  181.          -------------------------------------------------------------
  182.          FOSINIT
  183.          -------------------------------------------------------------
  184.          
  185.          PURPOSE :
  186.          
  187.            Initializes  the  FOSSIL  driver,  and checks  whether  the 
  188.          FOSSIL driver  is installed.  This function should be  called 
  189.          before any other FOS calls are made. DTR is raised by this 
  190.          call. The baudrate is NOT set by this call.
  191.          
  192.          
  193.          FORMAT  :
  194.          
  195.            FOSINIT(port%, result%)
  196.  
  197.          
  198.          RETURNS :
  199.          
  200.            0    no error, driver initialized
  201.           -1    error initializing driver
  202.  
  203.          
  204.          EXAMPLE :
  205.  
  206.            100 PORT% = 1
  207.            110 CALL FOSINIT(PORT%,RESULT%)
  208.            120 IF RESULT% = -1 THEN PRINT "ERROR INITIALIZING FOSSIL"
  209.          
  210.          
  211.          REMARKS :
  212.          
  213.            The  number of the comport that may be initialized  depends 
  214.          on  the particular FOSSIL driver you're using.  Refer to  the 
  215.          documentations of your driver for the values. 
  216.  
  217.            Should  a second call to this function occur,  all buffers, 
  218.          flow-contol parameters etc.  are reset to their initial state 
  219.          and no error is returned. 
  220.          
  221.          
  222.          -------------------------------------------------------------
  223.          FOSEXIT
  224.          -------------------------------------------------------------
  225.          
  226.          PURPOSE :
  227.  
  228.            This  function should be called whenever the communications 
  229.          port  in  no longer needed.  No FOS calls to  the  particular 
  230.          comport can be made anymore once this call has been made. DTR 
  231.          is not affected by this call. 
  232.  
  233.  
  234.          FORMAT  :
  235.  
  236.            FOSEXIT(COMPORT%)
  237.  
  238.          
  239.          -------------------------------------------------------------
  240.          FOSSPEED
  241.          -------------------------------------------------------------
  242.          
  243.          PURPOSE :
  244.  
  245.            Sets   the   baudrate  and  the  additional  line   control 
  246.          parameters  for  the communication port.  If a  non-supported 
  247.          baudrate  is specified,  the baudrate variable is set to  -1, 
  248.          and no call to the FOSSIL drive is made. 
  249.  
  250.  
  251.          FORMAT  :
  252.  
  253.            FOSSPEED(comport%, speed%, parity%, databits%, stopbits%)
  254.  
  255.            where speed% can be one of the following :
  256.  
  257.            300,600,1200,2400,4800,9600,19200,38400
  258.  
  259.            parity% can be :
  260.  
  261.            0  for    no parity
  262.            1  for   odd parity
  263.            2  for    no parity
  264.            3  for  even parity
  265.  
  266.            databits% can be :
  267.  
  268.            0  for     5 databits
  269.            1  for     6 databits
  270.            2  for     7 databits
  271.            3  for     8 databits
  272.  
  273.            stopbits% can be :
  274.  
  275.            0  for     1 stopbit
  276.            1  for    1½ stopbit if databits% = 0 i.e. 5 bits or
  277.                       2 stopbits for all other values for databits%.
  278.          
  279.          
  280.          RETURNS :
  281.  
  282.            speed%  is set to -1  if an illegal baudrate was specified, 
  283.          otherwise speed% is not affected. 
  284.  
  285.          
  286.          -------------------------------------------------------------
  287.          FOSTXCHAR
  288.          -------------------------------------------------------------
  289.          
  290.          PURPOSE :
  291.  
  292.            Transmits a character using the specified port.  If there's 
  293.          room  in the transmit buffer,  the return will be  immediate, 
  294.          otherwise  it  will  wait until there is room  to  store  the 
  295.          character in the transmit buffer. 
  296.  
  297.  
  298.          FORMAT  :
  299.  
  300.            FOSTXCHAR(comport%, char%, result%)
  301.  
  302.  
  303.          REMARKS :
  304.  
  305.            For the values of the result%  parameter,  please refer  to 
  306.          the description of the FOSSTATUS function.
  307.  
  308.          
  309.          -------------------------------------------------------------
  310.          FOSRXCHAR
  311.          -------------------------------------------------------------
  312.          
  313.          PURPOSE :
  314.  
  315.            If there's a character available in the receive buffer, the 
  316.          character  will be returned.  When no character is available, 
  317.          it will wait until one becomes available. 
  318.          
  319.          
  320.          FORMAT  :
  321.  
  322.            FOSRXCHAR(comport%, char%, result%)
  323.  
  324.  
  325.          REMARKS :
  326.  
  327.            For the values of the result%  parameter,  please refer  to 
  328.          the description of the FOSSTATUS function. 
  329.  
  330.          
  331.          -------------------------------------------------------------
  332.          FOSSTATUS
  333.          -------------------------------------------------------------
  334.          
  335.          PURPOSE :
  336.  
  337.            Requests status information about the state of the comport.
  338.  
  339.  
  340.          FORMAT  :
  341.  
  342.            FOSSTATUS(comport%, status%)
  343.  
  344.            status bits returned are :
  345.  
  346.            15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00      mask
  347.            -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  348.               XX XX          XX XX XX          XX
  349.                |  |           |  |  |           |
  350.                |  |           |  |  |           |
  351.                |  |           |  |  |           + bit is always set
  352.                |  |           |  |  |
  353.                |  |           |  |  +----- Carrier Detect       &H0080
  354.                |  |           |  |
  355.                |  |           |  +-------- Input data available &H0100
  356.                |  |           |
  357.                |  |           +----------- RX buffer overrun    &H0200
  358.                |  |
  359.                |  +----------------------- Room available       &H2000
  360.                |
  361.                +-------------------------- Output buffer empty  &H4000
  362.          
  363.          
  364.          -------------------------------------------------------------
  365.          FOSDTR
  366.          -------------------------------------------------------------
  367.          
  368.          PURPOSE :
  369.  
  370.            Raises or lowers the DTR signal on the specified comport.
  371.  
  372.  
  373.          FORMAT  :
  374.  
  375.            FOSDTR(comport%, state%)
  376.  
  377.            state% can be :
  378.  
  379.            0  to indicate that DTR should be lowered
  380.            1  to indicate that DTR should be raised
  381.          
  382.          
  383.          -------------------------------------------------------------
  384.          FOSTXFLUSH
  385.          -------------------------------------------------------------
  386.          
  387.          PURPOSE :
  388.  
  389.            Forces  the  transmission of all characters that  currently 
  390.          are in the transmit buffer.  The  function  does  not  return  
  391.          until all characters are transmitted !!! 
  392.  
  393.  
  394.          FORMAT  :
  395.  
  396.            FOSTXFLUSH(comport%)
  397.  
  398.          
  399.          -------------------------------------------------------------
  400.          FOSTXPURGE
  401.          -------------------------------------------------------------
  402.          
  403.          PURPOSE :
  404.  
  405.            This function purges all pending characters in the transmit 
  406.          buffer. Any characters not transmitted are discarded. 
  407.  
  408.  
  409.          FORMAT  :
  410.  
  411.            FOSTXPURGE(comport%)
  412.  
  413.          
  414.          -------------------------------------------------------------
  415.          FOSRXPURGE
  416.          -------------------------------------------------------------
  417.          
  418.          PURPOSE :
  419.  
  420.            Purges the  receive buffer.  Any input data in  the receive 
  421.          buffer is discarded. 
  422.  
  423.  
  424.          FORMAT  :
  425.  
  426.            FOSRXPURGE(comport%)
  427.  
  428.          
  429.          -------------------------------------------------------------
  430.          FOSTXCHARNW
  431.          -------------------------------------------------------------
  432.          
  433.          PURPOSE :
  434.         
  435.            This function is similar to the FOSTXCHAR function,  except 
  436.          that  if  the  driver  is unable to buffer  the  character  - 
  437.          because  the  transmit  buffer  is full -  the  call  returns 
  438.          immediately indicating the success of the call in the result% 
  439.          parameter. 
  440.  
  441.  
  442.          FORMAT  :
  443.  
  444.            FOSTXCHARNW(comport%, char%, result%)
  445.  
  446.            result% can be :
  447.  
  448.            0  if the character could *NOT* be transmitted
  449.            1  if the character was transmitted
  450.  
  451.          
  452.          -------------------------------------------------------------
  453.          FOSREADAHEAD
  454.          -------------------------------------------------------------
  455.          
  456.          PURPOSE :
  457.  
  458.            Peeks  into  the receive buffer and returns  the  character 
  459.          that  will  be  returned upon the next  FOSRXCHAR  call,   or 
  460.          returns -1 if the receive buffer is empty. 
  461.  
  462.  
  463.          FORMAT  :
  464.  
  465.            FOSREADAHEAD(comport%, char%)
  466.  
  467.            char% is -1  if the receive buffer is empty
  468.          
  469.          
  470.          -------------------------------------------------------------
  471.          FOSFLOWCTL
  472.          -------------------------------------------------------------
  473.          
  474.          PURPOSE :
  475.  
  476.            Enables or disables the flow control on the transmission. 
  477.          Two kinds of flow control are supported :
  478.  
  479.            15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  480.            -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  481.                                    XX XX XX XX XX XX XX XX
  482.                                    FORCED HIGH  |  |  |  |
  483.                                                 |  |  |  |
  484.                                                 |  |  |  +-- Xon/Xoff
  485.                                                 |  |  |      on
  486.                                                 |  |  |      transmit
  487.                                                 |  |  |
  488.                                                 |  |  +----- CTS/RTS
  489.                                                 |  |
  490.                                                 |  +-------- DSR/DTR
  491.                                                 |
  492.                                                 +----------- Xon/Xoff
  493.                                                              on
  494.                                                              receive
  495.          
  496.            When  the  corresponding  bit is set,  that  type  of  flow 
  497.          control  is enabled.  Applications should set the upper  four 
  498.          bits in the lower nibble as well, i.e. bits 4, 5, 6 and 7. 
  499.          
  500.            When  the  bit is cleared,  that type of  flow  control  is 
  501.          disabled. 
  502.  
  503.            Enabling Xon/Xoff on transmission will suspend transmission 
  504.          upon  receiving  an Xoff character.  The FOSSIL  drives  will 
  505.          resume transmission as soon as an Xon character is received. 
  506.  
  507.            Enabling  CTS/RTS,  will suspend transmission when  CTS  is 
  508.          lowered.  As soon as CTS is raised,  transmission is resumed. 
  509.          The  FOSSIL driver will drop RTS whenever a certain amount of 
  510.          the  receive buffer is filled.  As soon as the receive buffer 
  511.          contains  less characters than the predetermined  percentage, 
  512.          RTS is raised again. 
  513.  
  514.            Enabling  DSR/DTR,   will suspend transmission when DSR  is 
  515.          lowered.  As soon as DSR is raised,  transmission is resumed. 
  516.          The FOSSIL driver will drop DTR whenever a certain amount  of 
  517.          the receive buffer is filled.  As soon as the receive  buffer 
  518.          contains  less characters than the predetermined  percentage, 
  519.          RTS is raised again. 
  520.          
  521.            Enabling Xon/Xoff on receive,  will cause the FOSSIL driver 
  522.          to  send an Xoff character whenever a certain amount  of  the 
  523.          receive buffer is filled.  An Xon character will be sent,  as 
  524.          soon  as the receive buffer contains less characters than the 
  525.          predetermined percentage. 
  526.  
  527.          
  528.          FORMAT  :
  529.  
  530.            FOSFLOWCTL(comport%, state%)
  531.  
  532.          
  533.          EXAMPLES :
  534.          
  535.            state% is :
  536.          
  537.            &H00F0 to disable all flow control types
  538.            &H00F1 to enable Xon/Xoff on transmission
  539.            &H00F2 to enable CTS/RTS
  540.            &H00F4 to enable DSR/DTR
  541.            &H00F8 to enable Xon/Xoff on reception
  542.          
  543.          
  544.          -------------------------------------------------------------
  545.          FOSCTRLCK
  546.          -------------------------------------------------------------
  547.          
  548.          PURPOSE :
  549.  
  550.            Enables/disables extended Ctrl-C/Ctrl-K  checking,   and/or 
  551.          enables/disables the transmitter. 
  552.  
  553.  
  554.            15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
  555.            -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
  556.                                                      XX XX
  557.                                                       |  |
  558.                                                       |  +--- CtrlCK
  559.                                                       |  
  560.                                                       +------ TX
  561.          
  562.            Bit  0 controls whether the extended Ctrl-K/Ctrl-C checking 
  563.          is  enabled  (bit  set)  or disabled (bit not  set).   Bit  1 
  564.          controls  whether  the transmitter is active or not,  in  the 
  565.          same way Xon/Xoff characters do affect the transmitter.
  566.  
  567.            If the extended Ctrl-C/Ctrl-K checking is enabled, any 
  568.          subsequent call to this this routine will return an internal 
  569.          flag maintained by the FOSSIL driver, that indicates whether 
  570.          Ctrl-C/Ctrl-K has been pressed. When enabled, the Ctrl-
  571.          C/Ctrl-K character does *NOT* appear in the receive buffer.
  572.  
  573.          
  574.          FORMAT  :
  575.  
  576.            FOSCTRLCK(comport%, state%)
  577.          
  578.          
  579.          EXAMPLES :
  580.          
  581.            COMPORT% = 1
  582.            STATE% = &H0001
  583.            FOSCTRLCK(COMPORT%, STATE%)
  584.            IF STATE% AND &H0001 THEN PRINT "CTRL-C/CTRL-K RECEIVED"
  585.          
  586.          
  587.          -------------------------------------------------------------
  588.          FOSWDOG
  589.          -------------------------------------------------------------
  590.          
  591.          PURPOSE :
  592.          
  593.            Enables or disables 'watchdog' processing. When watchdog is 
  594.          enabled,  the state of the carrier detect (DCD)  line on  the 
  595.          particular comport is constantly monitored,  and whenever the 
  596.          signal drops, i.e. the connection is terminated the system is 
  597.          rebooted.  This option is typically used in combination  with 
  598.          external   programs  shelled  from  a  main   program.    The 
  599.          FOSINIT/FOSEXIT calls do *NOT* affect this monitoring. 
  600.  
  601.          FORMAT  :
  602.  
  603.            FOSWDOG(comport%, state%)
  604.  
  605.            state% = 1 to enable the watchdog process
  606.            state% = 0 to disable the watchdog process
  607.  
  608.          
  609.          -------------------------------------------------------------
  610.          FOSBOOT
  611.          -------------------------------------------------------------
  612.          
  613.          PURPOSE :
  614.          
  615.            Boots  the  system.   This function enables  a  program  to 
  616.          perform either a soft- or a warmboot. 
  617.  
  618.  
  619.          FORMAT  :
  620.  
  621.            FOSBOOT(type%)
  622.  
  623.            type% = 0  for a 'cold'start (incl. POST & memory tests)
  624.            type% = 1  for a 'warm'start (only DOS reboots)
  625.  
  626.          
  627.          -------------------------------------------------------------
  628.          FOSREAD
  629.          -------------------------------------------------------------
  630.          
  631.          PURPOSE :
  632.  
  633.            Read a block of data from the receive buffer. The number of 
  634.          characters  actually  transferred  is  put  into  the  BYTES% 
  635.          variable after the call. 
  636.          
  637.          
  638.          FORMAT  :
  639.  
  640.            FOSREAD(comport%, bytes%, buffer$)
  641.  
  642.  
  643.          EXAMPLE :
  644.  
  645.            '
  646.            'create a 32 byte buffer
  647.            '
  648.            BUF$="12345678901234567890123456789012"
  649.            '
  650.            PORT%  = 1
  651.            BYTES% = 32
  652.            '
  653.            CALL FOSREAD(PORT%, BYTES%, BUF$)
  654.            '
  655.            PRINT "BYTES READ : ";BYTES%
  656.            PRINT "DATA READ  : ";LEFT$(BUF$,BYTES%)
  657.  
  658.          
  659.          -------------------------------------------------------------
  660.          FOSWRITE
  661.          -------------------------------------------------------------
  662.          
  663.          PURPOSE :
  664.  
  665.            Write a block of data to the transmit buffer. The number of 
  666.          characters  actually  transferred  is  put  into  the  BYTES% 
  667.          variable after the call. 
  668.          
  669.  
  670.          FORMAT  :
  671.  
  672.            FOSWRITE(comport%, bytes%, buffer$)
  673.  
  674.  
  675.          EXAMPLES :
  676.  
  677.            '
  678.            'create some string
  679.            '
  680.            BUF$="Welcome to MailPro !"+CHR$(10)+CHR$(13)
  681.            '
  682.            PORT%  = 1
  683.            BYTES% = LEN(BUF$)
  684.            '
  685.            CALL FOSWRITE(PORT%, BYTES%, BUF$)
  686.            '
  687.            PRINT "BYTES WRITTEN : ";BYTES%
  688.          
  689.          
  690.          -------------------------------------------------------------
  691.          FOSBREAK
  692.          -------------------------------------------------------------
  693.          
  694.          PURPOSE :
  695.  
  696.            Starts or ends the transmission of a break state.
  697.  
  698.  
  699.          FORMAT  :
  700.  
  701.            FOSBREAK(comport%, state%)
  702.  
  703.            state% = 1 to start a break
  704.            state% = 0 to end a break
  705.  
  706.  
  707.          -------------------------------------------------------------
  708.          FOSTIMERTICK
  709.          -------------------------------------------------------------
  710.          
  711.          PURPOSE :
  712.  
  713.            This  function returns information about the current  timer 
  714.          interrupt.  It returns the interrupt number the timer is tied 
  715.          to,   the  number  of ticks per second,  and  the  number  of 
  716.          milliseconds per tick. 
  717.          
  718.          
  719.          FORMAT  :
  720.  
  721.            FOSTIMERTICK(Intno%, Ticks%, Msecs%)
  722.  
  723.          
  724.          -------------------------------------------------------------
  725.          FOSSCANKEY
  726.          -------------------------------------------------------------
  727.          
  728.          PURPOSE :
  729.  
  730.            Scans  the keyboard and returns the next character  in  the 
  731.          keyboard buffer. If no characters are available a value of -1 
  732.          will be returned. 
  733.  
  734.            The values returned will match the IBM-style of keycoding.
  735.  
  736.          
  737.          FORMAT  :
  738.  
  739.            FOSSCANKEY(Key%)
  740.  
  741.  
  742.          -------------------------------------------------------------
  743.          FOSGETKEY
  744.          -------------------------------------------------------------
  745.          
  746.          PURPOSE :
  747.  
  748.            Returns  the next character in the keyboard buffer.  If  no 
  749.          characters are available,  the functions waits until a key is 
  750.          pressed. 
  751.  
  752.          
  753.          FORMAT  :
  754.  
  755.            FOSGETKEY(Key%)
  756.  
  757.          
  758.          -------------------------------------------------------------
  759.          FOSLOCATE
  760.          -------------------------------------------------------------
  761.          
  762.          PURPOSE :
  763.  
  764.            Locates the cursor on the screen. The screen is treated to 
  765.          have coördinates as follows :
  766.  
  767.          ( 0, 0)
  768.                 +---------------------------------------------+
  769.                 |                                             |
  770.                 |  Hello World, this is supposed to be a      |
  771.                 |  picture of a screen...                     |
  772.                 |                                             |
  773.                 |                                             |
  774.                 |                                             |
  775.                 |                                             |
  776.                 |                                             |
  777.                 +---------------------------------------------+ 
  778.                                                                (24,79)
  779.          
  780.          FORMAT  :
  781.  
  782.            FOSLOCATE(Row%, Col%)
  783.          
  784.  
  785.          -------------------------------------------------------------
  786.          FOSGETLOC
  787.          -------------------------------------------------------------
  788.          
  789.          PURPOSE :
  790.  
  791.            Returns the current position of the cursor.
  792.            
  793.          
  794.          FORMAT  :
  795.  
  796.            FOSGETLOC(Row%, Col%)
  797.          
  798.          
  799.          -------------------------------------------------------------
  800.          FOSDISPANSI
  801.          -------------------------------------------------------------
  802.          
  803.          PURPOSE :
  804.  
  805.            Displays  a character and allows ANSI screen processing  to 
  806.          occur (if available).  On DOS machines the FOSSIL routine  to 
  807.          perform this function probably will call a DOS function to do 
  808.          the  ANSI processing.  Keep in mind that DOS function are not 
  809.          re-entrant. In such cases, this routine may not be assumed to 
  810.          be re-entrant either. 
  811.  
  812.          
  813.          FORMAT  :
  814.  
  815.            FOSDISPANSI(Char%)
  816.          
  817.  
  818.          -------------------------------------------------------------
  819.          FOSDISPBIOS
  820.          -------------------------------------------------------------
  821.          
  822.          PURPOSE :
  823.  
  824.            Displays a charactes using the system BIOS. This means that 
  825.          DOS  output redirection does not work when this call is  used 
  826.          to produce screen output. 
  827.  
  828.          
  829.          FORMAT  :
  830.  
  831.            FOSDISPBIOS(Char%)
  832.  
  833.