home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol266 / gasp.for < prev    next >
Encoding:
Text File  |  1986-05-19  |  3.2 KB  |  105 lines

  1.         SUBROUTINE      GASP(NSET)
  2. C/////////////////////////////////////////////////////////////////////
  3. C/                                                                   /
  4. C/      Program-id.     GASP                                      /
  5. C/      Date-written.   Jan. 16th 1984                               /
  6. C/      File-name.      GASP.FOR                                     /
  7. C/      Remarks.        Subroutine GASP page 34                      /
  8. C/            GASP is the master control routine and       /
  9. C/            is referred to as the GASP executive.         /
  10. C/    Source.        Original GASP was developed at U.S. Steel.   /
  11. C/            GASP II was developed at Arizona State         /
  12. C/            University with FORTRAN IV on IBM 1130 with  /
  13. C/            8K words (16bit one word).             /
  14. C/            Translate to CP/M 8bit computer    by Makoto    /
  15. C/            Yamagiwa (JUG-CP/M No.61) and released to    /
  16. C/            JUGPDS.                         /
  17. C/    Security.    GASP II is a trade mark of Arizona         /
  18. C/            State University, U.S.A. by A. Alan B.       /
  19. C/            Pritsker & Philip J. Kiviat: "Simulation     /
  20. C/            with GASP II", 1969                 /
  21. C/                                                                   /
  22. C/////////////////////////////////////////////////////////////////////
  23. C    * ONE WORD INTEGERS EXCEPT NSET
  24. C       
  25.         INTEGER*4       NSET(6,1)
  26. C
  27.       COMMON /C1/ID,IM,INIT,JEVNT,JMNIT,MFA,MSTOP,MX,MXC,NCLCT,NHIST,
  28.      1           NOQ,NORPT,NOT,NPRMS,NRUN,NRUNS,NSTAT,OUT,SCALE,ISEED,
  29.      2           TNOW,TBEG,TFIN,MXX,NPRNT,NCRDR,NEP,VNQ(4)
  30. C
  31.       COMMON /C2/ATRIB(4),ENQ(4),INN(4),JCELS(5,22),KRANK(4),MAXNQ(4),
  32.      1           MFE(4),MLC(4),MLE(4),NCELS(5),NQ(4),PARAM(20,4),
  33.      2           QTIME(4),SSUMA(10,5),SUMA(10,5),NAME(6),NPROJ,MON,
  34.      3         NDAY,NYR,JCLR
  35. C
  36.         NOT = 0
  37.     1   CALL    DATAN(NSET)
  38. C
  39. C       --- Print out filing array.
  40. C
  41.         JEVNT = 101
  42.         CALL    MONTR(NSET)
  43.         WRITE(NPRNT,403)
  44.   403     FORMAT(1H0,28X,'** Intermediate Results **'//)
  45. C
  46. C       --- Obtain next event which is first entry in file 1.
  47. C           ATRIB(1) is event time, ATRIB(2) is event code.
  48. C
  49.    10   CALL    RMOVE(MFE(1),1,NSET)
  50.         TNOW = ATRIB(1)
  51.         JEVNT = ATRIB(2)
  52. C
  53. C       --- Test to see if this event is a moitor event.
  54. C
  55.         IF (JEVNT - 100) 13,12,6
  56.    13   I = JEVNT
  57. C
  58. C       --- Call programmers event routines.
  59. C
  60.         CALL    EVNTS(I, NSET)
  61. C
  62. C       --- Test methode for stopping
  63. C
  64.         IF (MSTOP) 40,8,20
  65.    40   MSTOP = 0
  66. C
  67. C       --- Test for no summary report.
  68. C
  69.         IF (NORPT) 14,22,42
  70.    20   IF (TNOW - TFIN) 8,22,22
  71.    22   CALL    SUMRY(NSET)
  72.         CALL    OTPUT(NSET)
  73. C
  74. C       --- Test number of runs remaining
  75. C
  76.    42   IF(NRUNS - 1) 14,9,23
  77.    23   NRUNS = NRUNS - 1
  78.         NRUN = NRUN + 1
  79.                              GO TO 1
  80.    14   CALL    ERROR(93,NSET)
  81.     6   CALL    MONTR(NSET)
  82.                       GO TO 10
  83. C
  84. C       --- Reset JMNIT
  85. C
  86.    12      IF(JMNIT) 14,30,31
  87.    30      JMNIT = 1
  88.                        GO TO 10
  89.    31      JMNIT = 0
  90.                         GO TO 10
  91. C
  92. C       --- Test to see if event information is to be printed.
  93. C
  94.     8   IF (JMNIT) 14,10,32
  95.    32   ATRIB(2) = JEVNT
  96.         JEVNT = 100
  97.         CALL    MONTR(NSET)
  98.                         GO TO 10
  99. C
  100. C       --- If all runs are completed return to main program 
  101. C           for instructions.
  102. C
  103.     9   RETURN
  104.         END
  105.