home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / PLINESYS.ZIP / PROTOCOL.SRC < prev    next >
Encoding:
Text File  |  1991-01-09  |  6.2 KB  |  165 lines

  1. // $Header:   D:/SOURCE/PLINE/PROTOCOL/VCS/PROTOCOL.SRV   1.0   30 Nov 1990 16:51:28   TGS  $
  2. //=============================================================================
  3. //
  4. // PereLine Modem Communications Source
  5. // Copyright (c) 1985,1986,1987,1988,1989,1990 PereLine Data Systems, Inc.
  6. // All Rights Reserved.
  7. //
  8. // THIS IS A PROPRIETARY WORK COVERED IN TOTAL BY THE COPYRIGHT LAWS OF
  9. // THE UNITED STATES OF AMERICA.  IT MAY NOT BE COPIED IN PART OR IN WHOLE
  10. // BY ANYONE WITHOUT THE EXPLICIT WRITTEN PERMISSION FROM PERELINE DATA
  11. // SYSTEMS, INC.
  12. //
  13. //============================================================================
  14. // FILE FORMAT
  15. //    COMMENTS:    Double "forward slash" is a comment till EOL
  16. //                  Fields must all be specified.
  17. //
  18. //                  Fields are comma separated, newlines are ignored.
  19. //                      (this implies that more than one field may be on a line)
  20. //
  21. //                  Everything is ignored after the last comma in a line
  22. //                  All characters in a string field are significant up to the comma
  23. //                (including whitespace).  There must be a colon before the protocol
  24. //                name (to mark the beginning of the parameter block).  The end of
  25. //                a parameter block is marked with a semi-colon.
  26. //
  27. //                 More than one name can reference the same information.
  28. //                This is done by placing a block with only the protocol name
  29. //                specified. The next structure defined will be referenced.
  30. //
  31. //        PereLine will fill in the following variables in commands:
  32. //
  33. //            Used only with PereLine protocols:
  34. //            &A = ATTRIBUTES structure pointer
  35. //            &D = Common data area for communication between PL and it's
  36. //            &G = GLOBAL parameters structure pointer
  37. //            &P = PARMS structure pointer
  38. //
  39. //            Used with any external protocol:
  40. //            &a = Current COM port address e.g., 3f8
  41. //            &c = COM port number
  42. //            &b = Communications speed
  43. //            &d = Data bits
  44. //            &f = a list of files to be sent or received
  45. //                 background transfers
  46. //            &h = PereLine communication specific information for XMODEM/KERMIT
  47. //            &i = Current COM port IRQ level
  48. //            &p = Currrent parity setting
  49. //            &s = Stop bits
  50. //
  51. //
  52. //        XMODEM protocols use the following arguments:
  53. //
  54. //                handle    = which comm handle to use
  55. //                serial    = far pointer to serial comm routines
  56. //                 portPCB    = far pointer to serial comm PCB's
  57. //
  58. //                txflag    = 1 for transmit 0 for receive
  59. //
  60. //                 xtype    = one of:
  61. //                     (XMODEM)    0 = XMODEM
  62. //                     (TELINK)    1 = TELINK
  63. //                     (BATCH)        2 = BATCH
  64. //                     (YMODEM)    3 = YMODEM
  65. //                     (YMODEM_B)    4 = YMODEM Batch
  66. //                     (YMODEM_G)    5 = YMODEM G (No Checksum/CRC checking)
  67. // 
  68. //                 crcflag     = 1 for CRC, 0 for CHKSUM
  69. //
  70. //                 PDA         = Far pointer to structure for information exchange
  71. //                            with PereLine.
  72. //                 ATTR     = Far pointer to PereLine attribute structure
  73. //                 GPARM     = Far pointer to PereLine global parameter structure
  74. //                 PARM     = Far pointer to PereLine parameter structure
  75. //                 filelist = far pointer to the filelist or prompt string
  76. //                            make null for receive.
  77. //
  78. //        KERMIT protocol uses the following arguments:
  79. //
  80. //                handle   = which comm handle to use
  81. //                serial   = far pointer to serial comm routines
  82. //                 portPCB  = far pointer to serial comm PCB's
  83. //
  84. //                 txflag   = 1 for transmit 0 for receive
  85. //                PDA      = Far pointer to struct for info exchange with PereLine
  86. //                 ATTR     = Far pointer to PereLine attribute structure
  87. //                 GPARM     = Far pointer to PereLine global parameter structure
  88. //                 PARM     = Far pointer to PereLine parameter structure
  89. //                filelist = pointer to the filelist
  90. // 
  91. //
  92. // 
  93. //////////////////////////////////////////////////////////////////////////////
  94. :ASCII,                                    // Built in protocol
  95. ASC,                                    // Unique identifier for Change command
  96. YES,                                    // YES if PL Protocol NO if External
  97. NO,                                        // YES if Batch NO if not batch
  98. _NULL_,                                    // Receive Command
  99. _NULL_;                                    // Send Command
  100.  
  101. :XMODEM CKSUM,
  102. XMS,                                    // Unique identifier for Change command
  103. YES,                                       // YES if PL Protocol NO if External
  104. NO,                                        // YES if Batch NO if not batch
  105. XM &h 0 0 0 &D &A &G &P &f,                // Receive Command
  106. XM &h 1 0 0 &D &A &G &P &f;                // Send Command
  107.  
  108. :XMODEM CRC,
  109. XMC,                                    // Unique identifier for Change command
  110. YES,                                       // YES if PL Protocol NO if External
  111. NO,                                        // YES if Batch NO if not batch
  112. XM &h 0 0 1 &D &A &G &P &f,                // Receive Command
  113. XM &h 1 0 1 &D &A &G &P &f;                // Send Command
  114.  
  115. :XMODEM Batch,
  116. XMB,                                    // Unique identifier for Change command
  117. YES,                                       // YES if PL Protocol NO if External
  118. YES,                                        // YES if Batch NO if not batch
  119. XM &h 0 2 1 &D &A &G &P,                // Receive Command
  120. XM &h 1 2 1 &D &A &G &P &f;                // Send Command
  121.  
  122.  
  123. :1K-XMODEM,
  124. YMD,                                    // Unique identifier for Change command
  125. YES,                                       // YES if PL Protocol NO if External
  126. NO,                                        // YES if Batch NO if not batch
  127. XM &h 0 3 1 &D &A &G &P &f,                // Receive Command
  128. XM &h 1 3 1 &D &A &G &P &f;                // Send Command
  129.  
  130. :YMODEM,
  131. YMB,                                    // Unique identifier for Change command
  132. YES,                                       // YES if PL Protocol NO if External
  133. YES,                                    // YES if Batch NO if not batch
  134. XM &h 0 4 1 &D &A &G &P,                // Receive Command
  135. XM &h 1 4 1 &D &A &G &P &f;                // Send Command
  136.  
  137. :YMODEM-G,
  138. YMG,                                    // Unique identifier for Change command
  139. YES,                                       // YES if PL Protocol NO if External
  140. YES,                                    // YES if Batch NO if not batch
  141. XM &h 0 5 1 &D &A &G &P,                // Receive Command
  142. XM &h 1 5 1 &D &A &G &P &f;                // Send Command
  143.  
  144. :Telink,
  145. TEL,                                    // Unique identifier for Change command
  146. YES,                                       // YES if PL Protocol NO if External
  147. YES,                                    // YES if Batch NO if not batch
  148. XM &h 0 1 1 &D &A &G &P,                // Receive Command
  149. XM &h 1 1 1 &D &A &G &P &f;                // Send Command
  150.  
  151. :Kermit,
  152. KER,                                    // Unique identifier for Change command
  153. YES,                                       // YES if PL Protocol NO if External
  154. YES,                                    // YES if Batch NO if not batch
  155. KM &h 0 &D &A &G &P,                    // Receive Command
  156. KM &h 1 &D &A &G &P &f;                    // Send Command
  157.  
  158. :ZMODEM (DSZ),
  159. ZMD,                                    // Unique identifier for Change command
  160. NO,                                           // YES if PL Protocol NO if External
  161. YES,                                    // YES if Batch NO if not batch
  162. DSZ CON port &c rz -r,                     // Receive Command
  163. DSZ CON port &c sz -r &f;                // Send Command
  164.  
  165.