home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / modcomp / uftini. < prev    next >
Text File  |  2020-01-01  |  6KB  |  165 lines

  1.       SUBROUTINE UFTINI
  2. C
  3. C     ****************************************************************
  4. C
  5. C              KERMIT for the MODCOMP MAXIV operating system
  6. C
  7. C        Compliments of:
  8. C
  9. C                         SETPOINT, Inc.
  10. C                      10245 Brecksville Rd.
  11. C                      Brecksville, Ohio 44141
  12. C
  13. C
  14. C      KERMIT is a copyrighted protocol of Columbia Univ. The authors
  15. C      of this version hereby grant permission to copy this software
  16. C      provided that it is not used for an explicitly commercial
  17. C      purpose and that proper credit be given. SETPOINT, Inc. makes
  18. C      no warranty whatsoever regarding the accuracy of this package
  19. C      and will assume no liability resulting from it's use.
  20. C
  21. C     ****************************************************************
  22. C
  23. C     Abstract:  Initialize the UFTs required for the MAX IV Kermit
  24. C                package.
  25. C
  26. C     MODIFICATION HISTORY
  27. C
  28. C     BY            DATE     REASON            PROGRAMS AFFECTED
  29. C
  30. C     ****************************************************************
  31. C
  32. C     Author:  Rick Burke           Version: A.0    Date: Aug-86
  33. C
  34. C     Calling Parameters:  None
  35. C
  36. C     ****************************************************************
  37. C
  38. C     Messages generated by this module :  None
  39. C
  40. C     ****************************************************************
  41. C
  42. C     Subroutines called directly :  BLDUFT, REWIND
  43. C
  44. C     ****************************************************************
  45. C
  46. C     Files referenced :  None
  47. C
  48. C     ****************************************************************
  49. C
  50. C     Local variable definitions :
  51. C
  52. C     DEV1         - Logical device to which KE2 is assigned
  53. C     DEV2         - Logical device to which KE4 is assigned
  54. C     HANOPT       - Handler options word from TASS4
  55. C     LDEVST       - Logical device status returned from TASS4
  56. C     LFNAM        - CAN code of base value of LFN for Kermit I/O
  57. C     RECSIZ       - Record size returned by TASS4
  58. C     SUCCES       - Success indicator of TASS4 calls
  59. C
  60. C     ****************************************************************
  61. C
  62. C     Commons referenced :  KER, KERPAR, and UFTTBL local commons
  63. C
  64. C     ****************************************************************
  65. C
  66. C     (*$END.DOCUMENT*)
  67. C
  68. C     ****************************************************************
  69. C     *                                                              *
  70. C     *         D I M E N S I O N   S T A T E M E N T S              *
  71. C     *                                                              *
  72. C     ****************************************************************
  73. C
  74.       IMPLICIT INTEGER (A-Z)
  75. C
  76. C     ****************************************************************
  77. C     *                                                              *
  78. C     *         T Y P E   S T A T E M E N T S                        *
  79. C     *                                                              *
  80. C     ****************************************************************
  81. C
  82. C
  83. C     ****************************************************************
  84. C     *                                                              *
  85. C     *         C O M M O N   S T A T E M E N T S                    *
  86. C     *                                                              *
  87. C     ****************************************************************
  88. C
  89.       INCLUDE USL/KERCOM
  90.       INCLUDE USL/KERPMC
  91.       INCLUDE USL/UFTTBC
  92. C
  93. C     ****************************************************************
  94. C     *                                                              *
  95. C     *         E Q U I V A L E N C E   S T A T E M E N T S          *
  96. C     *                                                              *
  97. C     ****************************************************************
  98. C
  99. C
  100. C     ****************************************************************
  101. C     *                                                              *
  102. C     *         D A T A   S T A T E M E N T S                        *
  103. C     *                                                              *
  104. C     ****************************************************************
  105. C
  106.       DATA LFNAM /3@KE0/
  107. C
  108. C     ****************************************************************
  109. C
  110. C     Code starts here :
  111. C
  112.       CALL BLDUFT (IUFT(1,1),0,LFNAM+1,4ZA000)
  113.       CALL BLDUFT (IUFT(1,2),0,LFNAM+2,4ZE000)
  114.       CALL BLDUFT (IUFT(1,3),0,LFNAM+3,4ZC280)
  115.       CALL BLDUFT (IUFT(1,4),0,LFNAM+4,4ZD380,0,0,0,4Z8000,0,BLIN(1,1),
  116.      >             132)
  117.       CALL BLDUFT (IUFT(1,5),0,LFNAM+5,4ZA000)
  118.       CALL BLDUFT (IUFT(1,7),0,LFNAM+7,4ZA000)
  119.       CALL BLDUFT (IUFT(1,8),0,LFNAM+8,4ZA000)
  120.       CALL BLDUFT (IUFT(1,9),0,LFNAM+9,4ZA000)
  121.       CALL BLDUFT (IUFT(1,10),0,LFNAM+4,4ZD380,0,0,0,4Z8000,0,BLIN(1,2),
  122.      >             132)
  123. C
  124. C                 NOW REWIND THE DISK FILES WE WILL ACCESS
  125. C
  126.       CALL REW4 (IUFT(1,5))
  127.       CALL REW4 (IUFT(1,8))
  128. C
  129.       CALL WEOF4 (IUFT(1,8))
  130. C
  131. C----->  If the terminal I/O and Kermit I/O ports are pointing
  132. C----->  at the I/O channel then set HOSTON = YES and defer
  133. C----->  issuing a read to KE4 until either a SEND or
  134. C----->  RECEIVE are issued.
  135. C
  136.       CALL TASS4 (IUFT(1,2),SUCCES,LDEVST,RECSIZ,DEV1,HANOPT)
  137.       IF (SUCCES .NE. 1) CALL EXIT
  138.       CALL TASS4 (IUFT(1,4),SUCCES,LDEVST,RECSIZ,DEV2,HANOPT)
  139.       IF (SUCCES .NE. 1) CALL EXIT
  140. C
  141. C----->  Zero out the buffers we will use for Kermit data.
  142. C
  143.       DO 10 I = 1,132
  144.       BLIN(I,1) = 0
  145.       BLIN(I,2) = 0
  146.    10 CONTINUE
  147.       IF (DEV1 .NE. DEV2) GO TO 20
  148. C
  149. C----->  Kermit has been activated from a remote device, so set
  150. C----->  the HOSTON flag and don't queue an initial read.
  151. C
  152.       HOSTON = YES
  153.       CHRCHN = 0
  154.       RETURN
  155.    20 CONTINUE
  156. C
  157. C----->  Kermit has been activated by a local terminal, so issue
  158. C----->  the initial read, in anticipation of incoming data.
  159. C
  160.       HOSTON = NO
  161.       CURCHN = 1
  162.       CALL READ4 (IUFT(1,4),BLIN(1,CURCHN),132,.FALSE.)
  163.       RETURN
  164.       END
  165.