home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / ASYNC3.ZIP / ASYNC.TXT < prev    next >
Text File  |  1993-03-10  |  93KB  |  2,593 lines

  1.                             Chapter 1 - Introduction
  2.  
  3.      This package of asynchronous communications tools for IBM (COM1 - COM4)
  4. and Digiboard (intelligent communications hardware, up to 32 ports) hardware,
  5. consists of library (.LIB) files for each memory model (SMALL, COMPACT, MEDIUM,
  6. LARGE), and for both IBM and Digiboard hardware.  It also includes all of the
  7. source files, header files (with prototypes) and MAKE files needed to generate
  8. the various libraries.  Batch files are included for calling make with
  9. appropriate flags for each supported compiler.
  10.  
  11.      With standard IBM asynchronous hardware, two ports can be opened
  12. simultaneous in any of the following combinations (limited because of only 2
  13. interrupts allowed for asynchronous ports in DOS).
  14.  
  15.         ALLOWED                  NOT ALLOWED
  16.  
  17.         COM1 and COM2            COM1 and COM3
  18.         COM1 and COM4            COM2 and COM4
  19.         COM2 and COM3
  20.         COM3 and COM4
  21.  
  22.      A working knowledge of 'C' and operation of your compiler is assumed.
  23.  
  24.      The "shareware" version is configured for the BORLANDC++ V3.0 compiler in .
  25. LIB format, and comes with the small memory model library only (ASYNCS.LIB).
  26. Header files with module prototypes for the library routines are included, as
  27. well as TEST.C for testing the modules on your system.  No other source code is
  28. provided with the shareware version or support for Digiboard hardware.
  29.  
  30.      Also included are useful demonstration utilities as described in .
  31.  
  32.      Becoming a registered user will provide full source code to every module,
  33. support for other C compilers, 3 more utility programs, and a bound laser
  34. printed manual.  There is also full support for Digiboard communications boards
  35. which will allow up to 32 ports on your PC.  You will also be put on our
  36. registered users' list and receive upgrade notification whenever new, expanded
  37. versions become available.
  38.  
  39.      To register send a check for $45 to:
  40.  
  41.                Nordtech Research, Inc.
  42.                P.O. Box 1011
  43.                1608 North Fourth
  44.                Fairfield, Iowa  52556
  45.  
  46.                Or by phone:                  (800) 274-7820  (515) 472-7820
  47.  
  48.                Or by Compuserve Mail:        73200,2371
  49.  
  50.                You may also register online with Compuserve.
  51.  
  52.                Or by FAX:                    (515) 472-3524
  53.  
  54.      You can also pay with Visa or Mastercard.  Provide your card number and
  55. expiration date.  Please include the spelling of the name on the credit card.
  56. Always include your shipping address.
  57.  
  58.      To order by phone, call (800) 274-7820 (please use 800 number for ordering
  59. only) or (515) 472-7820.
  60.  
  61.      There is a registration/order form in the file README of the shareware
  62. version.
  63.  
  64.                             Chapter 2 - Installation
  65.  
  66.      Registered users will receive 2 diskettes.  The first diskette contains
  67. all files for standard IBM communications hardware (COM1 - COM4).
  68.  
  69.      The second diskette contains code for use with Digiboard hardware.  If you
  70. are not going to use Digiboard hardware, file this diskette.  If you are,
  71. follow the instructions below for both of your diskettes.
  72.  
  73.      First, place the diskette into the floppy drive and then copy all of the
  74. utility programs in the root directory of the diskette into the directory where
  75. you will place the library source code (for now).
  76.  
  77.      All of the utility and library source files, make files, batch files and
  78. the file README are archived into the file \SOURCE\SOURCE.ZIP (and
  79. \SOURCE\DSOURCE for Digiboard).  If you desire to modify the library or want to
  80. look at these files, copy this file to the directory where you normally put
  81. your source code or to a new directory of your choice.  Also copy the public
  82. domain utility PKUNZIP.COM (in the \SOURCE directory).  Type PKUNZIP SOURCE
  83. (DSOURCE for Digiboard) to uncompress all of the source files, make files and
  84. batch files.
  85.  
  86.      Then follow the directions below for you specific compiler.  The following
  87. sections assume that you have structured your subdirectories according to the
  88. directions for each of the compilers supported.
  89.  
  90. 2.1 Shareware Version
  91.  
  92.      The shareware version contains only the BORLANDC small memory model
  93. library (ASYNCS.LIB), include files (*.h), and DATAMON.EXE (a nifty data line
  94. monitor program for debugging and testing RS-232 devices).  All files are
  95. compressed together into ASYNC.ZIP.
  96.  
  97.      First copy ASYNC.ZIP to the subdirectory where your C source files are
  98. kept.  Then type PKUNZIP ASYNC to uncompress the files.
  99.  
  100.      Copy ASYNCS.LIB to your \BORLANDC\LIB subdirectory.
  101.  
  102.      Copy *.H files to \BORLANDC\INCLUDE subdirectory.
  103.  
  104.      Print out READMEBC and this manual if desired.
  105.  
  106.      Follow instructions in  to test your installation with a simple
  107. communications test program.
  108.  
  109. 2.2 BorlandC Version
  110.  
  111.      Copy \BORLANDC\LIB\*.LIB to your \BORLANDC\LIB subdirectory.
  112.  
  113.      Copy \INCLUDE\*.H files to \BORLANDC\INCLUDE subdirectory.
  114.  
  115.      In your autoexec.bat file make sure you define the following environment
  116. variables to the proper directory.
  117.  
  118.      SET INCLUDE=C:\BORLANDC\INCLUDE\
  119.      SET LIB=C:\BORLANDC\LIB\
  120.      SET BIN=C:\BORLANDC\BIN\
  121.  
  122.      Print out README for latest changes.
  123.  
  124.      Follow instructions in  to test your installation with a simple
  125. communications test program.
  126.  
  127. 2.3 ZORTECH Version
  128.  
  129.      Copy \ZORTECH\LIB\*.LIB files to your \ZORTECH\LIB subdirectory.
  130.  
  131.      Copy \INCLUDE\*.H files to \ZORTECH\INCLUDE subdirectory.
  132.  
  133.      In your autoexec.bat file make sure you define the following environment
  134. variables to the proper directory.
  135.  
  136.      SET INCLUDE=C:\ZORTECH\INCLUDE\
  137.      SET LIB=C:\ZORTECH\LIB\
  138.  
  139.      Print out README for latest changes.
  140.  
  141.      Follow instructions in  to test your installation with a simple
  142. communications test program.
  143.  
  144. 2.4 QuickC Version
  145.  
  146.      Copy \MSC\LIB\*.LIB to your \QC\LIB subdirectory.  Or to the \LIB
  147. directory if this is where you QuickC library files are kept.
  148.  
  149.      Copy \INCLUDE\*.H files to \QC\INCLUDE subdirectory.  Or to the \INCLUDE
  150. directory if this is where your include files are kept.
  151.  
  152.      In your autoexec.bat file make sure you define the following environment
  153. variables to the proper directory.
  154.  
  155.      SET INCLUDE=C:\QC\INCLUDE\
  156.      SET LIB=C:\QC\LIB\
  157.  
  158.      Print out README for latest changes.
  159.  
  160.      Follow instructions in  to test your installation with a simple
  161. communications test program.
  162.  
  163. 2.5 MSC Version
  164.  
  165.      Copy \C600\LIB\*.LIB to your \C600\LIB subdirectory.  Or to the \LIB
  166. directory if this is where you MSC library files are kept.
  167.  
  168.      Copy \INCLUDE\*.H files to \C600\INCLUDE subdirectory.  Or to the \INCLUDE
  169. directory if this is where your include files are kept.
  170.  
  171.      In your autoexec.bat file make sure you define the following environment
  172. variables to the proper directory.
  173.  
  174.      SET INCLUDE=C:\C600\INCLUDE\
  175.      SET LIB=C:\C600\LIB\
  176.      SET BIN=C:\C600\BIN\
  177.  
  178.      Print out README for latest changes.
  179.  
  180.      Follow instructions in  to test your installation with a simple
  181. communications test program.
  182.  
  183.                        Chapter 3 - Demonstration Program
  184.  
  185.      The following code can be used to test this communications package.  It is
  186. a simple terminal emulation program which reads characters from COM1 and
  187. displays them, and sends characters typed at the keyboard out COM1 (change
  188. statement in initialize() module if COM2-COM4 is desired).
  189.  
  190.      The baud rate as configured is set to 1200 but can be set to any legal
  191. value (as defined in ASYNC.H) by changing value in call to Async_Open in the
  192. module initialize().
  193.  
  194.      The file TEST.C is included in all versions of the software and contains
  195. the code shown in section .
  196.  
  197.      Do not attempt to develop larger programs with the library until you can
  198. get TEST to work and you fully understand the program.  It is quite simple and
  199. should be mastered within a few minute's time.
  200.  
  201.      Note that this file has included ASYNC.H.  ASYNC.H should always be
  202. included in any program using these tools.  The include file VID.H is included
  203. from ASYNC.H to allow generic support for direct video as explained in section
  204. .  Other tools (file transfer, windows, etc) have other include files as
  205. defined in the introductory paragraphs to each of the individual sections
  206. discussing modules and files.
  207.  
  208.      Note the calls to Async_Init and Async_Open.  These modules must always be
  209. called prior to any use of the other Async modules.
  210.  
  211. 3.1 Compiler Independent Direct Video
  212.  
  213.      All of the supported compilers support direct access to the screen (much
  214. faster than using BIOS calls).  To allow compiler independent calls to these
  215. routines the include file VID.H is supplied.
  216.  
  217.      The code you develop does not have to take advantage of these routines,
  218. but if you intend to modify the ASYNC library modules, it is recommended that
  219. you look at this include file to see how they work.
  220.  
  221.      As an example TEST.C below demonstrates their use.  The first call to
  222. VID_open is needed for the Zortech version.  All other compilers require no
  223. initialization, and therefore VID_open is a dummy macro in VID.H for BorlandC,
  224. QuickC and MSC and is redefined to disp_open for Zortech.  VID_putc is for
  225. character output, VID_puts for string output and VID_printf for formatted
  226. output.  VID_startstand sets all following characters to reverse video,
  227. VID_endstand sets the following characters to normal video.  VID_clr_scr erases
  228. the entire screen.  VID_move(x,y) moves the cursor to row x, column y (0,0 is
  229. upper left).
  230.  
  231.      Microsoft (MSC and QC) users should be aware that using direct video
  232. requires linking with the GRAPHICS.LIB library that came with your compiler.
  233. This makes programs grow quite large.
  234.  
  235. 3.2 EXTERN symbol
  236.  
  237.      You will notice that the first statement in TEST.C is:
  238.  
  239.      #define EXTERN
  240.  
  241.      This symbol is used by ASYNC.H and other header files to determine if this
  242. is the main module where variables are not defined as "extern".  ASYNC.H and
  243. the other header files first check to see if EXTERN is already defined and if
  244. not they create it as:
  245.  
  246.      #define EXTERN extern
  247.  
  248.      Only define EXTERN (#define EXTERN) in your main module to tell the
  249. compiler that it should place the global variables there.
  250.  
  251. 3.3 BorlandC Command Line
  252.  
  253.      To compile TEST.C and link it with the async library small memory model
  254. library, type the following:
  255.  
  256.      tmf test S
  257.  
  258.       After successful compilation, type TEST and press .  As you type
  259. characters they will be sent out COM1.  Characters received at COM1 will be
  260. displayed on the screen.  Press  to quit back to DOS.
  261.  
  262. 3.4 BorlandC Environment
  263.  
  264.      First create a project file called test.prj which has the following lines:
  265.  
  266.                test
  267.                asyncs.lib
  268.  
  269.      Then enter the BorlandC environment (BC) and name the project file TEST.
  270. Set a compiler DEFINE to be _BORLANDC and then RUN.   After successful
  271. compilation, the screen will blank and as you type characters they will be sent
  272. out COM1.  Characters received at COM1 will be displayed on the screen.  Press
  273. to quit back to the BORLANDC environment.
  274.  
  275. 3.5 Zortech C
  276.  
  277.      To compile TEST.C and link it with the async library, type the following:
  278.  
  279.      zmf test
  280.  
  281.       After successful compilation, type TEST and press .  As you type
  282. characters, they will be sent out COM1.  Characters received at COM1 will be
  283. displayed on the screen.  Press  to quit back to DOS.
  284.  
  285. 3.6 QuickC Command Line
  286.  
  287.      To compile TEST.C and link it with the async library, type the following:
  288.  
  289.      qmf test
  290.  
  291.       After successful compilation, type TEST and press .  As you type
  292. characters, they will be sent out COM1.  Characters received at COM1 will be
  293. displayed on the screen.  Press  to quit back to DOS.
  294.  
  295.      QMF.BAT will place an 'M' after the name of the file (i.e. TEST will
  296. become TESTM).  This is because the make files for Microsofts MAKE program are
  297. quite a bit different than for Borlands MAKE.
  298.  
  299. 3.7 MSC Command Line
  300.  
  301.      To compile TEST.C and link it with the async library, type the following:
  302.  
  303.      mmf test
  304.  
  305.       After successful compilation, type TEST and press .  As you type
  306. characters, they will be sent out COM1.  Characters received at COM1 will be
  307. displayed on the screen.  Press  to quit back to DOS.
  308.  
  309.      MMF.BAT will place an 'M' after the name of the file (i.e. TEST will
  310. become TESTM).  This is because the make files for Microsofts MAKE program are
  311. quite a bit different than for Borlands MAKE.
  312.  
  313. 3.8 TEST.C
  314.  
  315. /* |-----------------------------------------------|*/
  316. /* |                                               |*/
  317. /* |  test -- test async library program           |*/
  318. /* |                                               |*/
  319. /* |-----------------------------------------------|*/
  320.  
  321. #define EXTERN
  322.  
  323. #include <async.h>
  324. #include <stdio.h>
  325. #include <stdlib.h>
  326.  
  327. #define    COM1     0
  328. #define    COM2     1
  329. #define    COM3     2
  330. #define    COM4     3
  331.  
  332. #define    SCAN    0   /* func. key scan code lead in */
  333. #define    QUIT    'D'/* F10 quit  */
  334. #define    TRUE    1
  335.  
  336. char KbData, ModData;
  337. int port;
  338.  
  339. main()
  340. {
  341.    initialize();
  342.    VID_puts("\nPress F10 to quit...\n");
  343.    do {
  344.        if (kbhit()) {                           /* get any char at kbd */
  345.            KbData = getch();
  346.            if (KbData == SCAN) {                /* FUNCTION KEY */
  347.                KbData = getch();
  348.                switch (KbData) {
  349.  
  350.                    case QUIT :
  351.                        CloseUp();
  352.  
  353.                }
  354.            }
  355.            else
  356.                Async_Send(port, KbData);
  357.        }
  358.        if (Async_Receive(port, &ModData)) {
  359.            VID_putc(ModData);
  360.        }
  361.    } while (TRUE)  /* main while loop */
  362. }      /* main */
  363.  
  364. CloseUp()
  365. {
  366.    Async_Close(port);
  367.    VID_close();
  368.    exit(0);
  369. }
  370.  
  371. initialize()
  372. {
  373.    VID_open();
  374.    port = COM1;
  375.    Async_Init();
  376.    if (!Async_Open(port, 1200, 'E', 7, 1, 1000, 1000)) {
  377.        VID_printf("Error opening COM%1s\n", port+1);
  378.        VID_flush();
  379.    }
  380. }
  381.  
  382. ProcessInputs()    /* dummy routine for Delay module */
  383. {
  384. }
  385.  
  386.                          Chapter 4 - Files and Modules
  387.  
  388.      This chapter will describe each of the modules included with this
  389. communications library.
  390.  
  391. 4.1 File A_INIT.C Modules (initialize, open, close)
  392.  
  393.      Before using any of the modules described in this section, include the
  394. file ASYNC.H.
  395.  
  396.      The 3 following modules need to be called whenever using these tools.  The
  397. first procedure (Async_Init) initializes all buffer variables and is only
  398. called once before any other Async routine is called.  The second procedure (
  399. Async_Open) is called once for each communications port needed before it is
  400. ever used.  The third routine (Async_Close) is called at the end of processing
  401. once for each open port.
  402.  
  403. Routines:
  404.  
  405. Async_Init                            Performs initialization.
  406. Async_Open                            Sets up COM port
  407. Async_Close                           Closes down COM port
  408.  
  409.  
  410. Async_Init --- Initialize Asynchronous Variables
  411.  
  412.  
  413. Purpose:   Initializes variables, always call first and only call one time.
  414.  
  415. Calling Sequence:
  416.            Flag = Async_Init();
  417.  
  418. Calls:     None (Except Digiboard version).
  419.  
  420. Returns:   TRUE is successful FALSE otherwise.  (Always true except for
  421.            DIGIBOARD version).
  422.  
  423. int Async_Init(void)
  424.  
  425.  
  426. Async_Open --- Open communications port
  427.  
  428.  
  429. Purpose:   This module initializes the communications hardware and sets up the
  430.            interrupt vectors for the receive and send buffers.
  431.  
  432. Calling Sequence:
  433.  
  434. Flag = Async_Open(Port, BaudRate, Parity, WordSize, StopBits, RBuff, SBuff)
  435.  
  436.            Port           which port (0, 1, 2, 3)(0=COM1 1=COM2 2=COM3 3= COM4)
  437.  
  438.            BaudRate       Baud rate (110 to 57600)
  439.                                     set to B115K for 115200 baud
  440.  
  441.            Parity         "E" for even, "O" for odd, "N" for none
  442.  
  443.            WordSize       Bits per character  (5 through 8)
  444.  
  445.            StopBits       How many stop bits  (1 or 2)
  446.  
  447.            RBuff          Size of receive buffer to allocate (number of WORDS,
  448.                           max 32K)
  449.  
  450.            SBuff          Size of send buffer to allocate (number of CHARS, max
  451.                           64K).  Set to 0 to not use send interrupts.
  452.  
  453. Flag returned TRUE if port opened successfully.
  454.  
  455. Flag returned FALSE if any errors.
  456.  
  457. Calls:
  458.            intsetup (see asyncm.asm)
  459.  
  460. Async_Open(int Port, unsigned BaudRate, char Parity, int WordSize, int
  461.            StopBits, int RBuff, unsigned SBuff)
  462.  
  463.  
  464. Async_Close --- Close down communications interrupts
  465.  
  466.  
  467. Purpose:   Resets interrupt system to what it was before port opened.
  468.  
  469. Calling Sequence:
  470.            Async_Close(port);
  471.  
  472.            port           port to close.
  473.  
  474. Calls:     None
  475.  
  476. void Async_Close(int Port)
  477.  
  478. 4.2 File A_CHAR.C Modules (Send/Recv 1 char at a time)
  479.  
  480.      IMPORTANT: when compiling this module do not turn on the compiler stack
  481. overflow checking option.  The interrupt service routine sets up its own stack
  482. that will cause run time errors if this switch is turned on.
  483.  
  484.      The modules in this section are used to send and receive data one
  485. character at a time.  The module Async_Receive_With_Timeout returns -1 if a
  486. specified time elapses without a character coming in.  The module Async_Putback
  487. puts a character back into the receive buffer such that it will be the next
  488. character read by Async_Receive or any module used to read characters from the
  489. buffer.
  490.  
  491. Routines:
  492.  
  493. Async_Receive                          Reads character from COM buffer
  494. Async_Putback                          Replace a character in COM buffer
  495. Async_Send                             Places char in send buffer
  496. Async_Receive_With_Timeout             Receives char with timeout check
  497. Async_Send_Brk                         Sends break (attention) signal
  498. Async_Purge_Buffer                     Clears receive buffer
  499. Async_Isr                              Interrupt service routine
  500.  
  501.  
  502. Async_Receive --- Retrieve a character from buffer
  503.  
  504.  
  505.  
  506. Purpose:   Retrieve character (if any) from buffer
  507.  
  508. Calling Sequence:
  509.            Flag = Async_Receive(port, &c);
  510.  
  511.            port           port to read character from
  512.  
  513.            c              character (if any) retrieved from buffer
  514.  
  515. Flag returned 1 if character retrieved from buffer.
  516.  
  517. Flag returned 0 if no character retrieved.
  518.  
  519. Flag returned with port status if character retrieved with parity, overrun or
  520.            framing error
  521.  
  522. Calls:     None
  523.  
  524. Async_Receive(int port, unsigned char *c)
  525.  
  526.  
  527. Async_Putback --- Return character to buffer
  528.  
  529.  
  530. Purpose:   Replace character in buffer.  If a character needs to be put back
  531.            into buffer for a another module, etc.
  532.  
  533. Calling Sequence:
  534.            Async_Putback(port, c);
  535.  
  536.            port           port to put character into
  537.  
  538.            c              character to put back into buffer
  539.  
  540. Calls:     None
  541.  
  542. Async_Putback(int port, unsigned char c)
  543.  
  544.  
  545. Async_Send --- Places a character in the send buffer
  546.  
  547.  
  548. Purpose:   This module places a character in the send buffer.  The character
  549.            will be sent automatically at a later time by the interrupt service
  550.            routine.
  551.  
  552. Calling Sequence:
  553.            Async_Send(port, c);
  554.  
  555.            port           port to send character to
  556.  
  557.            c              character to place in send buffer
  558.  
  559. Calls:     DeltaTime
  560.  
  561. Remarks:   If the send buffer is full this routine will wait .25 seconds for
  562.            room to be made.  If it is still full (probably something wrong) it
  563.            will return ERR.
  564.  
  565. void Async_Send(int port, unsigned char c)
  566.  
  567.  
  568. Async_putc --- Sends a character out the port without buffering
  569.  
  570.  
  571. Purpose:   This module sends a character out the port.  The character is sent
  572.            immediately and not buffered.
  573.  
  574. Calling Sequence:
  575.            Async_putc(port, c);
  576.  
  577.            port           port to send character to
  578.  
  579.            c              character to send
  580.  
  581. Calls:     DeltaTime
  582.  
  583. Remarks:   If the send holding register is full this routine will wait .25
  584.            seconds for room to be made.  If it is still full (probably
  585.            something wrong) it will return ERR.
  586.  
  587. void Async_putc(int port, unsigned char c)
  588.  
  589.  
  590. Async_Receive_With_TimeOut --- Retrieve a char from buffer with delay
  591.  
  592.  
  593. Purpose:   Retrieve character as integer from buffer, or return TIMEOUT if
  594.            specified delay period expires.
  595.  
  596. Calling Sequence:
  597.            Async_Receive_With_Timeout(port, delay, &C);
  598.  
  599.            port           which commo port
  600.  
  601.            delay          Timeout period in hundreths of a second
  602.  
  603.            C              character (if any) retrieved from buffer.  Set to
  604.                           TIMEOUT if Timeout occurs prior to character being
  605.                           received.
  606.  
  607. Calls:     Async_Receive
  608.  
  609. int Async_Receive_With_Timeout(int Port, int Hunds, unsigned char *C)
  610.  
  611.  
  612. Async_Send_Brk --- Send break (attention) signal
  613.  
  614.  
  615. Calling Sequence:
  616.            Async_Send_Brk(port);
  617.  
  618.            port           which commo port
  619.  
  620. Calls:     None
  621.  
  622. void Async_Send_Brk(int Port)
  623.  
  624.  
  625. Async_Purge_Buffer --- Purge communications input buffer
  626.  
  627.  
  628. Calling Sequence:
  629.            Async_Purge_Buffer(port);
  630.  
  631.            port           which commo port
  632.  
  633. Calls:     Async_Receive
  634.  
  635. void Async_Purge_Buffer(int port)
  636.  
  637.  
  638. Async_Isr --- Interrupt Service Routine
  639.  
  640.  
  641. Purpose:   When an interrupt has occurred for one of the communications ports,
  642.            this routine is called by the routine to which the commo interrupts
  643.            are vectored (intserv in asyncm.asm).  Used for both send and
  644.            receive interrupts as well as receive errors and BREAK processing.
  645.            DO NOT CALL THIS ROUTINE.
  646.  
  647. Calling Sequence:
  648.            Async_Isr(port);
  649.  
  650. interrupt Async_Isr(int port)
  651.  
  652. 4.3 File A_STRNG.C Modules (Send strings)
  653.  
  654. Routines:
  655.  
  656. Async_Send_String                     Sends string over COM port
  657. Async_Send_String_With_Delays         Sends string with timed delays
  658.  
  659.  
  660. Async_Send_String --- Send string over communications port
  661.  
  662.  
  663. Purpose:   This module places a string of characters into the send buffer.
  664.  
  665. Calling Sequence:
  666.            Async_Send_String(port, s);
  667.  
  668.            port           port to send chars to
  669.  
  670.            s              string to send
  671.  
  672. Calls:     Async_Send
  673.  
  674. void Async_Send_String(int port, unsigned char *s)
  675.  
  676.  
  677. Async_Send_Line --- Send line over communications port
  678.  
  679.  
  680. Purpose:   This module places a string of characters into the send buffer
  681.            followed by a NEWLINE.
  682.  
  683. Calling Sequence:
  684.            Async_Send_Line(port, s);
  685.  
  686.            port           port to send chars to
  687.  
  688.            s              string to send
  689.  
  690. Calls:     Async_Send
  691.  
  692. void Async_Send_Line(int port, unsigned char *s)
  693.  
  694.  
  695. Async_Send_String_With_Delays --- Send string with timed delays
  696.  
  697.  
  698. Purpose:   Sends string out over communications port with specified delays for
  699.            each character and at the end of the string.
  700.  
  701. Calling Sequence:
  702.            Async_Send_String_With_Delays(port, s, char_Delay, EOS_Delay);
  703.  
  704.            port           which commo port
  705.  
  706.            s              String to send
  707.  
  708.            char_Delay     Number of hundreth of second to delay per character
  709.  
  710.            EOS_Delay      Number of hundreth of second to delay at end
  711.  
  712. Calls:     Async_Send
  713.            Async_Send_String
  714.            Delay
  715.  
  716. Remarks:
  717.  
  718.      This routine is useful when writing routines to perform non-protocol
  719. uploads.  Many computer systems require delays between receipt of characters
  720. for correct processing.  The delay for end-of-string usually applies when the
  721. string represents an entire line of a file.
  722.  
  723.      If delays are not required, Async_Send_String is faster. This routine will
  724. call Async_Send_String if no character delay is to be done.
  725.  
  726. void Async_Send_String_With_Delays(int port, unsigned char *s, int char_Delay,
  727.            int EOS_Delay)
  728.  
  729. 4.4 File A_HNDSHK.C Hardware Handshake Modules
  730.  
  731. Routines:
  732.  
  733. Async_DTR                              Set or clear Data Terminal Ready
  734. Async_RTS                              Set or clear Request To Send
  735. Async_DSR                              Check for modem DSR
  736. Async_CTS                              Check for modem CTS
  737. Async_DCD                              Checks for modem carrier detect
  738. Async_Carrier_Drop                     Checks for modem carrier drop
  739. Async_RI                               Check for modem RI
  740. Async_Percentage_Used                  Returns percentage Buffer used
  741. Async_SPercentage_Used                 Returns percentage SBuffer used
  742. Async_Buffer_Check                     Checks if character in COM buffer
  743.  
  744.  
  745. Async_DTR --- Set data terminal ready status
  746.  
  747.  
  748. Calling Sequence:
  749.            Async_DTR(port, Ready_Status);
  750.  
  751.            port           which commo port
  752.  
  753.            Ready_Status   Set TRUE to set on, Set FALSE to set off.
  754.  
  755. Calls:     None
  756.  
  757. void Async_DTR(int Port, char Ready_Status)
  758.  
  759.  
  760. Async_RTS --- Set Request To Send
  761.  
  762.  
  763. Calling Sequence:
  764.            Async_RTS(port, Ready_Status );
  765.  
  766.            port           which commo port
  767.  
  768.            Ready_Status   Set TRUE to set send on, Set FALSE to set off
  769.  
  770. Calls:     None
  771.  
  772. void Async_RTS(int Port, char Ready_Status)
  773.  
  774.  
  775. Async_DSR --- Check for modem DSR
  776.  
  777.  
  778. Calling Sequence:
  779.            Flag = Async_DSR(port);
  780.  
  781.            port           which commo port
  782.  
  783. Flag is set TRUE if "data set ready" detected, else FALSE.
  784.  
  785. Calls:     None
  786.  
  787. int Async_DSR(int Port)
  788.  
  789.  
  790. Async_CTS --- Check for modem CTS
  791.  
  792.  
  793. Calling Sequence:
  794.            Flag = Async_CTS(port);
  795.  
  796.            port           which commo port
  797.  
  798. Flag is set TRUE if "clear to send" detected, else FALSE.
  799.  
  800. Calls:     None
  801.  
  802. int Async_CTS(int Port)
  803.  
  804.  
  805. Async_DCD  --- Check for modem carrier detect
  806.  
  807.  
  808. Calling Sequence:
  809.            Flag = Async_DCD(port);
  810.  
  811.            port           which commo port
  812.  
  813. Flag is set TRUE if "data carrier" detected, else FALSE.
  814.  
  815. Calls:     None
  816.  
  817. int Async_DCD(int Port)
  818.  
  819.  
  820. Async_Carrier_Drop --- Check for modem carrier drop
  821.  
  822.  
  823. Calling Sequence:
  824.            Flag = Async_Carrier_Drop(port);
  825.  
  826.            port           which commo port
  827.  
  828. Flag is set TRUE if carrier not detected, else FALSE.
  829.  
  830. Calls:     None
  831.  
  832. int Async_Carrier_Drop(int Port)
  833.  
  834.  
  835. Async_RI --- Check for modem RI
  836.  
  837.  
  838. Calling Sequence:
  839.            Flag = Async_RI(port);
  840.  
  841.            port           which commo port
  842.  
  843. Flag is set TRUE if "ring indication" detected, else FALSE.
  844.  
  845. Calls:     None
  846.  
  847. int Async_RI(int Port)
  848.  
  849.  
  850. Async_Percentage_Used --- Report Percentage Buffer Filled
  851.  
  852.  
  853. Calling Sequence:
  854.            Percentage = Async_Percentage_Used(port);
  855.  
  856.            port           which commo port
  857.  
  858. Percentage value range from 0 (empty) to 100 (full).
  859.  
  860. Calls:     None
  861.  
  862.      Remarks:
  863.  
  864.      This routine is helpful when incorporating handshake into a communications
  865. program.  For example, assume that the host computer uses the XON/XOFF
  866. (DC1/DC3) protocol.  Then the PC program should issue an XOFF to the host when
  867. the value returned by Async_Percentage_Used > 75 or so.  When the utilization
  868. percentage drops below 25 or so, the PC program should transmit an XON.
  869.  
  870. int Async_Percentage_Used(int port)
  871.  
  872.  
  873. Async_SPercentage_Used --- Report Percentage SBuffer Filled
  874.  
  875.  
  876. Calling Sequence:
  877.            Percentage = Async_SPercentage_Used(port);
  878.  
  879.            port           which commo port
  880.  
  881. Percentage value range from 0 (empty) to 100 (full).
  882.  
  883. Calls:     None
  884.  
  885.      Remarks:
  886.  
  887.      This routine reports the status of the send buffer.
  888.  
  889. int Async_SPercentage_Used(int port)
  890.  
  891.  
  892. Async_Buffer_Check --- Check if character in receive buffer
  893.  
  894.  
  895. Calling Sequence:
  896.            Flag = Async_Buffer_Check(port);
  897.  
  898.            port           port to check for waiting chars.
  899.  
  900. Flag returned TRUE if character received in buffer.
  901.  
  902. Flag returned FALSE if no character received.
  903.  
  904. Calls:     None
  905.  
  906.      Remarks:
  907.  
  908.      This routine only checks if a character has been received and thus can be
  909. read; it does NOT return the character.  Use Async_Receive to read the
  910. character.
  911.  
  912. int Async_Buffer_Check(int port)
  913.  
  914. 4.5 File A_MODEM.C Modules (Hayes modem support)
  915.  
  916. Routines:
  917.  
  918. Async_Signon                 Sign on with Hayes modem (AT)
  919. Async_Signoff                Hang up phone (place on hook)
  920.  
  921.  
  922. Async_Signon --- Dial phone using Hayes AT command sequence
  923.  
  924.  
  925. Calling Sequence:
  926.            Async_Signon(port, phone);
  927.  
  928.            port           port conneted to modem.
  929.  
  930.            phone          string with phone number (T first char for Touch
  931.                           Tone)
  932.  
  933. Calls:     Async_Send_String, Async_Send, Delay
  934.  
  935. void Async_Signon(int port, unsigned char *phone)
  936.  
  937.  
  938. Async_Signoff --- Hang up phone using Hayes AT command sequence
  939.  
  940.  
  941. Calling Sequence:
  942.            Async_Signoff(port);
  943.  
  944.            port           which commo port
  945.  
  946. Calls:     Async_Send_String, Delay
  947.  
  948. void Async_Signoff(int port)
  949.  
  950. 4.6 File A_TIMING.C Modules
  951.  
  952.      Modules in this file are used for real-time delays where various processes
  953. may still need to be performed while another process is being delayed (user
  954. needs to provide a ProcessInputs() routine, can be empty if not needed).
  955.  
  956.      Two other routines are provided for timing purposes.
  957.  
  958.      Before using any of the modules in this section include the file TIMING.H.
  959.  
  960. Routines:
  961.  
  962. Delay                           Wait for n hundredths of a second
  963. DeltaTime                       Determine elapsed time since specified time.
  964. GetSystemHundreths              Read system hundreths of a second from counter.
  965.  
  966.  
  967. Delay -- Wait for n hundredths of a second
  968.  
  969.  
  970. Calling Sequence:
  971.            Delay(n)
  972.  
  973.            n              number of hundreths of a second to wait for
  974.  
  975. Calls:     ProcessInputs (provided by user or dummy if not needed)
  976.  
  977. void Delay(int n)
  978.  
  979.  
  980. DeltaTime -- Determine how much time has elapsed since specified time.
  981.  
  982.  
  983. Calling Sequence:
  984.            delta = DeltaTime(t1)
  985.  
  986.            t1             number of system hundreths to calculate elapsed time
  987.                           since.
  988.  
  989.            delta          is set to number of hundreths elapsed since t1.
  990.  
  991. Calls:     GetSystemHundreths
  992.  
  993. unsigned DeltaTime(unsigned long t1)
  994.  
  995.  
  996. GetSystemHundreths -- Read system hundreths of a second from counter.
  997.  
  998.  
  999. Calling Sequence:
  1000.            t = GetSystemHundreths()
  1001.  
  1002.            t              Hundreths of a second counter from system.
  1003.  
  1004. Calls:     system (DOS or memory location)
  1005.  
  1006. unsigned long GetSystemHundreths(void)
  1007.  
  1008. 4.7 File FILEXFER.C Modules
  1009.  
  1010.      Before using any of the modules in this section include the file XFER.H.
  1011.  
  1012. Routines:
  1013.  
  1014. initxfer                    Initialize xfer variables
  1015. upload                      upload a file with XOFF/XON protocol
  1016. recvfile                    Receive a file in XMODEM protocol
  1017. sendfile                    send a file in XMODEM protocol
  1018. WaitFor                     Wait for specified string from port
  1019.  
  1020.  
  1021. initxfer --- initialize file transfer variables
  1022.  
  1023.  
  1024. Calling Sequence:
  1025.            initxfer();
  1026.  
  1027. Calls:     none
  1028.  
  1029. void initxfer(void)
  1030.  
  1031.  
  1032. upload --- upload a file with XOFF/XON protocol
  1033.  
  1034.  
  1035. Purpose:   Sends a file with XOFF/XON protocol, no error check
  1036.  
  1037. Calling Sequence:
  1038.            upload(port, file);
  1039.  
  1040.            port           port to send file out of
  1041.  
  1042.            file           name of file to send
  1043.  
  1044. Calls:     Async_Send, mcharinp, readchar, Async_Buffer_Check
  1045.  
  1046. void upload(int port, char *file)
  1047.  
  1048.  
  1049. sendfile --- send a file using XMODEM protocol
  1050.  
  1051.  
  1052. Calling Sequence:
  1053.            flag = sendfile(port, file);
  1054.  
  1055.            port           port to send file out of
  1056.  
  1057.            file           name of file to send
  1058.  
  1059. flag is set to ERROR if file is not found or transfer was not successful.
  1060.  
  1061. flag is set to TRUE if file transfer was successful
  1062.  
  1063. Calls:     Async_Send, readchar
  1064.  
  1065. int sendfile(int port, char *file)
  1066.  
  1067.  
  1068. recvfile --- receive a file using XMODEM CHECKSUM protocol
  1069.  
  1070.  
  1071. Calling Sequence:
  1072.            flag = recvfile(port, file);
  1073.  
  1074.            port           port to send file out of
  1075.  
  1076.            file           name of file to receive
  1077.  
  1078. flag is set to ERROR if file can't be created or transfer was not successful.
  1079.  
  1080. flag is set to TRUE if file transfer was successful
  1081.  
  1082. Calls:     Async_Send, readchar, creat, putc_scr
  1083.  
  1084. int recvfile(int port, char *file)
  1085.  
  1086.  
  1087. WaitFor --- Get data from a port until specified string is received.
  1088.  
  1089.  
  1090. Calling Sequence:
  1091.            flag = WaitFor(port, string, startdelay, chardelay);
  1092.  
  1093.            port           port to send file out of
  1094.  
  1095.            string         string to wait for
  1096.  
  1097.            startdelay     delay time to allow for first char to come
  1098.  
  1099.            chardelay      delay time to allow for each additonal char
  1100.  
  1101. flag is set to TIMEOUT if string is not received within time allowed.
  1102.  
  1103. flag is set to TRUE if string is received.
  1104.  
  1105. Calls:     readchar
  1106.  
  1107. int WaitFor(int port, unsigned char *string, int startdelay, int chardelay);
  1108.  
  1109. 4.8 File WIND.C Modules
  1110.  
  1111.      Before using any of the modules in this section include the file WIND.H.
  1112. See DATAMON.C for an example of the use of these modules.
  1113.  
  1114. Routines:
  1115.  
  1116. InitWindow               Initialize window variables
  1117. DefineWindow             Define a new window in screen coordinates
  1118. SelectWindow             Change current window number for subsequent data
  1119. StringToWindow           Write a string to a specified window
  1120. CharToWindow             Write a character to a specified window
  1121. CRLFToWindow             Put cursor of specified window to next line start
  1122. WindowNorm               Set current window to normal
  1123. WindowRV                 Set current window to reverse video
  1124. WindowBlink              Set current window to blink
  1125. WindowUL                 Set current window to underline
  1126. WindowHigh               Set current window to high intensity
  1127. WindowLow                Set current window to low intensity
  1128. scroll                   scroll current window up or down
  1129. scroll_partial           scroll current window, or insert/delete line
  1130. ClearWindow              clear current window to all blanks
  1131. clear                    clear portion of current window
  1132. inccur                   increment cursor location, scroll if necessary
  1133. putcursor                display the cursor in current position
  1134. deccursor                move cursor left and wrap up if flag set
  1135. poscur                   position current window cursor
  1136. proprt                   process a printing character to current window
  1137. proctl                   process a control char to current window
  1138. clr_scr                  clears the actual screen
  1139. SwapOut                  copy screen to buffer area
  1140. SwapIn                   copy saved page to screen buffer
  1141.  
  1142.  
  1143. InitWindow --- Initialize window variables
  1144.  
  1145.  
  1146. Calling Sequence:
  1147.            InitWindow();
  1148.  
  1149. Calls:     None
  1150.  
  1151. Remarks:   See Datamon for example of usage
  1152.  
  1153. void InitWindow(void)
  1154.  
  1155.  
  1156. DefineWindow --- Define a new window in screen coordinates
  1157.  
  1158.  
  1159. Calling Sequence:
  1160.            DefineWindow(num, xul, yul, xlr, ylr);
  1161.  
  1162.            num            window number (set by caller)
  1163.  
  1164.            xul, yul       x and y of upper left corner of window (screen)
  1165.  
  1166.            xlr, ylr       x and y of lower right corner of window
  1167.  
  1168. Calls:     None
  1169.  
  1170. Remarks:   See Datamon for example of usage
  1171.  
  1172. void DefineWindow(int num, int xul, int yul, int xlr, int ylr)
  1173.  
  1174.  
  1175. SelectWindow --- Change current window number for subsequent data
  1176.  
  1177.  
  1178. Calling Sequence:
  1179.            SelectWindow(n)
  1180.  
  1181.            n              number of new window
  1182.  
  1183. Calls:     None
  1184.  
  1185. Remarks:   Sets WindowN global variable
  1186.  
  1187. void SelectWindow(int n)
  1188.  
  1189.  
  1190. StringToWindow --- Write a string to a specified window
  1191.  
  1192.  
  1193. Calling Sequence:
  1194.            StringToWindow(Window, Str)
  1195.  
  1196.            Window         number of window to write string to
  1197.  
  1198.            Str            character string to write
  1199.  
  1200. Calls:     CharToWindow
  1201.  
  1202. Remarks:   Call with WindowN for current window
  1203.  
  1204. void StringToWindow(int Window, char *Str)
  1205.  
  1206.  
  1207. CharToWindow --- Write a character to a specified window
  1208.  
  1209.  
  1210. Calling Sequence:
  1211.            CharToWindow(Window, c)
  1212.  
  1213.            Window         number of window to write char to
  1214.  
  1215.            c              char to write
  1216.  
  1217. Calls:     proprt, proctl
  1218.  
  1219. Remarks:   call with WindowN for current window.  c can be a control character.
  1220.  
  1221. void CharToWindow(int Window, char c)
  1222.  
  1223.  
  1224. CRLFToWindow --- Put cursor of specified window to next line start
  1225.  
  1226.  
  1227. Calling Sequence:
  1228.            CRLFToWindow(Window);
  1229.  
  1230.            Window         number of window to move cursor of
  1231.  
  1232. Calls:     CharToWindow
  1233.  
  1234. void CRLFToWindow(int Window)
  1235.  
  1236.  
  1237. WindowNorm --- Set attribute of current window to Normal
  1238.  
  1239.  
  1240. Calling Sequence:
  1241.            WindowNorm();
  1242.  
  1243. Calls:     None
  1244.  
  1245. void WindowNorm(void)
  1246.  
  1247.  
  1248. WindowRV --- Set attribute of current window to Reverse Video
  1249.  
  1250.  
  1251. Calling Sequence:
  1252.            WindowRV();
  1253.  
  1254. Calls:     None
  1255.  
  1256. void WindowRV(void)
  1257.  
  1258.  
  1259. WindowBlink --- Set attribute of current window to Blink
  1260.  
  1261.  
  1262. Calling Sequence:
  1263.            WindowBlink();
  1264.  
  1265. Calls:     None
  1266.  
  1267. void WindowBlink(void)
  1268.  
  1269.  
  1270. WindowUL --- Set attribute of current window to Underline
  1271.  
  1272.  
  1273. Calling Sequence:
  1274.            WindowUL();
  1275.  
  1276. Calls:     None
  1277.  
  1278. void WindowUL(void)
  1279.  
  1280.  
  1281. WindowHigh --- Set attribute of current window to High Intensity
  1282.  
  1283.  
  1284. Calling Sequence:
  1285.            WindowHigh();
  1286.  
  1287. Calls:     None
  1288.  
  1289. void WindowHigh(void)
  1290.  
  1291.  
  1292. WindowLow --- Set attribute of current window to Low Intensity
  1293.  
  1294.  
  1295. Calling Sequence:
  1296.            WindowLow();
  1297.  
  1298. Calls:     None
  1299.  
  1300. void WindowLow(void)
  1301.  
  1302.  
  1303. scroll --- scroll current window up or down
  1304.  
  1305.  
  1306. Calling Sequence:
  1307.            scroll(Direction);
  1308.  
  1309.            Direction      set to UP or DOWN for direction of scroll
  1310.  
  1311. Calls:     scroll_partial
  1312.  
  1313. Remarks:   UP means top line of top of screen, blank bottom
  1314.  
  1315. void scroll(int Direction)
  1316.  
  1317.  
  1318. scroll_partial --- scroll current window, or insert/delete line
  1319.  
  1320.  
  1321. Calling Sequence:
  1322.            scroll_partial(Direction, YTop)
  1323.  
  1324.            Direction      set to UP or DOWN for direction of scroll
  1325.  
  1326.            YTop           set to top line of window to scroll
  1327.  
  1328. Calls:     memmovew, memsetw, get_off_xy
  1329.  
  1330. Remarks:   This routine is used to scroll window, insert line
  1331.            (scroll DOWN at YTop set to insert point) and delete
  1332.            line (scroll UP at YTop set to delete line)
  1333.  
  1334. void scroll_partial(int Direction, int YTop)
  1335.  
  1336.  
  1337. ClearWindow  --- clear current window to all blanks
  1338.  
  1339.  
  1340. Calling Sequence:
  1341.            ClearWindow();
  1342.  
  1343. Calls: clear
  1344.  
  1345. void ClearWindow(void)
  1346.  
  1347.  
  1348. clear --- clear portion of current window
  1349.  
  1350.  
  1351. Calling Sequence:
  1352.            clear(xmin, ymin, xmax, ymax)
  1353.  
  1354.            xmin, ymin     coords of up/left corner of region to clear
  1355.  
  1356.            xmax, ymax     coords of lower/right corner of region to clear
  1357.  
  1358. Calls:     memsetw
  1359.  
  1360. Remarks:   coords relative to current window
  1361.  
  1362. void clear(int xmin, int ymin, int xmax, int ymax)
  1363.  
  1364.  
  1365. inccur --- move cursor right, wrap, scroll if necessary
  1366.  
  1367.  
  1368. Calling Sequence:
  1369.            inccur();
  1370.  
  1371. Calls:     scroll, poscur
  1372.  
  1373. Remarks:   Current window.  Called by proprt, etc.
  1374.  
  1375. void inccur(void)
  1376.  
  1377.  
  1378. putcursor --- display the cursor in current position
  1379.  
  1380.  
  1381. Calling Sequence:
  1382.            putcursor();
  1383.  
  1384. Calls:     poscur
  1385.  
  1386. Remarks:   Current window.  Called by proprt, etc.
  1387.  
  1388. void putcursor(void)
  1389.  
  1390.  
  1391. deccursor --- move cursor left and wrap up if flag set
  1392.  
  1393.  
  1394. Calling Sequence:
  1395.            deccursor();
  1396.  
  1397. Calls:     poscur
  1398.  
  1399. Remarks:   does not scroll down if at top. Current window
  1400.  
  1401. void deccursor(void)
  1402.  
  1403.  
  1404. poscur --- position current window cursor.
  1405.  
  1406.  
  1407. Calling Sequence:
  1408.            poscur(x, y);
  1409.  
  1410.            x, y           location to move cursor to
  1411.  
  1412. Calls:
  1413.  
  1414. Remarks:   x and y relative to window start
  1415.  
  1416. void poscur(int x, int y)
  1417.  
  1418.  
  1419. proprt --- process a printing character to current window
  1420.  
  1421.  
  1422. Calling Sequence:
  1423.            proprt(c);
  1424.  
  1425.            c              printable char (> BLANK)
  1426.  
  1427. Calls:     memsetw, inccur
  1428.  
  1429. Remarks:   use proctl for control characters (in current window)
  1430.  
  1431. void proprt(char c)
  1432.  
  1433.  
  1434. proctl --- process a control char to current window
  1435.  
  1436.  
  1437. Calling Sequence:
  1438.            proctl(c);
  1439.  
  1440.            c              a control character
  1441.  
  1442. Calls:     bdos, clear, poscur, scroll, deccursor, proprt, proctl (recursive)
  1443.  
  1444. Remarks:   many control chars are displayed <CTRL?>
  1445.  
  1446. void proctl(char c)
  1447.  
  1448.  
  1449. SwapOut --- Copy screen to buffer area
  1450.  
  1451.  
  1452. Calling Sequence:
  1453.            SwapOut();
  1454.  
  1455. Calls:     peekw
  1456.  
  1457. Remarks:   Uses global variables initialized in InitWindow.  Only one screen
  1458.            can be swapped out at a time.
  1459.  
  1460. void SwapOut(void)
  1461.  
  1462.  
  1463. SwapIn --- copy saved page to screen buffer
  1464.  
  1465.  
  1466. Calling Sequence:
  1467.            SwapIn();
  1468.  
  1469. Calls:     pokew
  1470.  
  1471. void SwapIn(void)
  1472.  
  1473. 4.9 File PRINTER.C Modules
  1474.  
  1475.      This file contains code for buffered printer support for LPT1 only at this
  1476. point.
  1477.  
  1478. Routines:
  1479.  
  1480. InitPrinter                 Initialize printer, alloc memory
  1481. StringToPrinter             Write a string to printer
  1482. CRLFToPrinter               Send CR/LF sequence to printer
  1483. CharToPrinter               Write a char to printer (doesn't use buffer)
  1484. PutPrinterBuffer            Put a character into printer output buffer
  1485. SendPrinterBuffer           Send a character from printer buffer
  1486.  
  1487.  
  1488. InitPrinter --- Initialize printer, alloc memory
  1489.  
  1490.  
  1491. Calling Sequence:
  1492.            InitPrinter();
  1493.  
  1494. Calls:     int86, VID_puts, CloseUp
  1495.  
  1496. void InitPrinter(void)
  1497.  
  1498.  
  1499. StringToPrinter --- Write a string to printer
  1500.  
  1501.  
  1502. Calling Sequence:
  1503.            StringToPrinter(s);
  1504.  
  1505. Calls:     PutPrinterBuffer
  1506.  
  1507. void StringToPrinter(unsigned char *s)
  1508.  
  1509.  
  1510. CRLFToPrinter --- Write a CR and LF to printer
  1511.  
  1512.  
  1513. Calling Sequence:
  1514.            CRLFToPrinter();
  1515.  
  1516. Calls:     PutPrinterBuffer
  1517.  
  1518. void CRLFToPrinter(void)
  1519.  
  1520.  
  1521. CharToPrinter --- Write a char directly to printer
  1522.  
  1523.  
  1524. Calling Sequence:
  1525.            CharToPrinter(c);
  1526.  
  1527. Calls:     int86
  1528.  
  1529. void CharToPrinter(unsigned char c)
  1530.  
  1531.  
  1532. PutPrinterBuffer --- Put a char into printer buffer
  1533.  
  1534.  
  1535. Calling Sequence:
  1536.            PutPrinterBuffer(c);
  1537.  
  1538. Calls:     none
  1539.  
  1540. void PutPrinterBuffer(unsigned char c)
  1541.  
  1542.  
  1543. SendPrinterBuffer --- Write a char to printer from buffer
  1544.  
  1545.  
  1546. Calling Sequence:
  1547.            SendPrinterBuffer();
  1548.  
  1549. Calls:     CharToPrinter
  1550.  
  1551. void SendPrinterBuffer(void)
  1552.  
  1553. 4.10 File ASYNCM.ASM Modules
  1554.  
  1555.      The modules in this file are written in assembly language for speed and
  1556. portability across various "C" compilers.  Users of this library will not need
  1557. to call any of these routines.  They are all called by Async_Open, described in
  1558. .
  1559.  
  1560.      If you do modify or otherwise need to recompile them, MASM v5.1 or later
  1561. must be used, or any version of TASM.  See make files for command line compile
  1562. options.
  1563.  
  1564. Routines:
  1565.  
  1566. intsetup                       Set interrupt vector offset with current CS
  1567. intserv                        Low level commo interrupt service
  1568. getvec                         Get current interrupt vector
  1569. setvec                         Set interrupt vector (segment and offset)
  1570. inton                          STI
  1571. intoff                         CLI
  1572.  
  1573. 4.11 File PEEKW.ASM Modules
  1574.  
  1575.      The modules in this file are written in assembly language for speed and
  1576. portability across various "C" compilers.  Users of this library will not need
  1577. to call any of these routines.  These routines augment standard library
  1578. routines for accessing and writing to memory.
  1579.  
  1580. Routines:
  1581.  
  1582. peekw                          Move n words from SEG:OFF to DS:BUF
  1583. pokew                          Move n words from DS:BUF to SEG:OFF
  1584. movewords                      Move n words from SEG1:OFF1 to SEG2:OFF2
  1585. memsetw                        Set n words at SEG:OFF to c
  1586. memmovew                       Move n words from SEG:OFF1 to SEG:OFF2
  1587. peekb                          Get 1 byte from SEG:OFF to AL
  1588. pokeb                          Store 1 byte at SEG:OFF
  1589.  
  1590.                         Chapter 5 - Library Maintenance
  1591.  
  1592.      Please see Chapter  for instructions on decompressing the source, make and
  1593. batch files discussed here.
  1594.  
  1595.      Each of the libraries (different memory models) can be created with a
  1596. specific makefile.  A batch file is included for each compiler (see following
  1597. sections) which will set the flags necessary to invoke the correct compiler and
  1598. route the completed library to the correct subdirectory.
  1599.  
  1600.      There is also a batch file for each compiler (MAKEALLT for BorlandC,
  1601. MAKEALLZ for Zortech, MAKEALLQ for QuickC, MAKEALLM for MSC) which will
  1602. recompile each of the memory model libraries.  These batch files can be used
  1603. only if you have DOS 3.3 or later (they use the CALL command within the batch
  1604. file).
  1605.  
  1606.      If you do not use the standard directory layout specified with the
  1607. compiler, you will need to edit the appropriate batch file.
  1608.  
  1609.      The following files are combined into the library and if modified you will
  1610. need to recreate the library.  If you do not have an assembler (WHAT?) you will
  1611. need to extract the 2 object files ASYNCM.OBJ and PEEKW.OBJ from the
  1612. appropriate library file (your compiler, the appropriate memory model .LIB
  1613. file) prior to running the batch file to create the library.  Otherwise the LIB
  1614. command (or TLIB) will not be able to find the object file.  Alternatively you
  1615. could edit the makefile and take out the part of the statement which attempts
  1616. to update these 2 modules in the library.
  1617.  
  1618.            A_INIT.C
  1619.            A_CHAR.C
  1620.            A_HNDSHK.C
  1621.            A_MODEM.C
  1622.            A_STRNG.C
  1623.            A_TIMING.C
  1624.            ASYNCM.ASM
  1625.            PEEKW.ASM
  1626.  
  1627.      For the Digiboard version, the following are combined into the library
  1628. file:
  1629.  
  1630.            D_INIT.C
  1631.            D_CHAR.C
  1632.            D_HNDSHK.C
  1633.            D_MODEM.C
  1634.            D_STRNG.C
  1635.            D_TIMING.C
  1636.            DIGI.C
  1637.            PEEKW.ASM
  1638.  
  1639. 5.1 BorlandC maintenance
  1640.  
  1641.      The batch file is called TMF.BAT.  It utilizes the command line version of
  1642. BorlandC.  If you modify any of the files that are part of the standard library
  1643. type TMF ASYNC ?.  ? is replaced by S for the small memory model, C for compact
  1644. (large data) model, M for medium (large code) model, and L for the Large
  1645. model.  Or use MAKEALLT as described above to recompile every memory model.
  1646.  
  1647.      There is also a batch file called BORLANDC.BAT which sets up the
  1648. environment variables needed in the makefiles.  You will undoubtedly need to
  1649. edit this file because your environment (directories, disks, etc.) will be
  1650. different than ours.
  1651.  
  1652. 5.2 ZORTECH maintenance
  1653.  
  1654.      The batch file is called ZMF.BAT.  If you modify any of the files that are
  1655. part of the standard library type ZMF ASYNC?.  ? is replaced by S for the small
  1656. memory model, C for compact (large data) model, M for medium (large code)
  1657. model, and L for the large (large code and data) model.  Or use MAKEALLZ as
  1658. described above to recompile every memory model.
  1659.  
  1660.      There is also a batch file called ZORTECH.BAT which sets up the
  1661. environment variables needed in the makefiles.  You will undoubtedly need to
  1662. edit this file because your environment (directories, disks, etc.) will be
  1663. different than mine.
  1664.  
  1665. 5.3 QuickC maintenance
  1666.  
  1667.      The batch file is called QMF.BAT.  If you modify any of the files that are
  1668. part of the standard library type QMF ASYNC?.  ? is replaced by S for the small
  1669. memory model, C for compact (large data) model, M for medium (large code)
  1670. model, and L for the large (large code and data) model.  Or use MAKEALLQ as
  1671. described above to recompile every memory model.
  1672.  
  1673.      There is also a batch file called QUICKC.BAT which sets up the environment
  1674. variables needed in the makefiles.  You will undoubtedly need to edit this file
  1675. because your environment (directories, disks, etc.) will be different than
  1676. mine.
  1677.  
  1678.      An additional file is needed for the Microsoft versions: a_printf.c.  This
  1679. file is used to implement a direct video printf routine.
  1680.  
  1681. 5.4 MSC maintenance
  1682.  
  1683.      The batch file is called MMF.BAT.  If you modify any of the files that are
  1684. part of the standard library type MMF ASYNC S.  ? is replaced by S for the
  1685. small memory model, C for compact (large data) model, M for medium (large code)
  1686. model, and L for the large (large code and data) model.  Or use MAKEALLM as
  1687. described above to recompile every memory model.
  1688.  
  1689.      An additional file is needed for the Microsoft versions: a_printf.c.  This
  1690. file is used to implement a direct video printf routine.
  1691.  
  1692.      There is also a batch file called MSC.BAT which sets up the environment
  1693. variables needed in the makefiles.  You will undoubtedly need to edit this file
  1694. because your environment (directories, disks, etc.) will be different than
  1695. mine.
  1696.  
  1697.                          Chapter 6 - DIGIBOARD Software
  1698.  
  1699. 6.1 DIGIBOARD Concepts
  1700.  
  1701.      The Digiboard intelligent communications hardware boards utilize different
  1702. libraries than the standard IBM asynchronous hardware.  These routines are
  1703. found in the files D_*.C, DIGI.C with header files ASCYND.H and M232.H.
  1704.  
  1705.      Use of the routines should be identical to using the normal modules,
  1706. however several special considerations need to be addressed.
  1707.  
  1708.      Upon start up, Async_Init will need to upload the file M232.FCM to each
  1709. board installed in the system (up to 4 boards, 32 ports).  Make sure that this
  1710. file (M232.FCM) is in the same directory as your compiled program.
  1711.  
  1712.      The number of boards installed, total number of ports, and number of ports
  1713. per board need to be set in the header file M232.H.  The library files
  1714. ASYNC?D.LIB on distribution diskette #2 were compiled for 1, 8 port board.  If
  1715. your system is different than this, you will need to recompile the library
  1716. after setting these variables in M232.H.  To recompile the library type:
  1717.  
  1718.      TMF ASYNC S -DDIGI (small memory model, Digiboard, BorlandC)
  1719.      ZMF ASYNCSD ( Zortech)
  1720.      QMF ASYNCSD ( QuickC)
  1721.      MMF ASYNC S DIGI=1 ( MSC)
  1722.  
  1723.      For other memory models, replace S with C, M or L.
  1724.  
  1725.      The utility DATAMOND is the same as DATAMON but configured for use with
  1726. Digiboard hardware.  The make file DATAMOND.M should be used instead of
  1727. DATAMONS.M if you desire to modify the program.  The header file DATAMON.H
  1728. shows how the include file ASYNCD.H is used in place of the normal ASYNC.H if
  1729. Digiboard hardware is present.  The DEFINE variable DIGI is set automatically
  1730. by DATAMOND.M as shown.  Please use these examples when creating your own
  1731. software for use with Digiboard hardware.
  1732.  
  1733. 6.2 Digiboard Hardware Setup
  1734.  
  1735.      The Digiboard hardware can be setup at many different interrupts and port
  1736. locations.  Use of this software as configured requires the following setup.
  1737.  
  1738.  
  1739.  Board #   I/O Port    IRQ      J2      J3      J4      J15     J16      J17
  1740.  
  1741.     1        320      5(J11)    1-2     1-2     1-2     1-2     1-2      2-3
  1742.  
  1743.     2        300      5(J11)    1-2     1-2     2-3     1-2     2-3      2-3
  1744.  
  1745.     3        220      5(J11)    1-2     2-3     1-2     2-3     1-2      2-3
  1746.  
  1747.     4        200      5(J11)    1-2     2-3     2-3     2-3     2-3      2-3
  1748.  
  1749.  
  1750.  
  1751.      See the Digiboard COMi installation manual (page 7) for information on
  1752. jumpering of the I/O port addresses.
  1753.  
  1754. 6.3 DIGI.C
  1755.  
  1756.      User should not modify modules in this file.  There are however several
  1757. handshaking options which are set with routines in this file.  See DATAMON.C
  1758. for an example of setting up incoming hardware flow control.  For further
  1759. information contact us.
  1760.  
  1761. 6.4 D_*.C
  1762.  
  1763.      These files contain all modules which are found in the files a_*.c as
  1764. defined in .  Many of the modules are implemented differently due to the
  1765. special requirements of using the coprocessor on board the Digiboard.  Their
  1766. use remains the same as previously discussed.
  1767.  
  1768.      The one change is that you can not specify the size of the receive or send
  1769. buffers (Async_Open).  They are fixed at 1000 characters.  When calling
  1770. Async_Open you still need to have some value set as in the IBM versions for
  1771. compatilbilty, again see DIGIBOARD.C.
  1772.  
  1773. 6.5 D_BLOCK.C
  1774.  
  1775.  
  1776. Async_Send_Block --- Send a block of data over communications port
  1777.  
  1778.  
  1779. Purpose:   This module retrieves a block of characters from the Digiboard
  1780.            receive buffer.
  1781.  
  1782. Calling Sequence:
  1783.            num = Async_Get_Block(port, unsigned char *data, max);
  1784.  
  1785.            port           port to get chars from
  1786.  
  1787.            data           pointer to area to put block of chars
  1788.  
  1789.            max            maximum number of chars to get
  1790.  
  1791.            num returned with number of characters (words) copied from
  1792.            Digiboard, 0 if no characters retrieved.
  1793.  
  1794. Calls:     None
  1795.  
  1796. int Async_Get_Block(int port, unsigned char *data, max)
  1797.  
  1798.  
  1799. Async_Send_Block --- Send a block of data over communications port
  1800.  
  1801.  
  1802. Purpose:   This module places a block of characters into the Digiboard send
  1803.            buffer.  Useful when a
  1804.  
  1805. Calling Sequence:
  1806.            numsent = Async_Send_Block(port, char *s, num);
  1807.  
  1808.            port           port to send chars to
  1809.  
  1810.            s              string to send
  1811.  
  1812.            num            number of char in block to send
  1813.  
  1814.            numsent returned with number of characters (words) sent to
  1815.            Digiboard, 0 if buffer couldn't hold num.
  1816.  
  1817. Calls:     None
  1818.  
  1819. int Async_Send_Block(int port, unsigned char *s, num)
  1820.  
  1821.                          Chapter 7 - Included Utilities
  1822.  
  1823.      The following sections will describe complete programs developed using the
  1824. modules describe in .  Each of these programs is provided on disk in compiled
  1825. form with all source code included.
  1826.  
  1827.      Each of these modules are useful tools for anyone who uses a personal
  1828. computer.
  1829.  
  1830. 7.1 DATAMON
  1831.  
  1832.      The Datamon program is a very powerful and useful tool when developing new
  1833. software involving communications or anytime two communications devices are
  1834. being connected.
  1835.  
  1836.      The makefile DATAMONS.M (S for small memory model) can be used to recreate
  1837. the program if you desire to modify it.  Use the appropriate batch file for
  1838. your compiler to execute make (i.e. TMF DATAMON S for BorlandC users, see .
  1839. Microsoft users type MMF DATAMON S or QMF DATAMON).  Also see section  for
  1840. information about creating DATAMOND for use with Digiboard hardware.
  1841.  
  1842.      This utility can immediately show whether a "null" modem cable is needed
  1843. and which control voltages are being provided by the other device.  It can also
  1844. be used to determine baud rates, parity, etc.
  1845.  
  1846.      The program shows the status of each hardware handshake line, allows easy
  1847. changing of baud rate, port number, data bits, parity, stop bits.  With one
  1848. function key () it sends the "The quick brown fox... " message.  It can capture
  1849. received data and save the captured data to disk at exit.
  1850.  
  1851.      A very powerful feature is the Auto Baud Detect capability described
  1852. later.  It can, as its name implies, determine and set baud rate, parity and
  1853. number of data bits to match that of incoming data on a line.
  1854.  
  1855.      There are no command line arguments and after starting the program the
  1856. following screen is displayed.
  1857.  
  1858.  
  1859.  
  1860.      The upper window of the screen displays the current status of each of the
  1861. handshake lines.  The DCE STATUS lines are values provided by the device on the
  1862. other end.  The DTE STATUS values are controlled by pressing  (RTS) and  (
  1863. DTR).  They are HIGH when first brought up.  These control signals can only be
  1864. used of course, if the appropriate pin is connected properly to the other
  1865. device.
  1866.  
  1867.      This window also displays the status of the other pertinent communications
  1868. parameters: baud rate, # of data bits, parity, # of stop bits, and which
  1869. communications port.
  1870.  
  1871.      Baud rate is 1200 when first brought up and is changed by pressing .  It
  1872. will vary between 110 and 115200.
  1873.  
  1874.      If you see PARITY, FRAMING, BREAK or OVERRUN displayed those conditions
  1875. are detected.  These conditions, when displayed, are for the last character or
  1876. bit sequence received.
  1877.  
  1878.      Framing and overrun usually means incorrect baud rate selection.  Playing
  1879. with baud rate (),number of data bits and parity in that order will allow you
  1880. to determine appropriate settings for a more permanent program to attach to the
  1881. port.  Also see Auto Baud Detect discussion below.
  1882.  
  1883.      The middle window of the screen will display characters received over the
  1884. communications port.
  1885.  
  1886.      The lower area of the screen displays the use of each of the function
  1887. keys.  These are described here.
  1888.  
  1889.      Pressing  will start capturing received text into a 16K buffer.  Pressing
  1890. it again will discontinue capture.  When you end the session () you will be
  1891. asked for a filename to save the captured text to if desired, or RETURN if you
  1892. don't want it.
  1893.  
  1894.      Pressing  will send the message "The quick brown fox jumped over the lazy
  1895. dog's back.".  This message contains every alphabetic character
  1896.  
  1897.       controls parity.  Values are EVEN, ODD and NONE.
  1898.  
  1899.       controls the number of data bits.  Values are 5, 6, 7 and 8.
  1900.  
  1901.       is for number of stop bits (1 or 2).
  1902.  
  1903.       controls RTS.
  1904.  
  1905.       controls DTR.
  1906.  
  1907.       controls which PORT is being used.  Pressing  will look for another port
  1908. and change to it if it is found.  Values are COM1 through COM4.
  1909.  
  1910.       is used to send a BREAK sequence over the communications line.  This
  1911. signal (hold transmit line at SPACE) is used often to interrupt or otherwise
  1912. signal other processes.
  1913.  
  1914.       turns on Auto Baud Detect.  This is a powerful feature which actually can
  1915. adjust baud rate, number of data bits, and parity to match that of an incoming
  1916. signal.  The word DETECT will appear in reverse video and any line error will
  1917. change parity, data bits or baud rate in an attempt to adjust.  Press  again to
  1918. turn this feature off.  Manual adjustments are allowed when this process is
  1919. taking place so you can help the system out.
  1920.  
  1921.                           SUMMARY OF DATAMON KEY USAGE
  1922.  
  1923.  
  1924.                     CAPTURE text to buffer for later saving to disk.
  1925.  
  1926.                     Send "The quick brown fox ... "
  1927.  
  1928.                     Change BAUD RATE
  1929.  
  1930.                     Change PARITY
  1931.  
  1932.                     Change DATA BITS
  1933.  
  1934.                     Change STOP BITS
  1935.  
  1936.                     Toggle RTS
  1937.  
  1938.                     Toggle DTR
  1939.  
  1940.                     Change PORT
  1941.  
  1942.                     Send BREAK signal
  1943.  
  1944.                     Toggles Auto Baud Detect
  1945.  
  1946.                     QUIT (return to DOS)
  1947.  
  1948.  
  1949.  
  1950.  
  1951. 7.2 SEND and RECV: quick file transfer
  1952.  
  1953.      The combination of SEND and RECV allows rapid transferring of files
  1954. between two computers.  Each of the two uses the XMODEM protocol to insure data
  1955. integrity.
  1956.  
  1957.      The makefile SEND.M (RECV.M for RECV) can be used to recreate the program
  1958. if you desire to modify it.  Use the appropriate batch file for your compiler
  1959. to execute make (i.e. TMF SEND S for BorlandC users, see ).
  1960.  
  1961.      Individual files can be specified or, optionally, a file can be specified
  1962. which contains names of other files (one per line) which are to be
  1963. transferred.  This can also be done in conjunction with specifying individual
  1964. file names.
  1965.  
  1966.      One very powerful use of these utility programs is to specify a file which
  1967. contains names of other files transferred.  To do this first send the file with
  1968. these filenames and then use the file (by preceding its name on the command
  1969. line with an @ symbol) to send the other files.
  1970.  
  1971.      For example, if the file FOO contained the names of three other files:
  1972. FOO1 FOO2 and FOO3 (one filename per line, can include path information) then
  1973. typing on the sending computer.
  1974.  
  1975.      SEND FOO @FOO
  1976.  
  1977.      And on the receiving computer:
  1978.  
  1979.      RECV FOO @FOO
  1980.  
  1981.      Would first transfer the file FOO and then transfer FOO1 FOO2 and FOO3 at
  1982. 19200 baud over COM1 (baud, port can be changed as described below).
  1983.  
  1984.      Other command line options allow specifying baud rate, port, and number of
  1985. stop bits.  Data bits are always 8 and parity is none.  This allows
  1986. transferring binary (executable) files as well as text files.
  1987.  
  1988.      If no command line parameters are specified (or are specified incorrectly)
  1989. the following is displayed:
  1990.  
  1991.  
  1992.  
  1993.      The same message is used for RECV (except of course recv instead of send).
  1994.  
  1995.      The default values are shown bracketed (i.e. COM1, 19200 baud, 1 stop
  1996. bit).  All parameters are optional except at least one filename or FILELIST
  1997. must be specified.
  1998.  
  1999. 7.3 MODEM: complete commo program
  2000.  
  2001.      The MODEM utility is a simple terminal program which can be used to access
  2002. remote databases, etc.  It has built in file transfer capabilities (like SEND
  2003. and RECV) for exchanging files using XMODEM protocol.  It also has a non-error
  2004. correcting protocol which just sends files using the XOFF/XON protocol.  It can
  2005. also CAPTURE data (like DATAMON) and save the data at any time.
  2006.  
  2007.      Upon startup the following screen is displayed:
  2008.  
  2009.  
  2010.  
  2011.      Like TEST.C, characters typed at the keyboard are sent out of the
  2012. communications port and characters received through the communications port are
  2013. displayed on the screen.
  2014.  
  2015.                            Chapter 8 - RS-232 Basics
  2016.  
  2017.                     A Practical Guide to RS-232 Interfacing
  2018.  
  2019.                                    Thanks to:
  2020.                                Lawrence E. Hughes
  2021.  
  2022.      The following information is intended to collect together in one place,
  2023. and explain in relatively simple terms, enough of the details of the RS-232
  2024. standard to allow a technician to construct and/or debug interfaces between any
  2025. two "RS-232 Compatible" devices.  A more detailed coverage of the subject may
  2026. be found in the book "Technical Aspects of Data Communication" by John E.
  2027. McNamara (1977, Digital Press).
  2028.  
  2029.      This guide is necessary due to the casual way that vendors implement "
  2030. RS-232" interfaces, sometimes omitting required signals, requiring optional
  2031. ones, or worse, implementing signals incorrectly.  Due to this, and a lack of
  2032. readily available information about the real EIA standard, there is often
  2033. considerable confusion involved in trying to interface two RS-232 devices.
  2034.  
  2035. 8.1 BACKGROUND
  2036.  
  2037.      RS-232-C is the most recent version of the EIA (Electronics Industry
  2038. Association) standard for low speed serial data communication.  It defines a
  2039. number of parameters concerning voltage levels, loading characteristics and
  2040. timing relationships.  The actual connectors which are almost universally used
  2041. (DB-25P and DB-25S, sometimes called "EIA connectors") are recommended, but not
  2042. mandatory.  Typical practice requires mounting the female (DB-25S) connector on
  2043. the chassis of communication equipment, and male (DB-25P) connectors on the
  2044. cable connecting two such devices.
  2045.  
  2046.      There are two main classes of RS-232 devices, namely DTE (Data Terminal
  2047. Equipment), such as terminals, and DCE (Data Communication Equipment), such as
  2048. modems.  Typically, one only interfaces a DTE to a DCE, as opposed to one DTE
  2049. to another DTE, or one DCE to another DCE, although there are ways to do the
  2050. later two by building non-standard cables.  Rarely if ever are more than two
  2051. devices involved in a given interface (multidrop is not supported).  A serial
  2052. port on a computer may be implemented as either DTE or DCE, depending on what
  2053. type of device it is intended to support.
  2054.  
  2055.      RS-232 is intended for relatively short (50 feet or less), relatively low
  2056. speed (19,200 bits per second or less) serial (as opposed to parallel)
  2057. communications.  Both asynchronous and synchronous serial encoding are
  2058. supported.  As "digital" signals (switched D.C. voltage, such as square waves)
  2059. are used, as opposed to "analog" signals (continuously varying voltage, such as
  2060. sine waves) a very wide bandwidth channel (such as direct wire) is required.  A
  2061. limited bandwidth channel (such as a phone circuit) would cause severe and
  2062. unacceptable distortion and consequent loss of information.
  2063.  
  2064.      RS-232 will support simplex, half-duplex, or full-duplex type channels.
  2065. In a simplex channel, data will only ever be travelling in one direction, e.g.
  2066. from DCE to DTE.  An example might be a "Receive Only" printer.  In a
  2067. half-duplex channel, data may travel in either direction, but at any given time
  2068. data will only be travelling in one direction, and the line must be "turned
  2069. around" before data can travel in the other direction.  An example might be a
  2070. Bell 201 style modem.  In a full-duplex channel, data may travel in both
  2071. directions simultaneously.  An example might be a Bell 103 style modem.
  2072. Certain of the RS-232 "handshaking" lines are used to resolve problems
  2073. associated with these modes, such as which direction data may travel at any
  2074. given instant.
  2075.  
  2076.      If one of the devices involved in an RS-232 interface is a real modem
  2077. (especially a half-duplex modem), the "handshaking" lines must be supported,
  2078. and the timing relationships between them are quite important.  These lines are
  2079. typically much easier to deal with if no modems are involved.  In certain
  2080. cases, these lines may be used to allow one device (which is receiving data at
  2081. a higher rate than it is capable of processing indefinitely) to cause the other
  2082. device to pause while the first one "catches up".  This use of the handshaking
  2083. lines was not really intended by the designers of the RS-232 standard, but it
  2084. is a useful by-product of the way such interfaces are typically implemented.
  2085.  
  2086.      Much of the RS-232 standard is concerned with support of "modems".  These
  2087. are devices which can convert a serial digital data signal into an analog
  2088. signal compatible with a narrow bandwidth (e.g. 3 kHz) channel such as a
  2089. switched telephone circuit, and back into serial digital data on the other
  2090. end.  The first process is called "modulation", and the second process is
  2091. called "demodulation", hence the term "MODEM".  The actual process used (at
  2092. data rates of up to 1200 bits per second) is FSK (Frequency Shift Keying), in
  2093. which a constant frequency sine wave (called the "carrier") is shifted to a
  2094. slightly higher or slightly lower frequency to represent a logic 0 or logic 1,
  2095. respectively.  In a half duplex modem, the entire available bandwidth is used
  2096. for one direction.  In a full duplex modem, the available bandwidth is divided
  2097. into two sub-bands, hence there is both an "originate carrier" (e.g. for data
  2098. from the terminal to the computer), and an "answer carrier" (e.g. for data from
  2099. the computer to the terminal).  The actual frequencies (in Hertz) used on the
  2100. Bell 103A full duplex modem are:
  2101.  
  2102.                           Bell 103A Modem Frequencies
  2103.  
  2104.  
  2105.     Signal         State        Originate                  Answer
  2106.  
  2107.     logic 0        SPACE          1180                      1850
  2108.     carrier                       1080                      1750
  2109.     logic 1        MARK            980                      1650
  2110.  
  2111.  
  2112.  
  2113.  
  2114. 8.2 THE STANDARD CIRCUITS AND THEIR DEFINITIONS
  2115.  
  2116.      For the purposes of the RS-232 standard, a "circuit" is defined to be a
  2117. continuous wire from one device to the other.  There are 25 circuits in the
  2118. full specification, less than half of which are at all likely to be found in a
  2119. given interface.  In the simplest case, a full-duplex interface may be
  2120. implemented with as few as 3 circuits.  There is a certain amount of confusion
  2121. associated with the names of these circuits, partly because there are three
  2122. different naming conventions (common name, EIA circuit name, and CCITT circuit
  2123. name).  The table below lists all three names, along with the circuit number
  2124. (which is also the connector pin with which that circuit is normally associated
  2125. on both ends).  Note that the signal names are from the viewpoint of the DTE
  2126. (e.g. Transmit Data is data being sent by the DTE, but received by the DCE).
  2127.  
  2128.                      RS-232 Pinouts and Signal Descriptions
  2129.  
  2130.  
  2131.   PIN     NAME      EIA   CCITT    DTE DCE   Description
  2132.  
  2133.    1       CG       AA     101       ---     Chassis Ground
  2134.    2       TD       BA     103       -->     Transmit Data
  2135.    3       RD.      BB     104       <--     Receive Data
  2136.    4       RTS      CA     105       -->     Request To Send
  2137.    5       CTS      CB     106       <--     Clear To Send
  2138.    6       DSR      CC     107       <--     Data Set Ready
  2139.    7       SG       AB     102       ---     Signal Ground
  2140.    8       DCD      CF     109       <--     Data Carrier Detect
  2141.   9*                                 <--     Pos. Test Voltage
  2142.   10*                                <--     Neg. Test Voltage
  2143.   11                                         (usually not used)
  2144.   12+     SCDC      SCF    122       <--     Sec. Data Car. Detect
  2145.   13+     SCTS      SCB    121       <--     Sec. Clear To Send
  2146.   14+      STD      SBA    118       -->     Sec. Transmit Data
  2147.   15#      TC       DB     114       <--     Transmit Clock
  2148.   16+      SRD      SBB    119       <--     Sec. Receive Data
  2149.   17#      RC       DD     115        <-     Receive Clock
  2150.   18                                         (not usually used)
  2151.   19+     SRTS      SCA    120       -->     Sec. Request To Send
  2152.   20       DTR      CD     1082      -->     Data Terminal Ready
  2153.   21*      SQ       CG     110       <--     Signal Quality
  2154.   22       RI       CE     125       <--     Ring Indicator
  2155.   23*               CH     111       -->     Data Rate Selector
  2156.                     CI     112       <--     Data Rate Selector
  2157.   24*      XTC      DA     113       -->     Ext. Transmit Clock
  2158.   25*                                -->     Busy
  2159.  
  2160.  
  2161.  
  2162.  
  2163.      In the above, the character following the pin number means:
  2164.  
  2165.      * rarely used + used only if secondary channel implemented # used only on
  2166. synchronous interfaces also, the direction of the arrow indicates which end (
  2167. DTE or DCE) originates each signal, except for the ground lines (---).  For
  2168. example, circuit 2 (TD) is originated by the DTE, and received by the DCE.
  2169. Certain of the above circuits (11, 14, 16, and 18) are used only by (or in a
  2170. different way by) Bell 208A modems.
  2171.  
  2172.      A secondary channel is sometimes used to provide a very slow (5 to 10 bits
  2173. per second) path for return information (such as ACK or NAK characters) on a
  2174. primarily half duplex channel.  If the modem used supports this feature, it is
  2175. possible for the receiver to accept or reject a message without having to "turn
  2176. the line around", a process that usually takes 100 to 200 milliseconds.
  2177.  
  2178.      On the above circuits, all voltages are with respect to the Signal Ground
  2179. (SG) line.  The following conventions are used:
  2180.  
  2181.                           RS-232 Logic Voltage Levels
  2182.  
  2183.  
  2184.      Voltage         Signal        Logic                  Control
  2185.  
  2186.     +3 to +25         SPACE          0                       On
  2187.     -3 to -25         MARK           1                      Off
  2188.  
  2189.  
  2190.  
  2191.  
  2192.      Note that the voltage values are inverted from the logic values (e.g. the
  2193. more positive logic value corresponds to the more negative voltage).  Note also
  2194. that a logic 0 corresponds to the signal name being "true" (e.g. if the DTR
  2195. line is at logic 0, that is, in the +3 to +25 voltage range, then the Data
  2196. Terminal IS Ready).
  2197.  
  2198. 8.3 ELECTRICAL CHARACTERISTICS OF EACH CIRCUIT
  2199.  
  2200.      The following criteria apply to the electrical characteristics of each of
  2201. the above lines:
  2202.  
  2203.      1) The magnitude of an open circuit voltage shall not exceed 25V.  2) The
  2204. driver shall be able to sustain a short to any other wire in the cable without
  2205. damage to itself or to the other equipment, and the short circuit current shall
  2206. not exceed 0.5 ampere.
  2207.  
  2208.      3) Signals shall be considered in the MARK (logic 1) state when the
  2209. voltage is more negative than -3V with respect to the Signal Ground.  Signals
  2210. shall be considered in the SPACE (logic 0) state when the voltage is more
  2211. positive that 3V with respect to the Signal Ground.  The range between -3V and
  2212. 3V is defined as the transition region, within which the signal state is not
  2213. defined.
  2214.  
  2215.      4) The load impedance shall have a DC resistance of less than 7000 ohms
  2216. when measured with an applied voltage of from 3V to 25V but more than 3000 ohms
  2217. when measured with a voltage of less than 25V.
  2218.  
  2219.      5) When the terminator load resistance meets the requirements of Rule 4
  2220. above, and the terminator open circuit voltage is 0V, the magnitude of the
  2221. potential of that circuit with respect to Signal Ground will be in the 5V to
  2222. 15V range.
  2223.  
  2224.      6) The driver shall assert a voltage between -5V and -15V relative to the
  2225. signal ground to represent a MARK signal condition.  The driver shall assert a
  2226. voltage between 5V and 15V relative to the Signal Ground to represent a SPACE
  2227. signal condition.  Note that this rule in conjunction with Rule 3 above allows
  2228. for 2V of noise margin.  Note also that in practice, -12V and 12V are typically
  2229. used.
  2230.  
  2231.      7) The driver shall change the output voltage at a rate not exceeding 30
  2232. volts per microsecond, but the time required for the signal to pass through the
  2233. -3V to +3V transition region shall not exceed 1 millisecond, or 4 percent of a
  2234. bit time, whichever is smaller.
  2235.  
  2236.      8) The shunt capacitance of the terminator shall not exceed 2500
  2237. picofarads, including the capacitance of the cable.  Note that when using
  2238. standard cable with 40 to 50 picofarads per foot capacitance, this limits the
  2239. cable length to no more than 50 feet.  Lower capacitance cable allows longer
  2240. runs.  9) The impedance of the driver circuit under power-off conditions shall
  2241. be greater than 300 ohms.
  2242.  
  2243.      Note that two widely available integrated circuit chips (1488 and 1489)
  2244. implement TTL to RS-232 drivers (4 per chip), and RS-232 receivers to TTL (also
  2245. 4 per chip), in a manner consistent with all of the above rules.
  2246.  
  2247. 8.4 DEFINITION OF THE MOST COMMON CIRCUITS
  2248.  
  2249.      1 CG Chassis Ground
  2250.  
  2251.      This circuit (also called Frame Ground) is a mechanism to insure that the
  2252. chassis of the two devices are at the same potential, to prevent electrical
  2253. shock to the operator.  Note that this circuit is not used as the reference for
  2254. any of the other voltages.  This circuit is optional.  If it is used, care
  2255. should be taken to not set up ground loops.
  2256.  
  2257.      2 TD Transmit Data
  2258.  
  2259.      This circuit is the path whereby serial data is sent from the DTE to the
  2260. DCE.  This circuit must be present if data is to travel in that direction at
  2261. any time.
  2262.  
  2263.      3 RD. Receive Data
  2264.  
  2265.      This circuit is the path whereby serial data is sent from the DCE to the
  2266. DTE.  This circuit must be present if data is to travel in that direction at
  2267. any time.
  2268.  
  2269.      4 RTS Request To Send
  2270.  
  2271.      This circuit is the signal that indicates that the DTE wishes to send data
  2272. to the DCE (note that no such line is available for the opposite direction,
  2273. hence the DTE must always be ready to accept data).  In normal operation, the
  2274. RTS line will be OFF (logic 1 / MARK).  Once the DTE has data to send, and has
  2275. determined that the channel is not busy, it will set RTS to ON (logic 0 /
  2276. SPACE), and await an ON condition on CTS from the DCE, at which time it may
  2277. then begin sending.  Once the DTE is through sending, it will reset RTS to OFF
  2278. (logic 1 / MARK).  On a full-duplex or simplex channel, this signal may be set
  2279. to ON once at initialization and left in that state.  Note that some DCEs must
  2280. have an incoming RTS in order to transmit (although this is not strictly
  2281. according to the standard).  In this case, this signal must either be brought
  2282. across from the DTE, or provided by a wraparound (e.g. from DSR) locally at the
  2283. DCE end of the cable.
  2284.  
  2285.      5 CTS Clear To Send
  2286.  
  2287.      This circuit is the signal that indicates that the DCE is ready to accept
  2288. data from the DTE.  In normal operation, the CTS line will be in the OFF
  2289. state.  When the DTE asserts RTS, the DCE will do whatever is necessary to
  2290. allow data to be sent (e.g.  a modem would raise carrier, and wait until it
  2291. stabilized).  At this time, the DCE would set CTS to the ON state, which would
  2292. then allow the DTE to send data.  When the RTS from the DTE returns to the OFF
  2293. state, the DCE releases the channel (e.g. a modem would drop carrier), and then
  2294. set CTS back to the OFF state.  Note that a typical DTE must have an incoming
  2295. CTS before it can transmit.  This signal must either be brought over from the
  2296. DCE, or provided by a wraparound (e.g. from DTR) locally at the DTE end of the
  2297. cable.
  2298.  
  2299.      6 DSR Data Set Ready
  2300.  
  2301.      This circuit is the signal that informs the DTE that the DCE is alive and
  2302. well.  It is normally set to the ON state by the DCE upon power-up and left
  2303. there.  Note that a typical DTE must have an incoming DSR in order to function
  2304. normally.  This line must either be brought over from the DCE, or provided by a
  2305. wraparound (e.g. from DTR) locally at the DTE end of the cable.  On the DCE end
  2306. of the interface, this signal is almost always present, and may be wrapped back
  2307. around (to DTR and/or RTS) to satisfy required signals whose normal function is
  2308. not required.
  2309.  
  2310.      7 SG Signal Ground
  2311.  
  2312.      This circuit is the ground to which all other voltages are relative.  It
  2313. must be present in any RS-232 interface.
  2314.  
  2315.      8 DCD Data Carrier Detect
  2316.  
  2317.      This circuit is the signal whereby the DCE informs the DTE that it has an
  2318. incoming carrier.  It may be used by the DTE to determine if the channel is
  2319. idle, so that the DTE can request it with RTS.  Note that some DTEs must have
  2320. an incoming DCD before they will operate.  In this case, this signal must
  2321. either be brought over from the DCE, or provided locally by a wraparound (e.g.
  2322. from DTR) locally at the DTE end of the cable.
  2323.  
  2324.      15 TC Transmit Clock
  2325.  
  2326.      This circuit provides the clock for the transmitter section of a
  2327. synchronous DTE.  It may or may not be running at the same rate as the receiver
  2328. clock.  This circuit must be present on synchronous interfaces.
  2329.  
  2330.      17 RC Receiver Clock
  2331.  
  2332.      This circuit provides the clock for the receiver section of a synchronous
  2333. DTE.  It may of may not be running at the same rate as the transmitter clock.
  2334. Note that both TC and RC are sourced by the DCE.  This circuit must be present
  2335. on synchronous interfaces.
  2336.  
  2337.      20 DTR Data Terminal Ready
  2338.  
  2339.      This circuit provides the signal that informs the DCE that the DTE is
  2340. alive and well.  It is normally set to the ON state by the DTE at power-up and
  2341. left there.  Note that a typical DCE must have an incoming DTR before it will
  2342. function normally.  This signal must either be brought over from the DTE, or
  2343. provided by a wraparound (e.g. from DSR) locally at the DCE end of the cable.
  2344. On the DTE side of the interface, this signal is almost always present, and may
  2345. be wrapped back around to other circuits (e.g. DSR, CTS and/or DCD) to satisfy
  2346. required handshaking signals if their normal function is not required.
  2347.  
  2348.      Note that in an asynchronous channel, both ends provide their own internal
  2349. timing, which (as long as they are within 5% of each other) is sufficient for
  2350. them to agree when the bits occur within a single character.  In this case, no
  2351. timing information need be sent over the interface between the two devices.  In
  2352. a synchronous channel, however, both ends must agree when the bits occur over
  2353. possibly thousands of characters.  In this case, both devices must use the same
  2354. clocks.  Note that the transmitter and receiver may be running at different
  2355. rates.  Note also that BOTH clocks are provided by the DCE.  When one has a
  2356. synchronous terminal tied into a synchronous port on a computer via two
  2357. synchronous modems, for example, and the terminal is transmitting, the
  2358. terminal's modem supplies the Transmit Clock, which is brought directly out to
  2359. the terminal at its end, and encodes the clock with the data, sends it to the
  2360. computer's modem, which recovers the clock and brings it out as the Receive
  2361. Clock to the computer.  When the computer is transmitting, the same thing
  2362. happens in the other direction.  Hence, whichever modem is transmitting must
  2363. supply the clock for that direction, but on each end, the DCE device supplies
  2364. both clocks to the DTE device.
  2365.  
  2366.      All of the above applies to interfacing a DTE device to a DCE device.  In
  2367. order to interface two DTE devices, it is usually sufficient to provide a
  2368. "flipped" cable, in which the pairs (TD, RD.), (RTS, CTS) and (DTR, DSR) have
  2369. been flipped.  Hence, the TD of one DTE is connected to the RD. of the other
  2370. DTE, and vice versa.  It may be necessary to wrap various of the handshaking
  2371. lines back around from the DTR on each end in order to have both ends work.  In
  2372. a similar manner, two DCE devices can be interfaced to each other.
  2373.  
  2374.      An RS-232 "breakout box" is particularly useful in solving interfacing
  2375. problems.  This is a device which is inserted between the DTE and DCE.
  2376. Firstly, it allows you to monitor the state of the various handshaking lines
  2377. (light on = signal ON / logic 0), and watch the serial data flicker on TD
  2378. and/or RD.  Secondly, it allows you to break the connection on one or more of
  2379. the lines (with dip-switches), and make any kind of cross-connections and/or
  2380. wraparounds (with jumper wires).  Using this, it is fairly easy to determine
  2381. which lines are not functioning as required, and quickly build a prototype of a
  2382. cable that will serve to interface the two devices.  At this point, the
  2383. breakout box can be removed and a real cable built that performs the same
  2384. function.
  2385.  
  2386.      An example of this kind of device is the Datatran Datatracker available
  2387. from Nordtech Research, Inc.  With many breakout boxes, care has to be taken to
  2388. connect the correct end of it to the DTE device, or the lights and switches do
  2389. not correspond to the actual signals.  But with this device the voltages of the
  2390. two inputs are separated so, for example, if two DTE devices are hooked up to
  2391. it the DTR light on both sides would show a Red light.
  2392.  
  2393.               Chapter 9 - Products/Services from Nordtech Research
  2394.  
  2395. 9.1 Communications Hardware
  2396.  
  2397.      Nordtech Research, Inc. is a distributor of many communications hardware
  2398. products.
  2399.  
  2400.      One of the most useful tools available when developing communications
  2401. software is an RS-232 breakout box.  This device allows monitoring of data and
  2402. control (handshake) lines at the physical level, provides a means of rewiring
  2403. from one line on one side to another on the other side.  By connecting this
  2404. device in line with a serial cable, it becomes a science rather then an art to
  2405. establish communications between two devices.
  2406.  
  2407.      When connecting two computers together, the first question to ask is
  2408. whether they are both DTE devices or if one has a DCE wired port (many serial
  2409. boards for the IBM-PC for example allow setting up as either).  This can be
  2410. easily determined by connecting a breakout box to one of the devices (after the
  2411. software is running) and observing which data line is being "marked" (i.e.
  2412. negative voltage).  If the transmit line (line 2) is being marked it is
  2413. configured as a DTE; receive line (line 3) would indicate that the device is
  2414. configured as DCE.
  2415.  
  2416.      If both devices are DTE (or both DCE) then a "null modem" cable will be
  2417. needed.  Unfortunately many different options need to be resolved.  If you are
  2418. developing the software for both devices, you will have control over the
  2419. hardware and softwarehandshaking.
  2420.  
  2421.      Many times, however, you only have control over one end and won't have
  2422. good specifications for the other end.  A breakout box can determine what, if
  2423. any, handshake is needed by the other end very quickly.  Often you can wire a
  2424. cable that feeds the DTR signal provided by the other computer back to his DSR
  2425. and CTS lines, but this disallows you from stopping his transmission at the
  2426. hardware level.  This may be desirable, however, if you are using a software
  2427. protocol (i.e. XOFF/XON, etc.).
  2428.  
  2429.      Please call for our latest pricing and availability on these and other
  2430. useful testing devices, cabling, modems, etc.  You can count on getting a
  2431. better price from us than the list price usually charged by communications
  2432. specialists.
  2433.  
  2434.                     Nordtech Research, Inc. Current Pricing
  2435.  
  2436.  
  2437.   Manufacturer            Model             List Price          Our Price
  2438.  
  2439.     Datatran               Mini-Tracker           $29.95                $24.95
  2440.                       Mini-Tracker Plus           $49.95                $42.95
  2441.                             Datatracker          $239.95               $195.95
  2442.                              Micropatch           $29.95                $24.95
  2443.                          Gender Menders           $19.95                $14.95
  2444.                    Universal Cable (4")           $39.95                $34.95
  2445.                    Universal Cable (8")           $44.95                $39.95
  2446.                     Standard Cable (4")           $24.95                $19.95
  2447.                     Standard Cable (8")           $29.95                $24.95
  2448.  
  2449.     Digiboard                     Com 4          $479.00               $399.00
  2450.                                   Com 8          $749.00               $625.00
  2451.                                  Com 4i          $985.00               $825.00
  2452.                                  Com 8i         $1195.00               $995.00
  2453.  
  2454.  
  2455.  
  2456.  
  2457.      The mini-tracker and mini-Tracker Plus are simple LED devices which show
  2458. the state of the various signals.  The Mini-Tracker shows the 9 most used
  2459. signals and the Plus version shows all 24 (line 1 not monitored).  The
  2460. Mini-Tracker uses Tri-State LEDs which glow red for negative voltage and green
  2461. for positive.  The Plus has separate LED's for positive and negative voltages
  2462. which can be very helpful in identifying data on a line, especially at higher
  2463. baud rates.
  2464.  
  2465.      The Datatracker is one of the most powerful Breakout Boxes on the market
  2466. today for analyzing RS-232 communications problems.  It not only has 2 LEDs for
  2467. each line, but it separates the DTE side from the DCE side so if both devices
  2468. are actually DTE, both DTR lights would be illuminated.  The device also allows
  2469. breaking each signal and patching it to another line.  For example when you
  2470. have determined that both pieces of hardware are DTE you could patch the DTR on
  2471. one side (line 20) to DSR on the other side (line 6), and vice-versa.  2 would
  2472. go to 3 (xmit to recv), 4 to 5 (CTS to RTS).  This would give complete
  2473. handshake between the two devices.  All other lines would be left connected
  2474. straight across (i.e. 1 and 7).  The Datatracker also has provisions to
  2475. automatically switch lines 2 and 3 (a common need).  It also has optional add
  2476. on devices to test an installed cable (i.e. one that has been run through the
  2477. ceiling down the hall 100 feet (beyond the recommended limit for RS-232!).  By
  2478. attaching the Datatracker to one end of the cable and the optional cable tester
  2479. to the other end, the Datatracker will show which lines are connected and how.
  2480. Call for pricing on the cable tester.
  2481.  
  2482. 9.2 Consulting Services
  2483.  
  2484.      Nordtech Research specializes in communications software development.  Our
  2485. services can be obtained for large and small software development projects and
  2486. for phone questions.
  2487.  
  2488.      Phone questions can be billed to your Visa/MasterCard at the rate of $20
  2489. per 15 minutes (as of June 1988).  Longer term projects can be done on a fixed
  2490. price basis if suitable specifications for the project are available, or on an
  2491. hourly rate of $60/hour (as of June 1988).
  2492.  
  2493.                           Chapter 10 - Version History
  2494.  
  2495.                                   Version 3.0
  2496.  
  2497.      This version adds support for the 16550 UART.  This UART has built in FIFO
  2498. buffers which greatly improve high speed communications reliability.  Even
  2499. though the chip is advertised to be completely compatbile with previous the
  2500. 16450 UART and earlier chips, it would not work with previous versions of the
  2501. toolbox.  The Async_Open function now checks to see if this UART is present and
  2502. sets it up to use the FIFO it is there.
  2503.  
  2504.      Other fixes have been made including a problem with some copies of Version
  2505. 2.9 Borland Large Memory model library.  There were no code fixes, just some
  2506. corrupt files.
  2507.  
  2508.                                   Version 2.9:
  2509.  
  2510.      This version further improves upon the send interrupt handling, especially
  2511. for the 8250 and 82C50 chips.
  2512.  
  2513.      Some 82C50 chips don't seem to ever generate an interrupt when the
  2514. transmit buffer is empty.  To handle this case call Async_Open with the
  2515. transmit buffer size parameter set to 0 and all data is then sent without using
  2516. interrupts.  The data is also not buffered.  See Async_putc.
  2517.  
  2518.      The sendfile function in filexfer (XMODEM Send) has been fixed to work
  2519. when sending to PROCOMM.  It takes a few seconds before data flow begins.
  2520. PROCOMM first trys to use the CRC protocol then trys the CHECKSUM protocol
  2521. which these tools use.
  2522.  
  2523.      The function SendLine is added to the Async_String module.
  2524.  
  2525.      The function SendBlock and GetBlock are added to the Digiboard versions.
  2526.  
  2527.      The function WaitFor is added to the filexfer module.
  2528.  
  2529.      All BorlandC libraries were compiled with BorlandC++ V2.0.  No C++
  2530. capabilities are used.
  2531.  
  2532.      All Microsoft libraries were compiled with MSC 6.0.
  2533.  
  2534.                                   Version 2.8:
  2535.  
  2536.      This version further improves upon the interrupt handling, especially when
  2537. 2 ports are being used simultaneously.  The previous versions had a common
  2538. stack area for all ports and this version creates a separate stack area for
  2539. each port.  It also allows higher priority interrupts to have priority over the
  2540. commo port interrupts.
  2541.  
  2542.      Several new functions have been added (window attributes, a routine to
  2543. check percentage use of the send buffer, etc.).
  2544.  
  2545.      All BorlandC libraries were recompiled with BorlandC C++ version 1.0.
  2546.  
  2547.      The Digiboard version has been overhauled and uses the latest board
  2548. drivers from Digiboard Corporation.  The previous version didn't handle
  2549. hardware handshaking properly.  See DATAMON.C : Open_Commo_Ports() for an
  2550. example of setting up incoming hardware flow control (i.e. handshaking).
  2551.  
  2552.      Many batch and make files were modified to accommodate our new computer
  2553. systems modified environment (i.e. directory structure).  These include:
  2554. TMF.BAT, MMF.BAT, ZMF.BAT, BORLANDC.BAT, MSC.BAT, ZOR.BAT and almost all make
  2555. files (*.m).
  2556.  
  2557.                                   Version 2.7:
  2558.  
  2559.      This version fixed a bug in the interrupt handling which could cause the
  2560. system to hang when characters are being sent and recieved simultaneously.  It
  2561. also added processing of receive errors and BREAK detection via interrupt
  2562. handlers.  It also fixes a potential problem for users who use the DI and SI
  2563. registers (used with optimization turned on in 'C').  They were not being saved
  2564. in the interrupt routine previously.
  2565.  
  2566.      Several routines were added to the windowing package for controlling
  2567. character attributes.
  2568.  
  2569.      It also includes faster code for users of Digiboard products.  FAR
  2570. pointers are used instead of assembly routines to access data in the Digiboard
  2571. memory.
  2572.  
  2573.                                   Version 2.6:
  2574.  
  2575.      This version fixed several bugs in the large code models.
  2576.  
  2577.      It also has several fixes to the filexfer.c module.
  2578.  
  2579.      Several improvements to the quality of the manual.
  2580.  
  2581.                                   Version 2.5:
  2582.  
  2583.      Fixed bugs in modem.c, added print capability for modem.c (ALT-P).  Fixed
  2584. various other minor bugs.
  2585.  
  2586.                                   Version 2.4:
  2587.  
  2588.      Added interrupt driven, buffered SEND modules.  Requires changes to
  2589. previously developed code (add size of send buffer in Async_Open).
  2590.  
  2591.      Fixed Microsoft C bug which caused stack overflow message (fix is in make
  2592. file).
  2593.