Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_3_19910112 - monitor/sched.cref
There are no other files named sched.cref in the archive.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1
SCHED	MAC	 7-Nov-88 20:50	

     1					;[SRI-NIC]SRC:<7.MONITOR>SCHED.MAC.2,  7-Nov-88 17:00:45, Edit by MKL
     2					; v7 merge
     3					;    TTPSRQ is more paranoid about TTY's job and fork information
     4
     5					; Edit= 8816 to SCHED.MAC on 31-Mar-88 by RASPUZZI
     6					;Finally add edit 3080 to prevent ILMNRFs out of terminal PSI handling.
     7					; UPD ID= 8614, RIP:<7.MONITOR>SCHED.MAC.6,  11-Feb-88 18:29:49 by GSCOTT
     8					;TCO 7.1218 - Update copyright date.
     9					; UPD ID= 8444, RIP:<7.MONITOR>SCHED.MAC.5,   4-Feb-88 16:32:32 by GSCOTT
    10					;TCO 7.1210 - Set NOCHKR and NODDMP normally not dumpable.
    11					; UPD ID= 49, RIP:<7.MONITOR>SCHED.MAC.4,  23-Jul-87 08:41:27 by LOMARTIRE
    12					;More of TCO 7.1021 - JRST to CFSDMP since a valid stack may not exist yet
    13					; UPD ID= 42, RIP:<7.MONITOR>SCHED.MAC.3,  15-Jul-87 14:41:36 by LOMARTIRE
    14					;TCO 7.1021 - Add a call to CFSDMP in PISC7 for cluster dump facility
    15					; *** Edit 7473 to SCHED.MAC by RASPUZZI on 1-May-87
    16					; Put in the STKVAR variable that REDIT ate for lunch yesterday so that this
    17					; *&^%$@@$%^& module will compile. If it isn't LINK; MACRO; or DDT; then its
    18					; REDIT
    19					; *** Edit 7471 to SCHED.MAC by RASPUZZI on 30-Apr-87
    20					; Prevent SKDPF1s that occur because of the oversight in edit 7443. Mainly,
    21					; don't use -1 for a class when changing classes for batch jobs.
    22					; *** Edit 7443 to SCHED.MAC by RASPUZZI on 10-Apr-87, for SPR #21273
    23					; Make sure that running batch jobs get put into the new class when the class
    24					; is changed on the fly (reinstall edit 1947 - it got lost)
    25					; *** Edit 7303 to SCHED.MAC by WAGNER on 27-May-86
    26					; Restore code removed in edit 7164 to prevent ILPSEC bughalts. 
    27					; *** Edit 7290 to SCHED.MAC by WAGNER on 28-Apr-86, for SPR #18499
    28					; Fix JSYS trapping code to not trash the JSYS name if an intermediate
    29					; interrupt occurs to the trapped fork. NOTE: This edit is subsequent to edit
    30					; 7232 which was lost in the Code Maintainance process. 
    31					; *** Edit 7229 to SCHED.MAC by MCCOLLUM on 23-Jan-86
    32					; Prevent SKDPF1 BUGHLTs by clearing JOBPNM before ENTSKD in HLTJB: 
    33					; Edit 7164 to SCHED.MAC by WAGNER on 21-Oct-85
    34					; ***PERFORMANCE*** modify scheduler and called routines to be more efficient 
    35					; Edit 7134 to SCHED.MAC by GRANT on 15-Aug-85 (TCO 6-1-1522)
    36					; Turn off the NI at BUGHLT and PAR>SHUT time 
    37					; Edit 7113 to SCHED.MAC by PRATT on 5-Aug-85, for SPR #20684 (TCO 611504)
    38					; CLEAR JOBPNM IN HLTJB1 
    39					; UPD ID= 2180, SNARK:<6.1.MONITOR>SCHED.MAC.168,   5-Jun-85 11:01:39 by MCCOLLUM
    40					;TCO 6.1.1406  - Update copyright notice.
    41					; UPD ID= 2115, SNARK:<6.1.MONITOR>SCHED.MAC.167,   4-Jun-85 13:34:42 by WAGNER
    42					;TCO 6.1.1423 - *** PERFORMANCE *** Dont let MSSCHK get called at LV8CHK
    43					; UPD ID= 1931, SNARK:<6.1.MONITOR>SCHED.MAC.166,   7-May-85 22:17:25 by MCCOLLUM
    44					;TCO 6.1.1238 - Fix more BUG. documentation
    45					; UPD ID= 1852, SNARK:<6.1.MONITOR>SCHED.MAC.165,  30-Apr-85 14:21:23 by MCCOLLUM
    46					;TCO 6.1.1238 - Fix more BUG. documentation
    47					; UPD ID= 1797, SNARK:<6.1.MONITOR>SCHED.MAC.164,  23-Apr-85 13:33:06 by MCCOLLUM
    48					;TCO 6.1.1238 - Fix more BUG. documentation
    49					; UPD ID= 1771, SNARK:<6.1.MONITOR>SCHED.MAC.163,  22-Apr-85 11:57:02 by MCCOLLUM
    50					;TCO 6.1.1238 - Fix BUG. documentation
    51					; UPD ID= 1710, SNARK:<6.1.MONITOR>SCHED.MAC.162,   2-Apr-85 11:04:44 by WAGNER
    52					;TCO 6.1.1304 - Make SKDIDL not overflow into SKDTM0
    53					; UPD ID= 1518, SNARK:<6.1.MONITOR>SCHED.MAC.161,  13-Feb-85 13:53:13 by WAGNER
    54					;TCO 6.1.1197 - Make BKGND1 code charge to IDLE instead of BGND
    55					; UPD ID= 1503, SNARK:<6.1.MONITOR>SCHED.MAC.160,  12-Feb-85 10:02:53 by WAGNER
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-1
SCHED	MAC	 7-Nov-88 20:50	

    56					;TCO 6.1.1188 - Move DDMP and CHKR from SKDLV8 to CLK2CL for Performance
    57					; UPD ID= 1404, SNARK:<6.1.MONITOR>SCHED.MAC.159,  25-Jan-85 08:36:17 by HAUDEL
    58					;TCO 6.1.1156	- Use T1 when testing JOBNO in SKDSJC code.
    59					; UPD ID= 1362, SNARK:<6.1.MONITOR>SCHED.MAC.158,  18-Jan-85 15:21:35 by MOSER
    60					;MORE 6.1.1142 - USE CORRECT LOAD / DEFSTR
    61					; UPD ID= 1356, SNARK:<6.1.MONITOR>SCHED.MAC.157,  17-Jan-85 13:59:45 by MOSER
    62					;6.1.1142 - FIX SUMNR1
    63					; UPD ID= 1216, SNARK:<6.1.MONITOR>SCHED.MAC.156,  18-Dec-84 08:19:19 by HAUDEL
    64					;TCO 6.1.1090 - Change the way SCSPSI is called.
    65					; UPD ID= 1183, SNARK:<6.1.MONITOR>SCHED.MAC.155,  11-Dec-84 14:13:49 by LEACHE
    66					;Change EHLJSB conditional to EXTJSB
    67					; UPD ID= 1023, SNARK:<6.1.MONITOR>SCHED.MAC.154,  10-Nov-84 14:40:20 by PAETZOLD
    68					;TCO 6.1.1039 - Make monitor context MRETNs from XCDSEC work.
    69					; UPD ID= 1005, SNARK:<6.1.MONITOR>SCHED.MAC.153,   7-Nov-84 18:45:12 by MOSER
    70					;MORE 6.2245 - REARRANGE SKDSHK TABLE - SPEED UP APSKED
    71					; UPD ID= 5016, SNARK:<6.MONITOR>SCHED.MAC.152,  26-Oct-84 10:58:51 by LEACHE
    72					;Add code (under EHLJSB conditional) for extended JSB
    73					; UPD ID= 5005, SNARK:<6.MONITOR>SCHED.MAC.151,  25-Oct-84 07:25:31 by GRANT
    74					;In SWHLT, stop the KLIPA
    75					; UPD ID= 4978, SNARK:<6.MONITOR>SCHED.MAC.150,  22-Oct-84 16:32:32 by GRANT
    76					;Remove references to FTCI
    77					; UPD ID= 4952, SNARK:<6.MONITOR>SCHED.MAC.149,  18-Oct-84 14:35:40 by MOSER
    78					;TCO 6.2245 - MAKE SCHEDULER WASTE LESS TIME IN SKDJOB
    79					;CORRECT ACCOUNTING OF LAST THROES AT HLTFK2
    80					;REWRITE NEWST FOR BETTER RESPONSE 
    81					; UPD ID= 4910, SNARK:<6.MONITOR>SCHED.MAC.148,  10-Oct-84 15:50:18 by GLINDELL
    82					;TCO 6.2241 - Call SETPSK before deleting user UPT in HLTFK2
    83					; UPD ID= 4833, SNARK:<6.MONITOR>SCHED.MAC.147,  17-Sep-84 11:22:07 by PURRETTA
    84					;Update copyright notice
    85					; UPD ID= 4772, SNARK:<6.MONITOR>SCHED.MAC.146,  29-Aug-84 13:57:53 by TGRADY
    86					;TCO 6.2202 (QAR 706091) Fix DEBRK code to ERJMP after UMOVE to prevent
    87					; ILMNRF's from extended section user programs.
    88					; UPD ID= 4619, SNARK:<6.MONITOR>SCHED.MAC.145,  28-Jul-84 15:54:17 by MOSER
    89					;TCO 6.2083 - ENHANCE MONBK FACILITY
    90					; UPD ID= 4508, SNARK:<6.MONITOR>SCHED.MAC.144,  12-Jul-84 21:56:44 by TGRADY
    91					;TCO 6.2126 Use Global job number in GETOK% .GOCLS function
    92					; UPD ID= 4336, SNARK:<6.MONITOR>SCHED.MAC.143,  13-Jun-84 21:42:16 by MOSER
    93					;TCO 6.2037 - ADD BLOCKE - GO ECSKED AND BLOCK NOT IBS
    94					; UPD ID= 4324, SNARK:<6.MONITOR>SCHED.MAC.142,  12-Jun-84 13:27:31 by MOSER
    95					;TCO 6.2086 - FIX SHROFN UNMAP INDEX FILE
    96					; UPD ID= 4147, SNARK:<6.MONITOR>SCHED.MAC.141,  26-Apr-84 14:00:47 by MCINTEE
    97					;Change a CAMN to a CAME in SKDRTJ.
    98					; UPD ID= 4091, SNARK:<6.MONITOR>SCHED.MAC.140,  17-Apr-84 16:07:14 by PAETZOLD
    99					;More TCO 6.2032 - Change a TXZE to a TXNE in PIRQ to avoid reseting FKSTA2
   100					; UPD ID= 4083, SNARK:<6.MONITOR>SCHED.MAC.139,  12-Apr-84 15:53:25 by TGRADY
   101					;TCO 6.2032 - Set batch jobs in the dregs using global job number, not local.
   102					; UPD ID= 4064, SNARK:<6.MONITOR>SCHED.MAC.138,  11-Apr-84 15:55:38 by PAETZOLD
   103					;TCO 6.2020 - Save FKSTA2 in PIRQ and restore it in PIRQR.
   104					; UPD ID= 3804, SNARK:<6.MONITOR>SCHED.MAC.137,  29-Feb-84 01:44:52 by TGRADY
   105					;IMPLEMENT GLOBAL JOB NUMBERS
   106					; -IN .TWAKE, CONVERT USER-SUPPLIED JOB NUMBER FROM GLOBAL TO LOCAL.
   107					; -IN SKDRTJ (.SKED), CONVERT USER-SUPPLIED JOB NUMBER FROM GLOBAL TO LOCAL
   108					; -SAME THING FOR SKDSJC...
   109					; UPD ID= 3731, SNARK:<6.MONITOR>SCHED.MAC.136,  22-Feb-84 14:00:35 by MOSER
   110					;TCO 6.1562 CALL SERVER IF REQUESTED IN SHORT CYCLE. REMEMBER IF WE ARE IN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-2
SCHED	MAC	 7-Nov-88 20:50	

   111					; NULL JOB.
   112					; UPD ID= 3731, SNARK:<6.MONITOR>SCHED.MAC.136,  22-Feb-84 14:00:35 by MOSER
   113					;TCO 6.1562 CALL SERVER IF REQUESTED IN SHORT CYCLE. REMEMBER IF WE ARE IN
   114					; NULL JOB.
   115					; UPD ID= 3637, SNARK:<6.MONITOR>SCHED.MAC.135,   1-Feb-84 22:10:26 by MURPHY
   116					;More 6.1525 - Make JSYSes from monitor sections .G. 1 work.
   117					; UPD ID= 3587, SNARK:<6.MONITOR>SCHED.MAC.134,  29-Jan-84 12:11:16 by PAETZOLD
   118					;More TCO 6.1954 - Fix day one J0NRUN and NODDMP bug.
   119					; UPD ID= 3559, SNARK:<6.MONITOR>SCHED.MAC.133,  26-Jan-84 13:58:04 by PAETZOLD
   120					;More TCO 6.1954 - Determine new CHKTIM and DDPTIM in NOCHKR and NODDMP code.
   121					; UPD ID= 3540, SNARK:<6.MONITOR>SCHED.MAC.132,  25-Jan-84 15:15:28 by PAETZOLD
   122					;TCO 6.1954 - Rework NODDMP and NOCHKR code.  Add DDMPNR and CHKRNR BUGHLTs.
   123					; UPD ID= 3514, SNARK:<6.MONITOR>SCHED.MAC.131,  23-Jan-84 15:16:22 by MOSER
   124					;TCO 6.1910 - ALLOW -1 IN PATADR
   125					; UPD ID= 3450, SNARK:<6.MONITOR>SCHED.MAC.130,  12-Jan-84 15:07:45 by PAETZOLD
   126					;TCO 6.1927 - Zero out FKPGS in HLTFK1
   127					; UPD ID= 3446, SNARK:<6.MONITOR>SCHED.MAC.129,  12-Jan-84 14:20:26 by PAETZOLD
   128					;TCO 6.1929 - Change FKJOBN to FKJBN
   129					; UPD ID= 3308, SNARK:<6.MONITOR>SCHED.MAC.128,  13-Dec-83 18:15:00 by PAETZOLD
   130					;TCO 6.1906 - Change J0NRUN to NOCHKR and add NODDMP BUGHLT.
   131					; UPD ID= 3297, SNARK:<6.MONITOR>SCHED.MAC.127,  12-Dec-83 15:58:13 by LOMARTIRE
   132					;TCO 6.1860 - Clear all non-zero sections during logout to prevent hanging
   133					; UPD ID= 3268, SNARK:<6.MONITOR>SCHED.MAC.126,   6-Dec-83 17:33:04 by MOSER
   134					;TCO 6.1827 - PREVENT ILMNRF DURING FORK CREATION
   135					; UPD ID= 3257, SNARK:<6.MONITOR>SCHED.MAC.125,   6-Dec-83 09:22:56 by MOSER
   136					;TCO 6.1825 - MAKE JP%SYS FORKS IMUNE FROM WINDFALL WITHHELD
   137					; UPD ID= 3056, SNARK:<6.MONITOR>SCHED.MAC.124,  21-Oct-83 19:30:51 by MURPHY
   138					;Get JOBNO initialized in FKSET so UCLOCK not confused.
   139					; UPD ID= 2987, SNARK:<6.MONITOR>SCHED.MAC.123,   5-Oct-83 14:08:04 by MURPHY
   140					;TCO 6.1815 - Fix old bugs in .DISMS and SCHEDJ.
   141					; UPD ID= 2864, SNARK:<6.MONITOR>SCHED.MAC.122,  23-Aug-83 15:42:50 by LOMARTIRE
   142					;TCO 6.1767 - Fix .SKBCS function of SKED to loop through all batch jobs
   143					; UPD ID= 2832, SNARK:<6.MONITOR>SCHED.MAC.121,  16-Aug-83 12:03:57 by TGRADY
   144					;TCO 6.1689 - Put JTDEQ back the way it was until the fork tables are completed
   145					; UPD ID= 2800, SNARK:<6.MONITOR>SCHED.MAC.120,   4-Aug-83 00:33:09 by LEACHE
   146					;TCO 6.1737  Add crash-on-fork facility
   147					; UPD ID= 2771, SNARK:<6.MONITOR>SCHED.MAC.119,  27-Jul-83 11:45:24 by MURPHY
   148					;Ditto
   149					; UPD ID= 2766, SNARK:<6.MONITOR>SCHED.MAC.118,  25-Jul-83 17:12:34 by MURPHY
   150					;TCO 6.1751 - SKDJFC - Don't use FX as aobjn pointer.
   151					; UPD ID= 2705, SNARK:<6.MONITOR>SCHED.MAC.117,  19-Jul-83 08:39:26 by MILLER
   152					;TCO 6.1689. Fix JTDEQ not to cause ILMNRF
   153					; UPD ID= 2685, SNARK:<6.MONITOR>SCHED.MAC.116,   7-Jul-83 06:38:03 by HALL
   154					;TCO 6.1689 - Move fork tables to extended section
   155					;	Use DEFSTRs for fork tables
   156					; UPD ID= 2650, SNARK:<6.MONITOR>SCHED.MAC.115,   1-Jul-83 15:22:16 by TAMBURRI
   157					;TCO 6.1712 Remember and use the section number of the current PA1050
   158					; UPD ID= 2638, SNARK:<6.MONITOR>SCHED.MAC.114,  27-Jun-83 16:17:30 by CHALL
   159					;TCO 6.1673 Make FKTMI global
   160					; UPD ID= 2623, SNARK:<6.MONITOR>SCHED.MAC.113,  21-Jun-83 19:38:06 by PAETZOLD
   161					;TCO 6.1669 - Get rid of HPSCHKs for now.
   162					; UPD ID= 2552, SNARK:<6.MONITOR>SCHED.MAC.112,   2-Jun-83 22:26:54 by MURPHY
   163					;More - must have EA.ENTs in routines called from outside.
   164					; UPD ID= 2547, SNARK:<6.MONITOR>SCHED.MAC.111,  31-May-83 16:46:14 by MURPHY
   165					;More 6.1525 - Move class sched data to extended section.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-3
SCHED	MAC	 7-Nov-88 20:50	

   166					; UPD ID= 2486, SNARK:<6.MONITOR>SCHED.MAC.110,  18-May-83 11:51:49 by MURPHY
   167					;TCO 6.1660 - Remove RTMIN, RTMAX stuff in AJBALS.
   168					; UPD ID= 2423, SNARK:<6.MONITOR>SCHED.MAC.108,   5-May-83 13:56:54 by RIZZOLO
   169					; Change .DEBRK:+5/SETPCS [MSEC1,,0] to be an AC.
   170					; UPD ID= 2422, SNARK:<6.MONITOR>SCHED.MAC.107,   5-May-83 11:16:04 by MURPHY
   171					;More 6.1635 - Make sure environment right at PSII.
   172					; UPD ID= 2410, SNARK:<6.MONITOR>SCHED.MAC.106,   3-May-83 16:11:51 by COBB
   173					;TCO 6.1639 - ?s in PRINTX messages...
   174					; UPD ID= 2386, SNARK:<6.MONITOR>SCHED.MAC.105,  29-Apr-83 15:18:13 by MCINTEE
   175					;TCO 6.1630 - Change MONBK/PSIMB
   176					; UPD ID= 2372, SNARK:<6.MONITOR>SCHED.MAC.104,  29-Apr-83 14:22:46 by MURPHY
   177					;TCO 6.1635 -Use MONENV instead of MONFLG to include PCU and PCS values.
   178					; UPD ID= 2370, SNARK:<6.MONITOR>SCHED.MAC.102,  28-Apr-83 17:12:34 by MURPHY
   179					;Fix bug in UPD ID 1791 - PCS must be exactly 1 in DEBRK so BLT works.
   180					; UPD ID= 2341, SNARK:<6.MONITOR>SCHED.MAC.101,  25-Apr-83 20:12:14 by MCLEAN
   181					;TCO 6.1624. UU1050 HAS PCU IN  PC WORD
   182					; UPD ID= 2269, SNARK:<6.MONITOR>SCHED.MAC.100,  13-Apr-83 13:02:18 by MILLER
   183					;Conce more on the previous edit
   184					; UPD ID= 2268, SNARK:<6.MONITOR>SCHED.MAC.99,  13-Apr-83 12:49:06 by MILLER
   185					;TCO 6.1610. Call CFONLT when requested
   186					; UPD ID= 2259, SNARK:<6.MONITOR>SCHED.MAC.98,  13-Apr-83 08:43:50 by MCINTEE
   187					;stray character
   188					; UPD ID= 2257, SNARK:<6.MONITOR>SCHED.MAC.97,  13-Apr-83 08:31:13 by MCINTEE
   189					;Remove the last occurrence of FTNSPSRV
   190					; UPD ID= 2244, SNARK:<6.MONITOR>SCHED.MAC.96,  12-Apr-83 13:14:48 by MCINTEE
   191					;Remove IFNDEF FTNSPSRV
   192					; UPD ID= 2123, SNARK:<6.MONITOR>SCHED.MAC.95,  31-Mar-83 15:52:21 by HALL
   193					;TCO 6.1502 - Allow free space in extended sections
   194					;	Added an EA.ENT to SAVRT to cover its call to UCLOCK
   195					; UPD ID= 2105, SNARK:<6.MONITOR>SCHED.MAC.94,  28-Mar-83 17:46:51 by MURPHY
   196					;Remove MONPC and MONFL no longer used.
   197					; UPD ID= 2011, SNARK:<6.MONITOR>SCHED.MAC.93,  16-Mar-83 14:14:22 by MOSER
   198					;TCO 6.1375 - PREVENT JOBS STUCK ON DREGS QUEUE AFTER REMOVAL
   199					; UPD ID= 1962, SNARK:<6.MONITOR>SCHED.MAC.91,  10-Mar-83 15:07:10 by MURPHY
   200					;Handle second PSB page consistently with first.  Change name to FKPS2.
   201					; UPD ID= 1936, SNARK:<6.MONITOR>SCHED.MAC.90,   7-Mar-83 23:19:49 by CDUNN
   202					;MORE TCO 6.1127 - Make SCS% JSYS locs in PSB external (for now) to clean up
   203					;compile and syms end up in GLOBS.
   204					; UPD ID= 1933, SNARK:<6.MONITOR>SCHED.MAC.89,   7-Mar-83 22:40:50 by CDUNN
   205					;More TCO 6.1127 - Make PSITR1 global such that SCSPSI: (in SCSJSY)
   206					;can return there.
   207					; UPD ID= 1925, SNARK:<6.MONITOR>SCHED.MAC.88,   7-Mar-83 20:44:07 by CDUNN
   208					;Make default monitor load KLIPA code
   209					; UPD ID= 1915, SNARK:<6.MONITOR>SCHED.MAC.87,   3-Mar-83 14:24:30 by CDUNN
   210					;More TCO 6.1127 - Add code to PIRQ to take entries off SCS% work Q and place
   211					;on fork and CB queues for user mode SYSAP.
   212					; UPD ID= 1881, SNARK:<6.MONITOR>SCHED.MAC.86,  27-Feb-83 22:07:09 by MURPHY
   213					;Revise 6.1514 - Add ERJMPS and ERCALS handling. ERJMPR and ERCALR too.
   214					; UPD ID= 1851, SNARK:<6.MONITOR>SCHED.MAC.85,  22-Feb-83 08:47:17 by LEAPLINE
   215					;Remove conditional for KLNI. Call has been added to LV8CHK.
   216					; UPD ID= 1849, SNARK:<6.MONITOR>SCHED.MAC.84,  21-Feb-83 17:22:19 by MURPHY
   217					;Refine previous edit a bit.
   218					; UPD ID= 1846, SNARK:<6.MONITOR>SCHED.MAC.83,  21-Feb-83 00:45:14 by MURPHY
   219					;TCO 6.1517 - ITRSIM handle interal call.
   220					; UPD ID= 1837, SNARK:<6.MONITOR>SCHED.MAC.82,  20-Feb-83 20:25:08 by MURPHY
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-4
SCHED	MAC	 7-Nov-88 20:50	

   221					;TCO 6.1514 - Don't clobber user AC1 if taking ERJMP/ERCAL.
   222					;More 6.1472 - Adjust mousetraps in MENTR, etc.
   223					; UPD ID= 1791, SNARK:<6.MONITOR>SCHED.MAC.81,  11-Feb-83 16:45:52 by MURPHY
   224					;TCO 6.1472 - Don't clear CRSKED in ITRAP.
   225					; Revise BUGHLTs and BUGCHKs in ITRAP; require ERJMP after nested JSYS calls.
   226					; UPD ID= 1639, SNARK:<6.MONITOR>SCHED.MAC.80,  11-Jan-83 15:19:27 by MCINTEE
   227					;Remove edits 1609,1616,1620 - do it in SCJSYS
   228					; UPD ID= 1631, SNARK:<6.MONITOR>SCHED.MAC.79,   7-Jan-83 15:53:25 by MURPHY
   229					;TCO 6.1447 - More settable scheduler parameters
   230					; UPD ID= 1620, SNARK:<6.MONITOR>SCHED.MAC.78,   5-Jan-83 20:20:31 by NICHOLS
   231					;Typo in previous edit, again
   232					; UPD ID= 1616, SNARK:<6.MONITOR>SCHED.MAC.77,   4-Jan-83 13:46:11 by MCINTEE
   233					;Typo in previous edit.
   234					; UPD ID= 1609, SNARK:<6.MONITOR>SCHED.MAC.76,   3-Jan-83 09:01:53 by MCINTEE
   235					;Add code to PDBK1 to avoid losing SCJSYS wakeups. (under IFE FTNSPSRV)
   236					; UPD ID= 1583, SNARK:<6.MONITOR>SCHED.MAC.75,  27-Dec-82 17:49:11 by LEAPLINE
   237					;Add KLNI scheduler test.
   238					; UPD ID= 1564, SNARK:<6.MONITOR>SCHED.MAC.74,  22-Dec-82 12:58:38 by MCINTEE
   239					;Change PSIRQ's NOSKED to check for PI in progress.
   240					; UPD ID= 1563, SNARK:<6.MONITOR>SCHED.MAC.73,  22-Dec-82 07:36:44 by MCINTEE
   241					;MORE TCO 6.1391 - MAKE ILUUO1 A GLOBAL !! SINCE IT IS IN GLOBS
   242					; UPD ID= 1560, SNARK:<6.MONITOR>SCHED.MAC.72,  21-Dec-82 15:39:22 by MOSER
   243					;TCO 6.1391 - NEW ENTRY FOR ILUUO IF ALREADY IN JSYS CONTEXT
   244					; UPD ID= 1542, SNARK:<6.MONITOR>SCHED.MAC.70,  20-Dec-82 19:26:03 by NICHOLS
   245					;Move DECnet-36 scheduler calls from SCHED to STG
   246					;Feature test some more NSPSRV code
   247					; UPD ID= 1540, SNARK:<6.MONITOR>SCHED.MAC.69,  20-Dec-82 17:45:24 by NICHOLS
   248					;Add FTNSPSRV to distinguish between release 6.0 and 6.1
   249					;Change BITWAI to use FORKX instead of requiring caller to pass fork number
   250					; UPD ID= 1532, SNARK:<6.MONITOR>SCHED.MAC.68,  11-Dec-82 17:15:15 by PAETZOLD
   251					;Delete pre release 5 edit history.  Update copyright.
   252					; UPD ID= 1531, SNARK:<6.MONITOR>SCHED.MAC.67,  11-Dec-82 17:08:40 by PAETZOLD
   253					;TCO 6.1413 - Add CSKBUG BUGHLT to detect excessive ECSKEDs
   254					; UPD ID= 1346, SNARK:<6.MONITOR>SCHED.MAC.66,  18-Oct-82 12:38:54 by MOSER
   255					;TCO 6.1310 - LOOK AT NBPROC INSTEAD OF NGOJOB WHEN DETERMINING IDLE
   256					; UPD ID= 1337, SNARK:<6.MONITOR>SCHED.MAC.65,  13-Oct-82 18:10:52 by MILLER
   257					;tco 6.1000. PSI code has new conventions for saving and changing PC variables
   258					; UPD ID= 1302, SNARK:<6.MONITOR>SCHED.MAC.64,   8-Oct-82 15:13:19 by MURPHY
   259					;MORE 5.1.1075 - Make bias 11 same as release 4.
   260					; UPD ID= 1223, SNARK:<6.MONITOR>SCHED.MAC.63,  23-Sep-82 18:06:34 by MURPHY
   261					;TCO 6.1280 - Revisions to NEWST.
   262					; UPD ID= 1168, SNARK:<6.MONITOR>SCHED.MAC.62,  13-Sep-82 12:53:11 by MOSER
   263					;TCO 6.1246 - PREVENT ILMNRF WHEN JSYS TRAPPING
   264					; UPD ID= 1163, SNARK:<6.MONITOR>SCHED.MAC.61,  10-Sep-82 14:56:54 by MILLER
   265					;One more time
   266					; UPD ID= 1160, SNARK:<6.MONITOR>SCHED.MAC.60,  10-Sep-82 13:51:29 by MILLER
   267					;TCO 6.1259. Make PIRLGO force reinit fo stack at FLOGO
   268					; UPD ID= 1109, SNARK:<6.MONITOR>SCHED.MAC.59,  25-Aug-82 08:12:04 by MCINTEE
   269					;TCO 6.1030 - Make BITCLR & BITSET global
   270					; UPD ID= 1102, SNARK:<6.MONITOR>SCHED.MAC.58,  20-Aug-82 13:19:51 by MCINTEE
   271					;TCO 6.1030 - Make SKDLCY & SKDSCY global
   272					; UPD ID= 1099, SNARK:<6.MONITOR>SCHED.MAC.57,  19-Aug-82 14:34:46 by MCINTEE
   273					;TCO 6.1030 - DAP% JSYS - Fix up FKDAP, and calls to it.
   274					;  dismiss routine (BITWAI) and scheduler test routines (BITCLR, BITSET)
   275					; UPD ID= 1005, SNARK:<6.MONITOR>SCHED.MAC.56,  27-Jul-82 15:07:38 by COBB
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-5
SCHED	MAC	 7-Nov-88 20:50	

   276					;TCO 6.1193 - Put Call to NBNSB under SKEDSW conditional, make NSBTAB
   277					;bigger (100 decimal words from 20)
   278					; UPD ID= 996, SNARK:<6.MONITOR>SCHED.MAC.55,  19-Jul-82 13:26:33 by MCINTEE
   279					;Typo in previous edit...
   280					; UPD ID= 975, SNARK:<6.MONITOR>SCHED.MAC.54,   6-Jul-82 12:57:24 by MCINTEE
   281					;More TCO 6.1030 - DAP% JSYS - Add routine for DAP action interrupt (FKDAP),
   282					;  dismiss routine (BITWAI) and scheduler test routines (BITCLR, BITSET)
   283					; UPD ID= 960, SNARK:<6.MONITOR>SCHED.MAC.53,  24-Jun-82 13:40:24 by HALL
   284					;TCO 6.1000 - Support the 2080
   285					;	Use new kind of LDPAC and STPAC in JSYS entry and exit for KC
   286					; UPD ID= 955, SNARK:<6.MONITOR>SCHED.MAC.52,  22-Jun-82 15:55:18 by MURPHY
   287					;More 6.1160 - Replace WATCH tag lost in previous edit.
   288					; UPD ID= 938, SNARK:<6.MONITOR>SCHED.MAC.51,  16-Jun-82 14:14:32 by MURPHY
   289					;More 6.1160 - Discount load average by holding forks.
   290					; UPD ID= 889, SNARK:<6.MONITOR>SCHED.MAC.50,   9-Jun-82 18:27:04 by MURPHY
   291					;More 6.1160
   292					; UPD ID= 887, SNARK:<6.MONITOR>SCHED.MAC.49,   9-Jun-82 16:51:39 by MURPHY
   293					;TCO 6.1147 - Move bugdefs from BUGS.MAC to here and put them in-line.
   294					; UPD ID= 885, SNARK:<6.MONITOR>SCHED.MAC.48,   9-Jun-82 16:29:49 by MURPHY
   295					;TCO 6.1160 - Account IDLE time correctly.
   296					; UPD ID= 881, SNARK:<6.MONITOR>SCHED.MAC.47,   9-Jun-82 15:09:15 by MURPHY
   297					;Fix bug introduced in 6.1125 - NBWT going negative.
   298					; UPD ID= 822, SNARK:<6.MONITOR>SCHED.MAC.46,   3-Jun-82 13:24:05 by HALL
   299					;A few comments in the software interrupt code
   300					; UPD ID= 798, SNARK:<6.MONITOR>SCHED.MAC.45,  29-May-82 16:04:16 by HALL
   301					;TCO 6.1000 - Support the 2080
   302					;	Use LDPAC. and STPAC. to save and restore user AC's
   303					;	At MENT1, get section number using defstr rather than half-word instruction
   304					;	Fix previous edit to ITRAP to diddle P correctly
   305					; UPD ID= 761, SNARK:<6.MONITOR>SCHED.MAC.44,  18-May-82 14:59:45 by HALL
   306					;TCO 6.1000 - Support the 2080
   307					;	In PSI code, clean up setting of user context in flags word
   308					; UPD ID= 756, SNARK:<6.MONITOR>SCHED.MAC.43,  15-May-82 13:44:31 by HALL
   309					;TCO 6.1000 - Support the 2080
   310					;	MENTU - Make TRAPSI run in section 1
   311					;	MENT1 - Set PCS in new flags word
   312					;	ITRAP - Save fixed-up stack pointer in MPP for MRETN
   313					;	PSIS5 - When returning flag word in LEVTAB, return only the flag bits
   314					;	SCDIN - Provide reasonable initial value for INSKED
   315					;	DEBRK JSYS - Preserve only flags when comparing new and old flags words,
   316					;		set previous context correctly on entry
   317					;	JTENQ - Save flags from ENSKR instead of left half of CX
   318					;	MRETN - Remove clearing of QUOTAB (appears never to be set)
   319					; UPD ID= 744, SNARK:<6.MONITOR>SCHED.MAC.42,  13-May-82 13:52:03 by HALL
   320					;TCO 6.1000 - Support the 2080
   321					;	Move IMCFLG to PROLOG with other bits
   322					; UPD ID= 712, SNARK:<6.MONITOR>SCHED.MAC.41,   9-May-82 14:35:55 by HALL
   323					;TCO 6.1000 - Support the 2080
   324					;	Make UUO and RMS entry get op code and AC from the right place
   325					; UPD ID= 705, SNARK:<6.MONITOR>SCHED.MAC.40,   9-May-82 12:59:06 by HALL
   326					;TCO 6.1000 - Support the 2080
   327					;	SCDIN - Initialize new flags word in RSKCHK block; Make RSCCHK point
   328					;		to section 1
   329					;	PISC7 - Set AC blocks only on KL. Check for GOUSR only on KL. Fix new
   330					;		flags word for XJEN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-6
SCHED	MAC	 7-Nov-88 20:50	

   331					;	SCHED0 - Change inline XJRSTF to use XJRST; add AC blocks to new
   332					;		flags word for starting at PIRQ
   333					;	FKSET - Initialize PIPC block new flags word to set AC blocks, do same
   334					;		for PIFL, make new flags word include user AC block
   335					;	PIRQR - Initialize PFL correctly if going to WFORKA
   336					;	PIRSFK - Set AC blocks in PIFL when fork is in JSYS trap queue wait
   337					;	PIRLGO - Set AC blocks in PIFL when sending fork to FLOGO
   338					;	PSII - At PSIS9, don't clear right half of flags for the KC; at PSIMB,
   339					;		set AC blocks in PIFL; at PSISM, set AC blocks in PIFL when
   340					;		forcing user mode; at PSIS4 preserve rest of flags word when
   341					;		setting PCU and PCS.
   342					;	PSISV1 AND PSISV0 - Put DATAO PAG under KL conditional
   343					;	DEBRK - Preserve right half of flags word from JSYS entry when returning
   344					;		control to the user. Clear right half of flags word when
   345					;		comparing with LEVTAB; preserve rest of flags word when setting
   346					;		PCU and PCS.
   347					;	Add KIMOAC to SAVCT table for the KC
   348					;	GOUSR - Put DATAO under KL conditional
   349					; UPD ID= 691, SNARK:<6.MONITOR>SCHED.MAC.39,   5-May-82 00:09:54 by CDUNN
   350					;TCO 6.1127 - Add CISRV asyncronous event simulation code to SKDLV8
   351					; UPD ID= 688, SNARK:<6.MONITOR>SCHED.MAC.38,   4-May-82 18:01:52 by MURPHY
   352					;TCO 6.1125 - Scheduler tests called with CALL instead of JSP.
   353					; UPD ID= 671, SNARK:<6.MONITOR>SCHED.MAC.37,  29-Apr-82 12:31:15 by MURPHY
   354					;Put HPSCHK back in.
   355					; UPD ID= 511, SNARK:<6.MONITOR>SCHED.MAC.36,  16-Mar-82 20:06:34 by PAETZOLD
   356					;TCO 6.1070 - Remove SCTLW definition
   357					; UPD ID= 502, SNARK:<6.MONITOR>SCHED.MAC.35,  15-Mar-82 17:50:08 by COBB
   358					;TCO 5.1754 - CHECK ARGS WHEN SETTING NEW CLASS FOR SKED JSYS
   359					; UPD ID= 405, SNARK:<6.MONITOR>SCHED.MAC.34,  15-Feb-82 16:46:45 by MURPHY
   360					;TCO 5.1730 - Restore lost flags, fix APSKED.
   361					; UPD ID= 371, SNARK:<6.MONITOR>SCHED.MAC.33,   1-Feb-82 19:05:18 by MILLER
   362					;TCO 6.1059. Treat BSCRSK and PIBMP the same as JP%SYS
   363					; UPD ID= 370, SNARK:<6.MONITOR>SCHED.MAC.32,   1-Feb-82 16:02:33 by MILLER
   364					; UPD ID= 368, SNARK:<6.MONITOR>SCHED.MAC.31,   1-Feb-82 13:42:25 by MILLER
   365					;Fix missing ENDIF. in previous edit
   366					; UPD ID= 366, SNARK:<6.MONITOR>SCHED.MAC.30,   1-Feb-82 12:56:38 by MILLER
   367					;TCO 6.1059 AGAIN. Give JP%SYS forks a little less of a boost
   368					; UPD ID= 364, SNARK:<6.MONITOR>SCHED.MAC.29,  30-Jan-82 16:09:41 by HALL
   369					;More on TCO 6.1000 - removing PCU from JSTAB broke JSYS trapping
   370					; UPD ID= 349, SNARK:<6.MONITOR>SCHED.MAC.28,  25-Jan-82 14:02:03 by MILLER
   371					;TCO 6.1059 once more.
   372					; UPD ID= 348, SNARK:<6.MONITOR>SCHED.MAC.27,  25-Jan-82 13:17:09 by MILLER
   373					;TCO 6.1059. CORFCT fixes
   374					; UPD ID= 346, SNARK:<6.MONITOR>SCHED.MAC.26,  24-Jan-82 23:49:52 by MURPHY
   375					;TCO 5.1697 - XSSEV%, etc.  Handle extended entry vectors in UU1050, DMSENT.
   376					; UPD ID= 335, SNARK:<6.MONITOR>SCHED.MAC.25,  21-Jan-82 11:57:49 by LEACHE
   377					;For now, turn off HPSCHK - It's polluting CTY and ERROR.SYS
   378					; UPD ID= 326, SNARK:<6.MONITOR>SCHED.MAC.23,  19-Jan-82 15:14:43 by MILLER
   379					;TCO 5.1689. Fix run time guarantee
   380					; UPD ID= 306, SNARK:<6.MONITOR>SCHED.MAC.22,  16-Jan-82 13:52:13 by PAETZOLD
   381					;TCO 5.1680 - fix TCO 5.1658
   382					; UPD ID= 287, SNARK:<6.MONITOR>SCHED.MAC.21,   8-Jan-82 16:40:51 by MURPHY
   383					;TCO 5.1660 - Tags in MENTR, MRETN for JSLOOK program.
   384					; UPD ID= 281, SNARK:<6.MONITOR>SCHED.MAC.20,   7-Jan-82 21:46:22 by PAETZOLD
   385					;TCO 5.1658 - preserve PIFL in carrier off interrupt requests in PIRCOF and PIRLG1
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-7
SCHED	MAC	 7-Nov-88 20:50	

   386					; UPD ID= 213, SNARK:<6.MONITOR>SCHED.MAC.19,  18-Nov-81 17:43:55 by MURPHY
   387					;TCO 5.1615 - MAKE SETPCV INTERNAL
   388					; UPD ID= 208, SNARK:<6.MONITOR>SCHED.MAC.18,  13-Nov-81 13:10:31 by HALL
   389					;TCO 6.1000 - Load full word from JSTAB in IMCLL0 code.
   390					;	Clean up some comments
   391					; UPD ID= 187, SNARK:<6.MONITOR>SCHED.MAC.17,   5-Nov-81 17:34:59 by HALL
   392					;TCO 6.1000 - Clean up JSYS entry, necessary for 2080
   393					;	Assume JSTAB doesn't contain flags. Microcode sets PCU
   394					;	Save some code at MENTM
   395					; UPD ID= 179, SNARK:<6.MONITOR>SCHED.MAC.16,  31-Oct-81 14:43:29 by PAETZOLD
   396					;More TCO 6.1010 - Change CST3 references
   397					; UPD ID= 175, SNARK:<6.MONITOR>SCHED.MAC.15,  30-Oct-81 14:59:36 by MURPHY
   398					;Make HPSCHK less sensitive.
   399					; UPD ID= 158, SNARK:<6.MONITOR>SCHED.MAC.14,  22-Oct-81 16:22:17 by MURPHY
   400					;Ditto
   401					; UPD ID= 157, SNARK:<6.MONITOR>SCHED.MAC.13,  22-Oct-81 11:37:49 by MURPHY
   402					;Fix bug in 5.1428
   403					; UPD ID= 108, SNARK:<6.MONITOR>SCHED.MAC.12,  15-Oct-81 13:29:37 by SCHMITT
   404					;Reinsert TCO 5.1419 but check JOBRT instead of JOBDIR
   405					; UPD ID= 103, SNARK:<6.MONITOR>SCHED.MAC.11,  13-Oct-81 16:19:41 by MURPHY
   406					;Remove TCO 5.1419, ID 51 - it prevented class from being set during LOGIN
   407					; UPD ID= 102, SNARK:<6.MONITOR>SCHED.MAC.10,  13-Oct-81 10:57:44 by MURPHY
   408					;TCO 5.1570 - Fix bug in computation of utilization.
   409					; UPD ID= 96, SNARK:<6.MONITOR>SCHED.MAC.9,   7-Oct-81 14:53:08 by PAETZOLD
   410					;Remove TCO 5.1559 as it caused problems
   411					; UPD ID= 86, SNARK:<6.MONITOR>SCHED.MAC.8,   4-Oct-81 20:23:56 by PAETZOLD
   412					;TCO 5.1559 - Treat NVT's as real TTY's and not as PTY's in NEWST
   413					; UPD ID= 82, SNARK:<6.MONITOR>SCHED.MAC.7,  23-Sep-81 16:25:01 by MURPHY
   414					;TCO 5.1530 - reset local flags in AJBALS
   415					; UPD ID= 72, SNARK:<6.MONITOR>SCHED.MAC.6,  15-Sep-81 16:02:59 by PAETZOLD
   416					;TCO 6.1010 - Move CSTs to CSTSEC - Change CST1 non-mask references
   417					; UPD ID= 63, SNARK:<6.MONITOR>SCHED.MAC.5,   9-Sep-81 17:27:12 by MURPHY
   418					;Get rid of XCT of BUGHLT - make it CALL instead. (REEBUG)
   419					;Revise previous - preserve T3 and T4 in CORFCT
   420					; UPD ID= 55, SNARK:<6.MONITOR>SCHED.MAC.4,  25-Aug-81 09:29:51 by GRANT
   421					;Preserve T3 and T4 over CALL CORFCT in ONGOL
   422					; UPD ID= 50, SNARK:<6.MONITOR>SCHED.MAC.3,  11-Aug-81 14:49:11 by HALL
   423					;Rearrange, comment
   424					; UPD ID= 48, SNARK:<6.MONITOR>SCHED.MAC.2,  10-Aug-81 16:17:52 by HALL
   425					;A little more cleanup
   426					; UPD ID= 45, SNARK:<6.MONITOR>SCHED.MAC.1,   8-Aug-81 13:25:59 by HALL
   427					;TCO 6.1000 - Remove XWD from PISC7
   428					; UPD ID= 95, SNARK:<5.MONITOR>SCHED.MAC.58,   8-Aug-81 09:52:19 by HALL
   429					;Add some comments
   430					; UPD ID= 94, SNARK:<5.MONITOR>SCHED.MAC.57,   7-Aug-81 13:15:19 by SCHMITT
   431					;TCO 5.1439 - Do not perform JSYS trapping on execute only process
   432					; UPD ID= 93, SNARK:<5.MONITOR>SCHED.MAC.56,   7-Aug-81 13:09:43 by SCHMITT
   433					;TCO 5.1440 - Load Job number before compare at HLTJOB
   434					; UPD ID= 91, SNARK:<5.MONITOR>SCHED.MAC.55,   5-Aug-81 11:54:00 by MURPHY
   435					;Ditto
   436					; UPD ID= 64, SNARK:<5.MONITOR>SCHED.MAC.50,  22-Jul-81 17:28:19 by MURPHY
   437					;TCO 5.1428 - Detect excessive time in CSKED, etc.
   438					;Compute job utilization always.
   439					; UPD ID= 52, SNARK:<5.MONITOR>SCHED.MAC.49,  20-Jul-81 15:51:58 by MOSER
   440					;MORE OF TCO 5.1406 SAVE T REGS.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-8
SCHED	MAC	 7-Nov-88 20:50	

   441					; UPD ID= 51, SNARK:<5.MONITOR>SCHED.MAC.48,  20-Jul-81 10:15:59 by SCHMITT
   442					;Edit 1910 - TCO 5.1419 - Check if job is logged in at CHGCLS
   443					; UPD ID= 48, SNARK:<5.MONITOR>SCHED.MAC.47,  17-Jul-81 16:20:22 by MURPHY
   444					;TCO 5.1398 - HANDLE SKIP RETURN FROM MSETPT
   445					; UPD ID= 16, SNARK:<5.MONITOR>SCHED.MAC.46,  10-Jul-81 09:20:55 by MOSER
   446					;TCO 5.1406 - IF ILLEGAL MEMORY WRITE ON ERCAL RETURN THIS ERROR TO USER.
   447					; UPD ID= 8, SNARK:<5.MONITOR>SCHED.MAC.45,   9-Jul-81 17:13:00 by MURPHY
   448					; TCO 5.1396  - BIT IN JOBBIT TO INDICATE SYSTEM FORK - GETS HIGH PRIORITY
   449					;<5.MONITOR>SCHED.MAC.44, 30-Jun-81 11:23:32, EDIT BY MURPHY
   450					;<5.MONITOR>SCHED.MAC.43, 29-Jun-81 13:45:20, EDIT BY MURPHY
   451					;<5.MONITOR>SCHED.MAC.42, 29-Jun-81 11:58:33, EDIT BY MURPHY
   452					;<5.MONITOR>SCHED.MAC.41, 29-Jun-81 11:43:28, EDIT BY MURPHY
   453					;<5.MONITOR>SCHED.MAC.40, 29-Jun-81 10:55:19, EDIT BY MURPHY
   454					; UPD ID= 2263, SNARK:<5.MONITOR>SCHED.MAC.39,  26-Jun-81 18:06:51 by MURPHY
   455					;MAKE NOSKED/OKSKED EQUIVALENT TO NOSKD1/OKSKD1, SAME FOR CSKED, ETC.
   456					; TCO 5.1376 -
   457					;BAD FLAGS WHEN DEBREAK TO JOBCOF OR FLOGO; NOTE ITRAP WHEN LOGIN/LOGOUT
   458					; UPD ID= 2195, SNARK:<5.MONITOR>SCHED.MAC.38,  12-Jun-81 13:32:16 by MURPHY
   459					;FIX 2168 - NOSKED SHOULD HAVE BEEN NOSKD1, ETC.
   460					; UPD ID= 2188, SNARK:<5.MONITOR>SCHED.MAC.37,  11-Jun-81 15:57:40 by MURPHY
   461					;CHANGE TQNx TO TMNx REFLECTING CHANGE IN MACSYM
   462					; UPD ID= 2168, SNARK:<5.MONITOR>SCHED.MAC.36,  10-Jun-81 15:46:59 by MURPHY
   463					;ELIMINATE SCHEDULER REQUEST QUEUE, CALL FUNCTION IMMEDIATELY
   464					; UPD ID= 2057, SNARK:<5.MONITOR>SCHED.MAC.35,  21-May-81 11:04:35 by SCHMITT
   465					;Tco 5.1339 - Change prioritys of currently active batch jobs at SKDRDQ
   466					; UPD ID= 2045, SNARK:<5.MONITOR>SCHED.MAC.34,  20-May-81 11:51:55 by PAETZOLD
   467					;FIX TYPO IN PREVIOUS
   468					; UPD ID= 2037, SNARK:<5.MONITOR>SCHED.MAC.33,  19-May-81 17:04:10 by PAETZOLD
   469					;TCO 5.1335 DETECT OKSKED'S AND OKSKD1'S WHEN NOT NOSKED
   470					; UPD ID= 1898, SNARK:<5.MONITOR>SCHED.MAC.32,  29-Apr-81 06:29:16 by WACHS
   471					; UPD ID= 1855, SNARK:<5.MONITOR>SCHED.MAC.31,  21-Apr-81 07:02:36 by WACHS
   472					;TCO 5.1290 KEEP KEEP-ALIVE COUNTER GOING ID NOSKED FOR DIAG
   473					; UPD ID= 1707, SNARK:<5.MONITOR>SCHED.MAC.30,  16-Mar-81 11:46:40 by MURPHY
   474					;DITTO
   475					; UPD ID= 1668, SNARK:<5.MONITOR>SCHED.MAC.29,  11-Mar-81 17:13:23 by MURPHY
   476					;MODIFY ENTSKD TO CHECK FOR RECURSIVE ENTRY
   477					; UPD ID= 1570, SNARK:<5.MONITOR>SCHED.MAC.28,  19-Feb-81 14:10:20 by HALL
   478					;TRY AGAIN RUNNING EXEC0 IN SECTION 1
   479					; UPD ID= 1565, SNARK:<5.MONITOR>SCHED.MAC.27,  16-Feb-81 20:11:29 by MURPHY
   480					;BUT KEEP EXEC0 IN SECTION 0
   481					; UPD ID= 1555, SNARK:<5.MONITOR>SCHED.MAC.26,  12-Feb-81 17:42:30 by MURPHY
   482					;MAKE PSI CODE RUN IN SECTION 1
   483					; UPD ID= 1516, SNARK:<5.MONITOR>SCHED.MAC.25,   4-Feb-81 15:38:04 by MURPHY
   484					;MAKE SURE UMODF ON AT PSISM1 INTERRUPT START
   485					; UPD ID= 1471, SNARK:<5.MONITOR>SCHED.MAC.24,  22-Jan-81 09:27:41 by GRANT
   486					;MAKE SKEDSW CONDITIONALS CONFORM TO CODING STANDARD
   487					; UPD ID= 1463, SNARK:<5.MONITOR>SCHED.MAC.23,  21-Jan-81 11:18:10 by GRANT
   488					;TCO 5.1230 - CHANGE OLD DEBUG SWITCH TO SKEDSW
   489					; UPD ID= 1349, SNARK:<5.MONITOR>SCHED.MAC.22,  12-Dec-80 14:38:16 by MURPHY
   490					;GET JOBPT SETUP EARLIER
   491					; UPD ID= 1279, SNARK:<5.MONITOR>SCHED.MAC.21,  17-Nov-80 12:31:41 by MURPHY
   492					;TCO 5.1198 - NBSWP NOT DECREMENTED
   493					; UPD ID= 1273, SNARK:<5.MONITOR>SCHED.MAC.20,  14-Nov-80 17:51:56 by MURPHY
   494					;ENSURE FORKX IS -1 WHILE RUNNING BGND TASKS
   495					; UPD ID= 1217, SNARK:<5.MONITOR>SCHED.MAC.19,  31-Oct-80 14:57:52 by HALL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-9
SCHED	MAC	 7-Nov-88 20:50	

   496					;TCO 5.1180 - MOVE DST TO NON-ZERO SECTION
   497					;	MAKE SCHED0 RUN IN SECTION 1
   498					; UPD ID= 1208, SNARK:<5.MONITOR>SCHED.MAC.17,  29-Oct-80 11:52:52 by MURPHY
   499					;DITTO
   500					; UPD ID= 1205, SNARK:<5.MONITOR>SCHED.MAC.16,  28-Oct-80 17:35:05 by MURPHY
   501					;TCO 5.1182
   502					;NEW BIAS FLAG SK%CL1 - MAKE CLASS SCHED USE NORMAL QUEUE PRIORITIES IF 1
   503					; UPD ID= 1088, SNARK:<5.MONITOR>SCHED.MAC.15,   1-Oct-80 12:09:05 by MURPHY
   504					;FIX ACVAR
   505					; UPD ID= 968, SNARK:<5.MONITOR>SCHED.MAC.14,  25-Aug-80 16:29:08 by ENGEL
   506					;TCO 5.1136 - ADD DEVLKK
   507					; UPD ID= 792, SNARK:<5.MONITOR>SCHED.MAC.13,  23-Jul-80 20:54:21 by MURPHY
   508					;Fix BUG call
   509					; UPD ID= 782, SNARK:<5.MONITOR>SCHED.MAC.12,  23-Jul-80 11:24:43 by MURPHY
   510					;Be sure JOBRT is 0 when job created
   511					; UPD ID= 764, SNARK:<5.MONITOR>SCHED.MAC.11,  18-Jul-80 15:20:50 by MURPHY
   512					;DETECT NEGATIVE JOBRT
   513					; UPD ID= 596, SNARK:<5.MONITOR>SCHED.MAC.10,   3-Jun-80 17:44:31 by MURPHY
   514					;INIT FACTSW WITH SF%MS1 ON
   515					; UPD ID= 546, SNARK:<5.MONITOR>SCHED.MAC.9,  21-May-80 14:34:20 by MURPHY
   516					;ALWAYS USE HIGHER INTQ IF CLASS SCHEDULING
   517					; UPD ID= 508, SNARK:<5.MONITOR>SCHED.MAC.8,   5-May-80 15:56:19 by MILLER
   518					;TCO 5.1033. GIVE PIBMP IN ASSFK
   519					; UPD ID= 499, SNARK:<5.MONITOR>SCHED.MAC.7,  30-Apr-80 15:09:56 by GRANT
   520					;TCO 5.1030 - Make ?FULL be more informative
   521					; UPD ID= 485, SNARK:<5.MONITOR>SCHED.MAC.6,  28-Apr-80 09:35:13 by MURPHY
   522					; UPD ID= 465, SNARK:<5.MONITOR>SCHED.MAC.5,  23-Apr-80 13:22:17 by MURPHY
   523					;REMOVE WRITE PROTECT CHECKS
   524					; UPD ID= 462, SNARK:<4.1.MONITOR>SCHED.MAC.349,  23-Apr-80 12:00:31 by MURPHY
   525					;FIX STATISTICS
   526					; UPD ID= 431, SNARK:<4.1.MONITOR>SCHED.MAC.348,  13-Apr-80 14:35:11 by OSMAN
   527					;Use FRKTTY instead of FKCTYP
   528					; UPD ID= 338, SNARK:<4.1.MONITOR>SCHED.MAC.347,  17-Mar-80 13:49:19 by MURPHY
   529					;FIX SNOOP BUG, MOVE CALL RCVCH7
   530					; UPD ID= 322, SNARK:<4.1.MONITOR>SCHED.MAC.346,  12-Mar-80 12:14:39 by MURPHY
   531					;FIX JOBSRT
   532					; UPD ID= 317, SNARK:<4.1.MONITOR>SCHED.MAC.345,  11-Mar-80 11:13:06 by ELFSTROM
   533					; UPD ID= 314, SNARK:<4.1.MONITOR>SCHED.MAC.344,  10-Mar-80 18:22:05 by MURPHY
   534					;FIX ASSFK, CHKBMP
   535					; UPD ID= 285, SNARK:<4.1.MONITOR>SCHED.MAC.343,  20-Feb-80 17:56:18 by MURPHY
   536					;REVISE QUEUE PARAMETERS, FLAGS
   537					; UPD ID= 259, SNARK:<4.1.MONITOR>SCHED.MAC.342,  12-Feb-80 18:13:27 by MURPHY
   538					;SKDLV8 AGAIN
   539					; UPD ID= 196, SNARK:<4.1.MONITOR>SCHED.MAC.341,   9-Jan-80 14:45:47 by MURPHY
   540					;FIX LOST FORK CONTEXT IN SKDLV8
   541					; UPD ID= 78, SNARK:<4.1.MONITOR>SCHED.MAC.340,   1-Dec-79 16:00:57 by MILLER
   542					;CHECK FOR SCHEDULER ALARM SPENT IN SCDR. NEEDED NOW BECAUSE
   543					; OF MAIN PATH REORGANIZATION.
   544					;<4.1.MONITOR>SCHED.MAC.339, 29-Nov-79 14:26:50, EDIT BY MILLER
   545					;<4.1.MONITOR>SCHED.MAC.338, 29-Nov-79 14:20:14, EDIT BY MILLER
   546					;FIX TYPEO
   547					; UPD ID= 61, SNARK:<4.1.MONITOR>SCHED.MAC.337,  29-Nov-79 14:06:08 by MILLER
   548					;TCO 4.1.1036 AGAIN
   549					; UPD ID= 59, SNARK:<4.1.MONITOR>SCHED.MAC.336,  29-Nov-79 14:00:19 by MILLER
   550					;TCO 4.1.1036. SAVE AND RESTORE FLKCNT AND FKLOCK OVER JSYSES
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 1-10
SCHED	MAC	 7-Nov-88 20:50	

   551					; UPD ID= 9, SNARK:<4.1.MONITOR>SCHED.MAC.335,  21-Nov-79 17:35:26 by MURPHY
   552					;<4.1.MONITOR>SCHED.MAC.334, 19-Nov-79 16:35:59, EDIT BY MILLER
   553					;<4.1.MONITOR>SCHED.MAC.333, 19-Nov-79 16:28:48, EDIT BY MILLER
   554					;COMPUTE RT TIME-OUT IN AJBALS
   555					;<4.1.MONITOR>SCHED.MAC.332, 19-Nov-79 15:31:04, EDIT BY MILLER
   556					;<4.1.MONITOR>SCHED.MAC.331, 19-Nov-79 11:20:07, EDIT BY MILLER
   557					;<4.1.MONITOR>SCHED.MAC.330, 19-Nov-79 11:05:32, EDIT BY MILLER
   558					;APPLY RT TEST TO BS HOLD TIME IF MEMORY IS OVERLOADED
   559					;<4.1.MONITOR>SCHED.MAC.329, 13-Nov-79 14:35:25, EDIT BY MURPHY
   560					;<4.1.MONITOR>SCHED.MAC.327, 12-Nov-79 17:25:51, EDIT BY MURPHY
   561					;CHANGE SWAP SPACE LEVEL FOR NEW JOB CUTOFF
   562					;<MURPHY.MON>SCHED.MAC.2,  8-Nov-79 18:04:45, EDIT BY MURPHY
   563					;REORG CODE FOR FASTER MAIN PATH
   564					;<4.1.MONITOR>SCHED.MAC.325,  8-Nov-79 12:25:02, EDIT BY MURPHY
   565					;FIX AC CLOBBERAGE ON ERJMP CERTAIN CASES
   566
   567					;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1976, 1988.
   568					;	ALL RIGHTS RESERVED.
   569					;
   570					;	THIS SOFTWARE IS FURNISHED UNDER A  LICENSE AND MAY BE USED AND  COPIED
   571					;	ONLY IN  ACCORDANCE  WITH  THE  TERMS OF  SUCH  LICENSE  AND  WITH  THE
   572					;	INCLUSION OF THE ABOVE  COPYRIGHT NOTICE.  THIS  SOFTWARE OR ANY  OTHER
   573					;	COPIES THEREOF MAY NOT BE PROVIDED  OR OTHERWISE MADE AVAILABLE TO  ANY
   574					;	OTHER PERSON.  NO  TITLE TO  AND OWNERSHIP  OF THE  SOFTWARE IS  HEREBY
   575					;	TRANSFERRED.
   576					;
   577					;	THE INFORMATION IN THIS  SOFTWARE IS SUBJECT  TO CHANGE WITHOUT  NOTICE
   578					;	AND SHOULD  NOT  BE CONSTRUED  AS  A COMMITMENT  BY  DIGITAL  EQUIPMENT
   579					;	CORPORATION.
   580					;
   581					;	DIGITAL ASSUMES NO  RESPONSIBILITY FOR  THE USE OR  RELIABILITY OF  ITS
   582					;	SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.
   583
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 2
SCHED	MAC	 7-Nov-88 20:50	

   584
   585						SEARCH PROLOG
   586						TTITLE SCHED^
   587
   588UV					
   589UV					
   590					^
   591
   592					; SCHEDULER - D. MURPHY
   593
   594						IFNDEF FTKLIPA,<FTKLIPA==-1> ;Default is include KLIPA code
   595
   596					;SPECIAL AC DEFINITIONS USED HEREIN
   597
   598					DEFAC (FX,Q3)			;FORK INDEX
   599
   600					;LOCAL MACROS
   601
   602					;USED INTERNALLY BY SCHEDULER
   603					;ENTER SCHEDULER CONTEXT
   604
   605					DEFINE ENTSKD<
   606						SKIPE INSKED
   607						CALL REEBUG		;;ALREADY IN SCHED, BUGHLT
   608						AOS INSKED
   609						XPCW ENSKR>		;GO TO ENSKED
   610
   611					;LOCAL ITEMS IN STG.MAC
   612
   613					EXTN <N2CLKS,CLK2TM,LV8CHK,CLK2CL,SCHPF0,NHOLDF>
   614					EXTN <PAGDIF,ADJSWP,TSTFRP,HPSWRN>
   615
   616					;SCSJSY externals
   617					EXTERN SCSTEQ,SCSBEQ,SCSTCQ,SCSBCQ,SCSTMQ,SCSBMQ,SCSTDQ,SCSBDQ,SCSTXQ,SCSBXQ
   618					EXTERN SCSPSI,SCSPS0,SCSPS1
   619
   620					;CLASS SCHEDULER EXTERNALS
   621
   622					EXTN <CLSSHR,CLSCNT,JOBIRT,CLSUTL,CLSDST,CLSSUM,CLSRJA>
   623					EXTN <MJBUSE,UTLTIM,UTLINT,OLDSLD,CLASSF>
   624					EXTN <JOBDST,JOBCLS,JOBUTL,CLSSHI,MAXCLS,CLSCTL,CLSIRT,CLSSWA>
   625
   626					EDEFST (CLGLC,CLSCNT,17,18)	;COUNT OF PROCESSES ON GOLST FOR THIS CLASS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 3
SCHED	MAC	 7-Nov-88 20:50	

   627
   628					;LOWER CORE LOCATIONS FOR LITES DISPLAY
   629
   630		   	   000030	SHLTW==:30			;SCHEDULER HALT REQUEST WORD
   631
   632									;MISC PARAMETERS
   633		   	   000004	MINNR==:4			;MIN SIZE OF RPLQ FOR LOADING FORK
   634		   	   000023	TRMINT==^D19			;FORK TERMINATION CHANNEL
   635		   	   000017	DDPMAX==:^D15			;DDMP OVERDUE MAXIMUM COUNT
   636		   	   000017	CHKMAX==:^D15			;CHKR OVERDUE MAXIMUM COUNT
   637
   638					;ASSUMED WORKING SET SIZE (MINIMUM) FOR FORK WAKING UP AFTER LONG
   639					;BLOCK.
   640
   641	000000'01  000000  000012	MINWSS::^D10
   642
   643					;VALUES FOR DISASTER AVOIDANCE - USED ONLY IF SK%HQR = 1
   644
   645					;THESE ARE THE VALUES OF THE HQ LDAV AT WHICH AJNNLF WILL GO OFF AND ON
   646					;RESPECTIVELY.  AJNNLF PREVENTS NEW LQ FORKS FROM COMING INTO THE BALSET
   647					;WHEN ON.  THE TWO VALUES ARE SEPARATED SLIGHTLY TO PREVENT INSTABILITY.
   648
   649	000001'01  203400  000000	HQLEV1::4.0			;'OFF' VALUE FOR AJNNLF
   650	000002'01  203600  000000	HQLEV2::6.0			;'ON' VALUE FOR AJNNLF
   651
   652					;THESE ARE THE VALUES OF THE HQ LDAV AT WHICH AJHQOF WILL GO OFF AND ON
   653					;RESPECTIVELY.  AJHQOF FORCES LQ FORKS OUT OF THE BALSET.  AGAIN, TWO
   654					;VALUES PREVENT INSTABILITY.
   655
   656	000003'01  203600  000000	HQLEV3::6.0			;'OFF' VALUE FOR AJHQOF
   657	000004'01  204440  000000	HQLEV4::9.0			;'ON' VALUE FOR AJHQOF
   658
   659					;BASIC PERIODS
   660
   661	000005'01  000000  000024	SKDSCY::^D20			;SHORT CYCLE
   662	000006'01  000000  000144	SKDLCY::^D100			;LONG CYCLE
   663	000007'01  000000  001750	AJBLCY:	^D1000			;AJBALS CYCLE
   664	000010'01  000000000000#	SKDBQT:	^D200*NTMS		;BALSET RUN QUANTUM
   665		   000000000000#		MINQNT==^D10*NTMS	;MINMUM TIME BEFORE CHANGING ALARM
   666		   	   000012		SMLSTM==^D10		;ALARM CYCLE TO CATCH SMALL QUANTA
   667		   	   001750	UTLTMI==^D1000			;TIME PERIOD
   668		   	   000003	UTLINI==3			;# OF PERIODS IN A COMPUTE CYCLE
   669	000011'01  200767  423110	UTLEXP:	0.983471454		;e-(1/60)
   670	000012'01  200757  155713		0.9672161		;e-(2/60)
   671	000013'01  200747  017055		0.951229424		;e-(3/60)
   672	000014'01  200736  765426		0.935506985		;e-(4/60)
   673
   674						DEFSTR (SKPCT,JOBNAM,2,2) ;SKIP COUNT FOR NEWUTL
   675		   	   000003		MXSKPS==3		;MAX VALUE OF SKIP COUNT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 4
SCHED	MAC	 7-Nov-88 20:50	

   676
   677					;THE FOLLOWING MACROS AND COMPUTATIONS ARE NECESSARY DUE
   678					;TO MACROS INABILITY TO PERFORM FLOATING POINT
   679					;COMPUTATIONS.
   680
   681						RADIX 10
   682		   	   000005	MINSHR==5			;MIN % A SHARE MAY HAVE
   683		   	   000310	MAXVAL==1000/MINSHR		;MAX BIAS FOR CLASS PRIORITY
   684
   685					;NOW SOME MACROS TO DO THE FP CONSTRUCTIONS
   686
   687					   DEFINE FLTMIN (A) <
   688					
   689						SHRMIN==0.00'A
   690					   >
   691
   692					   DEFINE FLTMAX (A) <
   693					
   694						MXBIAS==A'.0>
   695
   696					;NOW PRODUCE THE VALUES
   697
   698						FLTMIN (\MINSHR)	;FP REPRESENTATION OF MINSHR
   699		   210620  000000		FLTMAX (\MAXVAL)	;FP REPRESENTATION OF MAXVAL
   700
   701						RADIX 8			;RETURN TO DEFAULT RADIX
   702
   703					;Random constant that MACRO can't seem to get in a literal in certain places.
   704
   705	000015'01  000000*  000000	MSEC1A:	MSEC1,,0
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 5
SCHED	MAC	 7-Nov-88 20:50	

   706
   707					;STANDARD VALUES FOR SCHEDULER INTERACTIVE/COMPUTATIONAL FLAGS
   708					; ON A SCALE OF 0 - 9
   709
   710					   REPEAT 0,<			;FOR REFERENCE ONLY - DEFINITIONS IN MONSYM
   711					
   712					SK%CYT==:1B18			;CYCLE TIME
   713					SK%IOC==:1B19			;IO QUANTUM CHARGE
   714					SK%HT1==:1B20			;LIMIT HOLD TIME
   715					SK%HT2==:1B21			;NO HOLD TIME AFTER SKIPPED FORK
   716					SK%HQR==:1B22			;HIGH QUEUE FORK HAVE PRIORITY UNDER LOAD
   717					SK%CL1==:1B23			;CLASS SKED, USE NORMAL QUEUE PRIORITIES IF 1
   718					;SK%BQE==:1B24			;BALSET QUEUE ON ENTRY
   719					SK%RSQ==:1B25			;QUICK RESCHEDULE ON WAKEUPS
   720					SK%RQ1==:1B26			;REQUEUE TO QUEUE 1
   721					SK%TTP==:1B27			;TTY PREFERENCE
   722					SK%WCF==:1B28			;WAIT CREDIT PROPORTIONAL TO LOAD AV
   723					SK%TOP==:1B29			;TTY OUTPUT PREFERENCE
   724					   >
   725
   726					;			C I H H H C B R R T W T
   727					;			Y O T T Q L Q S Q T C O
   728					;			T C 1 2 R 1 E Q 1 P F P
   729	000016'01  000000  577700	SKFLGV::BYTE (18) 0 (1) 1,0,1,1,1,1,1,1,1,1,1,1
   730	000017'01  000000  577700		BYTE (18) 0 (1) 1,0,1,1,1,1,1,1,1,1,1,1
   731	000020'01  000000  575700		BYTE (18) 0 (1) 1,0,1,1,1,1,1,0,1,1,1,1
   732	000021'01  000000  575700		BYTE (18) 0 (1) 1,0,1,1,1,1,1,0,1,1,1,1
   733	000022'01  000000  535700		BYTE (18) 0 (1) 1,0,1,0,1,1,1,0,1,1,1,1
   734	000023'01  000000  535700		BYTE (18) 0 (1) 1,0,1,0,1,1,1,0,1,1,1,1
   735	000024'01  000000  515700		BYTE (18) 0 (1) 1,0,1,0,0,1,1,0,1,1,1,1
   736	000025'01  000000  515700		BYTE (18) 0 (1) 1,0,1,0,0,1,1,0,1,1,1,1
   737	000026'01  000000  515500		BYTE (18) 0 (1) 1,0,1,0,0,1,1,0,1,1,0,1
   738	000027'01  000000  515500		BYTE (18) 0 (1) 1,0,1,0,0,1,1,0,1,1,0,1
   739	000030'01  000000  515500	SKFLDF:	BYTE (18) 0 (1) 1,0,1,0,0,1,1,0,1,1,0,1 ;NORMAL DEFAULT
   740	000031'01  000000  504500		BYTE (18) 0 (1) 1,0,1,0,0,0,1,0,0,1,0,1
   741	000032'01  000000  404400		BYTE (18) 0 (1) 1,0,0,0,0,0,1,0,0,1,0,0
   742	000033'01  000000  404400		BYTE (18) 0 (1) 1,0,0,0,0,0,1,0,0,1,0,0
   743	000034'01  000000  404400		BYTE (18) 0 (1) 1,0,0,0,0,0,1,0,0,1,0,0
   744	000035'01  000000  404400		BYTE (18) 0 (1) 1,0,0,0,0,0,1,0,0,1,0,0
   745	000036'01  000000  404000		BYTE (18) 0 (1) 1,0,0,0,0,0,1,0,0,0,0,0
   746	000037'01  000000  404000		BYTE (18) 0 (1) 1,0,0,0,0,0,1,0,0,0,0,0
   747	000040'01  000000  004000		BYTE (18) 0 (1) 0,0,0,0,0,0,1,0,0,0,0,0
   748	000041'01  000000  004000		BYTE (18) 0 (1) 0,0,0,0,0,0,1,0,0,0,0,0
   749		   	   000024	NSKFLV==:.-SKFLGV
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 6
SCHED	MAC	 7-Nov-88 20:50	

   750
   751					;CLASS SCHEDULING STRUCTURE DEFS
   752
   753					DEFSTR (CLSBD,CLSCTL,0,1)		;BATCH JOBS TO DREGS QUEUE
   754					DEFSTR (CLSDF,CLSCTL,9,9)		;DEFAULT CLASS
   755					DEFSTR (CLSBT,CLSCTL,18,9)		;BATCH CLASS
   756					DEFSTR (CLSAC,CLSCTL,19,1)		;IF ON, CLASS BY ACCOUNTS
   757					DEFSTR (CLSKV,CLSCTL,25,6)	;CURRENT KNOB VALUE
   758
   759		   	   000607		DREGS==<LOWQ>B29+LOWQ+1		;BATCH DREGS PRIORITY WORD
   760					; Execute only information for JSYS trapping
   761		   200000  000000		SFEXO==1B1		;EXECUTE ONLY BIT IN SYSFK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 7
SCHED	MAC	 7-Nov-88 20:50	

   762
   763					;Code for crash-on-fork facility
   764
   765					;Crash-on-fork code for SCHED4:
   766
   767					DEFINE $CRSF1<
   768					   IFN DEBUG,<
   769						SKIPN CRSFRF		;;Are we trying to crash on a fork?
   770						IFSKP.			;;Yes
   771						  EXCH T1,CRSFRN	;;Get fork number to crash on
   772						  CAME T1,FORKX		;;Is it the current fork?
   773						  IFSKP.		;;Yes
   774						    MOVE 0,[PAC+1,,1]	;;Restore AC's
   775						    BLT 0,17		;;...
   776						    MOVE 0,PAC		;;...
   777						    BUG.(HLT,KRSFRK,SCHED,HARD,<Crash-on-fork invoked>,<<FORKX,CRFORK>,<CRSJBN,REQJO
   778					B>>,<
   779					
   780					Cause:  The crash-on-fork facility was invoked, scheduling the specfied
   781						fork and then crashing the system.  Console output includes the
   782						crashed fork number and the job number that requested the crash.
   783					
   784					Data:	CRFORK - Crashed fork
   785						REQJOB- - Requesting job number
   786					
   787					>)
   788						  ENDIF.
   789						  EXCH T1,CRSFRN		;;No, restore T1
   790						ENDIF.
   791					  >
   792					>
   793
   794					;Crash-on-fork code for SKDLV8:
   795					;States for CRSFRF:
   796					; .EQL. ZERO		No request made
   797					; .EQL. -1		Request made, no PSI yet
   798					; .GTR. ZERO		Request made, PSI given
   799
   800					DEFINE $CRSF2 <
   801					   IFN DEBUG,<
   802						SKIPL CRSFRF		;;PSI needed for crash-on-fork?
   803						IFSKP.			;;Yes
   804						  PUSH P,T1		;;Save AC's
   805						  PUSH P,T2		;;...	
   806						  SETZB T1,CRSFRF	;;Get a zero flag-word for PSI
   807									;; and zero crash-on-fork flag
   808						  AOS CRSFRF		;;Keep crash-on-fork flag nonzero + positive
   809						  HRRZ T2,CRSFRN	;;Get number of fork to be crashed
   810						  CALL PSIGR		;;Give him a PSI
   811						  POP P,T2		;;Restore Ac's
   812						  POP P,T1		;;...
   813						ENDIF.
   814					  >
   815					>
   816
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 7-1
SCHED	MAC	 7-Nov-88 20:50	

   817					;The routine for invoking crash-on-fork
   818					;Args: T1/  fork to crash on
   819
   820					   IFN DEBUG,<
   821						EXTERN CRSFRN,CRSJBN,CRSFRF
   822					
   823					CRSFRK:	HRRZM T1,CRSFRN		;Save fork # to crash on
   824						MOVE T1,FORKX		;Get our fork number
   825						HLRZ T1,FKJOB(T1)	;Get our job number
   826						HRRZM T1,CRSJBN		;Save it for attribution
   827						SETOM CRSFRF		;Turn on the crash flag
   828						RET			;Return and wait for the excitement
   829					   >
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 8
SCHED	MAC	 7-Nov-88 20:50	

   830
   831					;SCHEDULER INITIALIZATION
   832
   833	000042'01  402 00 0 00 000000*	SCDIN::	SETZM SYSIFG
   834	000043'01  402 00 0 00 000000*		SETZM PWRDWN
   835	000044'01  402 00 0 00 000000*		SETZM FACTSW		;INITIALIZE SYSTEM FLAGS WORD
   836	000045'01  200 00 0 00 000030'		MOVE F,SKFLDF		;SET DEFAULT CONTROL FLAGS
   837	000046'01  202 00 0 00 000000*		MOVEM F,SCHFLG
   838						MOVE T1,[BUG.(HLT,SCDUUO,SCHED,HARD,<UUO in scheduler>,,<
   839					
   840					Cause:	An illegal instruction has been executed while in
   841						the scheduler's context. Since the scheduler's PSB
   842						is only a prototype PSB and UPT, allowing this MUUO
   843						to behave like others results in bizarre errors
   844						that mask the original problem. This BUGHLT should
   845						be analyzed like an ILLUUO.
   846					
   847					Action:	Most likley a software bug. Analyze this like any other
   848						ILLUUO.
   849					
   850	000047'01  200 01 0 00 010311'	]
   851	000050'01  202 01 0 00 000000*		MOVEM T1,MJRSTF		;INIT SCHEULER'S UUO DISPTACH TO BUGHLT
   852	000051'01  201 01 0 00 000013 		MOVEI T1,SKFLDF-SKFLGV+1 ;GET KNOB VALUE
   853	000052'01  137 01 0 00 010312'		STOR T1,CLSKV		;SAVE IT
   854	000053'01  201 01 0 00 000000 		MOVEI T1,0
   855	000054'01			     DO.
   856	000054'01  476 00 1 00 010313'		SETOM @[EP. CLSSWA(T1)]	;INIT WINDFALL ALLOCATION
   857	000055'01  305 01 0 00 000000#		CAIGE T1,MAXCLS-1
   858	000056'01  344 01 0 00 000054'		AOJA T1,TOP.
   859	000057'01			     ENDDO.
   860	000057'01  201 01 0 00 005670 		MOVEI T1,UTLTMI*UTLINI	;DEFAULT INTERVAL FOR UTIL
   861	000060'01  202 01 0 00 000000*		MOVEM T1,UTLINT		;SET UP INTERVAL
   862	000061'01  402 00 0 00 000000*		SETZM UTLTIM		;WHEN TO COMPUTE UTILIZATION
   863	000062'01  200 01 0 00 010314'		MOVX T1,MONENV		;INITIALIZE NEW FLAGS WORD FOR MONITOR MODE
   864	000063'01  202 01 0 00 000000#		MOVEM T1,RSKCHK+2	; FOR XCT RSKED
   865	000064'01  200 01 0 00 010315'		MOVE T1,[MSEC1,,RSKCH1]	;INITIALIZE NEW PC
   866	000065'01  202 01 0 00 000000#		MOVEM T1,RSKCHK+3	; FOR XCT RSKED
   867	000066'01  201 01 0 00 000000*		MOVEI T1,JTLST		; Set up JSYS trap queue
   868	000067'01  202 01 0 00 000000*		MOVEM T1,JTLSTL
   869	000070'01  200 01 0 00 010316'		MOVE T1,[1B0+FKPT]
   870	000071'01  201 02 0 00 000000*		MOVEI 2,NFKS
   871	000072'01  260 17 0 00 000132'		CALL ILIST		;INIT FREE FORK LIST
   872	000073'01  552 01 0 00 000000*		HRRZM 1,FREFK
   873	000074'01  201 01 0 00 000000*		MOVEI 1,JOBPT
   874	000075'01  201 02 0 00 000000*		MOVEI 2,NJOBS
   875	000076'01  260 17 0 00 000132'		CALL ILIST
   876	000077'01  202 01 0 00 000000*		MOVEM 1,FREJOB		;INIT FREE JOB LIST
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 9
SCHED	MAC	 7-Nov-88 20:50	

   877
   878	000100'01  476 00 0 00 000000*		SETOM JOBRT
   879	000101'01  200 01 0 00 010317'		MOVE 1,[XWD JOBRT,JOBRT+1]
   880	000102'01  251 01 0 00 000000#		BLT 1,JOBRT+NJOBS-1
   881	000103'01  402 00 0 00 000000*		SETZM SCTLW
   882	000104'01  402 00 0 00 000030 		SETZM SHLTW
   883	000105'01  476 00 0 00 000000*		SETOM SCDRN1
   884	000106'01  476 00 0 00 000000*		SETOM FORKX
   885	000107'01  476 00 0 00 000000*		SETOM TADIDT
   886	000110'01  476 00 0 00 000000*		SETOM SSKED
   887	000111'01  201 01 0 00 000001 		MOVEI T1,1		;ANY POSITIVE VALUE WILL DO
   888	000112'01  202 01 0 00 000000*		MOVEM 1,INSKED		;INDICATE IN THE SCHEDULER
   889	000113'01  200 01 0 00 010320'		MOVX 1,SF%FAC!SF%CRD!SF%MS1
   890									;INIT FACTSW TO FACT FILE ON
   891									;  AND ALLOW USERS TO CHANGE DIR PARAMETERS
   892									; AND DO MESSAGE LEVEL 1 ONLY
   893	000114'01  436 01 0 00 000044*		IORM 1,FACTSW
   894	000115'01  205 01 0 00 200000 		MOVX T1,<1B1>		;GET A LARGE TIME VALUE
   895	000116'01  202 01 0 00 000000*		MOVEM 1,CHKTIM		;PREVENT CHKR ALARM UNTIL INITIALIZED
   896	000117'01  202 01 0 00 000000*		MOVEM 1,DDPTIM		;PREVENT DDMP ALARM UNTIL INITIALIZED
   897
   898					;GENERATE LQWBAS TABLE
   899
   900	000120'01  201 02 0 00 000003 		MOVEI T2,INTQ1		;FIRST QUEUE TO DO
   901	000121'01  127 01 0 00 000002 	SCDIN0:	FLTR T1,T2		;GET FLOAT OF QUEUE NUMBER
   902	000122'01  174 01 0 00 005076'		FDVR T1,FLOWQ		;DO DIVIDE
   903	000123'01  155 01 0 00 201400 		FSBRI T1,(1.0)		;DO -(1-Q/LOWQ)
   904	000124'01  175 01 0 00 204500 		FDVRI T1,(10.0)		;COMPLETE COMPUTATION
   905	000125'01  212 01 0 02 000000#		MOVNM T1,LQWBAS-INTQ1(T2) ;STASH IT
   906	000126'01  271 02 0 00 000001 		ADDI T2,1		;NEXT Q
   907	000127'01  307 02 0 00 000006 		CAIG T2,LOWQ		;ALL DONE?
   908	000130'01  254 00 0 00 000121'		JRST SCDIN0		;NO. MORE THEN
   909	000131'01  254 00 0 00 005110'		CALLRET QBIAS		;SET UP BAIS QUANTUM TABLE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 10
SCHED	MAC	 7-Nov-88 20:50	

   910
   911	000132'01  271 01 0 02 777777 	ILIST::	ADDI 1,-1(2)
   912	000133'01  512 01 0 01 000000 		HLLZM T1,0(T1)		;CLEAR END OF LIST
   913	000134'01  363 02 0 00 000140'		SOJLE 2,ILIST1		;  SIZE OF BLOCK IN 2
   914	000135'01  202 01 0 01 777777 		MOVEM 1,-1(1)
   915	000136'01  275 01 0 00 000001 		SUBI 1,1
   916	000137'01  367 02 0 00 000135'		SOJG 2,.-2
   917	000140'01  263 17 0 00 000000 	ILIST1:	RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 11
SCHED	MAC	 7-Nov-88 20:50		Channel 7 Interrupt Routines

   918						SUBTTL Channel 7 Interrupt Routines
   919
   920					;CLOCK, POSSIBLE RESCHEDULING, OR START PROCESS FROM SCHEDULER
   921
   922	000141'01  7 004 20 0 00 020001 PISC7::	CLSB SCDCHN		;ISB MUST BE EXPLICITLY CLEARED ON KI
   923	000142'01  336 00 0 00 000000#		SKIPN RSKCHK+1		;CALL FROM RESKED CHECK?
   924	000143'01  254 00 0 00 000151'		IFSKP.
   925	000144'01  124 01 0 00 000000*		  DMOVEM T1,PI7AC1 	;SAVE ACS
   926	000145'01  120 01 0 00 000000*		  DMOVE T1,RSKCHK	;MOVE FLAGS AND PC TO USUAL PLACE
   927	000146'01  124 01 0 00 000000*		  DMOVEM T1,PISC7R
   928	000147'01  402 00 0 00 000000#		  SETZM RSKCHK+1	;CLEAR INDICATOR
   929	000150'01  120 01 0 00 000144*		  DMOVE T1,PI7AC1	;RESTORE ACS
   930	000151'01				ENDIF.
   931	000151'01  332 00 0 00 000000*		SKIPE CFSSKC		;Check on CFS interconnect?
   932	000152'01  350 00 0 00 000000*		AOS SKEDF3		;Yes. Make the scheduler run
   933	000153'01  332 00 0 00 000000*		SKIPE CLDREQ		;[7.1021] Cluster dump requested?
   934	000154'01  254 00 0 00 000000*		JRST CFSDMP		;[7.1021] Yes, do it now
   935	000155'01  336 00 0 00 000000*		SKIPN SKEDFC		;FORCED MEMORY CLEAR?
   936	000156'01  337 00 0 00 000000*		SKIPG SCKATM		;ALARM CLOCK?
   937	000157'01  350 00 0 00 000152*		AOS SKEDF3		;YES
   938	000160'01  332 00 0 00 000000*		SKIPE SKEDF1		;INITIATED BY SCHEDULER?
   939	000161'01  254 00 0 00 000252'		JRST SCDR		;YES, GO START PROCESS
   940	000162'01  337 00 0 00 000112*		SKIPG INSKED		;IN SCHEDULER NOW, OR
   941	000163'01  337 00 0 00 000157*		SKIPG SKEDF3		;NO SCHEDULING REQUESTS?
   942	000164'01  254 06 0 00 000146*		XJEN PISC7R		;IGNORE INTERRUPT
   943	000165'01  332 00 0 00 000000*		SKIPE NSKED		;OK TO RESCHEDULE?
   944	000166'01  254 00 0 00 000212'		JRST SCDW		;NO, GO SET TRAP
   945	000167'01  335 00 0 00 000000*		SKIPGE UTLOCK		;ANY UNIT TESTING BEING DONE?
   946	000170'01  332 00 0 00 000000*		SKIPE SNPCNT		;ANY SNOOP BREAK POINTS INSERTED?
   947	000171'01  254 00 0 00 000227'		JRST CHKSNP		;YES, GO SEE IF PC IS INSIDE A BP
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 12
SCHED	MAC	 7-Nov-88 20:50		Channel 7 Interrupt Routines

   948
   949					;Here to stop the current process. On the KC, new flags word for interrupt
   950					;set the AC blocks to make monitor be current and user be previous. On the
   951					;KL, we have to set them here.
   952
   953	000172'01			PISC7A:
   954					   IFN KLFLG,<
   955	000172'01  7 010 14 0 00 000000*	DATAO PAG,SETMON	;SET MON CONTEXT
   956					   >				;END OF IFN KLFLG
   957	000173'01  202 17 0 00 000000#		MOVEM 17,PAC+17		;SAVE PROCESS AC'S
   958	000174'01  201 17 0 00 000000*		MOVEI 17,PAC
   959	000175'01  251 17 0 00 000000#		BLT 17,PAC+16
   960	000176'01  120 01 0 00 000164*		DMOVE T1,PISC7R		;GET FLAGS AND PC
   961
   962					;On the KL, the process could be at GOUSR, in which case it would have set
   963					;the current AC block to be user, in preparation for returning to the user.
   964					;If so, back up the PC so that the DATAO can be executed again when the
   965					;process is resumed. This isn't necessary on the KC since XJRSTF sets the
   966					;block
   967
   968					   IFN KLFLG,<
   969	000177'01  603 01 0 00 010000 		TXNE T1,UMODF		;MONITOR PC?
   970	000200'01  254 00 0 00 000204'		IFSKP.
   971	000201'01  550 03 0 00 000002 		  HRRZ T3,T2		;YES, AT POINT OF RETURN TO USER?
   972	000202'01  306 03 0 00 007724'		  CAIN T3,GOUSR+1
   973	000203'01  541 02 0 00 007723'		  HRRI T2,GOUSR		;YES, RE-EXECUTE DATAO PAG WHEN RESUMED
   974	000204'01				ENDIF.
   975					   >				;END OF IFN KLFLG
   976	000204'01  124 01 0 00 000000*		DMOVEM T1,PFL
   977	000205'01  200 01 0 00 000223'		MOVE 1,RSKEDN		;RESET NOSKED TRAP
   978	000206'01  202 01 0 00 000000*		MOVEM 1,RSKED
   979	000207'01  350 00 0 00 000162*		AOS INSKED
   980	000210'01  265 07 0 00 000000*		JSP FX,KISSAV		;SAVE APR-DEPENDENT STUFF
   981						XJEN [MONENV
   982	000211'01  254 06 0 00 010321'		     MSEC1,,SCHED0]	;GO DO THE MAIN SCHEDULER LOOP
   983
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 13
SCHED	MAC	 7-Nov-88 20:50		Channel 7 Interrupt Routines

   984					;SET TRAP TO CAUSE INTERRUPT ON OKSKED
   985					;Here when process can't be unscheduled now because it is in critical code,
   986					;is NOSKED, or is in a SNOOP breakpoint. Set up RSKED to cause another
   987					;interrupt when the process does XCT RSKED.
   988
   989	000212'01  202 01 0 00 000206*	SCDW:	MOVEM 1,RSKED
   990	000213'01  336 00 0 00 000000*		SKIPN PNSKDC		;NOSKED DUE TO DIAG?
   991	000214'01  254 00 0 00 000220'		JRST SCDW1		;NO
   992	000215'01  256 00 0 00 000000*		XCT KEPALV		;YES, UPDATE KEEP-ALIVE COUNTER
   993	000216'01  200 01 0 00 000005'		MOVE 1,SKDSCY		;SET TO COME BACK SHORTLY
   994	000217'01  202 01 0 00 000156*		MOVEM 1,SCKATM		;CAUSE CHANNEL 7 INTERRUPT IN THIS TIME
   995	000220'01  200 01 0 00 000224'	SCDW1:	MOVE 1,RSKEDT		;GET THE XPCW
   996	000221'01  250 01 0 00 000212*		EXCH 1,RSKED		;PROCESS WILL EXECUTE XPCW EVENTUALLY
   997	000222'01  254 06 0 00 000176*		XJEN PISC7R
   998
   999					;Possible contents of RSKED. RSKCHK points to RSKCH1.
  1000
  1001	000223'01  255 00 0 00 000000 	RSKEDN:	JFCL			;NO-TRAP CONTENTS OF RSKED
  1002	000224'01  254 07 0 00 000145*	RSKEDT:	XPCW RSKCHK		;TRAP CONTENTS OF RSKED
  1003
  1004					;HERE WHEN RESKED REQUEST WAITING AND PROGRAM DOES XCT RSKED
  1005
  1006	000225'01  7 004 20 0 00 004001 RSKCH1:	ISB SCDCHN		;ENTER VIA INTERRUPT
  1007	000226'01  254 00 0 00 000226'		JRST .			;WAIT FOR INTERRUPT TO HAPPEN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 14
SCHED	MAC	 7-Nov-88 20:50		Channel 7 Interrupt Routines

  1008
  1009					;CHECK IF PROCESS IS IN A SNOOP BREAK POINT
  1010					;  IF YES, THEN THE PROCESS CANNOT BE STOPPED IN CASE BP IS REMOVED
  1011
  1012	000227'01  202 01 0 00 000000*	CHKSNP:	MOVEM T1,SNPSV1		;SAVE AN AC FOR TEST
  1013	000230'01  200 01 0 00 000222*		MOVE T1,PISC7R		;GET PC OF PROCESS BEING STOPPED
  1014	000231'01  603 01 0 00 010000 		TLNE T1,(UMODF)		;IN USER MODE?
  1015	000232'01  254 00 0 00 000250'		JRST CHKSN1		;YES, OK TO STOP HIM THEN
  1016	000233'01  550 01 0 00 000000#		HRRZ T1,PISC7R+1	;PICK UP PC
  1017	000234'01  301 01 0 00 000000*		CAIL T1,UTREP		;IN THE CRITICAL UTEST ROUTINE?
  1018	000235'01  303 01 0 00 000000*		CAILE T1,UTREPE		;...
  1019	000236'01  334 00 0 00 000000 		SKIPA			;NO
  1020	000237'01  254 00 0 00 000243'		JRST CHKSN0		;YES, DO NOT RESCHEDULE NOW
  1021	000240'01  301 01 0 00 000000*		CAIL T1,SNPBPP		;IN BREAK POINT PAGES?
  1022	000241'01  303 01 0 00 000000#		CAILE T1,SNPBPP+SNPBPS+SNPDPS-1
  1023	000242'01  254 00 0 00 000250'		JRST CHKSN1		;NOT IN BP PAGES, OK TO RESKED
  1024	000243'01  337 01 0 00 000217*	CHKSN0:	SKIPG T1,SCKATM		;DID WE MISS AN ALARM?
  1025	000244'01  201 01 0 00 000002 		MOVEI T1,2		;YES. SET IT TO A SMALL VALUE THEN
  1026	000245'01  202 01 0 00 000243*		MOVEM T1,SCKATM		;MAKE SURE ALARM VALUE IS GOOD
  1027	000246'01  200 01 0 00 000227*		MOVE T1,SNPSV1		;RESTORE AC
  1028	000247'01  254 00 0 00 000212'		JRST SCDW		;SET TRAPS AND CONTINUE PROCESS
  1029
  1030	000250'01  200 01 0 00 000246*	CHKSN1:	MOVE T1,SNPSV1		;RESTORE AC
  1031	000251'01  254 00 0 00 000172'		JRST PISC7A		;SAVE CONTEXT, STOP PROCESS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 15
SCHED	MAC	 7-Nov-88 20:50		Channel 7 Interrupt Routines

  1032
  1033					;SETUP AND RESUME PROCESS
  1034					;Here when SKEDF1 is set. Main scheduler path does this around SCHED4.
  1035
  1036	000252'01			SCDR:
  1037	000252'01  402 00 0 00 000160*		SETZM SKEDF1		;CLEAR LOCAL FLAG
  1038	000253'01  402 00 0 00 000207*		SETZM INSKED		;NO LONGER IN SCHEDULER
  1039	000254'01  476 00 0 00 000110*		SETOM SSKED
  1040	000255'01  265 07 0 00 000000*		JSP FX,KISLOD		;LOAD APR-DEPENDENT STUFF
  1041
  1042					;Prepare to tell the hardware what AC blocks to use, based on the user
  1043					;mode flag in the new flags word. On the KC, the setting of the AC blocks
  1044					;will be done by the XJEN below. On the KL, we do it with a DATAO.
  1045
  1046					   IFN KLFLG,<
  1047	000256'01  200 01 0 00 000204*		MOVE 1,PFL		;GET FLAGS
  1048	000257'01  603 01 0 00 010000 		TXNE 1,UMODF		;RETURNING TO USER OR MONITOR?
  1049	000260'01  334 01 0 00 000000*		SKIPA 1,SETUSR		;USER, GET USER CONTEXT WORD
  1050	000261'01  200 01 0 00 000172*		MOVE 1,SETMON		;GET MONITOR CONTEXT WORD
  1051	000262'01  202 01 0 00 000000*		MOVEM 1,SETPAG		;SAVE FOR USE BELOW
  1052					   >				;END OF IFN KLFLG
  1053	000263'01  337 01 0 00 000245*		SKIPG T1,SCKATM		;DID WE MISS AN ALARM?
  1054	000264'01  201 01 0 00 000002 		MOVEI T1,2		;YES. SET IT TO A SMALL VALUE THEN
  1055	000265'01  202 01 0 00 000263*		MOVEM T1,SCKATM		;MAKE SURE ALARM VALUE IS GOOD
  1056	000266'01  205 17 0 00 000174*		MOVSI 17,PAC		;RESTORE PROCESS AC'S
  1057	000267'01  251 17 0 00 000017 		BLT 17,17
  1058					   IFN KLFLG,<
  1059	000270'01  7 010 14 0 00 000262*	DATAO PAG,SETPAG	;SET AC BLOCKS
  1060					   >				;END OF IFN KLFLG
  1061
  1062					;See whether process was NOSKED or running in critical code. If so, set
  1063					;up RSKED so that the scheduler will be run as soon as possible.
  1064					;In either case, dismiss the interrupt and run the process.
  1065
  1066	000271'01  336 00 0 00 000165*		SKIPN NSKED		;RESUMING NOSKED PROCESS?
  1067	000272'01  332 00 0 00 000000*		SKIPE CRSKED		;OR CSKED PROCESS?
  1068	000273'01  334 00 0 00 000000 		SKIPA
  1069	000274'01  254 06 0 00 000256*		XJEN PFL		;RUN PROCESS
  1070	000275'01  350 00 0 00 000163*		AOS SKEDF3		;YES, REMEMBER SCHEDULING NEEDED
  1071	000276'01  202 01 0 00 000221*		MOVEM 1,RSKED		;SAVE THE AC
  1072	000277'01  200 01 0 00 000224'		MOVE 1,RSKEDT		;GET THE XPCW TO FORCE SCHEDULER TO RUN
  1073	000300'01  250 01 0 00 000276*		EXCH 1,RSKED		; WHEN THE PROCESS ALLOWS IT
  1074	000301'01  254 06 0 00 000274*		XJEN PFL		;RUN PROCESS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 16
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1075						SUBTTL Routines to Enter Scheduler
  1076
  1077					;VARIOUS WAYS OF ENTERING SCHEDULER
  1078
  1079					;JSYS HALTF - DISMISS FORK UNTIL INTERRUPT OR EXTERNALLY RESTARTED
  1080
  1081	000302'01			.HALTF::MCENT
  1082	000302'01			HALTF1::			;FORK TERM
  1083	000302'01  260 17 0 00 007024'	HALTX:	CALL GETSFX		;GET SUPERIOR FORK INDEX
  1084	000303'01  541 01 0 00 000307'		HRRI 1,HALTT
  1085	000304'01  205 02 0 00 000001 		MOVSI T2,FHV1		;SAY LOW PRIORITY WAIT
  1086	000305'01  265 16 0 00 000351'		HDISMS
  1087	000306'01  254 00 0 00 007714'		JRST MRETN		;IF CONTINUED
  1088
  1089	000307'01  254 00 0 04 000000 	HALTT::	JRST 0(4)		;IDENTIFIABLE TEST FOR HALTED FORK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 17
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1090
  1091					;SCHEDULING CONTROL MACROS
  1092					;NOSKED AND NOSKD1 EXECUTE A NOINT
  1093					;OKSKED AND OKSKD1 EXECUTE AN OKINT
  1094
  1095					;NOSKD1 - ENTERED VIA JSP CX,NOSK11
  1096
  1097	000310'01			NOSKD0::			;TAG FOR HISTORICAL REASONS
  1098	000310'01  332 00 0 00 000253*	NOSK11::SKIPE INSKED
  1099	000311'01  254 00 0 16 000000 		JRST 0(CX)
  1100	000312'01  350 00 0 00 000000*		AOS INTDF
  1101	000313'01  350 00 0 00 000271*		AOS NSKED
  1102	000314'01  254 00 0 16 000000 		JRST 0(CX)
  1103
  1104					;OKSKD1 - ENTERED VIA JSP CX,OKSK11
  1105
  1106	000315'01			OKSK11::
  1107	000315'01  332 00 0 00 000310*	OKSKD0::SKIPE INSKED
  1108	000316'01  254 00 0 16 000000 		JRST 0(CX)
  1109	000317'01  337 00 0 00 000313*		SKIPG NSKED		; ARE WE REALLY NOSKED?
  1110					OKSKE1:	 BUG.(HLT,OKSKBG,SCHED,SOFT,<OKSKD0 - OKSKED when not NOSKED>,<<CX,ADR>>,<
  1111					
  1112					Cause:	An OKSKED or OKSKD1 was done when the code was not NOSKED.
  1113						This is bad as sensitive code may be getting ruined because 
  1114						of races etc..  A NSKDIS would probably have resulted when a
  1115						DISMS was done later on.
  1116					
  1117					Data:	ADR - Address of caller
  1118					
  1119	000320'01  256 00 0 00 010323'	>)
  1120
  1121	000321'01  377 00 0 00 000317*		SOSG NSKED
  1122	000322'01  256 00 0 00 000300*		XCT RSKED
  1123	000323'01  256 00 0 00 000000*		XCT INTDFF
  1124	000324'01  254 00 0 16 000000 		JRST 0(CX)
  1125
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 18
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1126					;CHECK FOR INTERRUPT PENDING ON THIS FORK
  1127					;MAY BE CALLED FROM SCHED CONTEXT
  1128					;PRESERVES ALL ACS
  1129
  1130	000325'01  265 16 0 00 010326'	CKINT0::SAVEAC <FX>
  1131	000326'01  331 07 0 00 000106*		SKIPL FX,FORKX		;GET CURRENT FORK
  1132	000327'01  200 16 0 07 000000*		JE FKPS0,(FX),R		;RETURN IF NO INTERRUPT IS PENDING
  1133	000330'01  325 16 0 00 000000*
  1134	000331'01  350 00 0 00 000275*		AOS SKEDF3		;REQUEST RESKED
  1135	000332'01  7 004 20 0 00 004001 	ISB SCDCHN		;INTERRUPT ON SCHEDULER CHANNEL
  1136	000333'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 19
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1137
  1138					;CRITICAL SECTION, BGN AND END
  1139					;INVOKED BY CSKED AND ECSKED MACROS
  1140
  1141	000334'01  332 00 0 00 000315*	CRSKD0::SKIPE INSKED
  1142	000335'01  254 00 0 16 000000 		JRST 0(CX)
  1143	000336'01  350 00 0 00 000312*		NOINT			;IMPLIES NOINT ALSO
  1144	000337'01  350 00 0 00 000272*		AOS CRSKED
  1145	000340'01  254 00 0 16 000000 		JRST 0(CX)
  1146
  1147	000341'01  332 00 0 00 000334*	ECSKD0::SKIPE INSKED
  1148	000342'01  254 00 0 16 000000 		JRST 0(CX)
  1149	000343'01  337 00 0 00 000337*		SKIPG CRSKED		;REALLY CSKED?
  1150						 BUG.(HLT,CSKBUG,SCHED,SOFT,<ECSKED when not CSKED>,,<
  1151					
  1152					Cause:	An ECSKED was done when the code was not really CSKED. This may 
  1153						cause sensitive code to be ruined because of races.
  1154					
  1155	000344'01  256 00 0 00 010334'	>)
  1156
  1157	000345'01  377 00 0 00 000343*		SOSG CRSKED		;NOW OUT OF ALL CRITICAL SECTIONS?
  1158	000346'01  256 00 0 00 000322*		XCT RSKED		;YES, CHECK FOR DEFERRED RESCHEDULE
  1159	000347'01  256 00 0 00 000323*		OKINT
  1160	000350'01  254 00 0 16 000000 		JRST 0(CX)
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 20
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1161
  1162					;DISMISS WITH HOLD TIME--KEEP IN BALSET FOR SPECIFIED TIME BECAUSE
  1163					;BLOCK EXPECTED TO BE SATISFIED IN THAT TIME.
  1164					; 1/ USUAL DISMISS TEST
  1165					; 2/ HOLD TIME IN MILLISECONDS
  1166					;NORMALLY INVOKED VIA HDISMS(HT) MACRO
  1167
  1168	000351'01  332 00 0 00 000341*	EDMSH::	ENTSKD			;ENTER SCHED
  1169	000352'01  260 17 0 00 000537'
  1170	000353'01  350 00 0 00 000351*
  1171	000354'01  254 07 0 00 000000*
  1172	000355'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;MASK OFF FLAGS BITS IF SEC 0
  1173	000356'01  202 16 0 00 000000*		MOVEM CX,PPC		;SAVE PC
  1174	000357'01  200 16 0 00 000354*		MOVE CX,ENSKR		;FIND FLAGS
  1175	000360'01  202 16 0 00 000301*		MOVEM CX,PFL		;SET FLAGS
  1176	000361'01  254 00 0 00 000376'		JRST DISMSH		;JOIN REGULAR DISMISS BUT KEEP 2
  1177
  1178					;EXEC DISMISS - AC1 CONTAINS  XWD DATA,TEST ROUTINE ADR
  1179
  1180	000362'01  332 00 0 00 000353*	EDMS0::	ENTSKD			;ENTER SCHEDULER
  1181	000363'01  260 17 0 00 000537'
  1182	000364'01  350 00 0 00 000362*
  1183	000365'01  254 07 0 00 000357*
  1184	000366'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;MASK OFF FLAGS INCASE SECTION 0
  1185	000367'01  202 16 0 00 000356*		MOVEM CX,PPC		;RETURN BECOMES PROCESS PC
  1186	000370'01  200 16 0 00 000365*		MOVE CX,ENSKR		;FIND FLAGS ON THIS CALL
  1187	000371'01  202 16 0 00 000360*		MOVEM CX,PFL		;SAVE FLAGS
  1188	000372'01  200 17 0 00 001235'	DISMSE:	MOVE P,PI7P		;INIT SCHED STACK
  1189	000373'01  201 02 0 00 000000 		MOVEI 2,0		;SAY 0 HOLD TIME
  1190	000374'01  332 00 0 00 000345*		SKIPE CRSKED		;CRITICAL SECTION?
  1191	000375'01  201 02 0 00 000310 		MOVEI T2,^D200		;YES, STAY IN BALSET FOR A WHILE
  1192	000376'01  261 17 0 00 000002 	DISMSH:	PUSH P,2		;SAVE HOLD TIME
  1193	000377'01  550 02 0 00 000001 		HRRZ T2,T1		;GET ADR OF ROUTINE
  1194	000400'01  336 00 0 00 000321*		SKIPN NSKED		;CHECK FOR BUGGY DISMISS
  1195	000401'01  303 02 0 00 000000*		CAILE T2,RSCODZ		;CHECK FOR A NON-RESIDENT TEST ROUTINE
  1196						BUG.(HLT,NSKDIS,SCHED,HARD,<Dismiss while nosked or with non-res test address>,,<
  1197					
  1198					Cause:	A process has declared its intention to cease running (dismiss) until
  1199						a particular event occurs. The scheduler will test for the occurrence
  1200						of the event by calling a routine that the process has provided.  The
  1201						BUGHLT occurs if one of the following happens:
  1202							
  1203						     1. The process has already declared itself to be
  1204						   	NOSKED, thereby preventing the running of other processes;
  1205						
  1206						     2. The test routine is in  part of the monitor's swappable code
  1207						   	and could therefore cause an illegal page fault in the
  1208						   	scheduler.
  1209					
  1210	000402'01  256 00 0 00 010336'	>)
  1211
  1212	000403'01  202 01 0 07 000000*		STOR T1,FKSTX,(FX)	;PUT IN TEST WORD
  1213						; ..
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 21
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1214
  1215						; ..
  1216	000404'01			FRIBP2::!			;(WATCH BPT TAG)
  1217	000404'01  260 17 0 00 003417'		CALL SAVRT		;
  1218	000405'01  550 01 0 07 000403*		LOAD 1,FKSTR,(FX)	;GET SCHEDULER TEST
  1219	000406'01  302 01 0 00 000307'		CAIE 1,HALTT		;FORK TERMINATING?
  1220	000407'01  306 01 0 00 007031'		CAIN 1,FORCTM
  1221	000410'01  260 17 0 00 004173'		CALL SUPUNB		;YES, UNBLOCK SUPERIOR IF NECESSARY
  1222	000411'01  200 03 0 00 000000*		MOVE T3,JOBNO		;GET JOB NUMBER
  1223	000412'01  200 03 1 00 010340'		MOVE T3,@[EP. JOBCLS(T3)]	;GET COUNT OF GOLST PROCESSES
  1224	000413'01  607 03 0 00 777776 		TLNN T3,777776		;IS THIS HE LAST ONE?
  1225	000414'01  402 00 0 00 000000*		SETZM JOBCK0		;INIT MEASURING INTERVAL
  1226	000415'01  262 17 0 00 000002 		POP P,2			;RECOVER HOLD TIME
  1227	000416'01  554 03 0 00 000002 		HLRZ T3,T2		;GET WAIT PRIORITY
  1228	000417'01  306 03 0 00 000000 		CAIN T3,0		;GIVEN?
  1229	000420'01  201 03 0 00 000003 		MOVEI T3,FHV3		;NO, DEFAULT TO MIDDLE VAL
  1230	000421'01  506 03 0 07 000000*		STOR T3,FKGOLN		;SAVE IT
  1231	000422'01  550 02 0 00 000002 		HRRZ T2,T2
  1232	000423'01  326 02 0 00 000431'		IFE. T2			;IF 0 HOLD TIME,
  1233	000424'01  260 17 0 00 003142'		  CALL REMBSJ		;IF 0 HOLD TIME, REMOVE IMMEDIATELY
  1234	000425'01  260 17 0 00 004354'		  CALL GLREM		;REMOVE FROM GOLST
  1235	000426'01  260 17 0 00 003753'		  CALL WTCONC
  1236	000427'01  477 07 0 00 000326*		  SETOB FX,FORKX
  1237	000430'01  254 00 0 00 001063'		  JRST SCHED0
  1238	000431'01				ENDIF.
  1239	000431'01  200 01 0 00 000000*		MOVE 1,TODCLK		;HOLD IN BALSET
  1240	000432'01  405 01 0 00 377777 		ANDI 1,377777
  1241	000433'01  271 01 0 02 000000 		ADDI 1,0(2)		;CONSTRUCT SPECIAL TEST FOR HOLD TIME
  1242	000434'01  506 01 0 07 000000*		STOR T1,FKPTD,(FX)	;SAVE TEST DATA
  1243	000435'01  201 01 0 00 002265'		MOVEI 1,DISMT
  1244	000436'01  542 01 0 07 000434*		STOR 1,FKPTR,(FX)	;SAVE TEST ROUTINE
  1245	000437'01  350 00 0 00 000000*		AOS NHOLDF		;COUNT HOLDING FORKS
  1246	000440'01  254 00 0 00 000456'		JRST SCHP3
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 22
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1247
  1248					;RESCHEDULE ON PAGE WAIT
  1249
  1250					;CALLED VIA JSP CX,SCHEDP
  1251					;	T1/ Scheduler test
  1252
  1253	000441'01  621 16 0 00 777740 	SCHEDP::TXZ CX,EXFLBT		;MASK OFF FLAGS INCASE SECTION 0
  1254	000442'01  254 14 0 00 000000*		XSFM SKDFL		;STORE FLAGS
  1255	000443'01  202 16 0 00 000000*		MOVEM CX,SKDPC		;STORE PC
  1256	000444'01  332 00 0 00 000364*		ENTSKD
  1257	000445'01  260 17 0 00 000537'
  1258	000446'01  350 00 0 00 000444*
  1259	000447'01  254 07 0 00 000370*
  1260	000450'01  261 17 0 00 000001 	SCHP1:	PUSH P,1
  1261	000451'01  260 17 0 00 003417'		CALL SAVRT
  1262	000452'01  262 17 0 00 000001 		POP P,1
  1263	000453'01  202 01 0 07 000436*		STOR 1,FKPTX,(FX)	;SAVE SCHEDULER TEST WORD
  1264	000454'01  120 01 0 00 000442*		DMOVE 1,SKDFL		;GET FLAGS AND PC
  1265	000455'01  124 01 0 00 000371*		DMOVEM 1,PFL		;SAVE THEM IN PSB
  1266
  1267					IFN SKEDSW,<
  1268					
  1269						HRRZ T1,PPC		;Keep a record of PC's that call this routine
  1270						SKIPE NSKED		;BLOCK WHILE NOSKED?
  1271						CALL NBNSB		;YES, SAVE PC
  1272					
  1273						>			;END IFN SKEDSW
  1274
  1275					;Here to complete the dismiss. FKPGST contains scheduler test word
  1276
  1277	000456'01  200 01 0 00 000431*	SCHP3:	MOVE 1,TODCLK		;REMEMBER TIME WAIT STARTED
  1278	000457'01  202 01 0 07 000000*		STOR 1,FKNB%,(FX)
  1279	000460'01  350 00 0 00 000000*		AOS NBWT		;COUNT WAITING BALSET PROCESS
  1280	000461'01  550 01 0 07 000453*		LOAD T1,FKPTR,(FX)	;GET SCHEDULER TEST ROUTINE
  1281	000462'01  302 01 0 00 000000*		CAIE T1,SWPINT		;SWAP WAIT?
  1282	000463'01  306 01 0 00 000000*		CAIN T1,SWPRT
  1283	000464'01  350 00 0 00 000000*		AOS NBSWP		;YES, COUNT
  1284	000465'01  205 01 0 00 040000 		MOVX T1,BSWTB
  1285	000466'01  260 17 0 00 000470'		CALL SCHP2
  1286	000467'01  254 00 0 00 001063'		JRST SCHED0
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 23
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1287
  1288					;RETAIN FORK IN BALSET, SET FLAGS, ETC.
  1289
  1290					;ACCEPTS:
  1291					;	T1/ Flags to store into FKSWP
  1292
  1293					;	CALL SCHEDR
  1294
  1295					;Returns +1: always
  1296
  1297	000470'01  436 01 0 07 000000*	SCHP2:	OPSTRM <IORM T1,>,FKSWX,(FX)
  1298	000471'01  332 00 0 00 000400*		SKIPE NSKED
  1299	000472'01  202 07 0 00 000254*		MOVEM FX,SSKED		;REMEMBER FORK NUMBER OF NOSKED FORK
  1300	000473'01  477 07 0 00 000427*		SETOB FX,FORKX
  1301	000474'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 24
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1302
  1303					;DO OKSKED AND RESCHEDULE
  1304
  1305	000475'01  621 16 0 00 777740 	SCHEDR::TXZ CX,EXFLBT		;CLEAR FLAGS INCASE SECTION 0
  1306	000476'01  254 14 0 00 000454*		XSFM SKDFL		;SET FLAGS
  1307	000477'01  202 16 0 00 000443*		MOVEM CX,SKDPC
  1308	000500'01  332 00 0 00 000446*		ENTSKD
  1309	000501'01  260 17 0 00 000537'
  1310	000502'01  350 00 0 00 000500*
  1311	000503'01  254 07 0 00 000447*
  1312	000504'01  375 00 0 00 000471*		SOSGE NSKED
  1313						BUG.(HLT,ILOKSK,SCHED,,<OKSKED executed when not NOSKED>,,<
  1314					
  1315					Cause:	A process has declared itself to be OKSKED and ready to cease running
  1316						(dismiss) until some event occurs.  This BUGHLT occurs because the
  1317						process is OKSKED, indicating a mismatch of NOSKED and OKSKED states.
  1318					
  1319	000505'01  256 00 0 00 010341'	>)
  1320
  1321	000506'01  370 00 0 00 000336*		SOS INTDF		;FIX UP NOINT AS WELL
  1322	000507'01  254 00 0 00 000450'		JRST SCHP1
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 25
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1323
  1324					;COMMON SCHEDULER ENTER ROUTINE, SAVE AC'S
  1325					; ** INSKED MUST BE NON-0 BEFORE THIS CALL **
  1326
  1327					;Here via ENTSKD macro, which executes XPCW ENSKR
  1328
  1329	000510'01  202 17 0 00 000000#	ENSKED::MOVEM 17,PAC+17		;SAVE PROCESS AC'S
  1330	000511'01  201 17 0 00 000266*		MOVEI 17,PAC
  1331	000512'01  251 17 0 00 000000#		BLT 17,PAC+16
  1332	000513'01  265 07 0 00 000210*		JSP FX,KISSAV		;SAVE APR-DEPENDENT STUFF
  1333	000514'01  200 07 0 00 000473*		MOVE FX,FORKX		;GET INDEX OF CURRENT FORK
  1334	000515'01  200 17 0 00 001235'		MOVE P,PI7P		;GET PDL POINTER
  1335	000516'01  260 17 0 00 000000*		CALL UPDTCK		;UPDATE TODCLK
  1336	000517'01  205 01 0 00 000000*		MOVSI T1,MSEC1
  1337	000520'01  502 01 0 00 000000#		HLLM T1,ENSKR+1		;FORCE RETURN TO SECION 1
  1338	000521'01  120 01 0 00 000000#		DMOVE T1,PAC+1		;RESTORE T1 AND T2
  1339	000522'01  254 05 0 00 000503*		XJRSTF ENSKR
  1340
  1341					;Enter here from APRSRV handling overflow traps
  1342
  1343	000523'01  202 01 0 00 000000*	KITRP1::MOVEM 1,KIMUEF		;SAVE CHANNEL NUMBER
  1344	000524'01  332 00 0 00 000502*		ENTSKD			;ENTER SCHEDULER CONTEXT
  1345	000525'01  260 17 0 00 000537'
  1346	000526'01  350 00 0 00 000524*
  1347	000527'01  254 07 0 00 000522*
  1348	000530'01  200 01 0 00 000523*		MOVE 1,KIMUEF		;CHANNEL NUMBER
  1349	000531'01  200 02 0 00 000514*		MOVE 2,FORKX
  1350	000532'01  322 01 0 00 000534'		IFN. T1			;FOUND ANYTHING?
  1351	000533'01  260 17 0 00 006026'		  CALL PSIRQ		;YES, REQUEST INTERRUPT
  1352	000534'01				ENDIF.
  1353	000534'01  120 01 0 00 000000*		DMOVE 1,KIMUFL
  1354	000535'01  124 01 0 00 000455*		DMOVEM 1,PFL		;MOVE PC TO PSB
  1355	000536'01  254 00 0 00 001063'		JRST SCHED0		;GO TO SCHEDULER
  1356
  1357					;Several cases come here via CALL - like Charlie on the MTA, it never returns...
  1358
  1359					REEBUG:	BUG.(HLT,SKDCL1,SCHED,HARD,<Call to scheduler when already in scheduler>,,<
  1360					
  1361					Cause:	Code running in scheduler context has attempted to dismiss, block
  1362						or page fault thereby trying to enter scheduler context again.
  1363						This might result from an unexpected page fault or faulty logic,
  1364						i.e. the code doing the dismiss was not expected to be run
  1365						in scheduler context.
  1366					
  1367	000537'01  256 00 0 00 010343'	>)		;SOME SORT OF DISMISS IN SCHED
  1368
  1369
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 26
SCHED	MAC	 7-Nov-88 20:50		Routines to Enter Scheduler

  1370
  1371
  1372					IFN SKEDSW,<
  1373					;ROUTINE TO SAVE PC'S WHICH CAUSE NOSKED BLOCKS
  1374					;CALLED FROM PGRTRP ALSO.  ALL CALLS CURRENTLY UNDER SKEDSW CONDITIONAL
  1375					; T1/ PC TO SAVE
  1376					
  1377					NBNSB::	HRLZ T4,NNSBE		;NEG NUMBER TABLE ENTRIES IN USE
  1378						JUMPGE T4,NBNS2		;JUMP IF TABLE EMPTY
  1379					NBNS1:	HLRZ T2,NSBTAB(T4)
  1380						CAMN T1,T2		;ALREADY HAVE THIS PC?
  1381						JRST NBNS3		;YES, JUST COUNT IT
  1382						AOBJN T4,NBNS1		;CHECK ALL ENTRIES
  1383					NBNS2:	CAIL T4,NNSBT		;TABLE FULL?
  1384						RET			;YES, CAN'T ADD NEW ENTRY
  1385						HRLZM T1,NSBTAB(T4)	;ADD NEW PC TO TABLE
  1386						MOVNI T2,1(T4)		;INCREMENT USE COUNT
  1387						MOVEM T2,NNSBE
  1388					NBNS3:	AOS NSBTAB(T4)		;COUNT OCCURRANCES
  1389						RET
  1390					
  1391					NNSBT==^D100			;SIZE OF PC TABLE
  1392					RS NSBTAB,NNSBT			; PC,,COUNT
  1393					RS NNSBE,1			;NUMBER OF ENTRIES IN USE
  1394						>			;END IFN SKEDSW
  1395
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 27
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1396						SUBTTL Instruction trapping (ITRAP)
  1397
  1398					;INSTRUCTION TRAP - TRAP PC IN FPC, ASSUMED TO BE I +1
  1399
  1400					;Called via JSP T2,ITRAP1 (or JRST ITRAP) in process context
  1401
  1402	000540'01  202 01 0 00 000000*	ITRAP1::MOVEM 1,LSTERR		;SAVE ERROR CODE GIVEN IN 1
  1403	000541'01  202 02 0 00 000000*	ITRAP::	MOVEM T2,LSTIPC		;SAVE LAST ITRAP PC
  1404
  1405					;Check for illegal conditions
  1406
  1407	000542'01  332 00 0 00 000526*		SKIPE INSKED
  1408						BUG.(HLT,SKDTRP,SCHED,HARD,<Instruction trap while in scheduler>,<<KIMUPC,PC>,<LSTER
  1409					R,LSTERR>,<LSTIPC,ERRPC>>,<
  1410					
  1411					Cause:	An error occurred, resulting in an illegal instruction
  1412						trap. If a JSYS is being executed by the monitor, the
  1413						process normally receives an error return when this happens.
  1414						However, in this case the error occurred in the scheduler,
  1415						and there is no recovery.
  1416					
  1417					Data:	PC - PC of last MUUO.  This may or may not be relevant
  1418						LSTERR - Last error code.  This may indicate where error was
  1419							 generated
  1420						ERRPC -  PC where ITRAP was called
  1421	000543'01  256 00 0 00 010345'	>)
  1422
  1423	000544'01  331 00 0 00 000531*		SKIPL FORKX		;NO FORK RUNNING, OR
  1424	000545'01  7 004 30 0 00 077400 	CONSZ PI,177B27		;PI IN PROGRESS?
  1425						BUG.(HLT,PIITRP,SCHED,HARD,<Instruction trap while PI in progress or in scheduler>,<
  1426					<LSTERR,LSTERR>,<LSTIPC,ERRPC>>,<
  1427					
  1428					Cause:	An error occurred, resulting in an illegal instruction trap. If a JSYS
  1429						was being executed by the monitor, the process would receive an
  1430						error return.  However, in this case the error occurred  while a
  1431						hardware interrupt (PI) was being processed, or while the monitor was
  1432						executing code that starts the scheduler cycle.
  1433					
  1434					Data:	LSTERR - Last error code.  This may indicate where error was
  1435							 generated.
  1436						ERRPC - PC at which error was generated.
  1437	000546'01  256 00 0 00 010352'	>)
  1438
  1439
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 28
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1440
  1441	000547'01  331 00 0 00 000000*		SKIPL SLOWF		;NOW IN SLOW CODE?
  1442	000550'01  254 00 0 00 000552'		IFSKP.
  1443						  BUG.(HLT,ITNOJC,SCHED,HARD,<Instruction trap not in JSYS context>,<<LSTERR,LSTERR>
  1444					,<LSTIPC,ERRPC>,<KIMUPC,MUUOPC>>,<
  1445					
  1446					Cause:	The illegal instruction trap handler has been entered, but the
  1447						process is not in JSYS context.
  1448					
  1449					Data:	LSTERR - Last error code
  1450						ERRPC - PC at which error was generated
  1451						MUUOPC - Last MUUO PC
  1452	000551'01  256 00 0 00 010356'	>)
  1453
  1454	000552'01				ENDIF.
  1455	000552'01  120 01 0 00 000000*		DMOVE 1,KIMUU1		;GET LAST USER MUUO
  1456	000553'01  124 01 0 00 000000*		DMOVEM 1,UMUUOW		;SAVE AS TRAPPED INSTRUCTION
  1457	000554'01  200 17 0 00 000000*		MOVE P,MPP		;GET LAST STACK FRAME
  1458	000555'01  402 00 0 00 000506*		SETZM INTDF		;NORMALIZE AND PREVENT INTERRUPTS
  1459
  1460					;See if previous context is monitor and ERJMP present.
  1461
  1462	000556'01  120 01 0 17 777777 		DMOVE T1,-1(P)		;GET RETURN PC AND FLAGS
  1463	000557'01  250 01 0 00 000002 		EXCH T1,T2		;IN PROPER ORDER...
  1464	000560'01  603 01 0 00 010000 		TXNE T1,UMODF		;FROM MONITOR?
  1465	000561'01  254 00 0 00 000566'		IFSKP.
  1466	000562'01  260 17 0 00 010020'		  CALL ITRSIM
  1467	000563'01  254 00 0 00 000566'		ANSKP.
  1468	000564'01  202 03 0 17 777777 		  MOVEM T3,-1(P)	;ERJMP BACK TO MONITOR, OK.
  1469	000565'01  254 00 0 00 007714'		  JRST MRETN		;DO IT
  1470	000566'01				ENDIF.
  1471
  1472					;Here if the previous level was user or monitor without ERJMP.
  1473
  1474					;We should not be NOSKED or CSKED.  I.e., the JSYS code at this level should
  1475					;have cleaned up before going to ITRAP.  If it didn't, the trap is probably
  1476					;unexpected.
  1477
  1478	000566'01  336 00 0 00 000374*		SKIPN CRSKED
  1479	000567'01  332 00 0 00 000504*		SKIPE NSKED		;CHECK FOR PROPER STATE
  1480						  BUG.(HLT,NOSKTR,SCHED,SOFT,<ITRAP from NOSKED or CSKED context>,<<KIMUPC,MUUOPC>,<
  1481					LSTERR,LSTERR>,<LSTIPC,LSTIPC>>,<
  1482					
  1483					Cause:	An illegal instruction trap has occurred while the process
  1484						was NOSKED or CSKED.  This suggests that important
  1485						resources may be left locked.
  1486					
  1487					Action:	See if this is reproducible, and if so, report the
  1488						sequence to Software Engineering.
  1489					
  1490					Data:	MUUOPC - PC of last MUUO
  1491						LSTERR - Last error code
  1492						LSTIPC - PC from which ITRAP was called
  1493	000570'01  256 00 0 00 010363'	>)
  1494
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 28-1
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1495
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 29
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1496
  1497					;See if previous context was user
  1498
  1499	000571'01  607 01 0 00 010000 		TXNN T1,UMODF
  1500	000572'01  254 00 0 00 000577'		IFSKP.
  1501	000573'01  260 17 0 00 010020'		  CALL ITRSIM		;YES, CHECK FOR ERJMP
  1502	000574'01  254 00 0 00 000601'		   JRST ITR2		;NONE, GO DO INTERRUPT
  1503	000575'01  202 03 0 17 777777 		  MOVEM T3,-1(P)	;YES, DO IT
  1504	000576'01  254 00 0 00 007714'		  JRST MRETN
  1505	000577'01				ENDIF.
  1506
  1507					;Here only if previous context is monitor without ERJMP.
  1508
  1509						BUG.(CHK,MONNEJ,SCHED,SOFT,<Nested JSYS without ERJMP>,<<T1,FLAGS>,<T2,PC>>,<
  1510					
  1511					Cause:	An illegal instruction trap has occurred and the previous context
  1512						is the monitor but no ERJMP is present following the nested
  1513						JSYS call.  This violates required coding practice because
  1514						the previous context may have locks that need to be released.
  1515					
  1516					Action:	If this is reproducible, report the circumstances to
  1517						Software Engineering.
  1518					
  1519					Data:	FLAGS - Processor flags
  1520						PC - PC at which faulty nested JSYS was done
  1521	000000'04  000000  000000	>)
  1522	000577'01  256 00 0 00 010370'
  1523
  1524
  1525	000600'01  254 00 0 00 007714'		JRST MRETN		;RETURN +1 ANYHOW
  1526
  1527
  1528					;Got to top of stack without an ERJMP. Give an interrupt to the user.
  1529
  1530	000601'01  200 01 0 00 005666'	ITR2:	MOVE 1,CHNSON
  1531	000602'01  412 01 0 00 000000*		ANDCAM 1,PSIBW		;FLUSH PREVIOUS PANIC BREAKS
  1532	000603'01  201 01 0 00 000017 		MOVEI 1,.ICILI		;INITIATE CHANNEL 15 INTERRUPT
  1533	000604'01  260 17 0 00 006012'		CALL PSIRQ0
  1534	000605'01  260 17 0 00 000325'		CHKINT			;GET THE INTERRUPT "SEEN"
  1535	000606'01  256 00 0 00 000347*		OKINT			;INTERRUPT SHOULD TAKE HERE
  1536	000607'01  254 00 0 00 007714'		JRST MRETN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 30
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1537
  1538					;BLOCK UNTIL CONDITION SATISFIED
  1539					;BLOCK0 - STAYS IN BALSET,  BLOCK1 - LEAVES BALSET
  1540					;BLOCKE - LIKE BLOCK1 BUT GO ECSKED FIRST
  1541
  1542	000610'01  275 16 0 00 000002 	BLOCK0::SUBI CX,2		;MAKE RETURN TO CALL-1
  1543	000611'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;CLEAR FLAGS INCASE SECTION 0
  1544	000612'01  254 14 0 00 000476*		XSFM SKDFL		;STORE FLAGS
  1545	000613'01  202 16 0 00 000477*		MOVEM CX,SKDPC
  1546	000614'01  332 00 0 00 000542*		ENTSKD
  1547	000615'01  260 17 0 00 000537'
  1548	000616'01  350 00 0 00 000614*
  1549	000617'01  254 07 0 00 000527*
  1550	000620'01  260 17 0 00 000640'		CALL BLOCKS
  1551	000621'01  254 00 0 00 000450'		JRST SCHP1
  1552
  1553	000622'01  261 17 0 00 000016 	BLOCKE::PUSH P,CX		;SAVE CX
  1554	000623'01  265 16 0 00 000341'		ECSKED			;NOT CRITICAL NOW
  1555	000624'01  262 17 0 00 000016 		POP P,CX		;RESTORE CX
  1556	000625'01  332 00 0 00 000616*	BLOCK1::ENTSKD
  1557	000626'01  260 17 0 00 000537'
  1558	000627'01  350 00 0 00 000625*
  1559	000630'01  254 07 0 00 000617*
  1560	000631'01  260 17 0 00 000640'		CALL BLOCKS
  1561	000632'01  275 16 0 00 000002 		SUBI CX,2		;MAKE RETURN TO CALL-1
  1562	000633'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;CLEAR FLAGS INCASE SECTION0
  1563	000634'01  202 16 0 00 000367*		MOVEM CX,PPC		;RETURN BECOMES PROCESS PC
  1564	000635'01  200 16 0 00 000630*		MOVE CX,ENSKR		;PICK UP CALLERS FLAGS
  1565	000636'01  202 16 0 00 000535*		MOVEM CX,PFL
  1566	000637'01  254 00 0 00 000372'		JRST DISMSE
  1567
  1568	000640'01  211 01 0 00 000000#	BLOCKS:	MOVNI 1,^D100*NTMS
  1569	000641'01  272 01 0 00 000000*		ADDM T1,BSQNT		;CHARGE QUANTUM
  1570	000642'01  200 01 0 00 000456*		MOVE 1,TODCLK
  1571	000643'01  405 01 0 00 377777 		ANDI 1,377777
  1572	000644'01  271 01 0 00 001750 		ADDI 1,^D1000		;ADD 1000 MILLISECS
  1573	000645'01  205 01 0 01 000000 		MOVSI 1,0(1)
  1574	000646'01  541 01 0 00 000651'		HRRI 1,BLOCKW
  1575	000647'01  263 17 0 00 000000 		RET
  1576
  1577					;SHORT WAIT TEST.  RETURNS NUMBER OF MS LEFT TO WAIT
  1578
  1579	000650'01  255 00 0 00 000000 	BLOCKM::JFCL			;SCHED TEST FOR .5 TO 64 SEC.
  1580	000651'01  200 02 0 00 000642*	BLOCKW::MOVE 2,TODCLK		;SCHEDULER TEST, GET TIME
  1581	000652'01  405 02 0 00 377777 		ANDI 2,377777
  1582	000653'01  274 01 0 00 000002 		SUB 1,2			;DESIRED - NOW = WAIT LEFT
  1583	000654'01  323 01 0 04 000001 	BLK2:	JUMPLE 1,1(4)		;NO WAIT TIME LEFT
  1584	000655'01  305 01 0 00 200000 		CAIGE 1,200000		;BIG DIFFERENCE?
  1585	000656'01  254 00 0 04 000000 		JRST 0(4)		;NO, KEEP WAITING
  1586	000657'01  275 01 0 00 400000 		SUBI 1,400000		;YES, COMPENSATE FOR WRAPAROUND
  1587	000660'01  254 00 0 00 000654'		JRST BLK2
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 31
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1588
  1589					;DISMISS UNTIL WORD .GE. 0
  1590
  1591	000661'01  261 17 0 00 000001 	DISGE::	PUSH P,1
  1592	000662'01  505 01 0 00 000667'		HRLI 1,DISGET		;GIVEN MON ADDRESS IN 1
  1593	000663'01  204 01 0 00 000001 	DISXE:	MOVS 1,1
  1594	000664'01  265 16 0 00 000362'		MDISMS
  1595	000665'01  262 17 0 00 000001 		POP P,1
  1596	000666'01  263 17 0 00 000000 		RET
  1597
  1598	000667'01  335 00 0 01 000000 	DISGET::SKIPGE 0(1)
  1599	000670'01  254 00 0 04 000000 		JRST 0(4)
  1600	000671'01  254 00 0 04 000001 		JRST 1(4)
  1601
  1602					;DISMISS UNTIL WORD .L. 0
  1603
  1604	000672'01  261 17 0 00 000001 	DISL::	PUSH P,1
  1605	000673'01  505 01 0 00 000675'		HRLI 1,DISLT
  1606	000674'01  254 00 0 00 000663'		JRST DISXE
  1607
  1608	000675'01  331 00 0 01 000000 	DISLT::	SKIPL 0(1)
  1609	000676'01  254 00 0 04 000000 		JRST 0(4)
  1610	000677'01  254 00 0 04 000001 		JRST 1(4)
  1611
  1612					;DISMISS UNTIL WORD .G. 0
  1613
  1614	000700'01  261 17 0 00 000001 	DISG::	PUSH P,1
  1615	000701'01  505 01 0 00 000703'		HRLI 1,DISGT
  1616	000702'01  254 00 0 00 000663'		JRST DISXE
  1617
  1618	000703'01  337 00 0 01 000000 	DISGT::	SKIPG 0(1)
  1619	000704'01  254 00 0 04 000000 		JRST 0(4)
  1620	000705'01  254 00 0 04 000001 		JRST 1(4)
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 32
SCHED	MAC	 7-Nov-88 20:50		Instruction trapping (ITRAP)

  1621
  1622					;DISMISS UNTIL WORD .LE. 0
  1623
  1624	000706'01  261 17 0 00 000001 	DISLE::	PUSH P,1
  1625	000707'01  505 01 0 00 000711'		HRLI 1,DISLET
  1626	000710'01  254 00 0 00 000663'		JRST DISXE
  1627
  1628	000711'01  333 00 0 01 000000 	DISLET::SKIPLE 0(1)
  1629	000712'01  254 00 0 04 000000 		JRST 0(4)
  1630	000713'01  254 00 0 04 000001 		JRST 1(4)
  1631
  1632					;DISMISS UNTIL WORD .E. 0
  1633
  1634	000714'01  261 17 0 00 000001 	DISE::	PUSH P,1
  1635	000715'01  505 01 0 00 000717'		HRLI 1,DISET
  1636	000716'01  254 00 0 00 000663'		JRST DISXE
  1637
  1638	000717'01  332 00 0 01 000000 	DISET::	SKIPE 0(1)
  1639	000720'01  254 00 0 04 000000 		JRST 0(4)
  1640	000721'01  254 00 0 04 000001 		JRST 1(4)
  1641
  1642					;DISMISS UNTIL WORD .N. 0
  1643
  1644	000722'01  261 17 0 00 000001 	DISN::	PUSH P,1
  1645	000723'01  505 01 0 00 000725'		HRLI 1,DISNT
  1646	000724'01  254 00 0 00 000663'		JRST DISXE
  1647
  1648	000725'01  336 00 0 01 000000 	DISNT::	SKIPN 0(1)
  1649	000726'01  254 00 0 04 000000 		JRST 0(4)
  1650	000727'01  254 00 0 04 000001 		JRST 1(4)
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 33
SCHED	MAC	 7-Nov-88 20:50		Sleep and Wakeup JSYS's

  1651						SUBTTL Sleep and Wakeup JSYS's
  1652
  1653					;DISMISS FOR SPECIFIED TIME JSYS
  1654
  1655	000730'01			.DISMS::MCENT
  1656	000730'01  323 01 0 00 007714'		JUMPLE 1,MRETN
  1657	000731'01  301 01 0 00 100000 		CAIL 1,100000		;LONG OR SHORT TIME?
  1658	000732'01  254 00 0 00 000750'		JRST TDIS1		;LONG
  1659	000733'01  200 02 0 00 000651*		MOVE 2,TODCLK
  1660	000734'01  405 02 0 00 377777 		ANDI 2,377777
  1661	000735'01  271 02 0 01 000000 		ADDI 2,0(1)		;COMPUTE TIME TO RESTART
  1662	000736'01  305 01 0 00 000310 		CAIGE T1,^D200		;VERY SHORT WAIT?
  1663						JRST [	MOVEI T1,BLOCKW	;YES, USE BLOCKW AND HDISMS
  1664							HRL T1,T2
  1665							HDISMS (200)	;HOLD FOR ENOUGH TIME
  1666	000737'01  254 00 0 00 010375'			JRST MRETN]
  1667	000740'01  305 01 0 00 003720 		CAIGE 1,^D2000		;USE BLOCKW FOR WAIT .L. 2000 MS
  1668	000741'01  334 01 0 00 010402'		SKIPA T1,[FHV4,,BLOCKW]	;SHORT WAIT, USE BLOCKW AND HIGHER PRIORITY
  1669	000742'01  200 01 0 00 010403'		MOVE T1,[FHV2,,BLOCKM]	;BLOCKM AND LOWER PRIORITY
  1670	000743'01  500 02 0 00 000001 		HLL T2,T1		;PASS BLOCK PRIORITY
  1671	000744'01  504 01 0 00 000002 		HRL T1,T2		;SETUP TIME
  1672	000745'01  541 02 0 00 000000 		HRRI T2,0		;NO HOLD TIME
  1673	000746'01  265 16 0 00 000351'	TDIS2:	HDISMS			;DISMISS WITH SPECIFIED TEST
  1674	000747'01  254 00 0 00 007714'		JRST MRETN
  1675
  1676	000750'01  260 17 0 00 000754'	TDIS1:	CALL SETBKT		;COMPUTE TEST DATA
  1677	000751'01  541 01 0 00 000764'		HRRI 1,BLOCKT
  1678	000752'01  205 02 0 00 000001 		MOVSI T2,FHV1		;VERY LOW PRIORITY
  1679	000753'01  254 00 0 00 000746'		JRST TDIS2		;GO COMPLETE DISMISSAL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 34
SCHED	MAC	 7-Nov-88 20:50		Sleep and Wakeup JSYS's

  1680
  1681					;ROUTINE TO COMPUTE BLOCKT TEST DATA FROM GIVEN TIME IN MS
  1682					; 1/ TIME IN MS
  1683					;	CALL SETBKT
  1684					; RETURN +1: ALWAYS, 1/ TEST ARG FOR BLOCKT ,, 0
  1685
  1686	000754'01  311 01 0 00 010404'	SETBKT::CAML 1,[400,,0]		;BELOW MAX TIME?
  1687	000755'01  205 01 0 00 000400 		MOVSI 1,400		;NO, SET TO MAX
  1688	000756'01  200 02 0 00 000733*		MOVE 2,TODCLK		;COMPUTE TIME AT WHICH WAKEUP DUE
  1689	000757'01  621 02 0 00 777000 		TLZ 2,777000		; IN FORM USED BY BLOCKT
  1690	000760'01  270 02 0 00 000001 		ADD 2,1
  1691	000761'01  242 02 0 00 777766 		LSH 2,-^D10		;ROUND TO 18-BIT VALUE
  1692	000762'01  205 01 0 02 000000 		MOVSI 1,0(2)
  1693	000763'01  263 17 0 00 000000 		RET
  1694
  1695					;SCHEDULER WAIT TEST FOR LONG WAIT
  1696					;RETURNS NUMBER OF MS LEFT TO WAIT
  1697
  1698	000764'01  242 01 0 00 000012 	BLOCKT::LSH 1,^D10		;RESTORE WAKEUP TIME TO FULL SIZE
  1699	000765'01  200 02 0 00 000756*		MOVE 2,TODCLK		;GET TIME NOW
  1700	000766'01  621 02 0 00 777000 		TLZ 2,777000
  1701	000767'01  274 01 0 00 000002 		SUB 1,2			;DESIRED-NOW = TIME LEFT TO WAIT
  1702	000770'01  323 01 0 04 000001 	BLKT1:	JUMPLE 1,1(4)		;WAKEUP IF NEGATIVE
  1703	000771'01  317 01 0 00 010404'		CAMG 1,[XWD 400,0]	;VERY LARGE DIFFERENCE?
  1704	000772'01  254 00 0 04 000000 		JRST 0(4)		;NO, KEEP WAITING
  1705	000773'01  274 01 0 00 010405'		SUB 1,[XWD 1000,0]	;COMPENSATE FOR WRAPAROUND
  1706	000774'01  254 00 0 00 000770'		JRST BLKT1		;CHECK AGAIN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 35
SCHED	MAC	 7-Nov-88 20:50		Sleep and Wakeup JSYS's

  1707
  1708					;TEMPORARY JSYS'S FOR INTERJOB COMMUNICATION
  1709
  1710					;HIBERNATE - BLOCK UNTIL SIGNAL OR SPECIFIED ELAPSED TIME
  1711					; 1/ 0,,TIME		MAXIMUM BLOCK TIME IN SECONDS
  1712					;	THIBR
  1713					; RETURN +1: NEVER
  1714					; RETURN +2: SIGNAL RECEIVED OR TIME EXPIRED
  1715
  1716	000775'01			.THIBR:: MCENT
  1717	000775'01  221 01 0 00 001750 		IMULI 1,^D1000		;CONVERT SECONDS TO MS
  1718	000776'01  260 17 0 00 000754'		CALL SETBKT		;COMPUTE TEST DATA FOR TIME
  1719	000777'01  541 01 0 00 001006'		HRRI 1,HIBERT		;CONSTRUCT TEST WORD
  1720	001000'01  205 02 0 00 000002 		MOVSI T2,FHV2		;LOWER PRIORITY BLOCK
  1721	001001'01  265 16 0 00 000351'		HDISMS
  1722	001002'01  200 01 0 00 000411*		MOVE 1,JOBNO		;DISMISS SATISFIED, CLEAR WAKE BIT
  1723	001003'01  205 02 0 00 400000 		MOVSI 2,(JWAKEF)
  1724	001004'01  412 02 0 01 000000*		ANDCAM 2,JOBNAM(1)
  1725	001005'01  254 00 0 00 007712'		SMRETN
  1726
  1727					;SCHEDULER TEST FOR HIBERNATING FORK
  1728
  1729	001006'01  554 02 0 07 000000*	HIBERT::LOAD 2,FKJBN		;GET JOB NUMBER FOR FORK
  1730	001007'01  205 03 0 00 400000 		MOVSI 3,(JWAKEF)
  1731	001010'01  612 03 0 02 001004*		TDNE 3,JOBNAM(2)	;SIGNAL RECEIVED?
  1732	001011'01  254 00 0 04 000001 		JRST 1(4)		;YES, WAKEUP
  1733	001012'01  254 00 0 00 000764'		JRST BLOCKT		;NO, GO TEST TIME
  1734
  1735					;WAKEUP - SEND SIGNAL TO JOB WHICH WILL BE SEEN BY THIBR
  1736					; 1/ 0,,JOB#		NUMBER OF JOB TO BE AWAKENED
  1737					;	TWAKE
  1738					; RETURN +1: BAD JOB NUMBER
  1739					; RETURN +2: SIGNAL SENT.  DESTINATION JOB WILL BE AWAKENED
  1740					;	IMMEDIATELY IF NOW IN THIBR OR AS SOON AS NEXT THIBR DONE
  1741
  1742	001013'01			.TWAKE:: MCENT
  1743	001013'01  201 01 0 01 000000 		MOVEI T1,0(T1)
  1744	001014'01  260 17 0 00 000000*		CALL GL2LCL		;CONVERT GLOBAL JOB NUMBER TO LOCAL INDEX
  1745	001015'01  254 00 0 00 007700'		 RETERR()		;ILLEGAL JOB NUMBER
  1746	001016'01  335 00 0 01 000100*		SKIPGE JOBRT(T1)		;AND JOB EXISTS?
  1747	001017'01  254 00 0 00 010406'	TWAKER:	RETERR ATACX1		;NO
  1748	001020'01  550 02 0 01 000000*		HRRZ T2,JOBDIR(T1)	;GET LOGIN DIRECTORY
  1749	001021'01  322 02 0 00 001017'		JUMPE T2,TWAKER		;ERROR IF JOB NOT LOGGED IN
  1750	001022'01  205 02 0 00 400000 		MOVSI T2,(JWAKEF)
  1751	001023'01  436 02 0 01 001010*		IORM T2,JOBNAM(T1)	;SEND SIGNAL
  1752	001024'01  254 00 0 00 007712'		SMRETN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 36
SCHED	MAC	 7-Nov-88 20:50		Null Job

  1753						SUBTTL Null Job
  1754
  1755					;SCHEDULER
  1756
  1757					;'NULL' JOB - WAITS WHEN NO FORKS RUNNABLE
  1758
  1759	001025'01  476 00 0 00 000000*	SCDNUL:	SETOM NULJBF		;TELL THE WORLD WE ARE IN THE NULL JOB
  1760	001026'01  332 00 0 00 000000#	SCDNL2:	SKIPE PSKD1		;ANY BS (POSSIBLE) WAKEUPS
  1761	001027'01  254 00 0 00 001034'		JRST SCDNL1		;YES, CHECK BS
  1762	001030'01  336 00 0 00 000000*		SKIPN PSKED		;OR DEFINITE CHANGES OF STATE?
  1763	001031'01  332 00 0 00 000331*		SKIPE SKEDF3		;SCHEDULING REQUESTS?
  1764	001032'01  254 00 0 00 001034'		JRST SCDNL1		;YES
  1765	001033'01  254 00 0 00 001026'		JRST SCDNL2		;NO
  1766
  1767	001034'01  402 00 0 00 001025*	SCDNL1:	SETZM NULJBF		;NO LONGER IN THE NULL JOB
  1768	001035'01  260 17 0 00 001052'		CALL RDSIVL		;GET LAST INSKED INTERVAL
  1769	001036'01  336 00 0 00 000464*		SKIPN NBSWP		;FORKS WAITING FOR SWAPPING?
  1770	001037'01  254 00 0 00 001042'		IFSKP.
  1771	001040'01  272 01 0 00 000000*		  ADDM T1,SKDSWP	;YES, CHARGE SWAP-WAIT TIME
  1772	001041'01  254 00 0 00 001051'		ELSE.
  1773	001042'01  336 02 0 00 000000*		  SKIPN T2,NBPROC	;ANY RUNNABLE FORKS?
  1774	001043'01  254 00 0 00 001050'		  IFSKP.
  1775	001044'01  317 02 0 00 000437*		    CAMG T2,NHOLDF	;THAT ARE NOT HOLDING?
  1776	001045'01  254 00 0 00 001050'		  ANSKP.
  1777	001046'01  272 01 0 00 000000*		    ADDM T1,SKDFIL	;YES, ACCUMULATE OTHER BS WAITS
  1778	001047'01  254 00 0 00 001051'		  ELSE.
  1779	001050'01  272 01 0 00 000000*		    ADDM 1,SKDIDL	;OTHERWISE CHARGE IDLE TIME
  1780	001051'01				  ENDIF.
  1781	001051'01				ENDIF.
  1782	001051'01  254 00 0 00 001067'		JRST SCH0		;GO SCHEDULE
  1783
  1784					;READ LAST IN-SCHEDULER INTERVAL FOR STATISTICS
  1785					;RETURNS +1,
  1786					; T1/ TIME IN HP UNITS SINCE ROUTINE LAST CALLED
  1787					; SKDLST/ VALUE OF HP TIME NOW
  1788					;
  1789					; OR RETURNS T1/ 0 IF IN "IDLE BACKGROUND" CODE
  1790					;
  1791	001052'01  332 00 0 00 000000#	RDSIVL:	SKIPE BKIDLF		;IN "IDLE BACKGROUND"
  1792	001053'01  254 00 0 00 000000*		JRST RETZ		;YES, DON'T ACCUMULATE HERE, LET SCDNUL DO IT
  1793	001054'01  265 04 0 00 000000*		JSP 4,MTIME		;READ HP CLOCK
  1794	001055'01  200 02 0 00 000000*		MOVE 2,SKDLST		;GET LAST PREVIOUS READING OF HP CLOCK
  1795	001056'01  202 01 0 00 001055*		MOVEM 1,SKDLST		;SET NEW LAST READING
  1796	001057'01  274 01 0 00 000002 		SUB 1,2			;COMPUTE TIME SPEND IN NULL JOB
  1797	001060'01  305 01 0 00 000000 		CAIGE T1,0		;OVERFLOW?
  1798	001061'01  270 01 0 00 000000*		ADD T1,BASOVV		;YES, ADD CORRECTION
  1799	001062'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 37
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1800						SUBTTL Main Scheduler Loop
  1801
  1802	001063'01  7 004 30 0 00 077400 SCHED0::CONSZ PI,177B27		;ANY PI IN PROGRESS?
  1803						BUG.(HLT,PISKED,SCHED,HARD,<Entered scheduler with PI in progress>,,<
  1804					
  1805					Cause:	The monitor started to execute the main scheduler routine.  The
  1806						hardware indicates that a hardware interrupt is being held. Since
  1807						hardware interrupts operate at a higher priority than the scheduler,
  1808						this should not happen.
  1809	001064'01  256 00 0 00 010410'	>)
  1810
  1811
  1812					;ENTER SECTION 1, BECAUSE CODE IN PAGEM THAT IS CALLED FROM HERE
  1813					;MUST REFERENCE DATA IN NON-ZERO SECTIONS
  1814
  1815						XJRSTF [MONENV
  1816	001065'01  254 05 0 00 010412'			MSEC1,,.+1]	;SECTION 1 DAMMIT
  1817	001066'01  200 17 0 00 001235'		MOVE P,PI7P		;SETUP LOCAL PDL
  1818	001067'01  260 17 0 00 000516*	SCH0:	CALL UPDTCK		;UPDATE TODCLK
  1819	001070'01  256 00 0 00 000215*		XCT KEPALV		;DO KEEP ALIVE
  1820	001071'01  200 00 0 00 000046*		MOVE F,SCHFLG		;SETUP PERM FLAGS
  1821	001072'01  402 00 0 00 001031*		SETZM SKEDF3		;CLEAR SKED REQUEST
  1822	001073'01  336 00 0 00 000151*		SKIPN CFSSKC		;Need to check on CFS?
  1823	001074'01  254 00 0 00 001077'		IFSKP.			;If so
  1824	001075'01  402 00 0 00 001073*		 SETZM CFSSKC		;Clear this
  1825	001076'01  260 17 0 00 000000*		 CALL CFONLT		;And do the checking
  1826	001077'01				ENDIF.
  1827	001077'01  331 07 0 00 000544*		SKIPL FX,FORKX		;HAVE FORK SETUP?
  1828	001100'01  260 17 0 00 003626'		CALL UCLOCK		;YES, UPDATE CLOCK
  1829	001101'01  337 00 0 00 000265*		SKIPG SCKATM		;ALARM COUNTED DOWN TO 0?
  1830	001102'01  260 17 0 00 001130'		CALL SCHUPC		;YES, UPDATE CLOCKS
  1831	001103'01  335 07 0 00 001077*		SKIPGE FX,FORKX		;JOB TO CONTINUE?
  1832	001104'01  260 17 0 00 001745'		CALL SKDJOB		;NO, GO SCHEDULE ONE
  1833	001105'01  321 07 0 00 001025'		JUMPL FX,SCDNUL		;RUN 'NULL' JOB IF NO FORK TO CONTINUE
  1834	001106'01  200 16 0 07 000327*		JN FKPS0,(FX),SCHED5	;IF PSI REQUEST PENDING, GO CHECK IT
  1835	001107'01  321 16 0 00 001114'
  1836
  1837					;Here when ready to start a process. Force a channel 7 interrupt, which will
  1838					;be processed at PISC7.
  1839
  1840	001110'01			SCHED4:	$CRSF1			;Generate code for crash-on-fork facility
  1841	001110'01  260 17 0 00 001067*		CALL UPDTCK		;UPDATE TODCLK
  1842	001111'01  350 00 0 00 000252*		AOS SKEDF1		;SET FLAG FOR CH7 ROUTINE
  1843	001112'01  7 004 20 0 00 004001 	ISB SCDCHN		;LET IT START PROCESS
  1844	001113'01  254 00 0 00 001113'		JRST .			;WAIT FOR PI TO START
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 38
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1845
  1846					;Fork had an interrupt pending. If possible, give it now.
  1847
  1848	001114'01  200 16 0 07 001106*	SCHED5:	TMNN FKPS1,(FX)		;PSI NOW BEING DEFERRED?
  1849	001115'01  607 16 0 00 200000 
  1850	001116'01  332 00 0 00 000567*		SKIPE NSKED		;NO. NOSKED FORK?
  1851	001117'01  254 00 0 00 001110'		JRST SCHED4		;YES, CONTINUE CURRENT SEQUENCE
  1852	001120'01  205 01 0 00 200000 		MOVX T1,FKPSI1		;CLEAR WORD EXCEPT FOR PI IN PROG
  1853	001121'01  250 01 0 07 001114*		OPSTRM <EXCH 1,>,FKINX,(FX)
  1854	001122'01  202 01 0 00 000000*		MOVEM 1,PIMSK		;PASS REQUEST WORD TO SERVICE ROUTINE
  1855	001123'01  120 01 0 00 000636*		DMOVE T1,PFL		;SAVE PROCESS PC FOR PSI HANDLER
  1856	001124'01  124 01 0 00 000000*		DMOVEM T1,PIFL
  1857						DMOVE T1,[MONENV	;SET PPC TO START PSI HANDLER
  1858	001125'01  120 01 0 00 010414'			MSEC1,,PIRQ]
  1859	001126'01  124 01 0 00 001123*		DMOVEM T1,PFL
  1860	001127'01  254 00 0 00 001110'		JRST SCHED4		;GO START PROCESS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 39
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1861
  1862					;PERIODIC UPDATE AND CHECK CLOCKS
  1863
  1864	001130'01  335 07 0 00 001103*	SCHUPC:	SKIPGE FX,FORKX		;HAVE RUNNING FORK?
  1865	001131'01  254 00 0 00 001134'		JRST SKDLV8		;NO
  1866	001132'01  337 00 0 00 000641*		SKIPG BSQNT		;QUANT EXPIRED?
  1867	001133'01  260 17 0 00 003545'		CALL DISMSJ		;YES
  1868						; ..
  1869
  1870					;ACTIONS DONE 'FREQUENTLY' -- EVERY 20 MS
  1871
  1872	001134'01			SKDLV8:	$CRSF2			;Generate code for crash-on-fork facility
  1873	001134'01  260 17 0 00 001052'		CALL RDSIVL		;READ LAST INTERVAL
  1874	001135'01  202 01 0 00 000000*		MOVEM T1,SKDTHS		;ACCUMULATE SCHED TIME
  1875	001136'01  200 07 0 00 001130*		MOVE FX,FORKX
  1876	001137'01  202 07 0 00 000000*		MOVEM FX,LFORKX		;SAVE FORKX, MAKE IT BE -1 DURING BGND STUFF
  1877	001140'01  477 07 0 00 001136*		SETOB FX,FORKX
  1878	001141'01  260 17 0 00 000000*		CALL LV8CHK		;DO DEVICE-DEPENDENT THINGS
  1879	001142'01  260 17 0 00 000000*		CALL TTCH7		;TTY BIG BUFFER
  1880	001143'01  200 00 0 00 001071*		MOVE F,SCHFLG		;RESTORE FLAGS (TTCH7 KNOWN TO CLOBBER)
  1881	001144'01  260 17 0 00 000000*		CALL REMFPB		;YES, CHECK DELETED PAGE QUEUE
  1882	001145'01  200 07 0 00 001137*		MOVE FX,LFORKX		;RESTORE FORKX
  1883	001146'01  202 07 0 00 001140*		MOVEM FX,FORKX
  1884	001147'01  260 17 0 00 001052'		CALL RDSIVL		;READ LAST INTERVAL
  1885	001150'01  272 01 0 00 000000*		ADDM T1,BGNDTM		;ACCUMULATE BACKGROUND OVERHEAD TIME
  1886	001151'01  210 01 0 00 001135*		MOVN T1,SKDTHS		;RESET SCHED OVERHEAD TIME
  1887	001152'01  272 01 0 00 001056*		ADDM T1,SKDLST
  1888	001153'01  200 01 0 00 000765*		MOVE T1,TODCLK		;[7164]
  1889	001154'01  311 01 0 00 000000*		CAML T1,ALARMT		;[7164] TIME TO CHECK CLOCK WAITS?
  1890	001155'01  260 17 0 00 004153'		 CALL CLKCHK		;YES, CHECK FORKS WAITING FOR CLOCK
  1891	001156'01  332 00 0 00 000000*		SKIPE TSKED		;TTY OUTPUT EVENTS?
  1892	001157'01  260 17 0 00 004230'		CALL CHKTL		;YES, CHECK LIST
  1893	001160'01  332 00 0 00 001030*		SKIPE PSKED		;WAKEUPS?
  1894	001161'01  260 17 0 00 003545'		CALL DISMSJ		;YES
  1895	001162'01  260 17 0 00 001461'		CALL SWTST		;CHECK POKE AND SWITCH REQUESTS
  1896	001163'01  200 01 0 00 001153*		MOVE T1,TODCLK
  1897	001164'01  311 01 0 00 000000*		CAML T1,TIM2		;LONG CYCLE DUE?
  1898	001165'01  260 17 0 00 001201'		CALL CLK2		;YES
  1899	001166'01  335 07 0 00 001146*		SKIPGE FX,FORKX
  1900	001167'01  254 00 0 00 001173'		IFSKP.
  1901	001170'01  312 07 0 00 000000*		  CAME FX,LSTPFK	;SEE IF CONTEXT STILL SETUP
  1902	001171'01  260 17 0 00 000000*		  CALL SETPPG
  1903	001172'01  202 07 0 00 001170*		  MOVEM FX,LSTPFK
  1904	001173'01				ENDIF.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 40
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1905
  1906					;Set up to get next timer interrupt. Timer interrupts every millisecond.
  1907					;When SCKATM goes to  zero, APRSRV generates a channel 7 interrupt. New
  1908					;value depends on setting of bias knob.
  1909
  1910	001173'01  200 00 0 00 001143*		MOVE F,SCHFLG		;BE SURE WE HAVE FLAGS
  1911	001174'01  200 01 0 00 000005'		MOVE T1,SKDSCY		;SET CLOCK TO SHORT CYCLE TIME
  1912	001175'01  606 00 0 00 400000 		TXNN F,SK%CYT		;NORMAL CYCLE TIMES?
  1913	001176'01  240 01 0 00 000002 		ASH T1,2		;NO, USE TIMES 4
  1914	001177'01  202 01 0 00 001101*		MOVEM 1,SCKATM
  1915	001200'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 41
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1916
  1917					;SECOND PROCESS CLOCK, LESS PRECISE, UPDATES EVERY 100 MS
  1918
  1919	001201'01  260 17 0 00 003545'	CLK2:	CALL DISMSJ		;DISMISS CURRENT FORK, FORCE SKDJOB
  1920	001202'01  335 00 0 00 000105*		SKIPGE SCDRN1		;RUNNING SPECIFIC JOB?
  1921	001203'01  254 00 0 00 001207'		IFSKP.
  1922	001204'01  205 01 0 00 200000 		   MOVX T1,<1B1>       	;GET MASK FOR A LONG TIME FROM NOW
  1923	001205'01  202 01 0 00 000116*		   MOVEM T1,CHKTIM	;YES, DISABLE CHKR CHECK
  1924	001206'01  202 01 0 00 000117*		   MOVEM T1,DDPTIM	;AND DISABLE DDMP CHECK
  1925	001207'01				ENDIF.
  1926
  1927	001207'01  260 17 0 00 002013'		CALL BSBCK
  1928	001210'01  260 17 0 00 001267'		CALL SCLDAV		;UPDATE LOAD AVERAGES, ETC.
  1929	001211'01  260 17 0 00 001052'		CALL RDSIVL
  1930	001212'01  202 01 0 00 001151*		MOVEM T1,SKDTHS		;SAVE SCHED OVERHEAD TIME
  1931
  1932					;VARIOUS TIMERS AND CHECKS CAN GO HERE
  1933
  1934	001213'01  260 17 0 00 000000*		CALL RCVCH7		;CHECK RCVOK TIMER
  1935	001214'01  200 00 0 00 001173*		MOVE F,SCHFLG		;BE SURE WE HAVE FLAGS
  1936	001215'01  200 14 0 00 000006'		MOVE P5,SKDLCY
  1937	001216'01  606 00 0 00 400000 		TXNN F,SK%CYT		;NORMAL CYCLE TIMES?
  1938	001217'01  240 14 0 00 000002 		ASH P5,2		;NO, USE TIMES 4
  1939	001220'01  270 14 0 00 001163*		ADD P5,TODCLK		;COMPUTE NEXT TIME DUE
  1940	001221'01  250 14 0 00 001164*		EXCH P5,TIM2		;SET IT, GET OLD
  1941	001222'01  274 14 0 00 001221*		SUB P5,TIM2		;COMPUTE INTERVAL SINCE LAST UPDATE
  1942	001223'01  205 13 0 00 000000#		MOVSI P4,-N2CLKS	;SET TO SCAN SECOND LEVEL CLOCKS
  1943	001224'01  272 14 0 13 000000*	CLK21:	ADDM P5,CLK2TM(P4)	;UPDATE CLOCK
  1944	001225'01  337 00 0 13 001224*		SKIPG CLK2TM(P4)	;COUNTED OUT?
  1945	001226'01  256 00 0 13 000000*		XCT CLK2CL(P4)		;YES, DO WHATEVER
  1946	001227'01  253 13 0 00 001224'		AOBJN P4,CLK21
  1947	001230'01  260 17 0 00 001052'		CALL RDSIVL		;READ LAST INTERVAL
  1948	001231'01  272 01 0 00 001150*		ADDM T1,BGNDTM		;ACCUMULATE BACKGROUND OVERHEAD TIME
  1949	001232'01  210 01 0 00 001212*		MOVN T1,SKDTHS		;RESET SCHED OVERHEAD TIME
  1950	001233'01  272 01 0 00 001152*		ADDM T1,SKDLST
  1951	001234'01  263 17 0 00 000000 		RET
  1952
  1953	001235'01  000000#  000000#	PI7P::	IOWD NSKDP,SKDPDL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 42
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1954
  1955					;CHECK DDMP AND CHKR 
  1956
  1957	001236'01			JB0CHK::
  1958	001236'01  201 01 0 00 023420 		MOVEI	T1,^D10000	;WANT TO RUN AGAIN IN 10 SECONDS
  1959	001237'01  202 01 0 00 000000*		MOVEM	T1,JB0TIM	;SAVE FOR POSTERITY
  1960	001240'01  200 01 0 00 001220*		MOVE T1,TODCLK		;GET THE CURRENT TIME
  1961	001241'01  315 01 0 00 001205*		CAMGE T1,CHKTIM		;CHKR OVERDUE?
  1962	001242'01  254 00 0 00 001254'		 JRST JB0C.0		;NOT OVERDUE
  1963	001243'01  350 01 0 00 000000*		AOS T1,CHKDUE		;BUMP THE COUNT OF OVERDUES
  1964	001244'01  301 01 0 00 000017 		CAIL T1,CHKMAX		;HAS IT BEEN OVERDUE TOO LONG?
  1965						BUG.(HLT,CHKRNR,SCHED,SOFT,<CHKR fork not run for too long>,,<
  1966					
  1967					Cause:	The  monitor  creates  a fork in job zero that exists for the life of
  1968						the  system.  This  fork  runs  periodically  to  perform   essential
  1969						functions.  The  BUGHLT  occurs  when the scheduler detects that the
  1970						CHKR fork has not run for too long a time.
  1971					
  1972						Possible causes for CHKR not running include: 
  1973							1. A disk failure that prevents fork 0 from updating the disk
  1974							2. Removal of a  mounted structure
  1975							3. Logic errors in the monitor.
  1976							4. An HSC or MSCP server disk is hung.
  1977					
  1978	001245'01  256 00 0 00 010416'	>)
  1979
  1980	001246'01  302 01 0 00 000001 		CAIE T1,1		;IS THIS THE FIRST TIME?
  1981						BUG.(CHK,NOCHKR,SCHED,SOFT,<CHKR fork blocked>,<<T1,CHKDUE>>,<
  1982					
  1983					Cause:	The CHKR fork has not run in a while.  The monitor is getting
  1984						nervous.  If the CHKR fork continues to not run for a long time
  1985						the a CHKRNR BUGHLT will result.
  1986					
  1987					Data:	CHKDUE - Count of times CHKR was found overdue
  1988	000001'04  000400  000000	>,,<DB%NND>)			;[7.1210] 
  1989	001247'01  256 00 0 00 010420'
  1990
  1991	001250'01  350 00 0 00 000000*		AOS JB0FLG		;MAKE SURE CHKR WILL RUN
  1992	001251'01  200 01 0 00 001240*		MOVE T1,TODCLK		;GET THE CURRENT TIME
  1993	001252'01  270 01 0 00 000000*		ADD T1,CHKPER		;GET THE ALARM TIME
  1994	001253'01  202 01 0 00 001241*		MOVEM T1,CHKTIM		;SET THE ALARM TIME
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 43
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  1995
  1996	001254'01			JB0C.0:				;HERE AFTER CHECKING UP ON CHKR
  1997	001254'01  315 01 0 00 001206*		CAMGE T1,DDPTIM		;DDMP OVERDUE?
  1998	001255'01  254 00 0 00 001266'		 JRST JB0C.1		;NOT OVERDUE
  1999	001256'01  350 01 0 00 000000*	        AOS T1,DDPDUE		;BUMP THE OVERDUE COUNT
  2000	001257'01  301 01 0 00 000017 		CAIL T1,DDPMAX		;OVERDUE TOO LONG?
  2001						BUG.(HLT,DDMPNR,SCHED,SOFT,<DDMP fork not run for too long>,,<
  2002					
  2003					Cause:	The  monitor  creates  a fork in job zero that exists for the life of
  2004						the  system.  This  fork  runs  periodically  to  perform   essential
  2005						functions.  The  BUGHLT  occurs  when the scheduler detects that the
  2006						DDMP fork has not run in too long a time.
  2007					
  2008						Possible causes for DDMP not running include the following:
  2009							1. A disk failure that prevents fork 0 from updating the
  2010							   disk
  2011							2. Removal of a  mounted structure
  2012							3. Logic errors in the monitor.
  2013					
  2014	001260'01  256 00 0 00 010424'	>)
  2015
  2016	001261'01  302 01 0 00 000001 		CAIE T1,1		;IS THIS THE FIRST TIME?
  2017						BUG.(CHK,NODDMP,SCHED,SOFT,<DDMP fork blocked>,<<T1,DDPDUE>>,<
  2018					
  2019					Cause:	The DDMP fork has not run in a while.  The monitor is getting
  2020						nervous.  If the DDMP fork continues to not run for a long time
  2021						the a DDMPNR BUGHLT will result.
  2022					
  2023					Data:	DDPDUE - Count of times DDMP was found overdue
  2024	000002'04  000400  000000	>,,<DB%NND>)			;[7.1210] 
  2025	001262'01  256 00 0 00 010426'
  2026
  2027	001263'01  200 01 0 00 001251*		MOVE T1,TODCLK		;GET THE CURRENT TIME
  2028	001264'01  270 01 0 00 000000*		ADD T1,DDPPER		;GET THE NEXT ALARM TIME
  2029	001265'01  202 01 0 00 001254*		MOVEM T1,DDPTIM		;SETTHE NEXT ALARM
  2030									;HERE AFTER CHECKING UP ON DDMP
  2031	001266'01  263 17 0 00 000000 	JB0C.1:	RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 44
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2032
  2033					;CHECK LOAD AVS AND LITES
  2034
  2035	001267'01  200 02 0 00 001263*	SCLDAV:	MOVE T2,TODCLK
  2036	001270'01  274 02 0 00 000000*		SUB T2,RJTTIM
  2037	001271'01  305 02 0 00 000144 		CAIGE T2,^D100		;TIME FOR UPDATE?
  2038	001272'01  263 17 0 00 000000 		RET			;NO
  2039	001273'01  200 01 0 00 001267*		MOVE T1,TODCLK		;YES, RESET START OF INTERVAL
  2040	001274'01  202 01 0 00 001270*		MOVEM T1,RJTTIM
  2041	001275'01  200 01 0 00 000000*		MOVE T1,NGOJOB		;UPDATE NGOJOB INTEGRAL
  2042	001276'01  274 01 0 00 000460*		SUB T1,NBWT		;DISCOUNT BY FORKS IN BS WAIT FORKS
  2043	001277'01  220 01 0 00 000002 		IMUL T1,T2
  2044	001300'01  272 01 0 00 000000*		ADDM T1,RJTSUM
  2045	001301'01  200 01 0 00 001042*		MOVE T1,NBPROC
  2046	001302'01  220 01 0 00 000002 		IMUL T1,T2
  2047	001303'01  272 01 0 00 000000*		ADDM T1,BSTSUM		;UPDATE NBPROC INTEGRAL
  2048	001304'01  200 01 0 00 000000*		MOVE T1,NWSMEM
  2049	001305'01  220 01 0 00 000002 		IMUL T1,T2
  2050	001306'01  272 01 0 00 000000*		ADDM T1,NWSSUM		;UPDATE NWSMEM INTEGRAL
  2051	001307'01  200 01 0 00 000000*		MOVE T1,SUMNR		;INTEGRATE SUMNR
  2052	001310'01  220 01 0 00 000002 		IMUL T1,T2
  2053	001311'01  272 01 0 00 000000*		ADDM T1,SNRSUM
  2054	001312'01  200 01 0 00 000000*		MOVE T1,NRPLQ		;INTEGRATE NRPLQ
  2055	001313'01  220 01 0 00 000002 		IMUL T1,T2
  2056	001314'01  272 01 0 00 000000*		ADDM T1,RPQSUM
  2057	001315'01  200 01 0 00 000000*		MOVE T1,NHQFK		;UPDATE HIGH-QUEUE FORKS INTEGRAL
  2058	001316'01  220 01 0 00 000002 		IMUL T1,T2
  2059	001317'01  272 01 0 00 000000*		ADDM T1,HQFSUM
  2060	001320'01  200 01 0 00 000000*		MOVE T1,NLQFK		;UPDATE LOW-QUEUE FORKS INTEGRAL
  2061	001321'01  220 01 0 00 000002 		IMUL T1,T2
  2062	001322'01  272 01 0 00 000000*		ADDM T1,LQFSUM
  2063	001323'01  332 00 0 00 000000*		SKIPE CLASSF		;DOING CLASS SCHEDULING?
  2064	001324'01  260 17 0 00 001412'		CALL CLSAVG		;YES. INTEGRATE NRUN FOR THE CLASSES
  2065	001325'01  200 02 0 00 001273*		MOVE 2,TODCLK
  2066	001326'01  311 02 0 00 000000*		CAML 2,RJATIM		;TIME FOR RJAV UPDATE?
  2067	001327'01  260 17 0 00 001364'		CALL DORJAV		;YES
  2068	001330'01  200 01 0 00 001325*		MOVE T1,TODCLK		;GET NOW AGAIN
  2069	001331'01  311 01 0 00 000061*		CAML T1,UTLTIM		;TIME TO DO CLASS UTILIZATION UPDATES?
  2070	001332'01  260 17 0 00 004557'		CALL NEWUTL		;YES. DO IT NOW
  2071	001333'01  200 01 0 00 001050*		MOVE T1,SKDIDL		;UPDATE MS VERSIONS OF HP CLOCKS
  2072	001334'01  311 01 0 00 010432'		CAML T1,[370000,,0]	;IS SKDIDL APPROACHING "WRAP-AROUND"?
  2073	001335'01  254 00 0 00 001347'		 JRST SCLD.1		;YES, MODIFY IT, AND SAVE THE "FUDGE"
  2074	001336'01  231 01 0 00 000000*		IDIVI T1,NTMS
  2075	001337'01  202 01 0 00 000000*	SCLD.0:	MOVEM T1,SKDTM0
  2076	001340'01  200 01 0 00 001040*		MOVE T1,SKDSWP
  2077	001341'01  231 01 0 00 001336*		IDIVI T1,NTMS
  2078	001342'01  202 01 0 00 000000*		MOVEM T1,SKDTM1
  2079	001343'01  200 01 0 00 000000*		MOVE T1,SKDOVH
  2080	001344'01  231 01 0 00 001341*		IDIVI T1,NTMS
  2081	001345'01  202 01 0 00 000000*		MOVEM T1,SKDTM2
  2082	001346'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 45
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2083
  2084	001347'01  332 00 0 00 001323*	SCLD.1:	SKIPE CLASSF		;DOING CLASS SCHEDULING?
  2085	001350'01  254 00 0 00 001355'		 JRST SCLD.2		;YES, COMPUTE FUDGE DIFFERENTLY
  2086	001351'01  231 01 0 00 001344*		IDIVI T1,NTMS		;MAKE MS
  2087	001352'01  273 01 0 00 000000#		ADDB T1,IDLFUG		;SAVE OUR FUDGE
  2088	001353'01  402 00 0 00 001333*		SETZM SKDIDL		;CLEAR SKDIDL (GOOD FOR ANOTHER 95+ HOURS)
  2089	001354'01  254 00 0 00 001337'		JRST SCLD.0		;AND RESUME INLINE
  2090	001355'01  274 01 0 00 000000*	SCLD.2:	SUB T1,OLDIDL		;MAKE SKDIDL-OLDIDL (IN HP UNITS)
  2091	001356'01  202 01 0 00 001353*		MOVEM T1,SKDIDL		;SAVE AS SKDIDL
  2092	001357'01  200 01 0 00 001355*		MOVE T1,OLDIDL		;GET OLDIDL BACK
  2093	001360'01  231 01 0 00 001351*		IDIVI T1,NTMS		;MAKE INTO MS
  2094	001361'01  273 01 0 00 000000#		ADDB T1,IDLFUG		;SAVE AS OUR FUDGE FACTOR
  2095	001362'01  402 00 0 00 001357*		SETZM OLDIDL		;CLEAR OLDIDL (NOW ALL IS FINE FOR NEWUTL:)
  2096	001363'01  254 00 0 00 001337'		JRST SCLD.0		;AND RESUME INLINE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 46
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2097
  2098					;UPDATE RUNNABLE JOB AVERAGES
  2099
  2100	001364'01  201 01 0 00 001750 	DORJAV:	MOVEI T1,^D1000		;SET TIME FOR NEXT UPDATE
  2101	001365'01  272 01 0 00 001326*		ADDM T1,RJATIM
  2102	001366'01  200 01 0 00 001300*		MOVE T1,RJTSUM		;DO TOTAL AVERAGES
  2103	001367'01  276 01 0 00 000000*		SUBM T1,RJAVS1
  2104	001370'01  250 01 0 00 001367*		EXCH T1,RJAVS1
  2105	001371'01  201 02 0 00 000000*		MOVEI T2,RJAV		;TABLE AT RJAV
  2106	001372'01  260 17 0 00 001440'		CALL DORJ1
  2107	001373'01  200 01 0 00 001317*		MOVE T1,HQFSUM		;DO HIGH-QUEUE AVERAGES
  2108	001374'01  276 01 0 00 000000*		SUBM T1,RJAVS2
  2109	001375'01  250 01 0 00 001374*		EXCH T1,RJAVS2
  2110	001376'01  201 02 0 00 000000*		MOVEI T2,HQLAV		;TABLE AT HQLAV
  2111	001377'01  260 17 0 00 001440'		CALL DORJ1
  2112	001400'01  200 01 0 00 001322*		MOVE T1,LQFSUM		;DO LOW-QUEUE AVERAGES
  2113	001401'01  276 01 0 00 000000*		SUBM T1,RJAVS3
  2114	001402'01  250 01 0 00 001401*		EXCH T1,RJAVS3
  2115	001403'01  201 02 0 00 000000*		MOVEI T2,LQLAV		;TABLE AT LQLAV
  2116	001404'01  260 17 0 00 001440'		CALL DORJ1
  2117	001405'01  332 00 0 00 001347*		SKIPE CLASSF		;DOING CLASS SCHEDULING?
  2118	001406'01  260 17 0 00 001420'		CALL CLDRJ		;YES. COMPUTE LOAD AVGS FOR THE CLASSES
  2119	001407'01  126 01 0 00 001371*		FIXR T1,RJAV		;GET INTEGER 1 MIN AVERAGE
  2120	001410'01  202 01 0 00 000000*		MOVEM T1,IRJAV
  2121	001411'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 47
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2122
  2123					;RUN AVERAGE ROUTINES FOR THE CLASS SCHEDULER
  2124
  2125					;ROUTINE TO COMPUTE INTEGRALS FOR EACH OF THE CLASSES
  2126					;	T2/ TIME INTERVAL
  2127
  2128	001412'01  201 03 0 00 000000#	CLSAVG:	MOVEI T3,MAXCLS-1	;SCAN ALL CLASSES
  2129	001413'01  554 01 1 00 010433'	CLSAV0:	LOAD T1,CLGLC,(T3)	;GET GOLST POPULATION
  2130	001414'01  220 01 0 00 000002 		IMUL T1,T2		;COMPUTE N*dt
  2131	001415'01  272 01 1 00 010434'		ADDM T1,@[EP. CLSSUM(T3)]	;ACCUMULATE INTEGRAL
  2132	001416'01  365 03 0 00 001413'	CLSAV1:	SOJGE T3,CLSAV0		;DO ALL CLASSES
  2133	001417'01  263 17 0 00 000000 		RET			;DONE
  2134
  2135					;ROUITNE TO COMPUTE RUN AVGS FOR THE CLASSES
  2136
  2137	001420'01  265 16 0 00 000000*	CLDRJ:	SAVEAC <Q1>		;GET A WORK REG
  2138	001421'01  201 05 0 00 000000#		MOVEI Q1,MAXCLS-1	;SCAN ALL CLASSES
  2139	001422'01  255 01 0 00 001423'		JFOV .+1		;CLEAR OVERFLOW FLAG
  2140	001423'01  127 01 1 00 010435'	CLDRJ0:	FLTR T1,@[EP. CLSSUM(Q1)]	;GET INTEGRAL
  2141	001424'01  200 02 1 00 010436'		MOVE T2,@[EP. CLSSHR(Q1)]	;GET SHARE
  2142	001425'01  315 02 1 00 010437'		CAMGE T2,@[EP. CLSUTL(Q1)]	;GOT ANY WINDFALL?
  2143	001426'01  200 02 1 00 010440'		MOVE T2,@[EP. CLSUTL(Q1)]	;YES. USE UTIL THEN
  2144	001427'01  174 01 0 00 000002 		FDVR T1,T2		;SCALE
  2145						JFOV [	FLTR T1,@[EP. CLSSUM(Q1)] ;IF OVERFLOW, USE SUM AS INTEGRAL
  2146	001430'01  255 01 0 00 010442'			JRST .+1]	;AND PROCEED
  2147	001431'01  402 00 1 00 010444'		SETZM @[EP. CLSSUM(Q1)]	;NO SUM NOW
  2148	001432'01  201 02 0 05 000000 		MOVEI T2,0(Q1)		;GET CLASS
  2149	001433'01  221 02 0 00 000000*		IMULI T2,NRJAVS		;FIND N-WORD CHUNK FOR THIS CLASS
  2150	001434'01  270 02 0 00 010445'		ADD T2,[CLSRJA]		;THE AREA
  2151	001435'01  260 17 0 00 001441'		CALL DORJ2		;COMPUTE AVERAGES
  2152	001436'01  365 05 0 00 001423'	CLDRJ1:	SOJGE Q1,CLDRJ0		;DO ALL CLASSES
  2153	001437'01  263 17 0 00 000000 		RET			;DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 48
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2154
  2155					;COMPUTE ONE SET AVERAGES
  2156					; T1/ INTEGRAL OVER LAST ONE SECOND
  2157					; T2/ TABLE TO BE UPDATED - 30-BIT ADDRESS
  2158
  2159	001440'01  127 01 0 00 000001 	DORJ1:	FLTR T1,T1		;FLOAT INTEGRAL
  2160	001441'01  175 01 0 00 212764 	DORJ2:	FDVRI T1,(1000.0)	;DIVIDE BY 1 SECOND
  2161	001442'01  255 01 0 00 001443'		JFOV .+1		;CLEAR OV FLAG
  2162	001443'01  201 03 0 00 000000 		MOVEI T3,0
  2163	001444'01  670 02 0 00 010446'		TDO T2,[EP. 0(T3)]	;MAKE EFIW INDEXED BY T3
  2164	001445'01  200 04 1 00 000002 	SCHC1:	MOVE T4,@T2		;GET PRESENT SUM
  2165	001446'01  154 04 0 00 000001 		FSBR T4,T1		;COMPUTE SUM-TERM
  2166	001447'01  164 04 0 03 001456'		FMPR T4,EXPFF(T3)	;COMPUTE (SUM-TERM)*e(-T/C)
  2167						JFOV [	SETZM T4	;IF UNDERFLOW, ASSUME ZERO
  2168	001450'01  255 01 0 00 010447'			JRST .+1]
  2169	001451'01  144 04 0 00 000001 		FADR T4,T1		;SUM=(SUM-TERM)e-(T/C)+TERM
  2170	001452'01  202 04 1 00 000002 		MOVEM T4,@T2		;NEW SUM
  2171	001453'01  305 03 0 00 000000#		CAIGE T3,NRJAVS-1
  2172	001454'01  344 03 0 00 001445'		AOJA T3,SCHC1
  2173	001455'01  263 17 0 00 000000 		RET
  2174
  2175					;TABLE OF EXP(-T/C) FOR T = 1 SEC.
  2176
  2177	001456'01  200767  423110	EXPFF:	EXP 0.983471454		;C = 1 MIN
  2178	001457'01  200776  227510		EXP 0.996672216		;C = 5 MIN
  2179	001460'01  200777  334710		EXP 0.998889506		;C = 15 MIN
  2180
  2181					;TABLE OF 1-EXP(-T/C) FOR T = 1 SEC
  2182
  2183					   REPEAT 0,<			;DON'T NEED THIS NOW
  2184					EXPGF:	EXP 0.0165285462	;C = 1 MIN
  2185						EXP 0.00332778395	;C = 5 MIN
  2186						EXP 0.00111049406	;C = 15 MIN
  2187					   >				;END OF REPEAT 0
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 49
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2188
  2189					;TEST WORD DEPOSITED BY SWITCHES IN 20 OR 30
  2190					;ACCEPTS:
  2191
  2192					;Location 20/
  2193					;	Bit 0 - go to EDDT breakpoint
  2194					;	Bit 3 - wait for DDMP to finish and shutdown system
  2195					;	Bit 34 - reset the front end
  2196					;	Bit 35 - same as bit 0
  2197
  2198					;Location 30/
  2199					;	non-zero to request shutdown of system
  2200
  2201					;	CALL SWTST
  2202
  2203
  2204	001461'01  332 00 0 00 000043*	SWTST:	SKIPE PWRDWN		;POWER DOWN?
  2205	001462'01  254 00 0 00 001511'		JRST SCHPRF		;YES
  2206	001463'01  332 00 0 00 000030 		SKIPE SHLTW		;HALT REQUEST?
  2207	001464'01  254 00 0 00 001523'		JRST SWCRSH		;YES
  2208	001465'01  336 01 0 00 000103*		SKIPN T1,SCTLW		;SWITCHES?
  2209	001466'01  263 17 0 00 000000 		RET			;NO, NOTHING TO DO
  2210	001467'01  402 00 0 00 001465*		SETZM SCTLW
  2211	001470'01  243 01 0 00 001471'		JFFO 1,.+1
  2212	001471'01  305 02 0 00 000004 		CAIGE 2,NSWTT
  2213	001472'01  256 00 0 02 001500'		XCT SWTT(2)
  2214	001473'01  602 01 0 00 000001 		TXNE T1,1B35		;ALTERNATE MANUAL PAUSE?
  2215	001474'01  254 00 0 00 001504'		JRST SWHLT		;YES
  2216	001475'01  602 01 0 00 000002 		TXNE T1,1B34		;RESET PROTOCOL?
  2217	001476'01  254 00 0 00 001516'		JRST SWRS11		;YES
  2218	001477'01  263 17 0 00 000000 	SWTST1:	RET
  2219
  2220	001500'01  254 00 0 00 001504'	SWTT:	JRST SWHLT		;HALT T.S.
  2221	001501'01  254 00 0 00 001477'		JRST SWTST1		;NOT USED
  2222	001502'01  254 00 0 00 001477'		JRST SWTST1		;NOT USED
  2223	001503'01  254 00 0 00 001534'		JRST SCWAIT		;INTERNALLY GENERATED - WAIT FOR DOWN
  2224		   	   000004	NSWTT==.-SWTT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 50
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2225
  2226	001504'01  260 17 0 00 003545'	SWHLT:	CALL DISMSJ		;DISMISS CURRENT FORK
  2227	001505'01  260 17 0 00 000000*		CALL SETPSK		;SET SCHED CONTEXT
  2228	001506'01  332 00 0 00 000000*		SKIPE DDTPRS		;DDT LOADED?
  2229	001507'01  256 00 0 00 000000*	SWHLT4:	XCT CHKADR		;YES, GET BREAKPOINT
  2230	001510'01  254 00 0 00 001063'		JRST SCHED0		;RESUME SCHEDULER WHEN PROCEEDED
  2231
  2232					;POWER FAIL DETECTED
  2233
  2234	001511'01  260 17 0 00 003545'	SCHPRF:	CALL DISMSJ		;FLUSH CURRENT FORK
  2235	001512'01  260 17 0 00 001505*		CALL SETPSK		;SET SCHED CONTEXT
  2236	001513'01  256 00 0 00 000000*		XCT PWRFLE		;DO ANY SPECIAL POWER FAIL CODE
  2237	001514'01  260 17 0 00 000000*		CALL CASHOF		;MAKE SURE MEMORY IS CORRECT
  2238	001515'01  254 00 0 00 000000*		JRST SCHPF0		;FINISH IN APRSRV
  2239
  2240					;RESET FE PROTOCOL
  2241
  2242	001516'01  700 14 0 00 000400 	SWRS11:	PIOFF
  2243	001517'01  264 00 0 00 000000*		JSR BUGMON		;ENTER SECONDARY
  2244	001520'01  264 00 0 00 000000*		JSR BUGPRI		;ENTER PRIMARY, SHOULD BE IN SYNCH NOW
  2245	001521'01  700 14 0 00 000200 		PION
  2246	001522'01  254 00 0 00 001063'		JRST SCHED0		;CONTINUE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 51
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2247
  2248					;Here when 30 is non-zero. Set bit 3 in 20, and start DDMP.
  2249					;This will lead to shutdown of system, or breakpoint if set, at SCWAIT.
  2250
  2251	001523'01  402 00 0 00 000030 	SWCRSH:	SETZM SHLTW
  2252	001524'01  205 01 0 00 040000 		MOVSI 1,(1B3)		;SETUP TO WAIT FOR DDMP COMPLETION
  2253	001525'01  202 01 0 00 001467*		MOVEM 1,SCTLW
  2254	001526'01  402 00 0 00 000000*		SETZM DDTIME		;POKE DDMP
  2255	001527'01  350 00 0 00 001250*		AOS JB0FLG		;DO JOB 0
  2256	001530'01  400 01 0 00 000000 		SETZ 1,
  2257	001531'01  202 01 0 00 001202*	SWRUN2:	MOVEM 1,SCDRN1		;ALLOW ONLY THAT JOB TO RUN
  2258	001532'01  260 17 0 00 003545'		CALL DISMSJ		;DISMISS CURRENT FORK
  2259	001533'01  254 00 0 00 001477'		JRST SWTST1
  2260
  2261					;Here when bit 3 is set in 20. If DDMP is finished, proceed to hit breakpoint
  2262					;or halt processor
  2263
  2264	001534'01  336 00 0 00 001526*	SCWAIT:	SKIPN DDTIME		;DDMP FINISHED?
  2265						JRST [	MOVSI 1,(1B3)	;REISSUE REQUEST
  2266							MOVEM 1,SCTLW
  2267	001535'01  254 00 0 00 010451'			JRST SWTST1]
  2268	001536'01  260 17 0 00 003545'		CALL DISMSJ		;DISMISS CURRENT FORK IF ANY
  2269	001537'01  260 17 0 00 001512*		CALL SETPSK		;SET SCHED CONTEXT
  2270	001540'01  332 00 0 00 000000*		SKIPE IOIP		;WAIT FOR IO TO FINISH
  2271	001541'01  254 00 0 00 001540'		JRST .-1
  2272						HRROI 1,[ASCIZ /**HALTED**
  2273	001542'01  561 01 0 00 010454'	/]
  2274	001543'01  200 02 0 00 000000*		MOVE 2,CTYLNO
  2275	001544'01  260 17 0 00 000000*		CALL TTEMES		;ANNOUNCE HALT ON CTY
  2276	001545'01  260 17 0 00 000000*		CALL STADYN		;POINT TO DYNAMIC DATA
  2277	001546'01  254 00 0 00 001555'		 JRST SWHLT5		;NOT ACTIVE. SHOULDN'T HAPPEN
  2278	001547'01  261 17 0 00 000002 		PUSH P,T2		;SAVE DYNAMIC DATA ADDRESS
  2279	001550'01  260 17 0 00 001142*		CALL TTCH7		;MAKE SURE CTY OUPTUT IN PROGRESS
  2280	001551'01  200 02 0 17 000000 		MOVE T2,0(P)		;GET DYNMAIC DATA ADDRESS
  2281	001552'01  260 17 0 00 000000*		CALL TTSOBE		;SEE IF OUTPUT BUFFER IS EMPTY
  2282	001553'01  254 00 0 00 001552'		 JRST .-1		;NOT YET. KEEP WAITING
  2283	001554'01  262 17 0 00 000002 		POP P,T2		;DON'T NEED THIS ANYMORE
  2284	001555'01  336 00 0 00 001506*	SWHLT5:	SKIPN DDTPRS		;DDT PRESENT?
  2285	001556'01  254 00 0 00 001562'		JRST SWHLT2		;NO, HALT PROCESSOR
  2286	001557'01  336 00 0 00 000000*		SKIPN DBUGSW		;EXPECTING BREAKPOINTS?
  2287	001560'01  332 00 0 00 000000*		SKIPE DCHKSW
  2288	001561'01  254 00 0 00 001507'		JRST SWHLT4		;YES, GET ONE
  2289	001562'01			SWHLT2:
  2290	001562'01  700 14 0 00 000400 		PIOFF			;STOP ALL INTERRUPTS
  2291	001563'01  264 00 0 00 001517*		JSR BUGMON		;AND ENTER SECONDARY PROTOCOL
  2292					   IFN FTKLIPA,<
  2293	001564'01  260 17 0 00 000000*		CALL XCKLP		;[7134] STOP THE CI
  2294					   >
  2295	001565'01  260 17 0 00 000000*		CALL XCKNI		;[7134] STOP THE NI
  2296	001566'01  254 04 0 00 001567'		JRST 4,.+1		;STOP HERE
  2297	001567'01  264 00 0 00 001520*		JSR BUGPRI		;IF CONTINUES, RESTORE MACHINE
  2298	001570'01  700 14 0 00 000200 		PION			;ALL OF IT
  2299	001571'01  254 00 0 00 001063'		JRST SCHED0		;AND RESUME SCHEDULER
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 52
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2300
  2301					;SCHEDULER REQUEST PROCESSOR
  2302					;MAY BE CALLED FROM SCHEDULER OR PROCESS CONTEXT
  2303					; T1/ DATA,,ADDRESS OF FUNCTION
  2304
  2305					; *MONUMENT*
  2306					;Once upon a time, this routine was called at interrupt level with
  2307					;several different arguments.  At present, it is called only for
  2308					;JOBSRT and only in places where JOBSRT could be called directly.
  2309					;Therefore, this routine is now just a jacket for JOBSRT after
  2310					;verifying that the caller does indeed want JOBSRT.
  2311
  2312	001572'01  265 16 0 00 000000*	SCDRQ7::SAVET
  2313	001573'01  265 16 0 00 000310'		NOSKD1
  2314	001574'01  550 02 0 00 000001 		HRRZ T2,T1		;GET ROUTINE ADDRESS
  2315	001575'01  302 02 0 00 001603'		CAIE T2,JOBSRT		;THE ONE LEGAL CASE?
  2316						BUG.(CHK,SRQBAD,SCHED,HARD,<SCDRQ - Bad call to SCDRQ7>,,<
  2317					
  2318					Cause:	SCDRQ7 was called with a function it does not know about.
  2319					
  2320					Action:	Fix the call or fix SCDRQ7 to know about this function.
  2321					
  2322	000003'04  000000  000000	>)
  2323	001576'01  256 00 0 00 010457'
  2324
  2325	001577'01  554 01 0 00 000001 		HLRZ T1,T1		;GET DATA
  2326	001600'01  260 17 0 02 000000 		CALL 0(T2)		;DO IT
  2327	001601'01  265 16 0 00 000315'		OKSKD1
  2328	001602'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 53
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2329
  2330					;SCHEDULER REQUESTS
  2331					;CREATE A JOB
  2332					; T1/ TERMINAL LINE NUMBER OR 0,,-2 IF CRJOB
  2333
  2334					;Job creation effectively starts here. If called by TTYSRV, a terminal
  2335					;has been assigned (because CTRL/C was received on it). This routine picks
  2336					;a job number, allocates job storage, and creates the top fork. It then
  2337					;sets NEWJB% and NEWFK% in the top fork's FKINT word. Ultimately the fork
  2338					;gets to PIRQ with NEWFK% and NEWJB% set.
  2339
  2340	001603'01  265 16 0 00 000000*	JOBSRT::SAVEQ
  2341	001604'01  316 01 0 00 001543*		CAMN T1,CTYLNO		;CTY?
  2342	001605'01  254 00 0 00 001614'		JRST JOBSR2		;YES, ALLOW IF AT ALL POSSIBLE
  2343	001606'01  200 02 0 00 000000*		MOVE 2,SPTC		;CURRENT SPT COUNT
  2344	001607'01  311 02 0 00 000000*		CAML 2,SPC1		;ABOVE LOGIN LIMIT?
  2345						JRST [MOVE T3,[POINT 7,[ASCIZ\?FULL - No more SPT slots
  2346					\]]
  2347	001610'01  254 00 0 00 010471'		      JRST JOBSR1]
  2348	001611'01  200 02 0 00 000000*		MOVE 2,DRMFRE
  2349	001612'01  317 02 0 00 000000*		CAMG 2,DRMIN1		;ENOUGH DRUM SPACE?
  2350						JRST [MOVE T3,[POINT 7,[ASCIZ\?FULL - No more swapping space
  2351					\]]
  2352	001613'01  254 00 0 00 010503'		      JRST JOBSR1]
  2353	001614'01  265 16 0 00 000000*	JOBSR2:	SAVEAC <Q1,Q2>
  2354	001615'01  336 00 0 00 000077*		SKIPN FREJOB		;ROOM FOR NEW JOB
  2355						JRST [MOVE T3,[POINT 7,[ASCIZ\?FULL - No more job slots
  2356					\]]
  2357	001616'01  254 00 0 00 010514'		      JRST JOBSR1]
  2358	001617'01  336 00 0 00 000073*		SKIPN FREFK		;AND NEW FORK?
  2359						JRST [MOVE T3,[POINT 7,[ASCIZ\?FULL - No more forks
  2360					\]]
  2361	001620'01  254 00 0 00 010524'		      JRST JOBSR1]
  2362	001621'01  200 02 1 00 001615*		MOVE 2,@FREJOB		;ASSIGN JOB NUMBER
  2363	001622'01  250 02 0 00 001621*		EXCH 2,FREJOB
  2364	001623'01  275 02 0 00 000074*		SUBI 2,JOBPT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 54
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2365
  2366	001624'01  402 00 0 02 001016*		SETZM JOBRT(T2)		;JOB RUNTIME
  2367	001625'01  525 16 0 00 000037 		SETZRO JOBRTP,(T2)	; No job runtime limit
  2368	001626'01  412 16 0 02 000000*
  2369	001627'01  205 16 0 00 777740 		SETZRO TIMCNT,(T2)	;  and no clocks in use yet
  2370	001630'01  412 16 0 02 001626*
  2371	001631'01  402 00 1 00 010526'		SETZM @[EP. JOBIRT(T2)]	;NO INCREMENTAL RUN TIME YET
  2372	001632'01  313 02 0 00 000000*		CAMLE T2,MJBUSE		;HIGHER JOB NUMBER?
  2373	001633'01  202 02 0 00 001632*		MOVEM T2,MJBUSE		;YES
  2374	001634'01  135 03 0 00 010527'		LOAD T3,CLSDF		;GET DEFAULT CLASS
  2375	001635'01  542 03 1 00 010530'		HRRM T3,@[EP. JOBCLS(T2)]	;INIT TO DEFAULT CLASS
  2376	001636'01  350 00 1 00 010531'		AOS @[EP. CLSCNT(T3)]	;COUNT THIS NEW JOB
  2377	001637'01  202 01 0 00 000005 		MOVEM T1,Q1		;SAVE TTY NUMBER
  2378	001640'01  202 02 0 00 000006 		MOVEM T2,Q2		;SAVE JOB NUMBER
  2379	001641'01  260 17 0 00 001672'		CALL ASSFK		;GET A FORK IN FX
  2380	001642'01  542 07 0 06 001623*		STOR FX,JBTFK,(Q2)	;SETUP TOP FORK FOR JOB
  2381	001643'01  506 05 0 06 001642*		STOR Q1,JBTTY,(Q2)	;SETUP TTY FOR JOB
  2382	001644'01  506 06 0 07 001006*		STOR Q2,FKJBN		;LEAVE JOB NUMBER IN FORK
  2383	001645'01  260 17 0 00 000000*		CALL ASFSB		;ASSIGN JSB
  2384	001646'01  542 01 0 07 001644*		STOR 1,FKJSB
  2385					   IFN EXTJSB,<
  2386						CALL ASSPT		;Assign SPT slot for extended JSB
  2387						STOR T1,FKJPT		;Save it
  2388					   >
  2389	001647'01  200 01 0 00 000005 		MOVE T1,Q1		;TTY NUMBER
  2390	001650'01  661 01 0 00 040000 		TXO T1,NEWJB%
  2391	001651'01  436 01 0 07 001121*		OPSTRM <IORM 1,>,FKINX,(FX) ;LEAVE TTY NUMBER FOR STARTUP ROUTINE
  2392	001652'01  254 00 0 00 003753'		CALLRET WTCONC		;PUT FORK ON WAIT LIST
  2393
  2394					;HERE WHEN CAN'T START THE JOB BECAUSE OF SOME SHORTAGE.  SEND
  2395					;'FULL' TO THE LINE
  2396
  2397	001653'01  602 01 0 00 400000 	JOBSR1:	TXNE T1,1B18		;NEGATIVE LINE NUMBER?
  2398	001654'01  254 00 0 00 001667'		JRST JOBSRC		;YES, CRJOB
  2399	001655'01  200 02 0 00 000001 		MOVE T2,T1
  2400	001656'01  200 01 0 00 000003 		MOVE T1,T3		;GET POINTER TO MESSAGE
  2401	001657'01  261 17 0 00 000002 		PUSH P,2		;SAVE
  2402	001660'01  260 17 0 00 000000*		CALL TTABRT		;CONDITION LINE FOR TTEMES
  2403	001661'01  260 17 0 00 001544*		CALL TTEMES		;GIVE USER BAD NEWS
  2404	001662'01  262 17 0 00 000001 		POP P,1			;GET LINE NUMBER
  2405	001663'01  260 17 0 00 000000*		CALL CHKPTY		;IS THIS A PTY
  2406	001664'01  334 00 0 00 000000 		 SKIPA			;NO - DONE
  2407	001665'01  260 17 0 00 000000*		CALL PTYFIN		;YES - MAKE IT HUNGRY
  2408	001666'01  263 17 0 00 000000 		RET
  2409
  2410	001667'01  201 01 0 00 600025 	JOBSRC:	MOVEI T1,CRJBX6		;SYSTEM FULL ERROR CODE
  2411	001670'01  202 01 0 00 000000*		MOVEM T1,CRJANS		;ANSWER TO OTHER JOB
  2412	001671'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 55
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2413
  2414					;ASSIGN FORK SLOT
  2415
  2416	001672'01  200 00 0 00 001214*	ASSFK::	MOVE F,SCHFLG
  2417	001673'01  550 07 1 00 001617*		HRRZ FX,@FREFK
  2418	001674'01  250 07 0 00 001673*		EXCH FX,FREFK		;GET FORK, UPDATE LIST
  2419	001675'01  275 07 0 00 000000*		SUBI FX,FKPT
  2420	001676'01  402 00 0 07 000000*		SETZRO FKQ2X,(FX)	;INIT FLAGS AND Q VALUES
  2421	001677'01  201 01 0 00 004413'		MOVEI 1,JSKP
  2422	001700'01  542 01 0 07 000405*		STOR 1,FKSTR,(FX)	;INIT STATUS
  2423	001701'01  553 00 0 07 001700*		SETZRO FKSTD,(FX)	;CLEAR DATA FOR SCHEDULER TEST
  2424	001702'01  260 17 0 00 005240'		CALL INIQ		;GET INITIAL QUEUE FOR FORK
  2425	001703'01  137 01 0 00 010532'		STOR T1,FKQN
  2426	001704'01  200 01 0 01 000000#		MOVE T1,QUANTT(T1)	;GET QUANTUM FOR IT
  2427	001705'01  202 01 0 07 000000*		STOR 1,FKQTM		;ESTABLISH QUEUE
  2428	001706'01  200 01 0 00 001330*		MOVE 1,TODCLK
  2429	001707'01  202 01 0 07 000000*		STOR 1,FKTIM,(FX)
  2430	001710'01  205 01 0 00 500000 		MOVX 1,FKPSI0+NEWFK%
  2431	001711'01  202 01 0 07 001651*		STOR 1,FKINX,(FX)	;LEAVE INTERRUPT REQUEST
  2432	001712'01  205 16 0 00 200000 		SETONE PIBMP		;BE SURE IT RUNS ASAP
  2433	001713'01  436 16 0 07 001676*
  2434	001714'01  402 00 0 07 000470*		SETZRO FKSWX,(FX)
  2435	001715'01  402 00 0 07 001675*		SETZM FKPT(FX)
  2436	001716'01  402 00 0 07 000000*		SETZRO FKIBX,(FX)
  2437	001717'01  513 00 0 07 000000*		SETZRO FKPSB		;CLEAR SPT SLOT FOR PSB
  2438	001720'01  553 00 0 07 001717*		SETZRO FKUPT		;CLEAR SPT SLOT FOR SECTION 0 MAP
  2439	001721'01  553 00 0 07 000000*		SETZRO FKPS2		;CLEAR SPT SLOT FOR SECOND PSB PAGE
  2440	001722'01  513 00 0 07 001646*		SETZRO FKJSB		;CLEAR SPT SLOT FOR JSB
  2441	001723'01  553 00 0 07 001722*		SETZRO FKJBN		;CLEAR JOB NUMBER
  2442	001724'01  553 00 0 07 000000*		SETZRO FKNWCE		;CLEAR NUMBER ENTRIES IN WORKING SET CACHE
  2443	001725'01  513 00 0 07 001724*		SETZRO FKCSIZ		;CLEAR CURRENT SIZE
  2444	001726'01  201 01 0 00 100100 		MOVEI T1,100100		;INIT CURRENT AGE TO 100
  2445	001727'01  137 01 0 00 010533'		STOR T1,FKAGE
  2446	001730'01  201 01 0 00 000003 		MOVEI T1,3		;INIT WORKING SET TO 3
  2447	001731'01  542 01 0 07 000000*		STOR T1,FKWSS
  2448	001732'01  260 17 0 00 001645*		CALL ASFSB		;ASSIGN PSB
  2449	001733'01  542 01 0 07 001720*		STOR 1,FKPSB
  2450	001734'01  260 17 0 00 001732*		CALL ASFSB		;ASSIGN UPT
  2451	001735'01  506 01 0 07 001733*		STOR 1,FKUPT
  2452	001736'01  260 17 0 00 001734*		CALL ASFSB		;GET ONE FOR THE STACK PAGE
  2453	001737'01  506 01 0 07 001721*		STOR T1,FKPS2		;SAVE IT
  2454	001740'01  263 17 0 00 000000 		RET
  2455
  2456					;PROCESSOR INTERRUPTS REFERRED FROM APR PI SERVICE
  2457
  2458
  2459	001741'01  201 02 0 00 000013 	MPEINT:	MOVEI 2,.ICDAE		;GIVES I/O ERROR INTERRUPT
  2460	001742'01  250 01 0 00 000002 		EXCH 1,2		;FORK NUMBER LEFT BY APR ROUTINE
  2461	001743'01  260 17 0 00 006026'		CALL PSIRQ
  2462	001744'01  263 17 0 00 000000 		RET
  2463
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 56
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2464
  2465					;BALANCE SET SCHEDULER
  2466					;CALLED TO SELECT JOB TO RUN
  2467
  2468					;RETURNS +1: ALWAYS,
  2469					;	FX/ FORK HANDLE OF FORK TO RUN
  2470					;		OR
  2471					;	FX/ -1 IF NO FORK RUNNABLE
  2472
  2473	001745'01  402 00 0 00 001160*	SKDJOB:	SETZM PSKED		;CLEAR WAKEUP FLAG
  2474	001746'01  402 00 0 00 000000#		SETZM PSKD1		;AND POSSIBLE BS WAKEUP FLAG
  2475	001747'01  402 00 0 00 000000#		SETZM SKDFST		;RUNNING FAST
  2476	001750'01  335 07 0 00 000472*		SKIPGE FX,SSKED		;CURRENTLY A NOSKED FORK?
  2477	001751'01  254 00 0 00 001763'		IFSKP.
  2478	001752'01  200 01 0 07 001714*		  LOAD T1,FKSWX,(FX)	;GET SWAP FLAGS
  2479	001753'01  607 01 0 00 000004 		  JXE T1,FKGL%,BKGND1
  2480	001754'01  254 00 0 00 002037'
  2481	001755'01  325 01 0 00 002037'		  JXE T1,FKWSL,BKGND1
  2482	001756'01  607 01 0 00 040000 		  TXNN T1,BSWTB		;IN BS WAIT?
  2483	001757'01  254 00 0 00 002000'		  JRST SKDJ2		;NO RUN IT
  2484	001760'01  260 17 0 00 002110'		  CALL SKDJ3		;YES. STILL?
  2485	001761'01  254 00 0 00 002037'		   JRST BKGND1
  2486	001762'01  254 00 0 00 002000'		  JRST SKDJ2		;NOW RUNNABLE
  2487	001763'01				ENDIF.
  2488
  2489	001763'01  550 07 0 00 000000*		HRRZ FX,GOLST		;SCAN GOLST FOR FORK TO RUN
  2490	001764'01  322 07 0 00 002037'	SKCB5:	JUMPE FX,BKGND1		;NO RUNNABLE FORK
  2491	001765'01  275 07 0 00 001715*		SUBI FX,FKPT		;GET FORK INDEX
  2492	001766'01  550 05 0 07 001765*		HRRZ Q1,FKPT(FX)	;Q1 IS NEXT FORK TO SCAN
  2493	001767'01  200 01 0 07 001752*		LOAD T1,FKSWX,(FX)	;GET SWAP FLAGS
  2494	001770'01  325 01 0 00 001776'		JXE T1,FKWSL,SKCB2	;IF NOT LOADED, SKIP IT
  2495	001771'01  607 01 0 00 040000 		JXE T1,BSWTB,SKDJ2	;JUMP IF RUNNABLE
  2496	001772'01  254 00 0 00 002000'
  2497	001773'01  260 17 0 00 002110'		CALL SKDJ3		;NO, TEST IT
  2498	001774'01  334 00 0 00 000000 		 SKIPA
  2499	001775'01  254 00 0 00 002000'		JRST SKDJ2		;RUN IT
  2500	001776'01  200 07 0 00 000005 	SKCB2:	MOVE FX,Q1		;GET NEXT FORK
  2501	001777'01  254 00 0 00 001764'		JRST SKCB5
  2502
  2503					;HAVE RUNNABLE FORK - SET IT UP AND RUN IT
  2504
  2505	002000'01  350 00 0 00 000000*	SKDJ2:	AOS NCSWCH		;COUNT CONTEXT SWITCHES
  2506	002001'01  202 07 0 00 001166*		MOVEM FX,FORKX
  2507	002002'01  312 07 0 00 001172*		CAME FX,LSTPFK		;SAME AS LAST FORK LOADED?
  2508	002003'01  260 17 0 00 001171*		CALL SETPPG		;SETUP PAGER FOR THIS PROCESS
  2509	002004'01  202 07 0 00 002002*		MOVEM FX,LSTPFK		;REMEMBER LAST FORK LOADED
  2510	002005'01  200 03 0 07 001705*		LOAD T3,FKQTM		;SETUP QUANTUM FOR THIS RUN
  2511	002006'01  202 03 0 00 001132*		MOVEM T3,BSQNT
  2512	002007'01  202 03 0 00 000000*		MOVEM T3,BSQNT0
  2513	002010'01  402 00 0 00 000000*		SETZM FKT1		;CLEAR INCREMENTAL TIME
  2514	002011'01  260 17 0 00 000000*		CALL XGCCHK		;CHECK FOR XGC NEEDED
  2515	002012'01  263 17 0 00 000000 		RET			;DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 57
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2516
  2517					; CHECK WAITING BALANCE SET FORKS
  2518
  2519	002013'01  331 00 0 00 002001*	BSBCK:	SKIPL FORKX		;FORK CONTEXT SETUP
  2520						BUG.(HLT,SKDFKS,SCHED,HARD,<Illegal scheduler action while fork context setup>,,<
  2521					
  2522					Cause:  The scheduler was about to perform an action that requires that no fork
  2523						context is setup. The monitor found that FORKX was non-negative which
  2524						indicates that fork context was setup.
  2525					
  2526					Action:	Change the monitor to call DISMSJ before calling the routine or 
  2527						move the call to a more appropriate place. CLK2 always forces 
  2528						DISMSJ and is usually a good place for periodic actions.
  2529	002014'01  256 00 0 00 010534'	>)
  2530
  2531	002015'01  476 00 0 00 000000#		SETOM SKDFST		;NOT RUNNING FAST
  2532	002016'01  336 00 0 00 000155*		SKIPN SKEDFC		;FORCED CLEAR REQUESTED?
  2533	002017'01  254 00 0 00 002022'		IFSKP.
  2534	002020'01  335 00 0 00 001750*		  SKIPGE SSKED		;YES, A NOSKED FORK?
  2535	002021'01  254 00 0 00 002073'		  JRST SKDJFC		;NO, OK TO DO
  2536	002022'01				ENDIF.			;YES, CAN'T DO IT NOW
  2537	002022'01  260 17 0 00 002571'		CALL TSTBAL		;TEST AND ADJUST BALSET IF NECESSARY
  2538	002023'01  260 17 0 00 002326'		CALL WSMCHK		;DO PERIODIC WS MGT
  2539	002024'01  550 07 0 00 001763*		HRRZ FX,GOLST
  2540	002025'01  322 07 0 00 000330*	BSBCK1:	JUMPE FX,R		;DONE
  2541	002026'01  275 07 0 00 001766*		SUBI FX,FKPT
  2542	002027'01  550 05 0 07 002026*		HRRZ Q1,FKPT(FX)	;Q1 IS NEXT FORK TO SCAN
  2543	002030'01  200 01 0 07 001767*		LOAD T1,FKSWX,(FX)
  2544	002031'01  607 01 0 00 040000 		JXE T1,BSWTB,BSBCK2	;JUMP IF NOT BLOCKED
  2545	002032'01  254 00 0 00 002035'
  2546	002033'01  260 17 0 00 002110'		CALL SKDJ3		;TEST IT - REMOVE FROM BS WAIT IF DONE
  2547	002034'01  255 00 0 00 000000 		 JFCL
  2548	002035'01  200 07 0 00 000005 	BSBCK2:	MOVE FX,Q1		;STEP LIST
  2549	002036'01  254 00 0 00 002025'		JRST BSBCK1
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 58
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2550
  2551					;FOUND NO FORK TO RUN
  2552
  2553	002037'01  476 00 0 00 000000#	BKGND1:	SETOM BKIDLF		;FLAG IN "IDLE BACKGROUND" TASK FOR RDSIVL
  2554	002040'01  260 17 0 00 001110*		CALL UPDTCK		;UPDATE TODCLK
  2555	002041'01  205 10 0 00 777773 		MOVSI P1,-NSHAKL	;TRY TO SHAKE LOOSE A JOB
  2556	002042'01  200 11 0 00 001275*		MOVE P2,NGOJOB		;GET NUMBER OF JOBS ON GOLST
  2557	002043'01  336 00 0 00 000000#	BKGND3:	SKIPN PSKD1		;ANY EVENTS?
  2558	002044'01  332 00 0 00 001745*		SKIPE PSKED
  2559	002045'01  254 00 0 00 002062'		JRST BKGND2		;YES!
  2560	002046'01  261 17 0 00 000011 		PUSH P,P2		;*** P2 TRASHED BY SOME SCHED ROUTINES
  2561	002047'01  256 00 0 10 002066'		XCT SKDSHK(P1)		;TRY THIS
  2562	002050'01  262 17 0 00 000011 		POP P,P2		;*** RESTORE P2
  2563	002051'01  316 11 0 00 002042*		CAMN P2,NGOJOB
  2564	002052'01  254 00 0 00 002055'		IFSKP.
  2565	002053'01  350 00 0 00 000000#		   AOS PSKD1		;REQUEST SCHEDULER
  2566	002054'01  254 00 0 00 002057'		   JRST BKGNDT		;*****
  2567	002055'01				ENDIF.
  2568	002055'01  253 10 0 00 002043'		AOBJN P1,BKGND3		;NO
  2569	002056'01  254 00 0 00 002062'		JRST BKGND2
  2570
  2571	002057'01			BKGNDT:				;***
  2572	002057'01  311 11 0 00 002051*		CAML P2,NGOJOB		;***CHANGE FOR THE BETTER?
  2573	002060'01  350 00 0 00 000000#		AOS SKDSHQ		;***QUESTION THIS
  2574	002061'01  350 00 0 10 000000#		AOS SKDSHN(P1)		;***YES NOTE HOW WE GOT IT
  2575	002062'01  350 00 0 00 000000#	BKGND2:	AOS SKDSHS		;***COUNT TIMES THROUGH SHORT
  2576	002063'01  474 07 0 00 000000 		SETO FX,		;NOTE NO FORK TO RUN
  2577	002064'01  402 00 0 00 000000#		SETZM BKIDLF
  2578	002065'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 59
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2579
  2580					; ROUTINES TO CALL TO TRY TO "SHAKE LOOSE" A RUNNABLE FORK
  2581					; ORDER MAY MAKE A DIFFERENCE
  2582
  2583	002066'01  260 17 0 00 004224'	SKDSHK:	CALL WTCHK		;CHECK WAITING FORKS
  2584	002067'01  260 17 0 00 001134'		CALL SKDLV8		;DO ALL BACKGROUND STUFF
  2585	002070'01  260 17 0 00 001201'		CALL CLK2
  2586	002071'01  260 17 0 00 002601'		CALL AJBALS		;CHECK BALSET
  2587	002072'01  260 17 0 00 002326'		CALL WSMCHK		;CHECK WS
  2588		   	   000005	NSHAKL==.-SKDSHK		;NUMBER OF SHAKE LOOSE ROUTINES
  2589
  2590	000000'01			RS PSKD1,1			;BS EVENT FLAG BUT NO OVERIDE
  2591	000001'01			RS SKDFST,1			;FAST BS CHECK FLAG
  2592	000002'01			RS BKIDLF,1			;FLAGS SPENDING IDLE TIME DOING BKG STUFF
  2593	000003'01			RS IDLFUG,1			;HOLDS IDLE TIME (IN MS) FOR OVERFLOW OF SKDIDL
  2594					;*** THE FOLLOWING LOCATIONS ARE TEMPORARY PERFORMANCE COUNTERS
  2595
  2596	000004'01			RS GOLPWC,1			;***number of pwc boosts given after bswt
  2597	000005'01			RS SKDSHS,1			;***          short background
  2598	000006'01			RS SKDSHQ,1			;***number of "bad" bkgnd decisions
  2599	000007'01			RS SKDBRM,1			;***number of bswt hold time exp removals
  2600	000010'01			RS SKDBSK,1			;***number of dismt successes
  2601	000011'01			RS MXQNBO,1			;***forks on MAXQ that got PWC but still MAXQ
  2602	000012'01			RS MXQGBO,1			;***SUBSET of above that got boost to MAXQ-1
  2603	000013'01			RS SKDSHN,NSHAKL		;***count of times this routine changes NGOJOB
  2604
  2605					;HERE TO FORCE UNLOAD OF BALSET AND COLLECT ALL OF MEMORY THAT
  2606					;ISNT ACTUALLY LOCKED
  2607
  2608	002073'01  205 10 0 00 000000#	SKDJFC:	MOVSI P1,-NFKS
  2609	002074'01  550 07 0 00 000010 	SKJFC1:	HRRZ FX,P1		;PLAIN FORK INDEX FOR CALLS
  2610	002075'01  200 16 0 07 002030*		TMNE FKIBS		;IS THIS FORK IN THE BALANCE SET?
  2611	002076'01  603 16 0 00 100000 
  2612	002077'01  260 17 0 00 003220'		CALL CLRIBS		;YES. REMOVE IT
  2613	002100'01  200 16 0 07 002075*		IFQN. FKWSL
  2614	002101'01  325 16 0 00 002103'
  2615	002102'01  260 17 0 00 003265'		  CALL REMWS		;IF WS LOADED, REMOVE IT
  2616	002103'01				ENDIF.
  2617	002103'01  253 10 0 00 002074'		AOBJN P1,SKJFC1
  2618
  2619					;HERE WHEN BALSET UNLOADED, FORCE GCCOR TO FREE MEMORY. GCCOR TAKES
  2620					;NOTE OF SKEDFC
  2621
  2622	002104'01  260 17 0 00 000000*		CALL GCCOR		;GETS PRIVATE PAGES AND SPT PAGES
  2623	002105'01  476 00 0 00 002004*		SETOM LSTPFK		;NOTE PAGER CONTEXT INVALID
  2624	002106'01  402 00 0 00 002016*		SETZM SKEDFC		;CLEAR BLUNDERBUSS FLAG
  2625	002107'01  254 00 0 00 001745'		JRST SKDJOB		;AND TRY AGAIN.
  2626
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 60
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2627
  2628					;TEST WAITING BALSET FORK
  2629					; FX/ FORK
  2630					;	CALL SKDJ3
  2631					; RETURN +1: STILL WAITING
  2632					;	 +2: NO LONGER WAITING
  2633
  2634	002110'01  550 02 0 07 000461*	SKDJ3:	LOAD T2,FKPTR,(FX)	;GET TEST ROUTINE
  2635	002111'01  554 01 0 07 002110*		LOAD T1,FKPTD,(FX)	;SETUP TEST DATA
  2636	002112'01  415 04 0 00 004412'		XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  2637	002113'01  260 17 0 02 000000 		CALL 0(T2)		;(T1,FX) DO TEST
  2638	002114'01  263 17 0 00 000000 		 RET			;STILL WAITING ** NOTE: DISMT BYPASSES THIS
  2639									; AND RETS DIRECTLY
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 61
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2640
  2641	002115'01  260 17 0 00 002176'	FRIBP3::CALL DISACC		;ACCOUNT FOR WAIT (WATCH tag)
  2642	002116'01  200 01 0 00 001706*		MOVE 1,TODCLK		;COMPUTE LENGTH OF TIME WAITED
  2643	002117'01  274 01 0 07 000457*		OPSTR <SUB 1,>,FKNB%,(FX)
  2644	002120'01  242 01 0 00 777777 		LSH T1,-1		;PENALIZE FOR GOLST WAIT BY FACTOR OF 2
  2645	002121'01  305 01 0 00 000144 		CAIGE T1,^D100		;ABOVE MINIMUM TIME?
  2646	002122'01  254 00 0 00 002132'	TAMWTC:	IFSKP.
  2647	002123'01  350 00 0 00 000000#		  AOS GOLPWC		;***
  2648	002124'01  261 17 0 00 000001 		  PUSH P,T1		;***
  2649	002125'01  260 17 0 00 004354'		  CALL GLREM		;YES, REMOVE FROM GOLST AND
  2650	002126'01  262 17 0 00 000001 		  POP P,T1		;***
  2651	002127'01  221 01 0 00 001360*		  IMULI T1,NTMS		;CONVERT TO HIGH PRECISION UNITS
  2652	002130'01  260 17 0 00 005140'		  CALL NEWST2		;GIVE WAIT CREDIT
  2653	002131'01  260 17 0 00 004302'		  CALL GOCONC		;AND REPLACE ON GOLST
  2654	002132'01				ENDIF.
  2655	002132'01  550 01 0 07 002111*		LOAD T1,FKPTR,(FX)	;GET TEST ROUTINE
  2656	002133'01  306 01 0 00 000000*		CAIN T1,PRELWT		;PRELOAD WAIT?
  2657	002134'01  254 00 0 00 002143'		IFSKP.
  2658	002135'01  302 01 0 00 000462*		  CAIE 1,SWPINT		;NO, WAS BEING LOADED?
  2659	002136'01  254 00 0 00 000000*		  RETSKP		;NO, RETURN RUNNABLE
  2660	002137'01  200 16 0 07 001713*		  TMNN PIBMP		;RETURNING TO NORMAL PROCESSING?
  2661	002140'01  607 16 0 00 200000 
  2662	002141'01  336 00 0 00 000000*		  SKIPN PRELDF		;PRELOADING DESIRED?
  2663	002142'01  254 00 0 00 002174'		  JRST SKDJ3X		;NO
  2664	002143'01				ENDIF.
  2665					;Preload wait or being loaded and preloading desired.
  2666	002143'01  200 01 0 00 001312*		MOVE T1,NRPLQ		;SAVE NUMBER PAGES NOW AVAIL
  2667	002144'01  270 01 0 00 001540*		ADD T1,IOIP
  2668	002145'01  261 17 0 00 000001 		PUSH P,T1
  2669	002146'01  260 17 0 00 000000*		CALL PRELD		;TRY TO PRELOAD
  2670	002147'01  604 00 0 00 000000 		IFNSK.
  2671	002150'01  254 00 0 00 002173'
  2672	002151'01  205 16 0 00 040000 		  SETONE BSWTB		;NOT COMPLETE, PUT FORK BACK INTO WAIT
  2673	002152'01  436 16 0 07 002100*
  2674	002153'01  202 01 0 07 002132*		  STOR T1,FKPTX,(FX) 	;WAIT TEST RETURNED BY PRELD
  2675	002154'01  350 00 0 00 001276*		  AOS NBWT		;COUNT IT
  2676	002155'01  350 00 0 00 001036*		  AOS NBSWP		; AS SWAP WAIT
  2677	002156'01  200 01 0 00 002116*		  MOVE 1,TODCLK		;RESET TIME OF START OF WAIT
  2678	002157'01  202 01 0 07 002117*		  STOR 1,FKNB%,(FX)
  2679	002160'01  262 17 0 00 000001 		  POP P,T1
  2680	002161'01  274 01 0 00 002143*		  SUB T1,NRPLQ		;COMPUTE NUMBER PAGES USED FOR LOAD
  2681	002162'01  274 01 0 00 002144*		  SUB T1,IOIP
  2682	002163'01  554 02 0 07 001725*		  LOAD T2,FKNWCE	;GET PRELOAD RESERVE
  2683	002164'01  315 02 0 00 000001 		  CAMGE T2,T1		;GREATER THAN NUMBER LOADED?
  2684	002165'01  200 01 0 00 000002 		  MOVE T1,T2		;NO, LIMIT
  2685	002166'01  274 02 0 00 000001 		  SUB T2,T1		;REDUCE RESERVE BY AMT LOADED
  2686	002167'01  506 02 0 07 002163*		  STOR T2,FKNWCE
  2687	002170'01  210 01 0 00 000001 		  MOVN T1,T1		;REDUCE TOTAL RESERVE
  2688	002171'01  272 01 0 00 000000*		  ADDM T1,NRPMIN
  2689	002172'01  263 17 0 00 000000 		  RET			;RETURN NOT RUNNABLE
  2690	002173'01				ENDIF.
  2691	002173'01  262 17 0 00 000001 		POP P,T1		;FLUSH TEMP
  2692	002174'01  260 17 0 00 002260'	SKDJ3X:	CALL SOSNEB		;PROCESS FINISHED ENTERING BALSET
  2693	002175'01  254 00 0 00 002136*		RETSKP			;RETURN RUNNABLE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 62
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2694
  2695					;ACCOUNT FOR BALSET WAIT ON COMPLETION
  2696
  2697	002176'01  205 16 0 00 040000 	DISACC:	SETZRO BSWTB		;CLEAR WAIT
  2698	002177'01  412 16 0 07 002152*
  2699	002200'01  370 00 0 00 002154*		SOS NBWT		;NOW ONE LESS WAITING PROCESS
  2700	002201'01  200 01 0 00 002156*		MOVE 1,TODCLK		;COMPUTE LENGTH OF TIME WAITED
  2701	002202'01  274 01 0 07 002157*		OPSTR <SUB 1,>,FKNB%,(FX)
  2702	002203'01  305 01 0 00 000144 		CAIGE T1,^D100		;ABOVE MINIMUM TIME?
  2703	002204'01  254 00 0 00 002207'		IFSKP.
  2704	002205'01  205 16 0 00 000600 		  SETZRO <BSNST,BSOVRD>	;YES, NOTE
  2705	002206'01  412 16 0 07 002177*
  2706	002207'01				ENDIF.
  2707	002207'01  550 02 0 07 002153*		LOAD 2,FKPTR,(FX)	;WAIT TEST ADR
  2708	002210'01  272 01 0 00 000000*		ADDM 1,BSWT		;ACCUMULATE TOTAL WAIT
  2709	002211'01  306 02 0 00 002133*		CAIN T2,PRELWT		;PRELOAD WAIT?
  2710	002212'01  254 00 0 00 002217'		IFSKP.
  2711	002213'01  302 02 0 00 002135*		  CAIE 2,SWPINT		;OR SWAPIN?
  2712	002214'01  306 02 0 00 000463*		  CAIN 2,SWPRT		;OR SWAP?
  2713	002215'01  254 00 0 00 002217'		ANSKP.
  2714	002216'01  254 00 0 00 002224'		ELSE.
  2715	002217'01  272 01 0 00 000000*		  ADDM T1,DRMWT		;YES, CHARGE TO DRUM
  2716	002220'01  370 00 0 00 002155*		  SOS NBSWP		;REDUCE COUNT OF SWAP WAITS
  2717	002221'01  306 02 0 00 002214*		  CAIN T2,SWPRT		;SWAP-IN?
  2718	002222'01  260 17 0 00 002250'		  CALL CHGHLS		;YES. DO CHARGING THEN
  2719	002223'01  263 17 0 00 000000 		  RET
  2720	002224'01				ENDIF.
  2721	002224'01  302 02 0 00 000000*		CAIE T2,DWRTST		;WRITE WAIT?
  2722	002225'01  254 00 0 00 002230'		IFSKP.
  2723	002226'01  272 01 0 00 000000*		  ADDM T1,DWRWT		;YES, CHARGE IT
  2724	002227'01  254 00 0 00 002237'		  CALLRET DISMT5	;DO IO CHARGE AND RETURN
  2725	002230'01				ENDIF.
  2726	002230'01  302 02 0 00 000000*		CAIE 2,UDWDON		;UTILITY DSK? OR
  2727	002231'01  306 02 0 00 000000*		CAIN 2,DSKRT		;DSK?
  2728	002232'01  604 00 0 00 000000 		IFNSK.
  2729	002233'01  254 00 0 00 002236'
  2730	002234'01  272 01 0 00 000000*		  ADDM T1,DSKWT		;YES, CHARGE TO DSK
  2731	002235'01  254 00 0 00 002237'		  CALLRET DISMT5	;DO IO CHARGE IF NECESSARY
  2732	002236'01				ENDIF.
  2733	002236'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 63
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2734
  2735					;DO IO CHARGE IF NECESSARY
  2736
  2737	002237'01  602 00 0 00 200000 	DISMT5:	TXNE F,SK%IOC		;QUANTUM CHARGE FOR IO?
  2738	002240'01  263 17 0 00 000000 		RET			;NO
  2739	002241'01  201 01 0 00 000000#		MOVEI T1,^D10*NTMS	;YES, NOMINAL QUANTUM CHARGE
  2740	002242'01  200 03 0 07 002005*		LOAD 3,FKQTM		;CHARGE AGAINST REGULAR QUANTUM
  2741	002243'01  307 03 0 01 000000 		CAIG T3,0(T1)		;WILL RESULT BE POSITIVE?
  2742	002244'01  201 03 0 01 000001 		MOVEI T3,1(T1)		;NO. FORCE IT TO BE SO
  2743	002245'01  274 03 0 00 000001 		SUB 3,1
  2744	002246'01  202 03 0 07 002242*		STOR 3,FKQTM
  2745	002247'01  254 00 0 00 002252'		CALLRET CHGHLF		;CHARGE FOR FILE READ
  2746
  2747					;CHARGE HOLD TIME FOR FAULT
  2748
  2749					;ENTRY FOR SWAP READ
  2750
  2751	002250'01  201 01 0 00 000002 	CHGHLS:	MOVEI T1,2		;ASSUME SMALL CHARGE
  2752	002251'01  332 00 0 00 002141*		SKIPE PRELDF		;PRELOADING WS?
  2753
  2754					;ENTRY FOR FILE READ AND FOR SWAP READ IF PRELDF IS ON
  2755
  2756	002252'01  201 01 0 00 000012 	CHGHLF:	MOVEI T1,^D10		;LARGE CHARGE
  2757	002253'01  135 03 0 00 010536'		LOAD T3,FKBET		;GET HOLD TIME
  2758	002254'01  322 03 0 00 002025*		JUMPE T3,R		;IF NONE, DONE
  2759	002255'01  275 03 0 01 000000 		SUBI T3,0(T1)		;REDUCE BY QUANTUM CHARGE
  2760	002256'01  137 03 0 00 010536'		STOR T3,FKBET
  2761	002257'01  263 17 0 00 000000 		RET			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 64
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2762
  2763					;UPDATE FOR PROCESS FINISHED ENTERING BALSET
  2764
  2765	002260'01  554 01 0 07 002167*	SOSNEB:	LOAD T1,FKNWCE		;WS SIZE RESERVED DURING SWAPIN
  2766	002261'01  210 01 0 00 000001 		MOVN 1,1
  2767	002262'01  272 01 0 00 002171*		ADDM 1,NRPMIN		;REMOVE FROM CORE RESERVE
  2768	002263'01  370 00 0 00 000000*		SOS NEBAL
  2769	002264'01  263 17 0 00 000000 		RET
  2770
  2771					;WAIT TEST FOR FORK HAVING DONE EDISMS, BEING HELD IN BALSET
  2772					; FX/ FORK
  2773					;	CALL DISMT		;FROM SKDJ3 ONLY
  2774					; RETURN +1: CONTINUE SCAN, NO CHANGE TO FORK (OR CHANGED HEREIN)
  2775					;	+2: UNBLOCK THE FORK
  2776
  2777	002265'01  550 02 0 07 001701*	DISMT:	LOAD T2,FKSTR,(FX)	;SEE IF EDISMS WAIT FINISHED
  2778	002266'01  554 01 0 07 002265*		LOAD T1,FKSTD,(FX)
  2779	002267'01  415 04 0 00 004412'		XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  2780	002270'01  260 17 0 02 000000 		CALL 0(T2)		;(T1,FX) WAIT COMPLETED?
  2781	002271'01  254 00 0 00 002273'		 IFSKP. <JRST FRIBP1>	;YES, LET FORK RUN
  2782	002272'01  254 00 0 00 002314'
  2783	002273'01  336 00 0 00 000000#		SKIPN SKDFST		;RUNNING FAST
  2784	002274'01  263 17 0 00 000000 		RET			;YES, DON'T DO THIS ** RETURN TO SKDJ3 CALLER
  2785	002275'01  554 01 0 07 002207*		LOAD T1,FKPTD,(FX)	;GET TIME PARAMETER FOR BLOCKW
  2786	002276'01  260 17 0 00 000651'		CALL BLOCKW		;(T1,FX) HOLD TIME EXPIRED?
  2787	002277'01  254 00 0 00 002305'		IFSKP.
  2788	002300'01  350 00 0 00 000000#		  AOS SKDBRM		;**** COUNT REMOVALS
  2789	002301'01  370 00 0 00 001044*		  SOS NHOLDF		;ONE LESS HOLDING FORK
  2790	002302'01  260 17 0 00 002176'		  CALL DISACC		;YES, ACCOUNT FOR WAIT
  2791	002303'01  260 17 0 00 002317'		  CALL DISMT2		;PUT FORK INTO NORMAL BLOCK STATE
  2792	002304'01  263 17 0 00 000000 		  RET			;CONTINUE SCAN ** RETURN TO SKDJ3 CALLER
  2793	002305'01				ENDIF.
  2794	002305'01  200 16 0 07 001711*		JE FKPS0,(FX),R		;RETURN IF NO INTERRUPT PENDING **
  2795	002306'01  325 16 0 00 002254*
  2796	002307'01  200 16 0 07 002305*		JN FKPS1,(FX),R		;INTERRUPT PENDING. RETURN IF DEFERRED **
  2797	002310'01  603 16 0 00 200000 
  2798	002311'01  254 00 0 00 002306*
  2799	002312'01  205 16 0 00 001000 		SETONE FKIWT,(FX)	;NOT DEFERRED. REMEMBER FORK WAS WAITING.
  2800	002313'01  436 16 0 07 002307*
  2801	002314'01  370 00 0 00 002301*	FRIBP1::SOS NHOLDF		;ONE LESS HOLDING FORK
  2802	002315'01  350 00 0 00 000000#		AOS SKDBSK		;***
  2803	002316'01  254 00 0 00 002175*		RETSKP
  2804
  2805					;MOVE FORK FROM HOLD WAIT TO REGULAR NON-BALSET WAIT
  2806					; FX/ FORK
  2807
  2808	002317'01  265 16 0 00 001420*	DISMT2:	ACVAR <W1>
  2809	002320'01  200 05 0 07 002202*		LOAD W1,FKNB%,(FX)	;SAVE TIME THAT WAIT STARTED
  2810	002321'01  260 17 0 00 003142'		CALL REMBSJ		;REMOVE JOB FROM BAL SET
  2811	002322'01  260 17 0 00 004354'		CALL GLREM		;REMOVE FORK FROM GOLST
  2812	002323'01  202 05 0 07 002275*		STOR W1,FKPTX,(FX)	;SAVE TOD OF DISMISS FOR NEWST
  2813	002324'01  260 17 0 00 003755'		CALL WTCON2		;PUT ON WAIT LIST
  2814	002325'01  263 17 0 00 000000 		RET
  2815						ENDAV.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 65
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2816
  2817					;CALL PERIODIC WS MGT ROUTINES
  2818
  2819		   	   000764	WSMPER==^D500			;LENGTH OF PERIOD
  2820
  2821	002326'01  476 00 0 00 000000*	WSMCHK:	SETOM RWSOKF		;FLAG TO ALLOW REMWS IN WSMGR
  2822	002327'01  260 17 0 00 000000*		CALL TSTGCC		;SEE IF GCCOR NEEDED
  2823	002330'01  334 00 0 00 000000 		 SKIPA			;NO
  2824	002331'01  260 17 0 00 002560'		CALL DOGCC		;YES, DO IT AND ACCOUNT OVERHEAD
  2825	002332'01  200 01 0 00 001307*		MOVE T1,SUMNR
  2826	002333'01  270 01 0 00 002161*		ADD T1,NRPLQ
  2827	002334'01  270 01 0 00 002162*		ADD T1,IOIP
  2828	002335'01  315 01 0 00 000000*		CAMGE T1,MAXNR		;UNACCOUNTED PAGES?
  2829	002336'01  260 17 0 00 002560'		CALL DOGCC		;YES, COLLECT
  2830	002337'01  200 01 0 00 002333*		MOVE T1,NRPLQ
  2831	002340'01  270 01 0 00 002334*		ADD T1,IOIP
  2832	002341'01  305 01 0 00 000040 		CAIGE T1,^D32
  2833	002342'01  400 01 0 00 000000 		SETZ T1,
  2834	002343'01  332 00 0 00 002337*		SKIPE NRPLQ
  2835	002344'01  317 01 0 00 002262*		CAMG T1,NRPMIN		;LOW ON MEM?
  2836	002345'01  260 17 0 00 002426'		CALL WSMGR		;YES, FIX
  2837	002346'01  200 01 0 00 002201*		MOVE T1,TODCLK
  2838	002347'01  315 01 0 00 000000*		CAMGE T1,WSMTIM		;TIME FOR UPDATES?
  2839	002350'01  254 00 0 00 002355'		JRST WSMCK1		;NO
  2840	002351'01  271 01 0 00 000764 		ADDI T1,WSMPER		;YES, SETUP NEXT TIME
  2841	002352'01  202 01 0 00 002347*		MOVEM T1,WSMTIM
  2842	002353'01  260 17 0 00 002357'		CALL STEPFH		;UPDATE HISTORY VALUES
  2843	002354'01  260 17 0 00 002426'		CALL WSMGR		;CHECK FOR SWAP
  2844	002355'01  402 00 0 00 002326*	WSMCK1:	SETZM RWSOKF		;RESET FLAG
  2845	002356'01  263 17 0 00 000000 		RET
  2846
  2847					;STEP FORK HISTORY VALUES - RUN PERIODICALLY
  2848
  2849		   	   400000	FHUNIT==1B<^L<FKHST>>		;UNIT VALUE IN HISTORY
  2850		   	   000010	STEPTC==^D8			;TIME CONSTANT, LARGER FOR SLOWER CHANGE
  2851
  2852	002357'01  205 07 0 00 000000#	STEPFH:	MOVSI FX,-NFKS		;SCAN FORK TABLES
  2853	002360'01  335 00 0 07 002027*	STEPH1:	SKIPGE FKPT(FX)		;FORK EXISTS?
  2854	002361'01  254 00 0 00 002374'		JRST STEPH2		;NO
  2855	002362'01  550 03 0 07 002206*		LOAD T3,FKHST
  2856	002363'01  221 03 0 00 000007 		IMULI T3,STEPTC-1	;COMPUTE H*(X-1)/X
  2857	002364'01  200 16 0 07 002362*		IFQN. <FKIBH,FKIBS>	;WAS IN BALSET **ASSUMES FKIBH FULL DEFSTR**
  2858	002365'01  607 16 0 00 104000 
  2859	002366'01  254 00 0 00 002372'
  2860	002367'01  205 16 0 00 004000 		  SETZRO FKIBH
  2861	002370'01  412 16 0 07 002364*
  2862	002371'01  270 03 0 00 010537'		  ADD T3,[FHUNIT]
  2863	002372'01				ENDIF.
  2864	002372'01  231 03 0 00 000010 		IDIVI T3,STEPTC
  2865	002373'01  542 03 0 07 002370*		STOR T3,FKHST
  2866	002374'01  253 07 0 00 002360'	STEPH2:	AOBJN FX,STEPH1
  2867	002375'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 66
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2868
  2869					;GET FORK HISTORY VALUE
  2870					;VALUE USED TO RANK FORK WORKING SETS PRIORITY IN MEM
  2871					;GREATER NUMBER MEANS HIGHER PRIORITY
  2872					; FX/ FORK INDEX
  2873
  2874					;VALUES IN RESULT
  2875
  2876		   004000  000000	FHMNSK==4000B17			;NOSKED, TOP PRIORITY
  2877		   002000  000000	FHMRUN==2000B17			;RUNNABLE
  2878		   000400  000000	FHMPQ==  400B17			;PRIORITY QUEUE
  2879		   000200  000000	FHMBS==  200B17			;IN BALSET
  2880		   000100  000000	FHMCSK== 100B17			;CRITICAL SECTION
  2881		   000040  000000	FHMBIP==40B17			;PI BUMP
  2882					;FHMWTS==  70B17			;WAIT STATE CODE
  2883
  2884	002376'01  200 04 0 07 002373*	GFHST:	LOAD T4,FKSWX,(FX)	;GET SWAP FLAGS
  2885	002377'01  400 01 0 00 000000 		SETZ T1,		;START WITH 0
  2886	002400'01  200 16 0 07 002137*		TMNE PIBMP		;FORK NEEDS BUMPING FOR PI?
  2887	002401'01  603 16 0 00 200000 
  2888	002402'01  270 01 0 00 010540'		ADD T1,[FHMBIP]		;YES. GIVE IT HELP THEN
  2889	002403'01  603 04 0 00 020000 		TXNE T4,BSNSK		;NOSKED?
  2890	002404'01  270 01 0 00 010541'		ADD T1,[FHMNSK]		;YES, PRIORITY
  2891	002405'01  603 04 0 00 010000 		TXNE T4,BSCRSK		;CRITICAL SECTION?
  2892	002406'01  270 01 0 00 010542'		ADD T1,[FHMCSK]		;YES
  2893	002407'01  135 02 0 00 010532'		LOAD T2,FKQN
  2894	002410'01  307 02 0 00 000000 		CAIG T2,HIGHQ		;ON PRIORITY QUEUE?
  2895	002411'01  270 01 0 00 010404'		ADD T1,[FHMPQ]		;YES, BUMP
  2896	002412'01  607 04 0 00 200000 		TXNN T4,FKBLK		;FORK RUNNABLE?
  2897	002413'01  254 00 0 00 002420'		JRST GFHST1		;YES
  2898	002414'01  554 02 0 07 000421*		LOAD T2,FKGOLN		;NO, GET BLOCK WAIT PRIORITY
  2899						;STOR T2,FHMWTS,T1	;INCLUDE IN HISTORY WORD
  2900	002415'01  550 16 0 07 002376*		OPSTR <ADD T1,>,FKHST	;USE HISTORY VALUE
  2901	002416'01  270 01 0 00 000016 
  2902	002417'01  263 17 0 00 000000 		RET
  2903
  2904	002420'01  270 01 0 00 010543'	GFHST1:	ADD T1,[FHMRUN]		;YES, MAKE IT BETTER THAN ALL BLOCKED FORKS
  2905	002421'01  603 04 0 00 100000 		TXNE T4,FKIBS		;IN BALSET?
  2906	002422'01  270 01 0 00 010544'		ADD T1,[FHMBS]		;YES, BASIC UNIT VALUE
  2907	002423'01  554 16 0 07 002414*		OPSTR <ADD T1,>,FKGOLN	;GOLST POSITION IS FINAL DETERMINANT
  2908	002424'01  270 01 0 00 000016 
  2909	002425'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 67
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2910
  2911					;WORKING SET MANAGER
  2912					;SELECT WORKING SETS TO SWAP INTO OR OUT OF MEMORY
  2913
  2914	002426'01  265 16 0 00 000000*	WSMGR:	TRVAR <MAXWS,MAXWSF,MINWS,MINWSF,WSMSUP,WSMSNR>
  2915	002427'01  000000  000006
  2916	002430'01  201 04 0 00 000071*		MOVEI T4,NFKS		;ASSIGN GOLST POSITION TO ALL FORKS ON GOLST
  2917	002431'01  550 07 0 00 002024*		HRRZ FX,GOLST
  2918	002432'01  322 07 0 00 002437'	WSMGS1:	JUMPE FX,WSMG0		;JUMP IF END OF LIST
  2919	002433'01  201 07 0 07 000000#		MOVEI FX,-FKPT(FX)	;GET FORK INDEX
  2920	002434'01  506 04 0 07 002423*		STOR T4,FKGOLN		;STORE POSITION
  2921	002435'01  550 07 0 07 002360*		HRRZ FX,FKPT(FX)	;STEP LIST
  2922	002436'01  364 04 0 00 002432'		SOJA T4,WSMGS1		;STEP POSITION NUMBER
  2923
  2924	002437'01  205 07 0 00 000000#	WSMG0:	MOVSI FX,-NFKS		;SCAN FORK TO SELECT WORST IN-MEMORY
  2925	002440'01  402 00 0 15 000005 		SETZM WSMSUP		; FORK AND BEST NOT-IN-MEM FORK
  2926	002441'01  402 00 0 15 000006 		SETZM WSMSNR		;INIT SUMNR COUNT
  2927	002442'01  205 01 0 00 200000 		MOVX T1,1B1
  2928	002443'01  202 01 0 15 000003 		MOVEM T1,MINWS
  2929	002444'01  212 01 0 15 000001 		MOVNM T1,MAXWS
  2930	002445'01  476 00 0 15 000004 		SETOM MINWSF
  2931	002446'01  200 01 0 07 002415*	WSMG2:	LOAD T1,FKSWX,(FX)	;GET SWAP FLAGS
  2932	002447'01  603 01 0 00 400000 		TXNE T1,FKWSL		;WS IN MEM?
  2933						JRST [	LOAD T2,FKWSS	;YES, COMPUTE TOTAL
  2934							ADDM T2,WSMSNR
  2935							LOAD T2,FKCSIZ
  2936							ADDM T2,WSMSUP	;TOTAL USED PAGES
  2937							CALL GFHST	;GET HISTORY VALUE
  2938							CAML T1,MINWS	;HAVE NEW MINIMUM?
  2939							JRST WSMG1	;NO
  2940							MOVEM T1,MINWS	;YES, SAVE VALUE AND FX
  2941							HRRZM FX,MINWSF
  2942	002450'01  254 00 0 00 010545'			JRST WSMG1]
  2943	002451'01  607 01 0 00 100000 		TXNN T1,FKIBS		;NOT IN MEM, WANTS TO BE?
  2944	002452'01  254 00 0 00 002460'		JRST WSMG1		;NO
  2945	002453'01  260 17 0 00 002376'		CALL GFHST		;WS NOT IN MEM, GET HISTORY VAL
  2946	002454'01  317 01 0 15 000001 		CAMG T1,MAXWS		;NEW MAX?
  2947	002455'01  254 00 0 00 002460'		JRST WSMG1		;NO
  2948	002456'01  202 01 0 15 000001 		MOVEM T1,MAXWS		;YES, SAVE VALS
  2949	002457'01  552 07 0 15 000002 		HRRZM FX,MAXWSF
  2950	002460'01  253 07 0 00 002446'	WSMG1:	AOBJN FX,WSMG2
  2951						; ..
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 68
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  2952
  2953						; ..
  2954	002461'01  200 04 0 15 000006 		MOVE T4,WSMSNR		;CHECK TOTAL
  2955	002462'01  700 14 0 00 000400 		PIOFF			;PREVENT CHANGE AT INT LEVEL
  2956	002463'01  200 03 0 00 002332*		MOVE T3,SUMNR
  2957	002464'01  270 04 0 00 000000*		ADD T4,BALSHC
  2958	002465'01  700 14 0 00 000200 		PION
  2959	002466'01  316 04 0 00 000003 		CAMN T4,T3
  2960	002467'01  254 00 0 00 002473'		IFSKP.
  2961	002470'01  200 03 0 00 002463*		 MOVE T3,SUMNR
  2962						  BUG.(CHK,SUMNR2,SCHED,HARD,<WSMGR - SUMNR incorrect>,<<T3,SUMNR>,<T4,CHECK>>,<
  2963					
  2964					Cause:	The sum of reserve pages as stored in SUMNR was found to be
  2965						incorrect by routine WSMGR. The correct value has been computed and
  2966						stored in SUMNR.
  2967					
  2968					Data:	SUMNR - Current SUMNR value
  2969						CHECK - Correct computed SUMNR value
  2970	000004'04  000000  000000	>)
  2971	002471'01  256 00 0 00 010557'
  2972
  2973	002472'01  202 04 0 00 002470*		  MOVEM T4,SUMNR
  2974	002473'01				ENDIF.
  2975	002473'01  336 00 0 00 002355*		SKIPN RWSOKF		;REMWS OK HERE?
  2976	002474'01  254 00 0 00 002511'		JRST WSMG6		;NO, NO SWAPOUTS
  2977	002475'01  200 01 0 00 002343*	WSMG8:	MOVE T1,NRPLQ
  2978	002476'01  270 01 0 00 002340*		ADD T1,IOIP		;CHECK AVAILABLE MEM
  2979	002477'01  332 00 0 00 002475*		SKIPE NRPLQ
  2980	002500'01  317 01 0 00 002344*		CAMG T1,NRPMIN		;LOW?
  2981	002501'01  254 00 0 00 002527'		JRST WSMG4		;YES, DO SOMETHING ABOUT IT
  2982	002502'01  335 07 0 15 000004 		SKIPGE FX,MINWSF	;HAVE FORK WHICH COULD GO OUT?
  2983	002503'01  254 00 0 00 002511'		JRST WSMG6		;NO
  2984	002504'01  200 16 0 07 002446*		JN FKIBS,,WSMG6		;JUMP IF IT BELONGS IN BALSET
  2985	002505'01  603 16 0 00 100000 
  2986	002506'01  254 00 0 00 002511'
  2987	002507'01  305 01 0 00 000040 		CAIGE T1,^D32		;DOESN'T, MEM GETTING LOW?
  2988	002510'01  254 00 0 00 002546'		JRST WSMG7		;YES, FLUSH IT
  2989	002511'01  335 00 0 15 000001 	WSMG6:	SKIPGE MAXWS		;HAVE A FORK WAITING TO COME IN?
  2990	002512'01  254 00 0 00 002557'		JRST WSMG3		;NO
  2991	002513'01  200 07 0 15 000002 		MOVE FX,MAXWSF		;YES, GET ITS FX
  2992	002514'01  200 01 0 15 000001 		MOVE T1,MAXWS		;SEE IF BEST NOT-IN-MEM IS BETTER THAN
  2993	002515'01  331 00 0 15 000004 		SKIPL MINWSF		; WORST IN-MEM (OR NONE IN MEM)
  2994	002516'01  313 01 0 15 000003 		CAMLE T1,MINWS
  2995	002517'01  254 00 0 00 002524'		JRST WSMG5		;YES, LOAD
  2996	002520'01  550 01 0 07 001731*		LOAD T1,FKWSS		;ELSE, SEE IF FORK WOULD FIT WITH OTHERS
  2997	002521'01  270 01 0 00 002472*		ADD T1,SUMNR
  2998	002522'01  311 01 0 00 002335*		CAML T1,MAXNR		;FITS?
  2999	002523'01  254 00 0 00 002557'		JRST WSMG3		;NO, DO NOTHING
  3000	002524'01  260 17 0 00 003333'	WSMG5:	CALL LOADWS		;LOAD FORK
  3001	002525'01  254 00 0 00 002557'		 JRST WSMG3		;COULDN'T
  3002	002526'01  254 00 0 00 002437'		JRST WSMG0		;RECHECK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 69
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3003
  3004	002527'01  200 02 0 00 002521*	WSMG4:	MOVE T2,SUMNR		;MEM DEFINITELY OVERLOADED?
  3005	002530'01  311 02 0 00 002522*		CAML T2,MAXNR
  3006	002531'01  254 00 0 00 002541'		IFSKP.
  3007	002532'01  270 02 0 00 002476*		  ADD T2,IOIP		;INCLUDE PAGES DUE
  3008	002533'01  311 02 0 00 002530*		  CAML T2,MAXNR		;STILL UNDER LIMIT?
  3009	002534'01  254 00 0 00 002511'		  JRST WSMG6		;NO, DO NOTHING
  3010	002535'01  260 17 0 00 002560'		  CALL DOGCC		;COLLECT UNASSIGNED PAGES
  3011	002536'01  200 02 0 00 002527*		  MOVE T2,SUMNR		;RECHECK LIMIT
  3012	002537'01  315 02 0 00 002533*		  CAMGE T2,MAXNR
  3013	002540'01  254 00 0 00 002511'		  JRST WSMG6		;UNDER, CONTINUE
  3014	002541'01				ENDIF.			;OVER, REMOVE SOMETHING
  3015	002541'01  200 01 0 00 001304*		MOVE T1,NWSMEM
  3016	002542'01  303 01 0 00 000001 		CAILE T1,1		;MORE THAN ONE FORK IN MEM?
  3017	002543'01  254 00 0 00 002546'		IFSKP.
  3018	002544'01  260 17 0 00 002560'		  CALL DOGCC		;NO, CLEAR OUT SHARED PAGES
  3019	002545'01  254 00 0 00 002511'		  JRST WSMG6		;AND LEAVE FORK AS IS
  3020	002546'01				ENDIF.
  3021	002546'01  335 07 0 15 000004 	WSMG7:	SKIPGE FX,MINWSF	;HAVE A FORK TO REMOVE?
  3022	002547'01  254 00 0 00 002557'		JRST WSMG3		;NO, DO NOTHING NOW
  3023	002550'01  200 16 0 07 002504*		TMNN FKBLK		;FORK BLOCKED?
  3024	002551'01  607 16 0 00 200000 
  3025	002552'01  350 00 0 00 000000*		AOS NREMR		;NO, COUNT SWAPOUT OF RUNNABLE FORK
  3026	002553'01  260 17 0 00 003265'		CALL REMWS
  3027	002554'01  336 00 0 00 000000*		SKIPN POSPGF		;POST PURGE DONE?
  3028	002555'01  260 17 0 00 000000*		CALL FKGC		;NO, REMOVE FORK PAGES
  3029	002556'01  254 00 0 00 002437'		JRST WSMG0		;RECHECK
  3030
  3031	002557'01  263 17 0 00 000000 	WSMG3:	RET			;DONE
  3032
  3033					;DO GCCOR AND SWITCH OVERHEAD CHARGING
  3034
  3035	002560'01  260 17 0 00 001052'	DOGCC:	CALL RDSIVL		;YES, SWITCH OVERHEAD CHARGING
  3036	002561'01  202 01 0 00 001232*		MOVEM T1,SKDTHS
  3037	002562'01  260 17 0 00 002104*		CALL GCCOR
  3038	002563'01  476 00 0 00 002105*		SETOM LSTPFK		;NOTE PAGER CONTEXT INVALID
  3039	002564'01  260 17 0 00 001052'		CALL RDSIVL		;READ LAST INTERVAL
  3040	002565'01  272 01 0 00 000000*		ADDM T1,GCCTIM		;ACCUMULATE GCCOR TIME
  3041	002566'01  210 01 0 00 002561*		MOVN T1,SKDTHS		;RESET SCHED OVERHEAD TIME
  3042	002567'01  272 01 0 00 001233*		ADDM T1,SKDLST
  3043	002570'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 70
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3044
  3045					;ADJUST CONTENTS OF BALANCE SET
  3046					;SCAN DOWN GOLIST, REMOVING OR ADDING PROCESSES TO BALSET
  3047					; AS APPROPRIATE
  3048
  3049					   REPEAT 0,<
  3050					RTUNIT==^D10000			;RT UNIT FOR FORCED REMOVAL
  3051					RTMIN==^D30000			;MINIMUM TIME-OUT
  3052					RTMAX==^D120000			;MAX TIME-OUT
  3053					   >
  3054		   400000  000000	AJBYPF==1B0			;LOCAL FLAG - PASSED A NON-BALSET FK
  3055		   200000  000000	AJNNLF==1B1			;NO NEW LQ FORKS
  3056		   100000  000000	AJHQOF==1B2			;HQ FORKS ONLY
  3057					;AJRTRM==1B4			;RT REMOVAL FLAG
  3058
  3059					;LOCAL VARS - PAIRS MUST BE IN ORDER
  3060
  3061	000020'01			RS AJBNHQ,1			;RUNNING NUMBER HQ FORKS
  3062	000021'01			RS AJBNLQ,1			;RUNNING NUMBER LQ FORKS
  3063
  3064	000022'01			RS AJBHQP,1			;RUNNING TOTAL HQ PAGES
  3065	000023'01			RS AJBLQP,1			;RUNNING TOTAL LQ PAGES
  3066
  3067	000024'01			RS NXTAJB,1			;TIME NEXT AJBALS DUE
  3068	000025'01			RS AJBFLG,1			;PERMANENT FLAGS
  3069
  3070		   	   000024	BSPAD==^D20			;PAD FOR BALSET SUM
  3071		   	   000012	BSPADO==^D10			;POS OR NEG OFFSET FOR REMOVING OR LOADING
  3072
  3073					;TEST FOR AJBALS NECESSARY BEFORE SELECTING FORK TO RUN
  3074
  3075	002571'01  200 01 0 00 002537*	TSTBAL:	MOVE T1,MAXNR
  3076	002572'01  315 01 0 00 000000*		CAMGE T1,SUMBNR		;MEM OVERCOMMITTED?
  3077	002573'01  254 00 0 00 002577'		JRST TSTBL1		;YES, ADJUST
  3078	002574'01  200 01 0 00 002346*		MOVE T1,TODCLK
  3079	002575'01  315 01 0 00 000000#		CAMGE T1,NXTAJB		;TIME FOR PERIODIC CHECK?
  3080	002576'01  263 17 0 00 000000 		RET			;NO, DO NOTHING
  3081	002577'01  350 00 0 00 000000*	TSTBL1:	AOS NAJBAL		;COUNT FORCED CALLS
  3082	002600'01  254 00 0 00 002601'		CALLRET AJBALS		;DO IT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 71
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3083
  3084					;ADJUST BALANCE SET
  3085
  3086	002601'01  265 16 0 00 002426*	AJBALS:	TRVAR <AJLODN,AJBLFK,AJBBSC,PRIPST,RTREM>
  3087	002602'01  000000  000005
  3088						;ACS Q1,Q2,FX,P1,P2 SHOULD BE SAVED HERE
  3089	002603'01  332 00 0 00 000000*		SKIPE PAGDIF		;NEW PAGES IN SYSTEM?
  3090	002604'01  260 17 0 00 000000*		CALL ADJSWP		;YES. ADJUST PAGING TO MATCH NEW STATE
  3091	002605'01  476 00 0 15 000004 		SETOM PRIPST		;NO SKIPPED PROCESS YET
  3092	002606'01  402 00 0 15 000001 		SETZM AJLODN		;NUMBER FORKS LOADED ON THIS CALL
  3093	002607'01  402 00 0 00 000000#		SETZM AJBNHQ		;INIT VARIABLES
  3094	002610'01  402 00 0 00 000000#		SETZM AJBNLQ
  3095	002611'01  402 00 0 00 000000#		SETZM AJBHQP
  3096	002612'01  402 00 0 00 000000#		SETZM AJBLQP
  3097	002613'01  476 00 0 15 000002 		SETOM AJBLFK
  3098	002614'01  500 00 0 00 000000#		HLL F,AJBFLG		;GET PERM FLAGS
  3099	002615'01  336 00 0 00 001405*		SKIPN CLASSF		;NON-CLASS SCHEDULER?
  3100	002616'01  606 00 0 00 020000 		TXNN F,SK%HQR		;HQ DISASTER AVOIDANCE?
  3101	002617'01  254 00 0 00 002632'	      IFSKP.
  3102	002620'01  200 01 0 00 001376*		MOVE T1,HQLAV		;YES, GET CURRENT HQ LDAV
  3103	002621'01  315 01 0 00 000001'		CAMGE T1,HQLEV1		;BELOW TURN OFF POINT?
  3104	002622'01  621 00 0 00 200000 		TXZ F,AJNNLF		;YES
  3105	002623'01  311 01 0 00 000002'		CAML T1,HQLEV2		;ABOVE TURN ON POINT?
  3106	002624'01  661 00 0 00 200000 		TXO F,AJNNLF		;YES
  3107	002625'01  315 01 0 00 000003'		CAMGE T1,HQLEV3		;BELOW TURN OFF POINT?
  3108	002626'01  621 00 0 00 100000 		TXZ F,AJHQOF		;YES
  3109	002627'01  311 01 0 00 000004'		CAML T1,HQLEV4		;ABOVE TURN ON POINT?
  3110	002630'01  661 00 0 00 100000 		TXO F,AJHQOF		;YES
  3111	002631'01  254 00 0 00 002633'	      ELSE.
  3112	002632'01  621 00 0 00 300000 		TXZ F,AJNNLF!AJHQOF	;NO DISASTER AVOIDANCE, NORMALIZE FLAGS
  3113	002633'01			      ENDIF.
  3114	002633'01  200 01 0 00 002571*		MOVE T1,MAXNR		;SET LIMIT FOR HOLDING FORKS
  3115	002634'01  275 01 0 00 000100 		SUBI T1,100
  3116	002635'01  202 01 0 00 000000*		MOVEM T1,MAXHNR		;HOLD LIMIT
  3117	002636'01  402 00 0 00 000000*		SETZM BSKED
  3118	002637'01  400 05 0 00 000000 		SETZ Q1,			;INIT NBP COUNT
  3119	002640'01  200 04 0 00 002464*		MOVE 4,BALSHC		;INIT SUMNR COUNT
  3120	002641'01  271 04 0 00 000024 		ADDI T4,BSPAD		;INCLUDE PAD
  3121	002642'01  202 04 0 15 000003 		MOVEM T4,AJBBSC		;SAVE BASE
  3122	002643'01  201 06 0 00 000000*		MOVEI Q2,BSLST		;SCAN LIST OF RECENT BALSET ENTRIES
  3123					   REPEAT 0,<
  3124						TXZ F,AJRTRM		;ASSUME NOT DOING RT REMOVAL
  3125						MOVE T1,NBPROC		;GET # IN BS
  3126						CAMN T1,NGOJOB		;ALL IN?
  3127						JRST AJBS2		;YES
  3128						MOVE T1,IRJAV		;GET CURRENT LOAD AVG
  3129						IMULI T1,RTUNIT		;COMPUTE TIME TO HOLD PROCESSES
  3130						CAIGE T1,RTMIN
  3131						MOVEI T1,RTMIN
  3132						CAILE T1,RTMAX
  3133						MOVEI T1,RTMAX		;MAKE SURE NUMBER IS GOOD
  3134						MOVEM T1,RTREM		;SAVE IT
  3135						TXO F,AJRTRM		;SAY DOING REMOVALS
  3136					   >				;END REPEAT 0
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 72
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3137
  3138	002644'01  550 06 0 06 000000 	AJBS2:	HRRZ Q2,0(Q2)		;GET NEXT
  3139	002645'01  322 06 0 00 002670'		JUMPE Q2,AJBAL4		;JUMP IF END OF LIST
  3140	002646'01  201 07 0 06 000000#		MOVEI FX,-FKBSPW(Q2)
  3141	002647'01  205 16 0 00 002000 		SETZRO FKBSHF		;ASSUME NOT HOLDING
  3142	002650'01  412 16 0 07 002550*
  3143	002651'01  135 01 0 00 010536'		LOAD T1,FKBET		;GET HOLD EXPIRATION TIME
  3144	002652'01  554 02 0 07 001723*		LOAD T2,FKJBN
  3145	002653'01  274 01 0 02 001624*		SUB T1,JOBRT(T2)	;COMPUTE TIME REMAINING
  3146					   REPEAT 0,<
  3147						TXNN F,AJRTRM		;ALL PROCESSES FIT?
  3148						JRST AJBS0		;YES. SKIP RT TEST THEN
  3149						HLRZ CX,0(Q2)		;GET ENTRY TIME
  3150						HRRZ P2,TODCLK		;GET NOW
  3151						SUB P2,CX		;COMPUTE TIME SINCE ENTERED
  3152						SKIPGE P2		;CHECK FOR OVERFLOW
  3153						ADD P2,[1B17]		;YES. FIX IT
  3154						CAMG P2,RTREM		;TOO LONG?
  3155					AJBS0:   >			;END REPEAT 0
  3156	002654'01  602 01 0 00 200000 		TXNE T1,FKBETH		;NEGATIVE NUMBER? (CHECK HIGH-ORDER BIT)
  3157						JRST [	SETZRO FKBET	;YES, SET TIME EXPIRED
  3158							CALL REMBSL	;REMOVE FROM PROTECT LIST
  3159	002655'01  254 00 0 00 010564'			JRST AJBS2]
  3160	002656'01  550 01 0 07 002520*		LOAD T1,FKWSS
  3161	002657'01  270 01 0 00 000004 		ADD T1,T4
  3162	002660'01  275 01 0 00 000024 		SUBI T1,BSPAD
  3163	002661'01  313 01 0 00 002635*		CAMLE T1,MAXHNR		;ROOM TO HOLD FORK?
  3164	002662'01  327 05 0 00 002644'		JUMPG Q1,AJBS2		;NO (UNLESS FIRST FORK SEEN)
  3165	002663'01  205 16 0 00 002000 		SETONE FKBSHF		;SET HOLD FLAG
  3166	002664'01  436 16 0 07 002650*
  3167	002665'01  260 17 0 00 003031'		CALL AJBUQS		;STILL HOLDING, COUNT PAGES
  3168	002666'01  272 01 0 00 000004 		ADDM T1,T4
  3169	002667'01  344 05 0 00 002644'		AOJA Q1,AJBS2
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 73
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3170
  3171					;SCAN GOLST CHECKING ALL FORKS, AND REMOVE, LOAD, OR
  3172					;LEAVE AS IS.
  3173
  3174	002670'01  621 00 0 00 400000 	AJBAL4:	TXZ F,AJBYPF		;INIT FLAG
  3175	002671'01  201 06 0 00 002431*		MOVEI Q2,GOLST
  3176	002672'01  550 06 0 06 000000 	AJBAL1:	HRRZ Q2,0(Q2)		;GET NEXT
  3177	002673'01  322 06 0 00 003050'	AJBL10:	JUMPE Q2,AJBALX		;DONE IF REACHED END OF GOLST
  3178	002674'01  201 07 0 06 000000#		MOVEI FX,-FKPT(Q2)	;GET FORK INDEX
  3179	002675'01  135 11 0 00 010532'		LOAD P2,FKQN		;CHECK FORK QUEUE
  3180	002676'01  305 11 0 00 000005 		CAIGE P2,MAXQ		;HIGH QUEUES?
  3181	002677'01  634 11 0 00 000011 		TDZA P2,P2		;YES, USE 0 INDEX
  3182	002700'01  201 11 0 00 000001 		MOVEI P2,1		;NO, USE 1 INDEX
  3183	002701'01  200 16 0 07 002664*		JE FKIBS,,AJBAL5	;JUMP IF NOT IN BALSET
  3184	002702'01  607 16 0 00 100000 
  3185	002703'01  254 00 0 00 002755'
  3186	002704'01  200 16 0 07 002701*	FRIBP0:	JN FKBSHF,,AJBAL1	;IF HELD, ALREADY ACCOUNTED
  3187	002705'01  603 16 0 00 002000 
  3188	002706'01  254 00 0 00 002672'
  3189	002707'01  200 16 0 07 002704*		JN <BSNSK,BSCRSK>,,AJBL77 ;IF NOSKED OR CRSKED, TRY TO KEEP IT
  3190	002710'01  603 16 0 00 030000 
  3191	002711'01  254 00 0 00 002725'
  3192	002712'01  200 16 0 07 002400*		JN PIBMP,,AJBL77	;KEEP IF PI'ING
  3193	002713'01  603 16 0 00 200000 
  3194	002714'01  254 00 0 00 002725'
  3195	002715'01  337 00 0 00 002615*		SKIPG CLASSF		;WITHHOLDING WINDFALL?
  3196	002716'01  254 00 0 00 002722'		IFSKP.
  3197	002717'01  260 17 0 00 003553'		  CALL CKAHED		;YES. IS THIS ONE AHEAD?
  3198	002720'01  254 00 0 00 002722'		ANSKP.
  3199	002721'01  254 00 0 00 002745'		  JRST AJBL9		;YES, REMOVE FROM BALSET AND MEM
  3200	002722'01				ENDIF.
  3201	002722'01  603 00 0 00 100000 		TXNE F,AJHQOF		;HQ FORKS ONLY?
  3202	002723'01  326 11 0 00 002745'		JUMPN P2,AJBL9		;YES, FLUSH IF LQ
  3203	002724'01  322 05 0 00 002733'		JUMPE Q1,AJBAL7		;NO FURTHER CHECKS IF FIRST FORK SEEN
  3204	002725'01  550 01 0 07 002656*	AJBL77:	LOAD 1,FKWSS
  3205	002726'01  270 01 0 00 000004 		ADD 1,4
  3206	002727'01  275 01 0 00 000024 		SUBI T1,BSPAD		;REDUCE BY PAD OFFSET
  3207	002730'01  317 05 0 00 000000*		CAMG Q1,MAXBP		;FORK STILL FITS IN BALSET?
  3208	002731'01  313 01 0 00 002633*		CAMLE 1,MAXNR
  3209	002732'01  254 00 0 00 002737'		JRST AJBL12		;NO
  3210	002733'01  550 01 0 07 002725*	AJBAL7:	LOAD T1,FKWSS		;GET SIZE
  3211	002734'01  272 01 0 00 000004 		ADDM T1,4		;UPDATE SUM
  3212	002735'01  260 17 0 00 003035'		CALL AJBUQ0		;UPDATE QUEUE SUMS
  3213	002736'01  344 05 0 00 002672'		AOJA Q1,AJBAL1		;COUNT FORK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 74
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3214
  3215					;HERE IF FORK NOW IN BALSET DOESN'T APPEAR TO FIT.
  3216
  3217	002737'01  550 06 0 06 000000 	AJBL12:	HRRZ Q2,0(Q2)		;STEP LIST
  3218	002740'01  260 17 0 00 003220'		CALL CLRIBS		;NOTE NOT IN BALSET
  3219	002741'01  667 00 0 00 400000 		TXON F,AJBYPF		;NOTE PASSED A FORK NOT IN BALSET
  3220	002742'01  260 17 0 00 003041'		CALL SETPRP		;IF FIRST ONE, DO PRIORITY STUFF
  3221	002743'01  350 00 0 00 000000*		AOS NREMJ		;NOTE FORCED REMOVALS
  3222	002744'01  254 00 0 00 002673'		JRST AJBL10
  3223
  3224					;HERE TO REMOVE FORK FROM BALSET AND SWAPOUT IMMEDIATELY
  3225
  3226	002745'01  260 17 0 00 003220'	AJBL9:	CALL CLRIBS
  3227	002746'01  200 16 0 07 002707*	AJBAL2:	JE FKWSL,,AJBAL1	;JUMP IF WS NOT LOADED
  3228	002747'01  325 16 0 00 002672'
  3229	002750'01  550 06 0 06 000000 		HRRZ Q2,0(Q2)		;STEP LIST
  3230	002751'01  261 17 0 00 000004 		PUSH P,T4		;SAVE SUMBNR COMPUTATION
  3231	002752'01  260 17 0 00 003265'		CALL REMWS		;SWAPOUT
  3232	002753'01  262 17 0 00 000004 		POP P,T4		;RESTORE LOCAL SUMBNR
  3233	002754'01  254 00 0 00 002673'		JRST AJBL10
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 75
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3234
  3235					;FORK NOT NOW IN BALSET
  3236
  3237	002755'01  337 00 0 00 002715*	AJBAL5:	SKIPG CLASSF		;WITHHOLDING WINDFALL?
  3238	002756'01  254 00 0 00 002762'		IFSKP.
  3239	002757'01  260 17 0 00 003553'		  CALL CKAHED		;YES. IS THIS FORK AHEAD?
  3240	002760'01  254 00 0 00 002762'		ANSKP.
  3241	002761'01  254 00 0 00 002746'		  JRST AJBAL2
  3242	002762'01				ENDIF.
  3243	002762'01  335 00 0 00 000000*		SKIPGE SPMLCK		;SOMEONE TRYING TO GET A PAGE?
  3244	002763'01  254 00 0 00 002766'		IFSKP.
  3245	002764'01  260 17 0 00 000000*		  CALL TSTFRP		;YES. IS THIS FORK HOARDING THE PAGE?
  3246	002765'01  254 00 0 00 002672'		   JRST AJBAL1		;YES. DON'T LOAD IT
  3247	002766'01				ENDIF.
  3248	002766'01  322 05 0 00 003003'		JUMPE Q1,AJBAL6		;NO FURTHER CHECKS IF FIRST FORK SEEN
  3249	002767'01  550 01 0 07 002733*		LOAD T1,FKWSS		;CHECK SIZE
  3250	002770'01  270 01 0 00 000004 		ADD T1,T4			;BALSET SUM WHICH WOULD INCLUDE THIS FORK
  3251	002771'01  271 01 0 00 000012 		ADDI T1,BSPADO		;INCREASE BY PAD OFFSET
  3252	002772'01  315 05 0 00 002730*		CAMGE Q1,MAXBP		;ROOM IN BALSET FOR ANOTHER FORK?
  3253	002773'01  313 01 0 00 002731*		CAMLE T1,MAXNR		;ROOM FOR THIS FORK'S PAGES?
  3254	002774'01  254 00 0 00 003013'		JRST AJBL11		;NO
  3255	002775'01  603 00 0 00 200000 		TXNE F,AJNNLF		;ALLOW NEW LQ FORKS?
  3256	002776'01  326 11 0 00 003016'		JUMPN P2,AJB666		;NO. IF LQ CHECK FOR SPECIAL LOADING
  3257	002777'01  332 00 0 00 002755*		SKIPE CLASSF		;CLASS SCHEDULING BEING USED?
  3258	003000'01  607 00 0 00 400000 		TXNN F,AJBYPF		;YES. BYPASSED ANYBODY?
  3259	003001'01  334 00 0 00 000000 		SKIPA			;NO
  3260						JRST [	CALL CORFCT	;YES. GET PRIORITY OF THIS PROCESS
  3261							CAMGE T1,PRIPST	;THIS ONE LOWER THAN ONE PASSED?
  3262							JRST AJB667	;YES. CHECK FOR SPECIAL LOAD
  3263							CALL SETIBS	;NO. LOAD IT THEN
  3264	003002'01  254 00 0 00 010570'			JRST AJBAL7]	;AND PROCEED
  3265	003003'01  260 17 0 00 003161'	AJBAL6:	CALL SETIBS		;NOTE IN BALSET
  3266	003004'01  602 00 0 00 040000 		TXNE F,SK%HT2		;NO HOLD TIME IF SKIPPED PROCESS?
  3267	003005'01  607 00 0 00 400000 		TXNN F,AJBYPF		;YES, SKIPPED A PROCESS?
  3268	003006'01  254 00 0 00 002733'		JRST AJBAL7		;NO. ACCOUNT FOR IT
  3269	003007'01  205 16 0 00 377777 	AJBL69:	SETZRO FKBET		;YES. NO HOLD TIME NOW
  3270	003010'01  412 16 0 07 002435*
  3271	003011'01  260 17 0 00 003243'		CALL REMBSL		;REMOVE FROM PROTECTED LIST
  3272	003012'01  254 00 0 00 002733'		JRST AJBAL7		;AND PROCEED
  3273
  3274	003013'01  667 00 0 00 400000 	AJBL11:	TXON F,AJBYPF		;NOTE PASSED A FORK NOT IN BALSET
  3275	003014'01  260 17 0 00 003041'		CALL SETPRP		;IF FIRST TIME, DO PRIROITY STUFF
  3276	003015'01  254 00 0 00 002672'		JRST AJBAL1
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 76
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3277
  3278					;FORK CANNOT BE LOADED ACCORDING TO NORMAL RULES. CHECK FOR SPECIAL
  3279					;LOADING CRITERIA
  3280
  3281	003016'01  334 01 0 00 010575'	AJB666:	SKIPA T1,[AJBAL1]	;WHERE TO GO
  3282	003017'01  201 01 0 00 003013'	AJB667:	MOVEI T1,AJBL11		;WHERE TO GO
  3283	003020'01  200 16 0 07 002746*		JN BSCRSK,,AJB668	;IF CRSKED, LOAD IT
  3284	003021'01  603 16 0 00 010000 
  3285	003022'01  254 00 0 00 003027'
  3286	003023'01  200 16 0 07 002712*		JN PIBMP,,AJB668	;OR IF PI ALSO
  3287	003024'01  603 16 0 00 200000 
  3288	003025'01  254 00 0 00 003027'
  3289	003026'01  254 00 0 01 000000 		JRST 0(T1)		;CAN'T LOAD IT, GIVE UP
  3290	003027'01  260 17 0 00 003161'	AJB668:	CALL SETIBS		;PUT IN BALSET
  3291	003030'01  254 00 0 00 003007'		JRST AJBL69		;BUT NO HOLD TIME
  3292
  3293					;UPDATE RUNNING QUEUE SUMS
  3294
  3295	003031'01  135 11 0 00 010532'	AJBUQS:	LOAD P2,FKQN		;SET QUEUE SET INDEX
  3296	003032'01  305 11 0 00 000005 		CAIGE P2,MAXQ
  3297	003033'01  634 11 0 00 000011 		TDZA P2,P2		;USE 0 FOR INTERACTIVE QUEUES
  3298	003034'01  201 11 0 00 000001 		MOVEI P2,1		;1 FOR COMPUTE QUEUE
  3299	003035'01  550 01 0 07 002767*	AJBUQ0:	LOAD T1,FKWSS		;UPDATE FOR CURRENT FORK
  3300	003036'01  272 01 0 11 000000#		ADDM T1,AJBHQP(P2)	;COUNT PAGES
  3301	003037'01  350 00 0 11 000000#		AOS AJBNHQ(P2)		;COUNT FORKS
  3302	003040'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 77
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3303
  3304					;ROUTINE OF AJBALS TO HANDLE FIRST INSTANCE OF A FORK THAT
  3305					;WON'T FIT
  3306
  3307	003041'01  336 00 0 00 002777*	SETPRP:	SKIPN CLASSF		;CLASS SCHEDULING?
  3308	003042'01  263 17 0 00 000000 		RET			;NO. NOTHING TO DO HERE THEN
  3309	003043'01  260 17 0 00 004446'		CALL CORFCT		;YES. GET PRIROITY OF THIS PROCESS
  3310	003044'01  313 01 0 00 010576'		CAMLE T1,[1.0]		;ONE OF THE COMPUTING PROCESSES?
  3311						JRST [	TXZ F,AJBYPF	;NO. IGNORE THE SKIP THEN
  3312	003045'01  254 00 0 00 010577'			RET]		;AND DONE
  3313	003046'01  202 01 0 15 000004 		MOVEM T1,PRIPST		;SAVE PRIORITY OF THIS PROCESS
  3314	003047'01  263 17 0 00 000000 		RET			;AND DONE
  3315
  3316					;EXIT FROM AJBALS
  3317
  3318	003050'01  274 04 0 15 000003 	AJBALX:	SUB T4,AJBBSC		;REMOVE PAD AND ORIG BALSHC
  3319	003051'01  700 14 0 00 000400 		PIOFF			;PREVENT CHANGE AT INT LEVEL
  3320	003052'01  200 03 0 00 002572*		MOVE T3,SUMBNR
  3321	003053'01  270 04 0 00 002640*		ADD T4,BALSHC		;INCLUDE CURRENT BALSHC
  3322	003054'01  700 14 0 00 000200 		PION
  3323	003055'01  316 04 0 00 000003 		CAMN T4,T3		;CHECK SUM
  3324	003056'01  254 00 0 00 003062'		IFSKP.
  3325	003057'01  200 03 0 00 003052*		  MOVE T3,SUMBNR
  3326						  BUG.(CHK,SUMNR1,SCHED,HARD,<AJBALX - SUMBNR incorrect>,<<T3,SUMBNR>,<T4,CHECK>>,<
  3327					
  3328					Cause:	The value of SUMBNR has been found to be incorrect by AJBALX. The
  3329						correct value of SUMBNR has been computed and stored in SUMBNR.
  3330					
  3331					Data:	SUMBNR - Sum of working sets in balance set
  3332						CHECK - Correct computed value of SUMBNR
  3333	000005'04  000000  000000	>)
  3334	003060'01  256 00 0 00 010601'
  3335
  3336	003061'01  202 04 0 00 003057*		  MOVEM T4,SUMBNR
  3337	003062'01				ENDIF.
  3338	003062'01  200 01 0 00 002574*		MOVE T1,TODCLK		;SET TIME FOR NEXT PERIODIC CALL
  3339	003063'01  270 01 0 00 000007'		ADD T1,AJBLCY
  3340	003064'01  202 01 0 00 000000#		MOVEM T1,NXTAJB
  3341	003065'01  202 00 0 00 000000#		MOVEM F,AJBFLG		;SAVE NEW SETTINGS
  3342	003066'01  200 01 0 15 000001 		MOVE T1,AJLODN		;RETURN COUNT OF FORKS LOADED THIS CALL
  3343	003067'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 78
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3344
  3345					;CHECK FOR POSSIBILITY OF LOADING FORK INTO BALSET
  3346
  3347	003070'01  265 16 0 00 001603*	CHKTFK:	SAVEQ
  3348	003071'01  201 06 0 00 002671*		MOVEI Q2,GOLST
  3349	003072'01  550 06 0 06 000000 	CHKTF1:	HRRZ Q2,0(Q2)		;GET NEXT FORK ON GOLST
  3350	003073'01  322 06 0 00 002311*		JUMPE Q2,R		;DONE WHEN LIST NULL
  3351	003074'01  201 07 0 06 000000#		MOVEI FX,-FKPT(Q2)	;GET FORK INDEX
  3352	003075'01  200 16 0 07 003020*		JN FKIBS,,CHKTF1		;JUMP IF FORK IN BALSET
  3353	003076'01  603 16 0 00 100000 
  3354	003077'01  254 00 0 00 003072'
  3355	003100'01  335 00 0 00 002762*		SKIPGE SPMLCK		;IS SOME FORK TRYING TO GET A PAGE?
  3356	003101'01  254 00 0 00 003104'		IFSKP.
  3357	003102'01  260 17 0 00 002764*		  CALL TSTFRP		;YES. IS THIS FORK GUILTY OF HOLDING IT?
  3358	003103'01  254 00 0 00 003072'		   JRST CHKTF1		;YES. SKIP IT THEN
  3359	003104'01				ENDIF.
  3360	003104'01  260 17 0 00 003107'		CALL TRYLDF		;SEE IF IT CAN BE LOADED
  3361	003105'01  263 17 0 00 000000 		 RET			;COULDN'T, TRY NO MORE
  3362	003106'01  254 00 0 00 003072'		JRST CHKTF1		;COULD, TRY AGAIN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 79
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3363
  3364					;CHECK SPECIFIC FORK FOR LOADING INTO BALSET
  3365					;N.B. (THIS IS A MONUMENT). THIS CODE SHOULD NEVER BE
  3366					;CALLED TO LOAD A FORK OF LOWER PRIORITY THAN ONE NOT LOADED.
  3367					;THAT IS, IF A FORK HIGHER ON GOLST CAN NOT BE LOADED, THEN
  3368					;DON'T CALL TRYLDF TO LOAD THIS ONE. PRESENTLY, CHKTFK IS
  3369					;THE ONLY USER OF TRYLDF AND IT DOES THE RIGHT THING.
  3370					;WOE BE TO HE (OR HER) THAT VIOLATES THIS TRUST.
  3371
  3372	003107'01  200 02 0 00 000000#	TRYLDF:	MOVE T2,AJBFLG		;GET AJBALS PERMANENT FLAGS
  3373	003110'01  200 16 0 07 003075*		JN BSCRSK,,TRYLD0	;IF CSKED, ALWAYS TRY
  3374	003111'01  603 16 0 00 010000 
  3375	003112'01  254 00 0 00 003130'
  3376	003113'01  200 16 0 07 003023*		JN PIBMP,,TRYLD0	;IF PI'ING, ALSO LOAD
  3377	003114'01  603 16 0 00 200000 
  3378	003115'01  254 00 0 00 003130'
  3379	003116'01  607 02 0 00 200000 		TXNN T2,AJNNLF		;LQ FORK ALLOWED?
  3380	003117'01  254 00 0 00 003123'		IFSKP.
  3381	003120'01  135 01 0 00 010532'		  LOAD T1,FKQN		;NO
  3382	003121'01  301 01 0 00 000005 		  CAIL T1,MAXQ		;THIS FORK LQ?
  3383	003122'01  263 17 0 00 000000 		  RET			;YES, DON'T LOAD
  3384	003123'01				ENDIF.
  3385	003123'01  337 00 0 00 003041*		SKIPG CLASSF		;CLASS SCHED?
  3386	003124'01  254 00 0 00 003130'		IFSKP.
  3387	003125'01  260 17 0 00 003553'		  CALL CKAHED		;WINDFALL?
  3388	003126'01  254 00 0 00 003130'		ANSKP.
  3389	003127'01  254 00 0 00 003141'		  JRST TRYLD2		;NO, DON'T LOAD
  3390	003130'01				ENDIF.
  3391	003130'01  550 01 0 07 003035*	TRYLD0:	LOAD T1,FKWSS		;GET WS SIZE
  3392	003131'01  271 01 0 00 000024 		ADDI T1,BSPAD		;INCREASE BY PAD AND OFFSET
  3393	003132'01  270 01 0 00 003061*		ADD T1,SUMBNR		;COMPUTE BALSET SIZE WITH FORK
  3394	003133'01  311 01 0 00 002773*		CAML T1,MAXNR		;FORK WS FITS?
  3395	003134'01  254 00 0 00 003141'		JRST TRYLD2		;NO, DON'T LOAD
  3396	003135'01  260 17 0 00 003161'		CALL SETIBS		;NOTE FORK IN BALSET
  3397	003136'01  331 00 0 07 003110*		TMNN FKWSL		;WS NOW LOADED?
  3398	003137'01  402 00 0 00 002352*		SETZM WSMTIM		;NO, CHECK SOON
  3399	003140'01  254 00 0 00 002316*		RETSKP			;DONE
  3400
  3401	003141'01  263 17 0 00 000000 	TRYLD2:	RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 80
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3402
  3403					;REMOVE FORK FROM BALSET WHEN BLOCKING
  3404
  3405	003142'01  200 16 0 07 003136*	REMBSJ:	JE FKIBS,,R		;RETURN IF ALREADY OUT
  3406	003143'01  607 16 0 00 100000 
  3407	003144'01  254 00 0 00 003073*
  3408	003145'01  260 17 0 00 003220'		CALL CLRIBS
  3409	003146'01  550 01 0 07 003130*		LOAD T1,FKWSS
  3410	003147'01  550 02 0 07 002260*		LOAD T2,FKCSIZ
  3411	003150'01  271 02 0 00 000004 		ADDI T2,4
  3412	003151'01  315 02 0 00 000001 		CAMGE T2,T1		;WS SMALLER NOW?
  3413						CALL [	MOVE T1,T2	;YES, REDUCE RESERVE
  3414	003152'01  260 17 0 00 010606'			CALLRET ADJWSS]
  3415	003153'01  554 02 0 07 002652*		LOAD 2,FKJBN		;MAINTAIN SUBSYSTEM INFO...
  3416	003154'01  550 02 0 02 001023*		HRRZ 2,JOBNAM(2)
  3417	003155'01  550 01 0 07 003146*		LOAD 1,FKWSS
  3418	003156'01  272 01 1 00 010610'		ADDM 1,@[EP. SSIZE(2)]	;INTEGRATE WS SIZE
  3419	003157'01  350 00 1 00 010611'		AOS @[EP. SNBLKS(2)]	;AND COUNT NUMBER OF SAMPLES
  3420	003160'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 81
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3421
  3422					;NOTE FORK IN/OUT OF BALSET, MAINTAIN COUNT
  3423					; FX/ FORK INDEX
  3424
  3425	003161'01  205 16 0 00 104000 	SETIBS:	SETONE <FKIBS,FKIBH>
  3426	003162'01  436 16 0 07 003142*
  3427	003163'01  205 16 0 00 002000 		SETZRO FKBSHF		;INIT HOLD FLAG
  3428	003164'01  412 16 0 07 003162*
  3429	003165'01  606 00 0 00 100000 		JXE F,SK%HT1,SETIB2	;ALWAYS DO HOLD IF SK%HT1 0
  3430	003166'01  254 00 0 00 003177'
  3431	003167'01  200 01 0 00 000000*		MOVE T1,NBSL		;NUMBER HOLDING FORKS
  3432	003170'01  301 01 0 00 000002 		CAIL T1,2		;ENOUGH NOW?
  3433	003171'01  254 00 0 00 003214'		JRST SETIB1		;YES, NO MORE
  3434	003172'01  322 01 0 00 003177'		JUMPE T1,SETIB2		;GIVE HOLD TIME IF NO OTHERS
  3435	003173'01  200 01 0 00 003132*		MOVE T1,SUMBNR
  3436	003174'01  240 01 0 00 000001 		ASH T1,1
  3437	003175'01  311 01 0 00 003133*		CAML T1,MAXNR		;IF 1 OTHER, GIVE HOLD TIME IF
  3438	003176'01  254 00 0 00 003214'		JRST SETIB1		; BALSET LESS THAN HALF FULL
  3439	003177'01  260 17 0 00 003232'	SETIB2:	CALL APPBSL		;APPEND FORK TO BALSET LIST
  3440	003200'01  201 02 0 00 023420 		MOVEI T2,^D10000	;MAX HOLD TIME IF BIAS SCHEDULER
  3441	003201'01  332 00 0 00 003123*		SKIPE CLASSF		;IS IT?
  3442	003202'01  201 02 0 00 005670 		MOVEI T2,UTLINI*UTLTMI	;NO. SET TO NEWUTL CYCLE THEN
  3443	003203'01  550 01 0 07 003155*		LOAD T1,FKWSS		;COMPUTE HOLD TIME AS SIZE * 20 MS
  3444	003204'01  221 01 0 00 000024 		IMULI T1,^D20
  3445	003205'01  305 01 0 00 001750 		CAIGE T1,^D1000		;AT LEAST 1 SEC
  3446	003206'01  201 01 0 00 001750 		MOVEI T1,^D1000
  3447	003207'01  303 01 0 02 000000 		CAILE T1,0(T2)		;OVER MAX LIMIT?
  3448	003210'01  201 01 0 02 000000 		MOVEI T1,0(T2)		;YES. APPLY LIMIT THEN
  3449	003211'01  554 02 0 07 003153*		LOAD T2,FKJBN
  3450	003212'01  270 01 0 02 002653*		ADD T1,JOBRT(T2)	;COMPUTE EXPIRATION TIME
  3451	003213'01  137 01 0 00 010536'		STOR T1,FKBET
  3452	003214'01  550 01 0 07 003203*	SETIB1:	LOAD T1,FKWSS
  3453	003215'01  272 01 0 00 003173*		ADDM T1,SUMBNR		;UPDATE BALSET SUM
  3454	003216'01  350 00 0 00 001301*		AOS NBPROC
  3455	003217'01  263 17 0 00 000000 		RET
  3456
  3457	003220'01  205 16 0 00 100000 	CLRIBS:	SETZRO <FKIBS,FKBET>
  3458	003221'01  412 16 0 07 003164*
  3459	003222'01  205 16 0 00 377777 
  3460	003223'01  412 16 0 07 003010*
  3461	003224'01  260 17 0 00 003243'		CALL REMBSL		;REMOVE FORK FROM LIST
  3462	003225'01  550 01 0 07 003214*		LOAD T1,FKWSS
  3463	003226'01  210 01 0 00 000001 		MOVN T1,T1
  3464	003227'01  272 01 0 00 003215*		ADDM T1,SUMBNR		;UPDATE BALSET SUM
  3465	003230'01  370 00 0 00 003216*		SOS NBPROC
  3466	003231'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 82
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3467
  3468					;APPEND FORK TO BALSET LIST
  3469
  3470	003232'01  265 16 0 00 001614*	APPBSL:	SAVEAC <Q1,Q2>
  3471	003233'01  201 05 0 00 002643*		MOVEI Q1,BSLST
  3472	003234'01  550 06 0 05 000000 	APPBS1:	HRRZ Q2,0(Q1)		;GET NEXT, SAVE PREV PTR
  3473						JUMPN Q2,[MOVE Q1,Q2	;STEP AGAIN IF NOT END OF LIST
  3474	003235'01  326 06 0 00 010612'			JRST APPBS1]
  3475	003236'01  201 06 0 07 002434*		MOVEI Q2,FKBSPW(FX)	;END OF LIST, MAKE PTR TO NEW FORK
  3476	003237'01  542 06 0 05 000000 		HRRM Q2,0(Q1)		;APPEND
  3477	003240'01  513 00 0 07 003236*		SETZRO FKBLP		;NEW END
  3478	003241'01  350 00 0 00 003167*		AOS NBSL		;MAINTAIN COUNT
  3479	003242'01  263 17 0 00 000000 		RET
  3480
  3481					;REMOVE FORK FROM BALSET LIST
  3482
  3483	003243'01  201 01 0 00 003233*	REMBSL:	MOVEI T1,BSLST
  3484	003244'01  550 02 0 01 000000 	CLRIB1:	HRRZ T2,0(T1)		;GET NEXT, SAVE PREV
  3485	003245'01  322 02 0 00 003144*		JUMPE T2,R		;NOT ON LIST, IGNORE
  3486	003246'01  302 02 0 07 003240*		CAIE T2,FKBSPW(FX)	;DESIRED ONE?
  3487						JRST [	MOVE T1,T2	;NO, STEP
  3488	003247'01  254 00 0 00 010614'			JRST CLRIB1]
  3489	003250'01  550 02 0 02 000000 		HRRZ T2,0(T2)		;SPLICE LIST
  3490	003251'01  542 02 0 01 000000 		HRRM T2,0(T1)
  3491	003252'01  370 00 0 00 003241*		SOS NBSL		;MAINTAIN COUNT
  3492	003253'01  263 17 0 00 000000 		RET
  3493
  3494					;CHANGE FKNR, UPDATE SUMNR IF NECESSARY
  3495					; T1/ NEW VALUE OF FKNR
  3496					; FX/ FORK INDEX
  3497
  3498	003254'01  550 02 0 07 003225*	ADJWSS::LOAD T2,FKWSS		;WS IN MEM, MUST UPDATE SUMNR
  3499	003255'01  276 01 0 00 000002 		SUBM T1,T2		;GET DIFFERENCE
  3500	003256'01  542 01 0 07 003254*		STOR T1,FKWSS		;SET NEW VALUE
  3501	003257'01  200 01 0 07 003221*		LOAD T1,FKSWX,(FX)	;GET SWAP FLAGS
  3502	003260'01  603 01 0 00 400000 		TXNE T1,FKWS%		;WORKING SET LOADED?
  3503	003261'01  272 02 0 00 002536*		ADDM T2,SUMNR		;YES, ADJUST SUMNR
  3504	003262'01  603 01 0 00 100000 		TXNE T1,FKIB%		;IN BALSET
  3505	003263'01  272 02 0 00 003227*		ADDM T2,SUMBNR		;YES, ADJUST SUMBNR
  3506	003264'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 83
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3507
  3508					;REMOVE FORK WORKING SET FROM MEMORY
  3509					;REMWSN - REMOVE WORKING SET WITHOUT POSTPURGING
  3510
  3511	003265'01  200 16 0 07 003257*	REMWS:	IFQN. BSWTB		;IF FORK IN BALSET WAIT,
  3512	003266'01  607 16 0 00 040000 
  3513	003267'01  254 00 0 00 003302'
  3514	003270'01  260 17 0 00 002176'		  CALL DISACC		;TERMINATE WAIT
  3515	003271'01  550 01 0 07 002323*		  LOAD T1,FKPTR,(FX)
  3516	003272'01  302 01 0 00 002265'		  CAIE T1,DISMT		;HDISMS?
  3517	003273'01  254 00 0 00 003277'		  IFSKP.
  3518	003274'01  260 17 0 00 002317'		    CALL DISMT2		;YES, CLEAN UP
  3519	003275'01  370 00 0 00 002314*		    SOS NHOLDF		;ONE LESS HOLDING FORK
  3520	003276'01  254 00 0 00 003302'		  ELSE.
  3521	003277'01  302 01 0 00 002211*		    CAIE T1,PRELWT	;ENTERING?
  3522	003300'01  306 01 0 00 002213*		    CAIN T1,SWPINT
  3523	003301'01  260 17 0 00 002260'		    CALL SOSNEB		;YES, CLEAN UP
  3524	003302'01				  ENDIF.
  3525	003302'01				ENDIF.
  3526	003302'01  336 00 0 00 002554*		SKIPN POSPGF		;POSTPURGING?
  3527	003303'01  254 00 0 00 003312'		IFSKP.
  3528	003304'01  415 04 0 00 004412'		  XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  3529	003305'01  260 17 0 00 003300*		  CALL SWPINT		;(T1,FX) PSB AND UPT IN CORE?
  3530	003306'01  254 00 0 00 003312'		ANSKP.
  3531	003307'01  260 17 0 00 000000*		  CALL WSSWPO		;YES, DO IT
  3532	003310'01  476 00 0 00 002563*		  SETOM LSTPFK		;NOTE PAGER CONTEXT INVALID
  3533	003311'01  254 00 0 00 003320'		  JRST REMBS7
  3534	003312'01				ENDIF.
  3535	003312'01  205 02 0 00 777700 	REMWSN:	MOVSI 2,(-PLKV)
  3536	003313'01  205 04 0 00 777774 		MOVSI T4,-NFKSPP	;UNLOCK ALL SPECIAL PAGES
  3537	003314'01  256 00 0 04 003327'	REMBS6:	XCT FKSPPT(T4)		;GET PAGE ID
  3538	003315'01  550 01 0 01 000000*		HRRZ T1,SPT(T1)		;GET CORE ADDRESS
  3539	003316'01  272 02 1 00 000000#		ADDM T2,@CST1X+T1	;UNLOCK IT
  3540	003317'01  253 04 0 00 003314'		AOBJN T4,REMBS6
  3541	003320'01  550 02 0 07 003256*	REMBS7:	LOAD T2,FKWSS		;GET CURRENT RESERVE
  3542	003321'01  210 01 0 00 000002 		MOVN 1,2
  3543	003322'01  272 01 0 00 003261*		ADDM 1,SUMNR		;REDUCE BALSET SIZE
  3544	003323'01  205 16 0 00 400000 		SETZRO FKWSL		;WORKING SET NOT LOADED NOW
  3545	003324'01  412 16 0 07 003265*
  3546	003325'01  370 00 0 00 002541*		SOS NWSMEM
  3547	003326'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 84
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3548
  3549					;TABLE OF SPECIAL FORK PAGES
  3550					;EXECUTED BY LOADBS, REMBSJ, WSSWPO
  3551
  3552	003327'01  550 01 0 07 001735*	FKSPPT::LOAD T1,FKPSB		;PSB
  3553	003330'01  554 01 0 07 003327*		LOAD T1,FKUPT		;UPT
  3554	003331'01  550 01 0 07 003211*		LOAD T1,FKJSB		;JSB
  3555	003332'01  554 01 0 07 001737*		LOAD T1,FKPS2		;SECOND PSB
  3556
  3557					   IFN EXTJSB,<
  3558						LOAD T1,FKJPT		;PT of extended JSB
  3559					   >
  3560
  3561		   	   000004	NFKSPP==:.-FKSPPT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 85
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3562
  3563					;LOAD WORKING SET INTO MEMORY
  3564
  3565	003333'01  200 01 0 00 002477*	LOADWS:	MOVE T1,NRPLQ
  3566	003334'01  307 01 0 00 000004 		CAIG T1,NFKSPP		;ENOUGH PAGES TO START LOAD?
  3567	003335'01  263 17 0 00 000000 		RET			;NO
  3568	003336'01  265 16 0 00 010616'		SAVEAC <P2>
  3569	003337'01  350 00 0 00 003325*	LDJB3::	AOS NWSMEM		;COUNT NUMBER OF PROCESSES
  3570	003340'01  205 16 0 00 440000 		SETONE <BSWTB,FKWSL>	;SET FLAGS, WS LOADED AND WAITING
  3571	003341'01  436 16 0 07 003324*
  3572	003342'01  553 00 0 07 003271*		SETZRO FKPTD,(FX)	;CLEAR TEST DATA
  3573	003343'01  201 01 0 00 003305*		MOVEI 1,SWPINT
  3574	003344'01  542 01 0 07 003342*		STOR 1,FKPTR,(FX)	;SET TEST TO WAIT FOR PSB AND PT
  3575	003345'01  550 01 0 07 003320*		LOAD 1,FKWSS		;GET WORKING SET SIZE
  3576	003346'01  550 02 0 07 003147*		LOAD 2,FKCSIZ		;PAGES NOW ASSIGNED
  3577	003347'01  315 01 0 00 000002 		CAMGE 1,2		;REASONABLE VALUES?
  3578	003350'01  254 00 0 00 003400'		JRST FIXWSP		;NO
  3579	003351'01  272 01 0 00 003322*	LDJB5:	ADDM 1,SUMNR		;UPDATE SUM OF NR
  3580	003352'01  274 01 0 00 000002 		SUB T1,T2		;REDUCE RESERVE BY PAGES ALREADY ASSIGNED
  3581	003353'01  336 00 0 00 002251*		SKIPN PRELDF		;PRELOADING?
  3582	003354'01  201 01 0 00 000004 		MOVEI T1,NFKSPP		;NO, USE SMALL CONSTANT
  3583	003355'01  506 01 0 07 003346*		STOR T1,FKNWCE		;SAVE PRELOAD RESERVE
  3584	003356'01  272 01 0 00 002500*		ADDM T1,NRPMIN		;ADDITIONAL RESERVE FOR ENTERING FORKS
  3585	003357'01  350 00 0 00 002263*		AOS NEBAL		;COUNT ENTERING PROCESSES
  3586	003360'01  205 11 0 00 777774 		MOVSI P2,-NFKSPP	;SWAPIN ALL SPECIAL PAGES
  3587	003361'01  256 00 0 11 003327'	LDJB1:	XCT FKSPPT(P2)
  3588	003362'01  260 17 0 00 000000*		CALL SWPIN0
  3589	003363'01  253 11 0 00 003361'		AOBJN P2,LDJB1
  3590	003364'01  350 00 0 00 000000*		AOS NWSLOD		;COUNT WS LOADS
  3591	003365'01  350 00 0 00 002200*		AOS NBWT		;COUNT WAITING BALSET PROCESS
  3592	003366'01  350 00 0 00 002220*		AOS NBSWP		;COUNT IS AS SWAP WAIT
  3593	003367'01  200 01 0 00 003062*		MOVE T1,TODCLK		;SET START OF WAIT TIME
  3594	003370'01  202 01 0 07 002320*		STOR T1,FKNB%,(FX)
  3595	003371'01  336 00 0 00 000627*		SKIPN INSKED		;CHECK COMPLETION UNLESS NOT INSKED
  3596	003372'01  336 00 0 00 003353*		SKIPN PRELDF		; AND PRELOADING
  3597	003373'01  331 00 0 00 002013*		SKIPL FORKX		;CAN'T DO IT IF FORK CONTEXT SETUP
  3598	003374'01  254 00 0 00 003140*		RETSKP
  3599	003375'01  260 17 0 00 002110'		CALL SKDJ3
  3600	003376'01  255 00 0 00 000000 		 JFCL
  3601	003377'01  254 00 0 00 003374*		RETSKP
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 86
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3602
  3603					;HANDLE BAD FKCSIZ - RECOMPUTE COUNT AND REPORT VALUES
  3604
  3605	003400'01  200 04 0 00 000000*	FIXWSP:	MOVE T4,MONCOR		;SETUP TO SCAN CST3
  3606	003401'01  400 02 0 00 000000 		SETZ T2,		; TO COUNT ASSIGNED PAGES
  3607	003402'01  135 01 0 00 010624'	FIXWS1:	LOAD T1,CSTOFK,+T4	;GET FORK ASSIGNMENT
  3608	003403'01  316 01 0 00 000007 		CAMN T1,FX		;THIS FORK?
  3609	003404'01  350 00 0 00 000002 		AOS T2			;YES, COUNT
  3610	003405'01  312 04 0 00 000000*		CAME T4,NHIPG		;SCANNED ALL PAGES
  3611	003406'01  344 04 0 00 003402'		AOJA T4,FIXWS1		;NO
  3612	003407'01  550 01 0 07 003345*		LOAD T1,FKWSS		;GET EXISTING VALUES
  3613	003410'01  550 03 0 07 003355*		LOAD T3,FKCSIZ
  3614						BUG.(CHK,FKWSP1,SCHED,HARD,<LOADBS - Unreasonable FKWSP>,<<T1,FKWSS>,<T2,COUNT>,<T3,
  3615					FKCSIZ>,<FX,FORK>>,<
  3616					
  3617					Cause:	The value of FKCSIZ for this fork was found to be incorrect.
  3618						Specifically, the value of FKWSS was found to be less than the
  3619						value of FKCSIZ for this work. The correct value is being computed
  3620						and saved in FKCSIZ.
  3621					
  3622					Data:	FKWSS - Fork's reserve working set size
  3623						COUNT - Actual count of pages belonging to this fork
  3624						FKCSIZ - Saved count of pages belonging to this fork
  3625						FX - Fork number
  3626	000006'04  000000  000000	>)
  3627	003411'01  256 00 0 00 010625'
  3628
  3629	003412'01  542 02 0 07 003410*		STOR T2,FKCSIZ		;FIX COUNT
  3630	003413'01  315 01 0 00 000002 		CAMGE T1,T2		;NOW LOOKS OK?
  3631	003414'01  200 01 0 00 000002 		MOVE T1,T2		;NO, RESET FKWSS ALSO
  3632	003415'01  542 01 0 07 003407*		STOR T1,FKWSS
  3633	003416'01  254 00 0 00 003351'		JRST LDJB5		;NOW...
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 87
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3634
  3635					;UPDATE QUEUE NUMBER AND TIME USED VALUE
  3636
  3637	003417'01  265 16 0 00 000000*	SAVRT:	EA.ENT			;RUN IN SECTION 1 BECAUSE OF TIMERS
  3638	003420'01  260 17 0 00 003626'		CALL UCLOCK		;UPDATE CLOCKS
  3639	003421'01  400 01 0 00 000000 		SETZ T1,
  3640	003422'01  336 02 0 00 000000*		SKIPN T2,JOBBIT		;GET FORK PRIO IF ANY
  3641	003423'01  200 02 0 00 000000*		MOVE T2,JOBSKD		;NONE GET JOB PRIO
  3642	003424'01  602 02 0 00 400000 		TXNE T2,JP%SYS		;SYSTEM FORK?
  3643	003425'01  661 01 0 00 001000 		TXO T1,BSSPQ		;YES
  3644	003426'01  332 00 0 00 001116*		SKIPE NSKED		;NOSKED?
  3645	003427'01  661 01 0 00 020000 		TXO T1,BSNSK		;YES
  3646	003430'01  332 00 0 00 000566*		SKIPE CRSKED		;CSKED?
  3647	003431'01  661 01 0 00 010000 		TXO T1,BSCRSK		;YES
  3648	003432'01  430 01 0 07 003341*		OPSTR <XOR T1,>,FKSWX,(FX) ;COMPARE WITH LAST SETTING
  3649	003433'01  607 01 0 00 031000 		TXNN T1,BSNSK!BSCRSK!BSSPQ ;CHANGED?
  3650	003434'01  254 00 0 00 003441'		IFSKP.
  3651	003435'01  630 01 0 00 010634'		  ANDX T1,BSNSK!BSCRSK!BSSPQ
  3652	003436'01  432 01 0 07 003432*		  OPSTRM <XORM T1,>,FKSWX,(FX) ;YES, UPDATE VALUES
  3653	003437'01  260 17 0 00 004354'		  CALL GLREM		;CHANGE FORK POSITION ON GOLST
  3654	003440'01  260 17 0 00 004302'		  CALL GOCONC
  3655	003441'01				ENDIF.
  3656	003441'01  200 01 0 07 003436*		LOAD T1,FKSWX,(FX)
  3657	003442'01  200 16 0 07 003113*		TMNN PIBMP		;ANY HIGH PRIORITY SCHED FLAGS?
  3658	003443'01  607 16 0 00 200000 
  3659	003444'01  603 01 0 00 011000 		TXNE T1,BSCRSK!BSSPQ
  3660	003445'01  254 00 0 00 003451'		IFSKP.
  3661	003446'01  623 01 0 00 000600 		  TXZE T1,BSNST!BSOVRD	;NO, CLEAN UP IF NECESSARY
  3662	003447'01  202 01 0 07 003441*		  STOR T1,FKSWX,(FX)
  3663	003450'01  254 00 0 00 003476'		ELSE.
  3664	003451'01  200 02 0 00 000114*		  MOVE T2,FACTSW	;YES, SYSTEM IN NORMAL OPERATION?
  3665	003452'01  607 02 0 00 021000 		  TXNN T2,SF%RMT!SF%LCL	;I.E. LOCAL OR REMOTE LOGINS ALLOWED?
  3666	003453'01  621 01 0 00 000200 		  TXZ T1,BSNST		;NO, DON'T START WATCHDOG
  3667	003454'01  663 01 0 00 000200 		  TXOE T1,BSNST		;YES, JUST HAPPENED?
  3668	003455'01  254 00 0 00 003462'		  IFSKP.
  3669	003456'01  202 01 0 07 003447*		    STOR T1,FKSWX,(FX)	;YES. UPDATE FLAG
  3670	003457'01  200 02 0 00 003367*		    MOVE T2,TODCLK	;INIT ALARM FOR 5 SECS
  3671	003460'01  271 02 0 00 011610 		    ADDI T2,^D5000
  3672	003461'01  202 02 0 00 000000*		    MOVEM T2,HPSWRN
  3673	003462'01				  ENDIF.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 88
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3674
  3675	003462'01  200 02 0 00 003457*		  MOVE T2,TODCLK
  3676	003463'01  315 02 0 00 003461*		  CAMGE T2,HPSWRN	;TIME UP?
  3677	003464'01  254 00 0 00 003476'		  IFSKP.
  3678	003465'01  603 01 0 00 000400 		    ANDXE. T1,BSOVRD	;YES, NOT ALREADY NOTED?
  3679	003466'01  254 00 0 00 003476'
  3680	003467'01  200 02 0 00 001002*		    MOVE T2,JOBNO	;YES, JOB PROBABLY STUCK
  3681
  3682					;This bugchk is intended to detect forks which are running with priority
  3683					;(e.g. JP%SYS, NOSKED, CRKSED, or even PIBUMP) and using too much time.
  3684					;This is useful to know because such cases impact response for all
  3685					;ordinary users.  The bugchk reports
  3686					;the job and fork number of the offending fork.   DLM  10/28/81
  3687
  3688	003470'01  334 00 0 00 000000 		    SKIPA
  3689						    BUG.(CHK,HPSCHK,SCHED,SOFT,<SCHEDULER - Excessive time in high priority>,<<T2,JO
  3690					BNO>,<FX,FRKNO>>,<
  3691					
  3692					Cause:	A fork has entered a high priority scheduling condition, i.e.
  3693						PIBMP, CSKED, or JP%SYS, and has remained compute-bound for more than
  3694						5 seconds.  The fork has probably malfunctioned in some way, and
  3695						the high scheduling priority is affecting overall system response.
  3696					
  3697					Action:	The high priority status is disabled until the fork itself
  3698						clears the condition.
  3699					
  3700					Data:	JOBNO - Job number
  3701						FRKNO - Fork number
  3702	000007'04  000000  000000	>)
  3703	003471'01  256 00 0 00 010635'
  3704
  3705	003472'01  205 16 0 00 000400 		    SETONE BSOVRD	;OVERRIDE PRIORITY
  3706	003473'01  436 16 0 07 003456*
  3707	003474'01  260 17 0 00 004354'		    CALL GLREM		;FIND NEW POSITION ON GOLST
  3708	003475'01  260 17 0 00 004302'		    CALL GOCONC
  3709	003476'01				  ENDIF.
  3710	003476'01				ENDIF.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 89
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3711
  3712	003476'01  200 01 0 00 002010*		MOVE T1,FKT1		;GET TIME USE SINCE SETRT
  3713	003477'01  402 00 0 00 003476*		SETZM FKT1
  3714	003500'01  135 02 0 00 010532'		LOAD T2,FKQN		;ACCUMULATE QUEUE DISTRIBUTION
  3715	003501'01  272 01 0 02 000000#		ADDM T1,QSUM(T2)	; STATISTICS
  3716	003502'01  200 01 0 00 002006*		MOVE T1,BSQNT		;GET REMAINING BALSET QUANTUM
  3717	003503'01  274 01 0 00 002007*		SUB T1,BSQNT0		;COMPUTE QUANTUM CHARGE THIS RUNNING
  3718	003504'01  273 01 0 07 002246*		OPSTRM <ADDB T1,>,FKQTM	;UPDATE FORK QUANTUM
  3719	003505'01  336 03 0 00 003422*		SKIPN T3,JOBBIT		;GET CONTROLLING WORD
  3720	003506'01  200 03 0 00 003423*		MOVE T3,JOBSKD
  3721	003507'01  135 03 0 00 010642'		LOAD T3,JP%MXQ,T3	;CHECK MAXQ
  3722	003510'01  302 03 0 00 000000 		CAIE T3,0		;NON-0 AND EXCEEDED?
  3723	003511'01  315 02 0 00 000003 		CAMGE T2,T3
  3724						JUMPG T1,[CAIG T2,MAXQ	;ON DREGS QUEUE
  3725							  RET		;NO AND NOT EXHAUSTED, DONE
  3726							  LOAD T3,FKMNQ	;DREGS, GET MIN QUEUE
  3727							  CAMG T2,T3	;SHOULD STILL BE DREGS?
  3728							  RET		;YES AND NOT EXHAUSTED
  3729	003512'01  327 01 0 00 010644'			  JRST .+1]	;NO LONGER DREGS RECALC
  3730	003513'01  350 00 0 00 002636*		AOS BSKED		;EXHAUSTED, REQUEST ADJUST OF BALSET
  3731	003514'01  260 17 0 00 004354'		CALL GLREM		;REMOVE FROM GOLST WHILE CHANGING QUEUE
  3732	003515'01  135 02 0 00 010532'	SAVR12:	LOAD T2,FKQN		;GET Q NUMBER
  3733	003516'01  305 02 0 00 000005 	SAVRT8:	CAIGE 2,MAXQ		;NOW ON MAX Q?
  3734	003517'01  354 00 0 00 000002 		AOSA T2			;NO, GO TO NEXT ONE
  3735	003520'01  201 02 0 00 000005 		MOVEI T2,MAXQ		;STAY ON MAXQ
  3736	003521'01  336 04 0 00 003505*		SKIPN T4,JOBBIT		;SPECIAL PRIORITY?
  3737	003522'01  332 04 0 00 003506*		SKIPE T4,JOBSKD		;ANY JOB-WIDE SCHEDULING CAPS?
  3738	003523'01  604 00 0 00 000000 		IFNSK.
  3739	003524'01  254 00 0 00 003537'
  3740	003525'01  135 03 0 00 010652'		  LOAD T3,JP%RTG,T4 	;GET RUNTIME GUARANTEE
  3741	003526'01  336 00 0 00 003201*		  SKIPN CLASSF		;IGNORE IF CLASS SCHEDULING
  3742	003527'01  326 03 0 00 003567'		  JUMPN T3,RTG1		;CHECK IT IF SET
  3743	003530'01  135 03 0 00 010653'		  LOAD T3,JP%MNQ,T4 	;GET MIN QUEUE
  3744	003531'01  315 02 0 00 000003 		  CAMGE T2,T3		;WITHIN RANGE?
  3745	003532'01  200 02 0 00 000003 		  MOVE T2,T3		;NO, FIX
  3746	003533'01  135 03 0 00 010654'		  LOAD T3,JP%MXQ,T4 	;GET MAX QUEUE
  3747	003534'01  322 03 0 00 003537'		ANDN. T3		;IF SET...
  3748	003535'01  311 02 0 00 000003 		  CAML T2,T3		;WITHIN RANGE?
  3749	003536'01  201 02 0 03 777777 		  MOVEI T2,-1(T3)	;NO, FIX
  3750	003537'01				ENDIF.
  3751	003537'01  137 02 0 00 010532'	SAVRT9:	STOR 2,FKQN		;SET NEW QUEUE NUMBER
  3752	003540'01  200 01 0 02 000000#		MOVE 1,QUANTT(2)	;GET QUANTUM FOR THIS QUEUE
  3753	003541'01  202 01 0 07 003504*	RTG2:	STOR 1,FKQTM		;SET NEW QUANTUM VALUE
  3754	003542'01  200 03 0 00 003462*		MOVE 3,TODCLK
  3755	003543'01  202 03 0 07 001707*		STOR 3,FKTIM,(FX)	;SET TIME ON QUEUE
  3756	003544'01  254 00 0 00 004302'		CALLRET GOCONC		;NO. PUT FORK BACK ON GOLST
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 90
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3757
  3758					;DISMISS JOB FOR RESCHEDULING
  3759
  3760	003545'01  200 07 0 00 003373*	DISMSJ:	MOVE FX,FORKX
  3761	003546'01  321 07 0 00 003245*		JUMPL FX,R		;NO JOB
  3762	003547'01  260 17 0 00 003417'		CALL SAVRT		;UPDATE QUEUE AND QUANTUM
  3763	003550'01  400 01 0 00 000000 		SETZ 1,
  3764	003551'01  260 17 0 00 000470'		CALL SCHP2		;SET BALSET WORD
  3765	003552'01  263 17 0 00 000000 		RET
  3766
  3767					;ROUTINE USED BY LOADBS AND AJBALS TO CHECK IF A PROCESS SHOULD
  3768					;BE LOADED. IF A PRCESS IS "WAY AHEAD" OF ITS UTILIZATION,
  3769					;IT WILL NOT BE LOADED.
  3770					;	FX/ FORK INDEX
  3771					;RETURNS:	+1 NOT "WAY AHEAD"
  3772					;		+2 "WAY AHEAD"
  3773
  3774	003553'01  135 01 0 00 010532'	CKAHED:	LOAD T1,FKQN		;GET QUEUE NUMBER OF PROCESS
  3775	003554'01  200 16 0 07 003473*		JN <BSNSK,BSCRSK,BSSPQ>,,R ;IF CRITICAL OR SPECIAL PRIORITY DO IT
  3776	003555'01  603 16 0 00 031000 
  3777	003556'01  254 00 0 00 003546*
  3778	003557'01  307 01 0 00 000003 		CAIG T1,INTQ1		;NO, BUT INTERACTIVE OR SPECIAL?
  3779	003560'01  263 17 0 00 000000 		RET			;NO. LOAD IT TO ALLOW AN INTERACTION
  3780	003561'01  200 16 0 07 003442*		JN PIBMP,,R		;OR IF DOING PI, ALLOW IT
  3781	003562'01  603 16 0 00 200000 
  3782	003563'01  254 00 0 00 003556*
  3783	003564'01  260 17 0 00 004657'		CALL DIST		;GET PROCESS'S DISTANCE
  3784	003565'01  325 01 0 00 003563*		JUMPGE T1,R		;IF NOT AHEAD, LOAD IT
  3785	003566'01  254 00 0 00 003377*		RETSKP			;IS AHEAD. DON'T LOAD IT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 91
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3786
  3787					;RUNTIME GUARANTEE CONTROL - COMPUTE RUNTIME/ELAPSED, COMPARE WITH
  3788					;DESIGNATED CPU FRACTION.  RAISE OR LOWER SCHEDULER PRIORITY AS
  3789					;NECESSARY.
  3790					;	T4/ PRIORTY WORD
  3791
  3792					;LOWQT - CONTROLS INTERVAL OVER WHICH TIME IN GUARANTEED
  3793
  3794		   	   023420	LOWQT==^D10000
  3795
  3796	003567'01  135 03 0 00 010652'	RTG1:	LOAD T3,JP%RTG,T4	;GET CPU RUN-TIME GUARANTEE
  3797	003570'01  200 01 0 00 003467*		MOVE 1,JOBNO
  3798	003571'01  336 00 0 00 000414*		SKIPN JOBCK0		;GUARANTEE WORDS INIT'ED?
  3799						JRST [	MOVE 4,TODCLK	;INITIALIZE TIME QUARANTEE WORDS
  3800							MOVEM 4,JOBCK0
  3801							MOVE 4,JOBRT(1)
  3802							MOVEM 4,JOBCK1
  3803	003572'01  254 00 0 00 010655'			JRST RTG3]
  3804	003573'01  322 03 0 00 003516'	SAVRT7:	JUMPE T3,SAVRT8		;NOT SPECIAL
  3805	003574'01  200 04 0 01 003212*		MOVE 4,JOBRT(1)		;COMPUTE RUNTIME DURING TEST INTERVAL
  3806	003575'01  274 04 0 00 000000*		SUB 4,JOBCK1
  3807	003576'01  200 01 0 00 003542*		MOVE 1,TODCLK		;COMPUTE REAL TIME OF TEST INTERVAL
  3808	003577'01  274 01 0 00 003571*		SUB 1,JOBCK0
  3809	003600'01  221 04 0 00 000144 		IMULI 4,^D100		;COMPUTE RUNTM*100%/PCT TO GET
  3810	003601'01  230 04 0 00 000003 		IDIV 4,T3		;EXPECTED REAL TIME
  3811	003602'01  274 04 0 00 000001 		SUB 4,1			;EXCESS OR DEFICIT OF REAL TIME
  3812	003603'01  301 04 0 00 011610 		CAIL 4,LOWQT/2		;ACCUMULATED REASONABLE EXCESS?
  3813	003604'01  254 00 0 00 003612'		JRST SAVRT5		;YES, REDUCE PRIORITY
  3814	003605'01  220 03 0 00 003230*	RTG3:	IMUL T3,NBPROC		;GIVE BALSET QUANTUM PROPORTIONAL TO NBPROC
  3815	003606'01  220 03 0 00 000010'		IMUL T3,SKDBQT		;AND DESIRED PERCENTAGE
  3816	003607'01  231 03 0 00 000144 		IDIVI T3,^D100
  3817	003610'01  201 02 0 00 000001 		MOVEI T2,INTQ0		;KEEP ON A HIGH Q TO GET EXCLUSIVE TIME
  3818	003611'01  254 00 0 00 003537'		JRST SAVRT9
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 92
SCHED	MAC	 7-Nov-88 20:50		Main Scheduler Loop

  3819
  3820					;4 NOW CONTAINS TIME SUCH THAT AFTER THAT REAL-TIME INTERVAL,
  3821					;WITH NO RUNNING OF PROGRAM, ACTUAL PCT WILL EXACTLY EQUAL DESIRED PCT
  3822
  3823	003612'01  305 04 0 00 023420 	SAVRT5:	CAIGE 4,LOWQT		;ACCUMULATED EXCESS .GE. LOW-Q QUANT?
  3824						JRST [	CAIGE 2,MAXQ-1	;NO, STILL ON HIGHER QUEUES?
  3825							JRST SAVRT8	;YES, FOLLOW NORMAL ALGORITHM
  3826							MOVEI 2,MAXQ-1	;STAY ON SECOND LOWEST QUEUE
  3827	003613'01  254 00 0 00 010662'			JRST SAVRT9]
  3828	003614'01  305 04 0 00 047040 		CAIGE 4,2*LOWQT		;ACCUMULATED LARGE EXCESS?
  3829	003615'01  254 00 0 00 003622'		JRST SAVRT6		;NO
  3830	003616'01  275 04 0 00 047040 		SUBI 4,2*LOWQT		;YES, REMOVE EXCESS OVER 2*LOWQT
  3831	003617'01  210 04 0 00 000004 		MOVN 4,4
  3832	003620'01  272 04 0 00 003577*		ADDM 4,JOBCK0		;FROM CONSIDERATION
  3833	003621'01  201 04 0 00 047040 		MOVEI 4,2*LOWQT
  3834	003622'01  201 02 0 00 000005 	SAVRT6:	MOVEI 2,MAXQ		;PUT ON LOWEST QUEUE
  3835	003623'01  137 02 0 00 010532'		STOR 2,FKQN		;SET QUEUE NUMBER
  3836	003624'01  200 01 0 00 000000#	SAVR66:	MOVE 1,QUANTT		;GIVE ONLY SHORT QUANTUM SO WILL RECHECK SOON
  3837	003625'01  254 00 0 00 003541'		JRST RTG2
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 93
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  3838						SUBTTL Miscellaneous global routines
  3839
  3840					;UPDATE USER CLOCKS ON REQUEST (MUST BE NOSKED OR INSKED)
  3841
  3842	003626'01  336 00 0 00 003371*	UCLOCK::SKIPN INSKED		;NOW INSKED?
  3843						JRST [	PUSH P,T4	;NO, READ CLOCK
  3844							JSP T4,MTIME
  3845							POP P,T4
  3846	003627'01  254 00 0 00 010666'			JRST UCLOC3]
  3847	003630'01  336 00 0 00 000000*		SKIPN FKT0		;ALREADY DONE?
  3848	003631'01  263 17 0 00 000000 		RET			;YES
  3849	003632'01  200 01 0 00 002567*		MOVE T1,SKDLST		;TIME AT ENTRY TO SCHED
  3850	003633'01  336 00 0 00 000000*	UCLOC3:	SKIPN FKTOFF		;CLOCK NOW OFF?
  3851	003634'01  254 00 0 00 003640'		IFSKP.
  3852	003635'01  274 01 0 00 003633*		  SUB T1,FKTOFF		;YES, COMPUTE TIME OFF
  3853	003636'01  272 01 0 00 000000*		  ADDM T1,FKTLST	;ACCUMULATE AS LOST
  3854	003637'01  200 01 0 00 003635*		  MOVE T1,FKTOFF	;USE TIME OFF AS END OF CHARGE INTERVAL
  3855	003640'01				ENDIF.
  3856	003640'01  276 01 0 00 003630*		SUBM T1,FKT0		;COMPUTE INCREMENTAL RUNTIME
  3857	003641'01  250 01 0 00 003640*		EXCH T1,FKT0		;INIT NEW INTERVAL
  3858	003642'01  332 00 0 00 003626*		SKIPE INSKED		;IF INSKED
  3859	003643'01  402 00 0 00 003641*		SETZM FKT0		;LEAVE FKT0 CLEAR
  3860	003644'01  305 01 0 00 000000 		CAIGE T1,0		;OVERFLOW?
  3861	003645'01  270 01 0 00 001061*		ADD T1,BASOVV		;YES, CORRECT
  3862	003646'01  210 02 0 00 000001 		MOVN 2,1
  3863	003647'01  272 02 0 00 003502*		ADDM T2,BSQNT		;SUBTRACT TIME FROM QUANTUM
  3864	003650'01  270 01 0 00 000000*		ADD 1,RUNT2		;ACCUMULATE HIGH PRECISION TIME
  3865	003651'01  231 01 0 00 002127*		IDIVI 1,NTMS		;CONVERT TO MS
  3866	003652'01  202 02 0 00 003650*		MOVEM 2,RUNT2		;RETAIN HIGH PRECISION UNITS
  3867	003653'01  322 01 0 00 003565*		JUMPE 1,R		;RETURN IF NO CHANGE
  3868	003654'01  272 01 0 00 003477*		ADDM T1,FKT1		;ACCUMULATE RUNTIME SINCE SETRT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 94
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  3869
  3870	003655'01  200 02 0 00 003570*		MOVE 2,JOBNO
  3871	003656'01  335 00 0 02 003574*		SKIPGE JOBRT(T2)	;RUNTIME OK?
  3872						CALL [	BUG.(CHK,NEGJRT,SCHED,SOFT,<UCLOCK: Negative JOBRT detected>,<<T2,JOBNO>>,<
  3873					
  3874					Cause:	The job runtime (JOBRT) is negative for an existing job.  This
  3875						would cause the job to appear non-existent to most JSYSes.
  3876					
  3877					Action:	Use a reasonable value for JOBRT (0) and logout the job.
  3878					
  3879					Data:	JOBNO - Job number
  3880					
  3881	000010'04  000000  000000	>)
  3882							SETZM JOBRT(T2)	;QUICK FIX
  3883							SAVET
  3884							LOAD T2,JBTFK,(T2) ;NO, GET TOP FORK
  3885							MOVX T1,PSILO%	;FORCE LOGOUT ON IT
  3886	003657'01  260 17 0 00 010676'			CALLRET PSIGR]
  3887	003660'01  272 01 0 02 003656*		ADDM 1,JOBRT(T2)	;ACCOUNT FOR JOB
  3888	003661'01  272 01 0 00 000000*		ADDM 1,FKRT		;ACCOUNT FOR FORK
  3889	003662'01  272 01 0 00 000000*		ADDM T1,USRTIM		;ACCUMULATE TOTAL USER TIME
  3890	003663'01  272 01 1 00 010704'		ADDM T1,@[EP. JOBIRT(T2)]	;ACCUMULATE JOB RUN-TIME AS WELL
  3891	003664'01  550 03 1 00 010705'		HRRZ T3,@[EP. JOBCLS(T2)]	;GET CLASS OF THIS FORK
  3892	003665'01  272 01 1 00 010706'		ADDM T1,@[EP. CLSIRT(T3)];AND ACCUMULATE HERE ALSO
  3893	003666'01  200 16 0 02 001630*		JN JOBRTP,(2),UCLOC1	; Do runtime limit exceeded check if one set
  3894	003667'01  612 16 0 00 010707'
  3895	003670'01  254 00 0 00 003674'
  3896	003671'01  550 02 0 02 003154*	UCLOC2:	HRRZ 2,JOBNAM(2)	;GET SUBSYSTEM INDEX
  3897	003672'01  272 01 1 00 010710'		ADDM 1,@[EP. STIMES(2)]	;ACCUMULATE SUBSYSTEM TIME
  3898	003673'01  263 17 0 00 000000 		RET
  3899
  3900	003674'01  135 03 0 00 010711'	UCLOC1:	LOAD 3,JOBRTP,(2)	; Get blk ptr
  3901	003675'01  200 03 0 03 000001 		LOAD 3,TIMTIM,(3)	; Get limit
  3902	003676'01  322 03 0 00 003671'		JUMPE 3,UCLOC2		; Already done this stage?
  3903	003677'01  311 03 0 02 003660*		CAML 3,JOBRT(2)		; Exceeded yet?
  3904	003700'01  254 00 0 00 003671'		 JRST UCLOC2		; No, continue normally
  3905	003701'01  135 03 0 00 010711'		LOAD 3,JOBRTP,(2)	; Once again retrieve blk ptr
  3906	003702'01  402 00 0 03 000001 		SETZRO TIMTIM,(3)	; So we won't try to do it again
  3907	003703'01  261 17 0 00 000001 		PUSH P,1		; Save increment of time
  3908	003704'01  205 01 0 00 000004 		MOVX 1,PSITL%
  3909	003705'01  200 02 0 00 003545*		MOVE 2,FORKX
  3910	003706'01  554 02 0 02 003331*		LOAD T2,FKJO%,(T2)	; First get job this fork belongs to
  3911	003707'01  550 02 0 02 001643*		LOAD T2,JBTFK,(T2)	; then the top fork of the job
  3912	003710'01  260 17 0 00 006033'		CALL PSIGR		; Start up the fork
  3913	003711'01  262 17 0 00 000001 		POP P,1			; Recover time increment
  3914	003712'01  200 02 0 00 003655*		MOVE 2,JOBNO		; And job number
  3915	003713'01  254 00 0 00 003671'		JRST UCLOC2		; Done here, do the rest
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 95
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  3916
  3917					;TURN FORK CPU TIME CLOCK OFF
  3918
  3919	003714'01  265 04 0 00 001054*	FRTOFF::JSP T4,MTIME		;SAVE TIME AT WHICH CLOCK TURNED OFF
  3920	003715'01  202 01 0 00 003637*		MOVEM T1,FKTOFF
  3921	003716'01  263 17 0 00 000000 		RET
  3922
  3923					;TURN FORK CPU TIME CLOCK BACK ON
  3924					; RETURNS:
  3925					;  1/ CPU TIME THAT CLOCK WAS OFF IN HP UNITS
  3926
  3927	003717'01  265 04 0 00 003714*	FRTON::	JSP T4,MTIME
  3928	003720'01  274 01 0 00 003715*		SUB T1,FKTOFF		;COMPUTE TIME OFF
  3929	003721'01  272 01 0 00 003636*		ADDM T1,FKTLST		;ACCUMULATE AS LOST TIME
  3930	003722'01  272 01 0 00 003643*		ADDM T1,FKT0		;ADJUST START OF PERIOD TO EXCLUDE LOST TIME
  3931	003723'01  403 01 0 00 003720*		SETZB T1,FKTOFF		;NOTE CLOCK NOW ON
  3932	003724'01  250 01 0 00 003721*		EXCH T1,FKTLST		;RETURN ACCUMULATED LOST TIME AND CLEAR
  3933	003725'01  263 17 0 00 000000 		RET
  3934
  3935					;GET CURRENT FORK RUNTIME
  3936
  3937	003726'01  265 16 0 00 000310'	GETFRT::NOSKED
  3938						;SKIPN T1,FKTOFF		;USE CLOCK OFF TIME IF PRESENT
  3939	003727'01  265 04 0 00 003717*		JSP T4,MTIME		;READ CLOCK
  3940	003730'01  274 01 0 00 003722*		SUB T1,FKT0		;COMPUTE TIME SINCE LAST UPDATE
  3941	003731'01  305 01 0 00 000000 		CAIGE T1,0		;OVERFLOW?
  3942	003732'01  270 01 0 00 003645*		ADD T1,BASOVV		;YES, CORRECT
  3943	003733'01  270 01 0 00 003652*		ADD T1,RUNT2		;ADD FRACTIONAL MS
  3944	003734'01  231 01 0 00 003651*		IDIVI T1,NTMS		;CONVERT TO MS
  3945	003735'01  270 01 0 00 003661*		ADD T1,FKRT		;ADD CURRENT TIME
  3946	003736'01  265 16 0 00 000315'		OKSKED
  3947	003737'01  263 17 0 00 000000 		RET
  3948
  3949					;GET CURRENT FORK RUNTIME IN HIGH PRECISION UNITS
  3950
  3951	003740'01  265 16 0 00 000310'	GETHRT::NOSKED
  3952						;SKIPN T1,FKTOFF	;USE CLOCK OFF TIME IF PRESENT
  3953	003741'01  265 04 0 00 003727*		JSP T4,MTIME		;READ CLOCK
  3954	003742'01  274 01 0 00 003730*		SUB T1,FKT0		;COMPUTE TIME SINCE LAST UPDATE
  3955	003743'01  305 01 0 00 000000 		CAIGE T1,0		;CHECK FOR OVERFLOW
  3956	003744'01  270 01 0 00 003732*		ADD T1,BASOVV
  3957	003745'01  270 01 0 00 003733*		ADD T1,RUNT2		;ADD FRACTIONAL MS ACCUMULATED RUNTIME
  3958	003746'01  200 02 0 00 003735*		MOVE T2,FKRT		;GET MS ACCUMULATED RUNTIME
  3959	003747'01  221 02 0 00 003734*		IMULI T2,NTMS		;CONVERT TO HP UNITS
  3960	003750'01  270 01 0 00 000002 		ADD T1,T2		;COMPUTE SUM OF ACCUMULATED AND RECENT RUNTIME
  3961	003751'01  265 16 0 00 000315'		OKSKED
  3962	003752'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 96
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  3963
  3964					;PUT FORK ON WAIT LIST
  3965
  3966	003753'01  200 01 0 00 003576*	WTCONC::MOVE 1,TODCLK		;SAVE TIME FORK WAS PUT INTO WAITING
  3967	003754'01  202 01 0 07 003344*		STOR 1,FKPTX,(FX)
  3968	003755'01  550 01 0 07 002266*	WTCON2:	LOAD 1,FKSTR,(FX)	;CHECK FOR SPECIAL WAITS
  3969	003756'01  306 01 0 00 000000*		CAIN 1,TCITST		;TTY INPUT?
  3970						JRST [	MOVEI 2,TTILST	;YES
  3971	003757'01  254 00 0 00 010712'			JRST WTCON1]
  3972	003760'01  302 01 0 00 000000*		CAIE T1,TCOTST		;TTY OUTPUT WAITS?
  3973	003761'01  306 01 0 00 000000*		CAIN T1,TTOBET
  3974	003762'01  334 00 0 00 000000 		SKIPA
  3975	003763'01  306 01 0 00 000000*		CAIN T1,TTOAV
  3976						JRST [	MOVEI T2,TTOLST	;YES
  3977	003764'01  254 00 0 00 010714'			JRST WTCON1]
  3978	003765'01  302 01 0 00 000307'		CAIE T1,HALTT		;ANY OF VARIOUS HALTS?
  3979	003766'01  306 01 0 00 004412'		CAIN T1,JRET
  3980	003767'01  254 00 0 00 003772'		JRST WTCON3
  3981	003770'01  302 01 0 00 006333'		CAIE T1,SUSWT
  3982	003771'01  306 01 0 00 000000*		CAIN 1,FRZWT		;FREEZE?
  3983					WTCON3:	JRST [	MOVEI T2,FHV1
  3984							STOR T2,FKGOLN	;SET WAIT PRIORITY
  3985							MOVEI 2,FRZLST
  3986	003772'01  254 00 0 00 010716'			JRST WTCON1]
  3987	003773'01  302 01 0 00 000000*		CAIE 1,TRMTS1
  3988	003774'01  306 01 0 00 000000*		CAIN 1,TRMTST		;INFERIOR FORK WAIT?
  3989						JRST [	MOVEI 2,TRMLST
  3990	003775'01  254 00 0 00 010722'			JRST WTCON1]
  3991	003776'01  302 01 0 00 000650'		CAIE 1,BLOCKM
  3992	003777'01  306 01 0 00 000651'		CAIN 1,BLOCKW		;CLOCKS?
  3993	004000'01  334 00 0 00 000000 		SKIPA
  3994	004001'01  306 01 0 00 000764'		CAIN 1,BLOCKT
  3995						JRST [	MOVEI 2,CLKLST
  3996							SETZM ALARMT	;FORCE RECHECK OF CLOCKS TO INCLUDE THIS
  3997	004002'01  254 00 0 00 010724'			JRST WTCON1]
  3998	004003'01  306 01 0 00 000000*		CAIN 1,PIDWAT		;IPCF?
  3999						JRST [	MOVEI 2,WT2LST	;YES, USE GENERAL PURPOSE LIST
  4000	004004'01  254 00 0 00 010727'			JRST WTCON1]
  4001	004005'01  201 02 0 00 000000*		MOVEI 2,WTLST		;ALL OTHER WAITS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 97
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4002
  4003	004006'01  542 02 0 07 003561*	WTCON1:	STOR 2,FKWTL		;REMEMBER WHICH LIST
  4004	004007'01  201 01 0 07 003223*		MOVEI 1,FKPT(FX)	;PUT FORK ON PROPER LIST
  4005	004010'01  250 01 0 02 000000 		EXCH 1,0(2)
  4006	004011'01  542 01 0 07 004007*		HRRM 1,FKPT(FX)
  4007	004012'01  205 16 0 00 200000 		SETONE FKBLK		;NOTE BLOCKED
  4008	004013'01  436 16 0 07 003554*
  4009	004014'01  550 02 0 07 003755*		LOAD T2,FKSTR,(FX)	;NOW TRY TEST ONCE
  4010	004015'01  554 01 0 07 004014*		LOAD T1,FKSTD,(FX)
  4011	004016'01  415 04 0 00 004412'		XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  4012	004017'01  260 17 0 02 000000 		CALL 0(T2)		;(T1,FX)
  4013	004020'01  254 00 0 00 004023'		IFSKP.
  4014	004021'01  260 17 0 00 004100'		  CALL UNBLK1		;CONDITION ALREADY SATISFIED
  4015	004022'01  254 00 0 00 004033'		ELSE.
  4016	004023'01  331 00 0 07 002313*		  TMNN FKPS0,(FX)	;TEST FAILED. IS INTERRUPT REQUESTED?
  4017	004024'01  254 00 0 00 004033'		  IFSKP.
  4018	004025'01  200 16 0 07 004023*		    TMNE FKPS1,(FX)	;YES. ARE INTERRUPTS DEFFERED?
  4019	004026'01  603 16 0 00 200000 
  4020	004027'01  254 00 0 00 004033'		  ANSKP.
  4021	004030'01  205 16 0 00 001000 		    SETONE FKIWT,(FX)	;NO. FLAG INTERRUPT FROM WAIT STATE
  4022	004031'01  436 16 0 07 004025*
  4023	004032'01  260 17 0 00 004100'		    CALL UNBLK1		;AND WAKEUP FORK
  4024	004033'01				  ENDIF.
  4025	004033'01				ENDIF.
  4026	004033'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 98
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4027
  4028					;MOVE FORK FROM ONE WAIT LIST TO ANOTHER.  USED WHEN WAIT STATE
  4029					; CHANGES (E.G. FREEZE)
  4030					; FX/ FORK
  4031
  4032	004034'01  265 16 0 00 010731'	RECONC::SAVEAC <Q2>
  4033	004035'01  200 16 0 07 004013*		JE FKBLK,,UNBLK3		;JUMP IF NOT BLOCKED
  4034	004036'01  607 16 0 00 200000 
  4035	004037'01  254 00 0 00 004116'
  4036	004040'01  550 01 0 07 004006*		LOAD 1,FKWTL		;GET POINTER TO SPECIFIC LIST
  4037	004041'01  550 06 0 01 000000 	RECON1:	HRRZ Q2,0(1)		;SCAN FOR FORK
  4038	004042'01  322 06 0 00 004117'		JUMPE Q2,UBBAD		;COULDN'T FIND IT
  4039	004043'01  201 02 0 06 000000#		MOVEI 2,-FKPT(Q2)		;GET FOR INDEX
  4040	004044'01  302 02 0 07 000000 		CAIE 2,0(FX)		;DESIRED FORK
  4041						JRST [	MOVEI 1,0(Q2)	;NO
  4042	004045'01  254 00 0 00 010737'			JRST RECON1]
  4043	004046'01  550 02 0 06 000000 		HRRZ 2,0(Q2)		;YES, REMOVE FROM CURRENT LIST
  4044	004047'01  542 02 0 01 000000 		HRRM 2,0(1)
  4045	004050'01  260 17 0 00 003755'		CALL WTCON2		;PUT ON NEW LIST
  4046	004051'01  254 00 0 00 004116'		JRST UNBLK3		;RETURN
  4047
  4048
  4049					; CHKWT - Check if fork in FX is on wait list
  4050
  4051	004052'01  200 16 0 07 004035*	CHKWT::	JE FKBLK,,R		;JUMP AND RETURN IF NOT BLOCKED
  4052	004053'01  607 16 0 00 200000 
  4053	004054'01  254 00 0 00 003653*
  4054	004055'01  254 00 0 00 003566*		RETSKP			;SKIP IF BLOCKED
  4055
  4056					;CHKTOT - CALLED BY TTYSRV WHEN A TTY OUTPUT EVENT HAS OCCURED WHICH
  4057					;WILL LIKELY ALLOW A FORK TO WAKEUP
  4058
  4059	004056'01  350 00 0 00 001156*	CHKTOT::AOS TSKED		;JUST FLAG FOR NEXT TCLKS
  4060	004057'01  350 00 0 00 000000#		AOS PSKD1		;WAKEUP FAST IF NULL JOB
  4061	004060'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 99
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4062
  4063					;UNBLOCK SPECIFIC FORK - MAY BE CALLED FROM OUTSIDE SCHEDULER
  4064					; 1/ FORK INDEX
  4065					;	CALL UNBLKF
  4066					; RETURN +1 ALWAYS
  4067
  4068	004061'01  265 16 0 00 010326'	UNBLKF::SAVEAC <FX>
  4069	004062'01  265 16 0 00 003417*		EA.ENT
  4070	004063'01  202 01 0 00 000007 	 	MOVEM 1,FX		;SETUP ARG
  4071	004064'01  265 16 0 00 000310'		NOSKD1			;NOSKED WHILE DIDDLING LISTS
  4072	004065'01  200 16 0 07 004052*		JE FKBLK,,UNBF1		;JUMP IF NOT BLOCKED
  4073	004066'01  607 16 0 00 200000 
  4074	004067'01  254 00 0 00 004076'
  4075	004070'01  550 02 0 07 004015*	UNBF2:	LOAD T2,FKSTR,(FX)	;GET TEST ROUTINE
  4076	004071'01  554 01 0 07 004070*		LOAD T1,FKSTD,(FX)	;GET DATA FOR TEST ROUTINE
  4077	004072'01  415 04 0 00 004412'		XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  4078	004073'01  260 17 0 02 000000 		CALL 0(T2)		;(T1,FX)
  4079	004074'01  254 00 0 00 004076'		 JRST UNBF1		;NO, IGNORE CALL
  4080	004075'01  260 17 0 00 004100'		CALL UNBLK1		;DO THE WORK
  4081	004076'01  265 16 0 00 000315'	UNBF1:	OKSKD1
  4082	004077'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 100
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4083
  4084					;ROUTINE TO UNBLOCK SPECIFIC FORK
  4085					; FX/ FORK
  4086
  4087	004100'01  265 16 0 00 010741'	UNBLK1::SAVEAC <Q2,F>
  4088	004101'01  200 00 0 00 001672*		MOVE F,SCHFLG		;SETUP PERMANENT FLAGS
  4089	004102'01  200 16 0 07 004065*		JE FKBLK,,UBBAD		;JUMP IF NOT BLOCKED
  4090	004103'01  607 16 0 00 200000 
  4091	004104'01  254 00 0 00 004117'
  4092	004105'01  550 01 0 07 004040*		LOAD 1,FKWTL		;YES, GET POINTER TO IT
  4093	004106'01  550 06 0 01 000000 	UNBLK2:	HRRZ Q2,0(1)		;GET NEXT FORK ON LIST
  4094	004107'01  322 06 0 00 004117'		JUMPE Q2,UBBAD		;COULDN'T FIND IT
  4095	004110'01  201 02 0 06 000000#		MOVEI 2,-FKPT(Q2)		;GET INDEX FOR FORK
  4096	004111'01  302 02 0 07 000000 		CAIE 2,0(FX)		;REQUESTED ONE?
  4097						JRST [	MOVEI 1,0(Q2)	;NO
  4098	004112'01  254 00 0 00 010751'			JRST UNBLK2]
  4099	004113'01  550 02 0 06 000000 		HRRZ 2,0(Q2)		;REMOVE FORK FROM LIST
  4100	004114'01  542 02 0 01 000000 		HRRM 2,0(1)
  4101	004115'01  260 17 0 00 004247'		CALL SCHEDJ		;ADJUST QUEUE AND PUT ON GOLST
  4102	004116'01  263 17 0 00 000000 	UNBLK3:	RET
  4103
  4104					UBBAD:	BUG.(CHK,UNBFNF,SCHED,HARD,<Fork not found>,,<
  4105					
  4106					Cause:	This BUG can be caused in one of three ways:
  4107					
  4108						1. UNBLK1 was called to unblock a specific fork and the fork was
  4109						   not blocked.
  4110					
  4111						2. UNBLK1 was called to unblock a specific fork and the fork was
  4112						   not on the wait list it claimed to be on.
  4113					
  4114						3. RECONC was called to transfer a fork from one wait list to
  4115						   another, but the fork was not on the list it claimed to be on.
  4116	000011'04  000000  000000	>)
  4117	004117'01  256 00 0 00 010753'
  4118
  4119	004120'01  254 00 0 00 004116'		JRST UNBLK3
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 101
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4120
  4121					;WAKEUP SUPERIOR, E.G. ON FORK SUSPENSION
  4122					; T1/ TEST ADR - WAKEUP ONLY IF THIS TEST
  4123					;	CALL WAKSUP
  4124
  4125	004121'01  265 16 0 00 010326'	WAKSUP:	SAVEAC <FX>
  4126	004122'01  200 02 0 00 000001 		MOVE T2,T1
  4127	004123'01  550 01 0 00 000000*		HRRZ T1,FORKN		;GET SUPERIOR
  4128	004124'01  322 01 0 00 004054*		JUMPE T1,R		;RETURN IF TOP FORK
  4129	004125'01  270 01 0 00 006224'		ADD T1,SUPERP
  4130	004126'01  135 01 0 00 000001 		LDB T1,T1
  4131	004127'01  550 07 0 01 000000*		HRRZ FX,SYSFK(T1)
  4132	004130'01  200 16 0 07 004102*		JE FKBLK,,R		;RETURN IF NOT BLOCKED
  4133	004131'01  607 16 0 00 200000 
  4134	004132'01  254 00 0 00 004124*
  4135	004133'01  550 16 0 07 004071*		OPSTR <CAME T2,>,FKSTR,(FX) ;IS SCHEDULER TEST THE ONE WE WANT?
  4136	004134'01  312 02 0 00 000016 
  4137	004135'01  263 17 0 00 000000 		RET			;NO, DON'T WAKE
  4138	004136'01  254 00 0 00 004100'		CALLRET UNBLK1		;WAKE IT
  4139
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 102
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4140
  4141					;SPECIAL ROUTINE CALLED FROM NSPSRV TO UNBLOCK A PROCESS IF
  4142					;NECESSARY. ACCEPTS:
  4143					;		T1/ FORK INDEX
  4144					;		T2/ LOW ADDRESS FOR SCHEDULER TESTS
  4145					;		T3/ HIGH ADDRESS
  4146
  4147					;THIS ROUTINE CHECKS IF PROCESS IS ON WAIT LIST AND IS WAITING
  4148					;ON ONE OF THE SPECIFIED ROUTINES
  4149
  4150	004137'01  200 03 0 00 000002 	NETWKF::MOVE T3,T2		;SET UP RANGE TEST
  4151	004140'01  265 16 0 00 010326'	NETWK1::SAVEAC <FX>
  4152	004141'01  200 07 0 00 000001 		MOVE FX,T1		;GET FORK # INTO FX
  4153	004142'01  265 16 0 00 000310'		NOSKD1			;PREVENT STATE CHANGES
  4154	004143'01  200 16 0 07 004130*		JE FKBLK,,UNBF1		;JUMP IF NOT BLOCKED
  4155	004144'01  607 16 0 00 200000 
  4156	004145'01  254 00 0 00 004076'
  4157	004146'01  550 01 0 07 004133*		LOAD T1,FKSTR,(FX)	;YES. GET WAIT ROUTINE
  4158	004147'01  311 01 0 00 000002 		CAML T1,T2		;WITHIN RANGE?
  4159	004150'01  313 01 0 00 000003 		CAMLE T1,T3		;STILL?
  4160	004151'01  254 00 0 00 004076'		JRST UNBF1		;NO. DON'T WAKE IT
  4161	004152'01  254 00 0 00 004070'		JRST UNBF2		;YES. WAKE IT
  4162
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 103
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4163
  4164					;CHECK CLOCK LIST.  WAKEUP ANY FORKS HAVING EXPIRED TIMES AND
  4165					; COMPUTE TIME FOR NEXT CHECK
  4166
  4167	004153'01  265 16 0 00 003070*	CLKCHK:	SAVEQ
  4168	004154'01  205 01 0 00 200000 		MOVSI 1,(1B1)		;YES, INIT TO FIND MIN VALUE
  4169	004155'01  202 01 0 00 001154*		MOVEM 1,ALARMT
  4170	004156'01  201 05 0 00 000000*		MOVEI 5,CLKLST
  4171	004157'01  550 06 0 05 000000 	CLKCH1:	HRRZ Q2,0(Q1)		;GET NEXT FORK
  4172	004160'01  322 06 0 00 004132*		JUMPE Q2,R
  4173	004161'01  201 07 0 06 000000#		MOVEI FX,-FKPT(Q2)	;GET FORK INDEX
  4174	004162'01  550 02 0 07 004146*		LOAD T2,FKSTR,(FX)	;GET SCHEDULER TEST ROUTINE
  4175	004163'01  554 01 0 07 004162*		LOAD T1,FKSTD,(FX)	;GET TEST ROUTINE DATA
  4176	004164'01  415 04 0 00 004412'		XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  4177	004165'01  260 17 0 02 000000 		CALL 0(T2)		;(T1,FX)
  4178						 JRST [	ADD 1,TODCLK	;FAILS, RETURNS NUMBER OF MS REMAINING
  4179							CAMGE 1,ALARMT	;THIS SOONER THAN SOONEST SO FAR?
  4180							MOVEM 1,ALARMT	;YES
  4181							MOVEI Q1,0(Q2)
  4182	004166'01  254 00 0 00 010756'			JRST CLKCH1]
  4183	004167'01  550 02 0 06 000000 		HRRZ 2,0(Q2)		;REMOVE FORK FROM LIST
  4184	004170'01  542 02 0 05 000000 		HRRM 2,0(Q1)
  4185	004171'01  260 17 0 00 004247'		CALL SCHEDJ		;WAKEUP THE FORK
  4186	004172'01  254 00 0 00 004157'		JRST CLKCH1
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 104
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4187
  4188					;CHECK SUPERIOR ON FORK TERMINATION
  4189					;SUPERIOR FORK INDEX LEFT IN LH OF DISMISS TEST WORD
  4190					;OR ENTER AT SUPUB0 WITH FORKX INDEX IN 1
  4191
  4192	004173'01  265 16 0 00 000000*	SUPUNB:	STKVAR <SUPFX>
  4193	004174'01  000000  000001
  4194	004175'01  202 07 0 17 777776 		MOVEM FX,SUPFX		;SAVE CURRENT
  4195	004176'01  554 07 0 07 004163*		LOAD FX,FKSTD,(FX)	;GET SUPERIOR FORK INDEX
  4196	004177'01  200 16 0 07 004143*		JE FKBLK,,SUPUX		;JUMP IF SUPERIOR NOT BLOCKED
  4197	004200'01  607 16 0 00 200000 
  4198	004201'01  254 00 0 00 004213'
  4199	004202'01  550 01 0 07 004105*		LOAD 1,FKWTL		;SEE WHERE IT IS
  4200	004203'01  302 01 0 00 000000*		CAIE 1,TRMLST		;WAITING FOR TERMINATION?
  4201	004204'01  254 00 0 00 004213'		JRST SUPUX		;NO
  4202	004205'01  550 02 0 07 004176*		LOAD T2,FKSTR,(FX)	;YES. GET SCHEDULER TEST
  4203	004206'01  306 02 0 00 003773*		CAIN 2,TRMTS1		;WAITING FOR ANY FORK?
  4204	004207'01  254 00 0 00 004212'		JRST SUPU1		;YES, WAKE IT
  4205	004210'01  554 02 0 07 004205*		LOAD T2,FKSTD,(FX)	;NO, SPECIFIC FORK.
  4206	004211'01  316 02 0 17 777776 		CAMN 2,SUPFX		;WAITING FOR THIS ONE?
  4207	004212'01  260 17 0 00 004100'	SUPU1:	CALL UNBLK1		;YES, WAKE IT
  4208	004213'01  200 07 0 17 777776 	SUPUX:	MOVE FX,SUPFX		;RESTORE SELF
  4209	004214'01  332 00 0 00 000000*		SKIPE PRIMRY		;IS THIS IN FORK INIT?
  4210	004215'01  260 17 0 00 007032'		CALL FKTMI		;NO. GENERATE INTERRUPT THEN
  4211	004216'01  263 17 0 00 000000 		RET
  4212
  4213	004217'01  201 01 0 00 000023 	SUPUB0::MOVEI T1,TRMINT		;GET CHANNEL FOR FORK TERMINATION
  4214	004220'01  200 02 0 00 003705*		MOVE T2,FORKX		;TO SELF
  4215	004221'01  260 17 0 00 006026'		CALL PSIRQ		;GO REQUEST INTERRUPT
  4216	004222'01  260 17 0 00 000325'		CHKINT			;AND MAKE IT HAPPEN
  4217	004223'01  263 17 0 00 000000 		RET			;AND DONE
  4218
  4219					;WTCHK - TEST ALL NON-SPECIAL WAITING FORKS
  4220					;CHKTL - TEST TTY OUTPUT FORKS
  4221
  4222	004224'01  201 01 0 00 000454 	WTCHK::	MOVEI T1,^D300		;SET TIME FOR NEXT CHECK
  4223	004225'01  202 01 0 00 000000*		MOVEM T1,WTTIM
  4224	004226'01  201 06 0 00 004005*		MOVEI Q2,WTLST		;HEAD OF WAITING LIST
  4225	004227'01  260 17 0 00 004232'		CALL SCHEDA
  4226	004230'01  201 06 0 00 000000*	CHKTL:	MOVEI Q2,TTOLST		;TTY OUTPUT LIST
  4227	004231'01  402 00 0 00 004056*		SETZM TSKED
  4228	004232'01  201 05 0 06 000000 	SCHEDA:	MOVEI Q1,0(Q2)		;KEEP POINTER TO LAST ONE IN Q1,
  4229	004233'01  550 06 0 05 000000 	SCHEDB:	HRRZ Q2,0(Q1)		;POINTER TO CURRENT ONE IN Q2
  4230	004234'01  322 06 0 00 004160*		JUMPE Q2,R		;DONE
  4231	004235'01  201 07 0 06 000000#		MOVEI FX,-FKPT(Q2)	;FORK INDEX
  4232	004236'01  550 02 0 07 004210*		LOAD T2,FKSTR,(FX)	;GET TEST ROUTINE
  4233	004237'01  554 01 0 07 004236*		LOAD T1,FKSTD,(FX)	;GET DATA FOR TEST ROUTINE
  4234	004240'01  415 04 0 00 004412'		XMOVEI T4,JSPRET	;DUMMY FOR OLD JSP TESTS
  4235	004241'01  260 17 0 02 000000 		CALL 0(T2)		;(T1,FX)
  4236	004242'01  254 00 0 00 004232'		 JRST SCHEDA		;NO SKIP = STILL NOT RUNNABLE
  4237	004243'01  550 02 0 06 000000 		HRRZ 2,0(Q2)		;REMOVE FROM WAIT LIST
  4238	004244'01  542 02 0 05 000000 		HRRM 2,0(Q1)
  4239	004245'01  260 17 0 00 004247'		CALL SCHEDJ		;SETUP QUEUE AND GOLST
  4240	004246'01  254 00 0 00 004233'		JRST SCHEDB
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 105
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4241
  4242					;DO WAKEUP ON FORK - SET NEW STATUS AND PUT ON GOLST
  4243
  4244	004247'01  350 00 0 00 000000*	SCHEDJ:	AOS TTYBKS		;NOW RUNNABLE, COUNT UNBLOCKS
  4245	004250'01  205 16 0 00 200000 		SETZRO FKBLK
  4246	004251'01  412 16 0 07 004177*
  4247	004252'01  260 17 0 00 005114'		CALL NEWST		;ESTABLISH NEW QUEUE STATUS
  4248	004253'01  260 17 0 00 004302'		CALL GOCONC		;PUT ON READY LIST
  4249	004254'01  260 17 0 00 004256'		CALL APSKED		;SEE IF RESCHEDULE NEEDED
  4250	004255'01  254 00 0 00 003070'		CALLRET CHKTFK		;PUT FORK INTO BALSET IF POSSIBLE
  4251
  4252					;UPON RECEIPT OF WAKEUP EVENT FOR FORK, SEE IF RESCHEDULING SHOULD
  4253					;OCCUR TO RUN UNBLOCKED FORK RATHER THAN CURRENT FORK
  4254					; FX/ FORK INDEX
  4255					;	CALL APSKED
  4256					; RETURN +1 ALWAYS, ALL ACS PRESERVED
  4257
  4258	004256'01  200 16 0 00 004101*	APSKED::JE SK%RSQ,SCHFLG,APSK1	;SYSTEM MGR WANTS THIS?
  4259	004257'01  606 16 0 00 002000 
  4260	004260'01  254 00 0 00 004300'
  4261	004261'01  331 00 0 00 004220*		SKIPL FORKX		;HAVE A CURRENT FORK?
  4262	004262'01  332 00 0 00 003642*		SKIPE INSKED		;ALREADY IN SCHEDULER?
  4263	004263'01  254 00 0 00 004300'		JRST APSK1		;NO OR YES - NO NEED TO INTERRUPT
  4264	004264'01  301 07 0 00 002430*		CAIL FX,NFKS
  4265	004265'01  254 00 0 00 004300'		JRST APSK1		;NOT A VALID FORK
  4266	004266'01  265 16 0 00 010763'		SAVEAC <T1,T2,FX>	;SAVE SOME ACS
  4267
  4268					;*** THIS CHECK IS SLIGHTLY BOGUS SINCE QUEUE NUMBER DOES NOT ALWAYS
  4269					;*** INDICATE CORRECT PRIORITY!
  4270
  4271	004267'01  135 01 0 00 010532'		LOAD T1,FKQN		;GET QUEUE NUMBER OF NEW FORK
  4272	004270'01  200 07 0 00 004261*		MOVE FX,FORKX
  4273	004271'01  135 02 0 00 010532'		LOAD T2,FKQN		;GET QUEUE NUMBER OF CURRENT FORK
  4274	004272'01  313 01 0 00 000002 		CAMLE T1,T2		;NEW BETTER THAN CURRENT?
  4275	004273'01  254 00 0 00 004300'		JRST APSK1		;NO, DO NOTHING
  4276	004274'01  350 00 0 00 001072*		AOS SKEDF3		;YES, REQUEST RESCHED
  4277	004275'01  350 00 0 00 002044*		AOS PSKED
  4278	004276'01  7 004 20 0 00 004001 	ISB SCDCHN		;RIGHT NOW
  4279	004277'01  263 17 0 00 000000 		RET
  4280
  4281	004300'01  350 00 0 00 000000#	APSK1:	AOS PSKD1		;FLAG POSSIBLE SCHEDULING EVENT
  4282	004301'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 106
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4283
  4284					;PUT FORK ON GO LIST.  LIST IS KEPT IN PRIORITY ORDER; SEARCH
  4285					; DOWN LIST UNTIL FORK OF LOWER PRIORITY IF FOUND.  PUT NEW FORK
  4286					; JUST AHEAD OF THAT ONE.
  4287
  4288	004302'01  265 16 0 00 010731'	GOCONC:	SAVEAC <Q2>
  4289	004303'01  260 17 0 00 004322'		CALL ONGOL		;PUT ON GO LIST
  4290	004304'01  350 00 0 00 002057*		AOS NGOJOB		;KEEP COUNT OF READY JOBS
  4291	004305'01  554 03 0 07 003706*		LOAD T3,FKJBN		;GET JOB #
  4292	004306'01  205 16 0 00 000001 		MOVSI CX,1		;GET AN INCREMENTOR
  4293	004307'01  273 16 1 00 010775'		ADDB CX,@[EP. JOBCLS(T3)]	;ONE MORE ON GOLST
  4294	004310'01  603 16 0 00 777776 		TLNE CX,777776		;FIRST ONE ON?
  4295	004311'01  254 00 0 00 004315'		JRST GOCNC0		;NO.
  4296	004312'01  550 03 1 00 010776'		HRRZ T3,@[EP. JOBCLS(T3)]	;GET CLASS
  4297	004313'01  205 16 0 00 000001 		INCR CLGLC,(T3)		;ONE MORE ON GOLST
  4298	004314'01  272 16 1 00 010777'
  4299	004315'01  135 03 0 00 010532'	GOCNC0:	LOAD T3,FKQN		;UPDATE QUEUE COUNTS
  4300	004316'01  305 03 0 00 000005 		CAIGE T3,MAXQ
  4301	004317'01  354 00 0 00 001315*		AOSA NHQFK
  4302	004320'01  350 00 0 00 001320*		AOS NLQFK
  4303	004321'01  263 17 0 00 000000 		RET
  4304
  4305					;ROUTINE TO DO THE WORK.
  4306
  4307	004322'01  265 16 0 00 004173*	ONGOL: STKVAR <SFX,SP1,SP2>
  4308	004323'01  000000  000003
  4309	004324'01  202 07 0 17 777776 		MOVEM FX,SFX		;SAVE FORK INDEX
  4310	004325'01  260 17 0 00 004446'		CALL CORFCT		;COMPUTE PRIORITY
  4311	004326'01  202 01 0 17 777775 		MOVEM T1,SP1
  4312	004327'01  202 02 0 17 777774 		MOVEM T2,SP2		;SAVE PRIORITIES
  4313	004330'01  201 03 0 00 003071*		MOVEI T3,GOLST
  4314	004331'01  550 04 0 03 000000 	GOC1:	HRRZ T4,0(T3)		;GET NEXT FORK ON LIST
  4315	004332'01  322 04 0 00 004345'		JUMPE T4,ONGOL0		;END OF LIST?
  4316	004333'01  201 07 0 04 000000#		MOVEI FX,-FKPT(T4)	;GET FORK INDEX (.. -FKPT(T4) )
  4317	004334'01  260 17 0 00 004446'		CALL CORFCT		;GET PRIORITY OF THIS FORK
  4318	004335'01  317 01 0 17 777775 		CAMG T1,SP1		;BETTER THAN CLASS TO BE ADDED?
  4319	004336'01  254 00 0 00 004341'		JRST GOC2		;NO. TEST FOR INSET HERE
  4320	004337'01  201 03 0 04 000000 	ONGOL1:	MOVEI T3,0(T4)		;YES. KEEP SCANNING
  4321	004340'01  254 00 0 00 004331'		JRST GOC1
  4322
  4323					;FOUND BEGINNING OF CLASS STUFF. NOW FIND PROPER PLACE
  4324
  4325	004341'01  316 01 0 17 777775 	GOC2:	CAMN T1,SP1		;SAME CLASS?
  4326	004342'01  315 02 0 17 777774 		CAMGE T2,SP2		;YES. BELONG HERE?
  4327	004343'01  254 00 0 00 004345'		JRST ONGOL0		;YES. DO IT
  4328	004344'01  254 00 0 00 004337'		JRST ONGOL1		;NO. KEEP GOING THEN
  4329	004345'01  200 07 0 17 777776 	ONGOL0:	MOVE FX,SFX		;GET ORIGINAL INDEX
  4330	004346'01  201 01 0 07 004011*		MOVEI T1,FKPT(FX)	;PUT FORK INTO LIST
  4331	004347'01  542 01 0 03 000000 		HRRM T1,0(T3)		;LINK TO PREVIOUS
  4332	004350'01  542 04 0 07 004346*		HRRM T4,FKPT(FX)
  4333	004351'01  205 16 0 00 000004 		SETONE FKOGL		;MARK ON GOLST
  4334	004352'01  436 16 0 07 004251*
  4335	004353'01  263 17 0 00 000000 		RET			;DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 107
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4336
  4337					;REMOVE SELECTED FORK FROM GOLST
  4338					;	FX/ fork index
  4339
  4340	004354'01  265 16 0 00 004153*	GLREM:	SAVEQ
  4341	004355'01  200 16 0 07 004352*		JE FKOGL,,GLREM2	;IF NOT MARKED ON GOLST DIE
  4342	004356'01  607 16 0 00 000004 
  4343	004357'01  254 00 0 00 004411'
  4344	004360'01  550 05 0 00 000007 		HRRZ Q1,FX		;GET FORK INDEX FOR COMPARING
  4345	004361'01  201 01 0 00 004330*		MOVEI 1,GOLST
  4346	004362'01  550 06 0 01 000000 	GLREM1:	HRRZ Q2,0(1)
  4347	004363'01  322 06 0 00 004411'		JUMPE Q2,GLREM2
  4348	004364'01  201 07 0 06 000000#		MOVEI FX,-FKPT(Q2)	;GET FORK INDEX
  4349	004365'01  312 07 0 00 000005 		CAME FX,Q1		;DESIRED ONE?
  4350						JRST [	MOVEI 1,0(Q2)	;NO
  4351	004366'01  254 00 0 00 011000'			JRST GLREM1]
  4352	004367'01  550 06 0 07 004350*		HRRZ Q2,FKPT(FX)		;YES, REMOVE FROM LIST
  4353	004370'01  542 06 0 01 000000 		HRRM Q2,0(1)
  4354	004371'01  370 00 0 00 004304*		SOS NGOJOB
  4355	004372'01  554 05 0 07 004305*		LOAD Q1,FKJBN		;GET JOB NUMBER
  4356	004373'01  205 16 0 00 777777 		MOVSI CX,-1		;GET A DECREMNTOR
  4357	004374'01  273 16 1 00 011002'		ADDB CX,@[EP. JOBCLS(Q1)]	;DO IT
  4358	004375'01  603 16 0 00 777777 		TLNE CX,-1		;LAST ONE OFF?
  4359	004376'01  254 00 0 00 004402'		JRST GLREM0		;NO
  4360	004377'01  550 05 1 00 011003'		HRRZ Q1,@[EP. JOBCLS(Q1)]	;GET CLASS NUMBER
  4361	004400'01  205 16 0 00 777777 		DECR CLGLC,(Q1)		;ONE LESS ON GOLST
  4362	004401'01  272 16 1 00 011004'
  4363	004402'01  135 05 0 00 010532'	GLREM0:	LOAD Q1,FKQN		;UPDATE QUEUE COUNTS
  4364	004403'01  305 05 0 00 000005 		CAIGE Q1,MAXQ
  4365	004404'01  374 00 0 00 004317*		SOSA NHQFK
  4366	004405'01  370 00 0 00 004320*		SOS NLQFK
  4367	004406'01  205 16 0 00 000004 		SETZRO FKOGL		;NO LONGER ON GOLST
  4368	004407'01  412 16 0 07 004355*
  4369	004410'01  263 17 0 00 000000 		RET
  4370
  4371					GLREM2:	BUG.(HLT,GLFNF,SCHED,HARD,<GLREM - Fork not found>,,<
  4372					
  4373					Cause:	The scheduler is trying to remove a process from its linked list of
  4374						runnable processes (the GOLIST).  The BUGHLT occurs because the
  4375						scheduler does not find the process in the GOLIST.  This indicates an
  4376						inconsistency in the scheduler's data base.
  4377	004411'01  256 00 0 00 011005'	>)
  4378
  4379
  4380					;DUMMY RETURNS FOR ROUTINES CALLED WITH 'CALL' BUT ACT AS IF THEY
  4381					;WERE CALLED WITH JSP T4,.  T4 IS SETUP TO CONTAIN JSPRET.
  4382	004412'01			JRET::
  4383	004412'01  263 17 0 00 000000 	JSPRET::RET			;THROUGH HERE ON JRST 0(T4)
  4384	004413'01  350 00 0 17 000000 	JSKP::	AOS 0(P)		;THROUGH HERE ON JRST 1(T4)
  4385	004414'01  263 17 0 00 000000 		RET
  4386
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 108
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4387
  4388					;wait bit routine - dismiss until bit becomes 0 or 1
  4389					;CALL BITWAI
  4390					;T1/ test bit set
  4391					;T2/ address of test word
  4392					;T3/ test value
  4393					;  0 means dismiss until bit becomes 0
  4394					;  nonzero means dismiss until bit becomes 1
  4395					;returns +1 eventually, uses T1-T3, preserves all others
  4396					;returns +1 immediately if T1=0
  4397	004415'01  265 16 0 00 000000*	BITWAI::SAVEAC <T4>
  4398	004416'01  200 04 0 00 004270*		MOVE T4,FORKX		;get fork index
  4399	004417'01  202 02 0 04 000000*		STOR T2,FKST2,(T4)	;additional datum - address of word to test
  4400	004420'01  243 01 0 00 004422'		JFFO T1,BITWA1		;get bit number
  4401	004421'01  263 17 0 00 000000 		RET			;no bit to test, return
  4402	004422'01  504 01 0 00 000002 	BITWA1:	HRL T1,T2    		;bit number in LH (data)
  4403	004423'01  336 00 0 00 000003 		SKIPN T3		;waiting for bit to be set ?
  4404	004424'01  254 00 0 00 004427'		IFSKP.
  4405	004425'01  541 01 0 00 004440'		  HRRI T1,BITSET	;yes. address of test routine
  4406	004426'01  254 00 0 00 004430'		ELSE.
  4407	004427'01  541 01 0 00 004432'		  HRRI T1,BITCLR	;no. address of test routine
  4408	004430'01				ENDIF.
  4409	004430'01  265 16 0 00 000362'		MDISMS
  4410	004431'01  263 17 0 00 000000 		RET
  4411
  4412					;Test routine -  waiting for a bit to be cleared
  4413					;FX/ fork index
  4414					;preserves all ACs
  4415	004432'01  265 16 0 00 000000*	BITCLR::SAVEAC <T1,T2>
  4416	004433'01  554 01 0 07 004237*		LOAD T1,FKSTD,(FX)	;get bit number
  4417	004434'01  200 02 1 07 004417*		LOAD T2,FK2DT		;get test word
  4418	004435'01  616 02 0 01 000000*		TDNN T2,BITS(T1)	;is that bit of that word set ?
  4419	004436'01  254 00 0 00 004055*		RETSKP    		;no. wait no more.
  4420	004437'01  263 17 0 00 000000 		RET     		;yes. wait some more
  4421
  4422					;Test routine -  waiting for a bit to be set
  4423					;FX/ fork index
  4424					;preserves all ACs
  4425	004440'01  265 16 0 00 004432*	BITSET::SAVEAC <T1,T2>
  4426	004441'01  554 01 0 07 004433*		LOAD T1,FKSTD,(FX)	;get bit number
  4427	004442'01  200 02 1 07 004434*		LOAD T2,FK2DT		;get test word
  4428	004443'01  616 02 0 01 004435*		TDNN T2,BITS(T1)	;is that bit of that word set ?
  4429	004444'01  263 17 0 00 000000 		RET       		;no. wait some more.
  4430	004445'01  254 00 0 00 004436*		RETSKP 			;yes. wait no more.
  4431
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 109
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4432
  4433					;COMPUTE PRIORITY NUMBER FOR FORK
  4434					; FX/ FORK INDEX
  4435					;	CALL CORFCT
  4436					; RETURNS +1, T1/ FIRST SORT KEY
  4437					; T2/ SECOND SORT KEY
  4438
  4439	004446'01  135 02 0 00 010532'	CORFCT:	LOAD T2,FKQN		;GET QUEUE NUMBER
  4440	004447'01  332 00 0 00 003526*		SKIPE CLASSF		;CLASS SCHEDULING?
  4441	004450'01  254 00 0 00 004472'		JRST CORFC1		;YES
  4442	004451'01  200 01 0 00 003753*	CORFCO:	MOVE T1,TODCLK		;NO, ORDER FORKS BY QUEUE NUMBER
  4443	004452'01  274 01 0 07 003543*		OPSTR <SUB T1,>,FKTIM,(FX) ; AND THEN ELAPSED TIME ON QUEUE
  4444	004453'01  321 01 0 00 004455'		JUMPL T1,CORFC2		;RETURN NEG IF NOT DUE TO RUN YET
  4445	004454'01  270 01 0 02 005101'		ADD T1,TBASE(T2)	;ADD QUEUE OFFSET
  4446	004455'01  200 02 0 07 004407*	CORFC2:	LOAD T2,FKSWX,(FX)	;CHECK FLAGS
  4447	004456'01  603 02 0 00 020000 		TXNE T2,BSNSK		;NOSKED?
  4448	004457'01  270 01 0 00 005077'		ADD T1,NSKBAS		;YES, PRIORITY
  4449	004460'01  603 02 0 00 000400 		TXNE T2,BSOVRD		;PRIORITY OVERRIDE?
  4450	004461'01  254 00 0 00 004470'		IFSKP.
  4451	004462'01  200 16 0 07 004202*		  TMNN PIBMP		;IF PI'ING, GIVE PRIORITY
  4452	004463'01  607 16 0 00 200000 
  4453	004464'01  603 02 0 00 010000 		  TXNE T2,BSCRSK	;CRITICAL SECTION?
  4454	004465'01  334 00 0 00 000000 		  SKIPA
  4455	004466'01  603 02 0 00 001000 		  TXNE T2,BSSPQ		;OR SPECIAL SYSTEM FORK?
  4456	004467'01  270 01 0 00 005100'		  ADD T1,CSKBAS		;YES, SECOND PRIORITY
  4457	004470'01				ENDIF.
  4458	004470'01  201 02 0 00 000000 		MOVEI T2,0		;NO SECOND KEY HERE
  4459	004471'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 110
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4460
  4461					;THE CLASS SCHEDULER IS ON. THE COMPUTED PRIORITY IS AS FOLLOWS:
  4462					;	T1/ CLASS DISTANCE+MODIFIER
  4463					;  OR	T1/ SPECIAL VALUE
  4464					;WHERE THE SPECIALS ARE:
  4465					;	6.0 IF NOSKED
  4466					;	4.0 IF Q 0
  4467					;	    IF Q1 OR PI BOOST OR CRSKED OR SPECIAL SYSTEM FORK,
  4468					;	     3.0 + VALUE (0 TO 1) FOR LENGTH OF TIME ON PRESENT QUEUE
  4469
  4470					;HOWEVER, IF THE CLASS IS PRESENTLY USING WINDFALL, Q1 PROCESSES
  4471					;RECEIVE CSLDST+.05 AS THE PRIORITY
  4472
  4473					;MODIFIERS IF NON-SPECIAL
  4474					;	0.5 IF ON INTQ1 AND CLASS NOT USING WINDFALL
  4475					;	T2/ JOB DISTANCE + MODIFIER
  4476					;WHERE THESE MODIFERS ARE:
  4477					;	0.1(1-Q/LOWQ)
  4478					;OR	T2/	Q NUMBER
  4479					;	IF PROCESS IS SPECIAL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 111
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4480
  4481	004472'01  265 16 0 00 000000*	CORFC1:	SAVEAC<T3,T4>
  4482	004473'01  200 16 0 07 004455*		JN BSNSK,,CORFC4	;NOSKED?
  4483	004474'01  603 16 0 00 020000 
  4484	004475'01  254 00 0 00 004536'
  4485						JUMPE T2,[MOVX T1,<4.0>	;NO. IF QUEUE 0, DO IT
  4486	004476'01  322 02 0 00 011007'			JRST CORFC7]
  4487	004477'01  307 02 0 00 000001 		CAIG T2,INTQ0		;INTERACTIVE PROCESS?
  4488	004500'01  254 00 0 00 004551'		JRST CORFC5		;YES. GO HANDLE IT
  4489	004501'01  260 17 0 00 004657'		CALL DIST		;GET DISTANCES
  4490	004502'01  200 16 0 00 004256*	CORFC3:	TMNN SK%CL1,SCHFLG	;USING QUEUES OR DISTANCES?
  4491	004503'01  606 16 0 00 010000 
  4492	004504'01  604 00 0 00 000000 		IFNSK.			;IF QUEUES
  4493	004505'01  254 00 0 00 004515'
  4494	004506'01  261 17 0 00 000001 		 PUSH P,T1		;SAVE CURRENT CLASS DIST
  4495	004507'01  135 02 0 00 010532'		 LOAD T2,FKQN		;GET QUEUE
  4496	004510'01  260 17 0 00 004451'		 CALL CORFCO		;DO OTHER COMPUTATION
  4497	004511'01  200 02 0 00 000001 		 MOVE T2,T1		;RETURN RESULT AS JOB DISTANCE
  4498	004512'01  262 17 0 00 000001 		 POP P,T1		;RECOVER CALL DIST
  4499	004513'01  135 16 0 00 010532'		 LOAD CX,FKQN
  4500	004514'01  254 00 0 00 004517'		ELSE.			;IF DISTANCES
  4501	004515'01  135 16 0 00 010532'		 LOAD CX,FKQN		;GET Q VALUE AGAIN
  4502	004516'01  144 02 0 16 000000#		 FADR T2,LQWBAS-INTQ1(CX) ;ATTENUATE JOB DISTANCE
  4503	004517'01				ENDIF.
  4504	004517'01  321 01 0 00 004522'		IFGE. T1
  4505	004520'01  307 16 0 00 000003 		 CAIG CX,INTQ1		;INTERACTIVE QUEUES?
  4506	004521'01  145 01 0 00 200400 		 FADRI T1,(EXP 0.5)	;YES. ATTENUATE CLASS DISTANCE SUCH
  4507									; THAT A WELL-BEHAVED CLASS WILL
  4508									; ACHIEVE PRIORITY ON THIS QUEUE
  4509	004522'01				ENDIF.
  4510	004522'01  200 03 0 07 004473*		LOAD T3,FKSWX,(FX)	; GET FLAGS AGAIN
  4511	004523'01  603 03 0 00 000400 		TXNE T3,BSOVRD		;OVERRIDDEN?
  4512	004524'01  254 00 0 00 004534'		IFSKP.
  4513	004525'01  200 16 0 07 004462*		 TMNN PIBMP
  4514	004526'01  607 16 0 00 200000 
  4515	004527'01  603 03 0 00 011000 		 TXNE T3,BSSPQ!BSCRSK	;NO SPECIAL?
  4516	004530'01  604 00 0 00 000000 		 IFNSK.
  4517	004531'01  254 00 0 00 004534'
  4518	004532'01  315 01 0 00 011011'		  CAMGE T1,[0.5]	;MAKE SURE ADEQUATELY BOOSTED
  4519	004533'01  205 01 0 00 200400 		  MOVX T1,<0.5>		;IF NOT, HELP IT OUT SOME, BUT NOT TO
  4520									; THE DETRIMENT OF WELL-BEHAVED QUEUE 2
  4521									; PROCESSES
  4522	004534'01				 ENDIF.
  4523	004534'01				ENDIF.
  4524	004534'01  263 17 0 00 000000 		RET			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 112
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4525
  4526					;NEED SPECIAL PRIORITY
  4527
  4528	004535'01  334 01 0 00 011012'	CORFC8:	SKIPA T1,[3.0]		;AHEAD OF ALL COMPUTE BOUND FORKS
  4529	004536'01  205 01 0 00 203600 	CORFC4:	MOVX T1,<6.0>		;FOR NOSKED
  4530
  4531					;The following computes a value which increases from 0 to 1 as
  4532					;the length of time on the present queue.  This provides a
  4533					;round-robin among forks with otherwise equal high priority.
  4534					;The computation is N/(N+C) where N is the length of time
  4535					;on the queue and C is a constant.
  4536
  4537	004537'01  200 02 0 00 004451*	CORFC7:	MOVE T2,TODCLK
  4538	004540'01  274 02 0 07 004452*		OPSTR <SUB T2,>,FKTIM,(FX) ;TIME ON QUEUE
  4539	004541'01  127 02 0 00 000002 		FLTR T2,T2
  4540	004542'01  200 04 0 00 000002 		MOVE T4,T2
  4541	004543'01  145 04 0 00 215400 		FADRI T4,(4096.0)	;AN ARBITRARY CONSTANT
  4542	004544'01  174 02 0 00 000004 		FDVR T2,T4
  4543	004545'01  263 17 0 00 000000 		RET			;AND DONE
  4544
  4545					;GET JOB DIST ONLY, PRESERVE CLASS DIST IN T1
  4546
  4547	004546'01  265 16 0 00 000000*	CORFC6:	SAVEAC <T1>		;KEEP THE CLASS DIST WE HAVE
  4548	004547'01  260 17 0 00 004657'		CALL DIST		;GET THE JOB DIST
  4549	004550'01  263 17 0 00 000000 		RET			;RETURN THOSE TWO
  4550
  4551					;PROCESS IS ON QUEUE 1 AND CLASS SCHEDULER IS ON
  4552
  4553	004551'01  260 17 0 00 004657'	CORFC5:	CALL DIST
  4554	004552'01  331 00 0 00 004447*		SKIPL CLASSF		;WITHHOLDING?
  4555	004553'01  331 00 0 00 000001 		SKIPL T1		;IN WINDFALL?
  4556	004554'01  254 00 0 00 004535'		JRST CORFC8		;WITHHOLDING OFF OR NOT IN WINDFALL, BOOST
  4557	004555'01  145 01 0 00 200400 		FADRI T1,(0.5)		;IN WINDFALL AND WITHHOLDING, SMALL BOOST
  4558	004556'01  263 17 0 00 000000 		RET			; AND USE PRESENT VALUES
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 113
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4559
  4560					;COMPUTE NEW UTILIZATION FOR ALL CLASSES.
  4561
  4562					;COMPUTATION PERFORMED IS:
  4563					;	U(I+1)=U(I)*e^-(T/C)+F(1-e^(T/C))
  4564					;WHERE:
  4565					;	U(I)=PREVIOUS UTILIZATION
  4566					;	U(I+1)= NEWLY COMPUTED UTILIZATION
  4567					;	T/C= 1/20 (TIME CONSTANT OF 60 SEC, COMPUTED EVERY 3 SEC)
  4568					;	F= FRACTIONAL UTILIZTION IN INTERVAL. COMPUTE AS:
  4569					;		CLSIRT/TIME    WHERE:
  4570					;	TIME = SELLABLE TIME = (SOLD TIME + IDLE TIME)
  4571
  4572	004557'01  265 16 0 00 000000*	NEWUTL:	ACVAR <W1,W2,W3>	;GET A WORK REG
  4573	004560'01  200 06 0 00 003662*		MOVE W2,USRTIM		;GET CURRENT USER TIME
  4574	004561'01  276 06 0 00 000000*		SUBM W2,OLDSLD		;COMPUTE TIME SOLD IN INTERVAL
  4575	004562'01  250 06 0 00 004561*		EXCH W2,OLDSLD		;START NEW INTERVAL
  4576	004563'01  200 01 0 00 001356*		MOVE T1,SKDIDL		;GET IDLE TIME (HP UNITS)
  4577	004564'01  276 01 0 00 001362*		SUBM T1,OLDIDL		;COMPUTE IDLE TIME USED IN INTERVAL
  4578	004565'01  250 01 0 00 004564*		EXCH T1,OLDIDL		;AND START NEW INTERVAL
  4579	004566'01  231 01 0 00 003747*		IDIVI T1,NTMS		;CONVERT TO MILLISECONDS
  4580	004567'01  270 06 0 00 000001 		ADD W2,T1		;TIME = SOLD + IDLE
  4581	004570'01  127 06 0 00 000006 		FLTR W2,W2		;GET FLOAT OF INTERVAL
  4582	004571'01  255 01 0 00 004572'		JFOV .+1		;INIT OVERFLOW FLAG
  4583	004572'01  336 00 0 00 004552*		SKIPN CLASSF		;CLASS SCHEDULING ON?
  4584	004573'01  254 00 0 00 004620'		JRST NEWUTJ		;NO, ONLY DO JOB UTILS
  4585	004574'01  201 05 0 00 000000#		MOVEI W1,MAXCLS-1	;SET UP TO COMPUTE CLASS UTILS
  4586	004575'01  336 03 1 00 011013'	NEWUT0:	SKIPN T3,@[EP. CLSIRT(W1)];ANY TIME IN THIS INTERVAL?
  4587	004576'01  254 00 0 00 004602'		JRST NEWUT1		;NO. PROCEED
  4588	004577'01  402 00 1 00 011014'		SETZM @[EP. CLSIRT(W1)]	;CLEAR COUNTER
  4589	004600'01  127 03 0 00 000003 		FLTR T3,T3		;FLOAT THE VALUE
  4590	004601'01  174 03 0 00 000006 		FDVR T3,W2		;COMPUTE FRACTIONAL USE
  4591	004602'01  200 01 1 00 011015'	NEWUT1:	MOVE T1,@[EP. CLSUTL(W1)]	;GET CLASS UTIL
  4592	004603'01  154 01 0 00 000003 		FSBR T1,T3
  4593	004604'01  164 01 0 00 000013'		FMPR T1,UTLEXP+UTLINI-1	;DECAY IT
  4594						JFOV [	SETZM T1	;YES. ASSUME UNDERFLOW THEN
  4595	004605'01  255 01 0 00 011016'			JRST .+1]
  4596	004606'01  144 01 0 00 000003 		FADR T1,T3		;NEW UTIL
  4597	004607'01  202 01 1 00 011020'		MOVEM T1,@[EP. CLSUTL(W1)]
  4598	004610'01  154 01 1 00 011021'		FSBR T1,@[EP. CLSSHR(W1)]	;COMPUTE LINEAR DISTANCE
  4599	004611'01  331 00 0 00 000001 		SKIPL T1		;WINDFALL?
  4600	004612'01  335 03 1 00 011022'		SKIPGE T3,@[EP. CLSSWA(W1)]	;YES. ANY WINDFALL ALLOCATION?
  4601	004613'01  200 03 1 00 011023'		MOVE T3,@[EP. CLSSHR(W1)]	;NO. USE NORMAL SHARE THEN
  4602	004614'01  174 01 0 00 000003 		FDVR T1,T3		;COMPUTE DISTANCE
  4603						JFOV [	SKIPE T3	;ANY SHARE?
  4604							TDZA T1,T1	;YES. ASSUME ON TARGET THEN
  4605							FADRI T1,(MXBIAS) ;NO. MAKE SURE IS RUN LAST THEN
  4606	004615'01  255 01 0 00 011024'			JRST .+1]	;PROCEED
  4607	004616'01  212 01 1 00 011030'		MOVNM T1,@[EP. CLSDST(W1)]	;SAVE DISTANCE
  4608	004617'01  365 05 0 00 004575'		SOJGE W1,NEWUT0		;DO ALL CLASSES
  4609						; ..
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 114
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4610
  4611					;NEWUTL CONTINUED...
  4612					;COMPUTE JOB UTILS AND DISTANCES
  4613
  4614	004620'01  200 05 0 00 001633*	NEWUTJ:	MOVE W1,MJBUSE		;GET HIGHEST JOB IN USE
  4615	004621'01  335 00 0 05 003677*	NEWU00:	SKIPGE JOBRT(W1)	;THIS JOB IN USE?
  4616	004622'01  254 00 0 00 004644'		JRST NEWU02		;NO. SKIP IT THEN
  4617	004623'01  336 03 1 00 011031'		SKIPN T3,@[EP. JOBIRT(W1)]	;THIS JOB HAVE SOME RUN-TIME?
  4618	004624'01  254 00 0 00 004630'		JRST NEWU01		;NO
  4619	004625'01  402 00 1 00 011032'		SETZM @[EP. JOBIRT(W1)]	;YES. CLEAR COUNTER
  4620	004626'01  127 03 0 00 000003 		FLTR T3,T3		;GET FLOAT OF TIME
  4621	004627'01  174 03 0 00 000006 		FDVR T3,W2		;GET FRACTION
  4622	004630'01  200 01 1 00 011033'	NEWU01:	MOVE T1,@[EP. JOBUTL(W1)]	;GET CURRENT JOB UTILIZATON
  4623	004631'01  154 01 0 00 000003 		FSBR T1,T3
  4624	004632'01  164 01 0 00 000013'		FMPR T1,UTLEXP+UTLINI-1	;DECAY IT
  4625						JFOV [	SETZM T1
  4626	004633'01  255 01 0 00 011034'			JRST .+1]
  4627	004634'01  144 01 0 00 000003 		FADR T1,T3		;NEW UTIL
  4628	004635'01  202 01 1 00 011036'		MOVEM T1,@[EP. JOBUTL(W1)]	;SAVE IT
  4629	004636'01  550 02 1 00 011037'		HRRZ T2,@[EP. JOBCLS(W1)]	;GET CLASS
  4630	004637'01  200 03 1 00 011040'		MOVE T3,@[EP. CLSSHI(T2)]	;GET JOB'S SHARE
  4631	004640'01  154 03 0 00 000001 		FSBR T3,T1		;COMPUTE LINEAR DIFFERENCE
  4632	004641'01  174 03 1 00 011041'		FDVR T3,@[EP. CLSSHI(T2)]	;COMPUTE "EXPONENTIAL DIFFERENCE
  4633						JFOV [	SKIPE @[EP. CLSSHI(T2)] ;ANY SHARE?
  4634							SETZM T3	;NO. ASSUME ON TARGET THEN
  4635	004642'01  255 01 0 00 011043'			JRST .+1]
  4636	004643'01  202 03 1 00 011046'		MOVEM T3,@[EP. JOBDST(W1)]	;SAVE JOB DISTANCE
  4637	004644'01  365 05 0 00 004621'	NEWU02:	SOJGE W1,NEWU00		;DO ALL JOBS
  4638	004645'01  200 01 0 00 004537*		MOVE T1,TODCLK		;GET NOW
  4639	004646'01  270 01 0 00 000060*		ADD T1,UTLINT		;WHEN TO DO IT NEXT
  4640	004647'01  202 01 0 00 001331*		MOVEM T1,UTLTIM		;""
  4641
  4642					;REORDER GOLST
  4643
  4644	004650'01  200 05 0 00 004361*		MOVE W1,GOLST		;GET GOLST
  4645	004651'01  402 00 0 00 004650*		SETZM GOLST		;INIT IT TO EMPTY
  4646	004652'01  322 05 0 00 004234*	REORDR:	JUMPE W1,R		;IF EMPTY NOW, ALL DONE
  4647	004653'01  201 07 0 05 000000#		MOVEI FX,-FKPT(W1)	;GET FORK INDEX
  4648	004654'01  550 05 0 07 004367*		HRRZ W1,FKPT(FX)	;GET NEXT ITEM
  4649	004655'01  260 17 0 00 004322'		CALL ONGOL		;INSERT IN NEW GOLST
  4650	004656'01  254 00 0 00 004652'		JRST REORDR		;AND PROCEED
  4651
  4652						ENDAV.			;END ACVAR
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 115
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4653
  4654					;COMPUTE CURRENT DISTANCE FROM TARGET UTIL FOR PROCESS
  4655					;FX/	FORK HANDLE
  4656					;RETURNS:	T1/ DISTANCE FROM CLASS TARGET UTILIZATION (IN %)
  4657					;		T2/ DISTNCE FROM JOB TARGET UTIL (IN %)
  4658					;CLOBBERS ONLY T1 AND T2
  4659
  4660	004657'01  554 02 0 07 004372*	DIST:	LOAD T2,FKJBN		;GET JOB NUMBER
  4661	004660'01  550 01 1 00 011047'		HRRZ T1,@[EP. JOBCLS(T2)]	;GET JOB CLASS
  4662	004661'01  200 01 1 00 011050'		MOVE T1,@[EP. CLSDST(T1)]	;GET CLASS DISTANCE
  4663	004662'01  200 02 1 00 011051'		MOVE T2,@[EP. JOBDST(T2)]	;GET JOB DISTANCE
  4664	004663'01  263 17 0 00 000000 		RET			;DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 116
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4665
  4666					;MORE CLASS SCHEDULING PARAMETERS.
  4667					;ROUTINES TO MAINTAIN SHARE COUNTS
  4668
  4669					;ADD A MEMBER TO A CLASS
  4670					;	T1/ CLASS
  4671
  4672					   REPEAT 0,<			;NOT BEING USED NOW
  4673					DECSHR:	SOSA @[EP. CLSCNT(T1)]	;ONE LESS ITEM
  4674					INCSHR:	AOS @[EP. CLSCNT(T1)]	;ONE MORE ITEM
  4675						SKIPE CLASSF		;DOING CLASS SCHEDULING?
  4676						CALL ADJCLS		;YES. ADJUST CLASS PARAMETERS
  4677						RET			;ALL DONE THEN
  4678					   >				;END OF REPEAT 0
  4679
  4680					;ROUTINE TO START UP CLASS SCHEDULING
  4681
  4682	004664'01  332 00 0 00 004572*	STRCLS:	SKIPE CLASSF		;NOW ON?
  4683	004665'01  263 17 0 00 000000 		RET			;YES. NO NEED THEN
  4684	004666'01  265 16 0 00 002317*		ACVAR <W1>
  4685	004667'01  476 00 0 00 004664*		SETOM CLASSF		;START IT UP
  4686					   REPEAT 0,<			;DON'T NEED THIS BECAUSE NEWUTL ALWAYS ON
  4687						MOVEI W1,NJOBS-1	;SCAN JOBS
  4688					STRCL0:	SETZM @[EP. JOBIRT(W1)]	;NO INCREMENTAL RUN-TIME YET
  4689						SETZM @[EP. JOBUTL(W1)]	;NO UTIL
  4690						SOJGE W1,STRCL0		;DO ALL JOBS
  4691						MOVE T1,USRTIM		;GET CURRENT "SOLD" TIME
  4692						MOVEM T1,OLDSLD		;INIT INTERVAL
  4693					   >
  4694	004670'01  201 01 0 00 000000 		MOVEI T1,0
  4695	004671'01			      DO.
  4696	004671'01  402 00 1 00 011052'		SETZM @[EP. CLSIRT(T1)]
  4697	004672'01  402 00 1 00 011053'		SETZM @[EP. CLSSUM(T1)]
  4698	004673'01  402 00 1 00 011054'		SETZM @[EP. CLSCNT(T1)]	;CLEAR COUNTS AS WELL
  4699	004674'01  305 01 0 00 000000#		CAIGE T1,MAXCLS-1
  4700	004675'01  344 01 0 00 004671'		AOJA T1,TOP.
  4701	004676'01			      ENDDO.
  4702	004676'01  201 01 0 00 000000 		MOVEI T1,0
  4703	004677'01			      DO.
  4704	004677'01  402 00 1 00 011055'		SETZM @[EP. CLSRJA(T1)]
  4705	004700'01  305 01 0 00 000000#		CAIGE T1,MAXCLS*NRJAVS-1
  4706	004701'01  344 01 0 00 004677'		AOJA T1,TOP.
  4707	004702'01			      ENDDO.
  4708	004702'01  260 17 0 00 004704'		CALL COUNT		;GET CORRECT CLASS COUNTS
  4709	004703'01  263 17 0 00 000000 		RET
  4710
  4711						ENDAV.			;END ACVAR
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 117
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4712
  4713					;ROUTINES TO COMPUTE CLASS PARAMETERS
  4714
  4715					;FIRST. COMPUTE ALL CLSCNT VALUES BY SCANNING GOLST
  4716
  4717	004704'01  265 16 0 00 010326'	COUNT:	SAVEAC <FX>		;SAVE REG
  4718	004705'01  201 04 0 00 000000#		MOVEI T4,NJOBS-1	;SCAN ALL JOBS
  4719	004706'01  335 00 0 04 004621*	COUNT0:	SKIPGE JOBRT(T4)	;THIS JOB ACTIVE?
  4720	004707'01  254 00 0 00 004712'		JRST COUNT4		;NO
  4721	004710'01  553 02 1 00 011056'		HRRZS T2,@[EP. JOBCLS(T4)]	;YES. GET CLASS
  4722	004711'01  350 00 1 00 011057'		AOS @[EP. CLSCNT(T2)]	;INCREMENT COUNT
  4723	004712'01  365 04 0 00 004706'	COUNT4:	SOJGE T4,COUNT0		;DO ALL JOBS
  4724	004713'01  201 01 0 00 000000#	COUNT1:	MOVEI T1,MAXCLS-1
  4725	004714'01  332 00 1 00 011060'	COUNT2:	SKIPE @[EP. CLSCNT(T1)]	;ANYBODY IN THIS CLASS?
  4726	004715'01  260 17 0 00 005000'		CALL ADJCLS		;YES. DO COMPUTING THEN
  4727	004716'01  365 01 0 00 004714'		SOJGE T1,COUNT2
  4728
  4729					;NOW COMPUTE ON GOLST COUNT
  4730
  4731	004717'01  550 01 0 00 004651*		HRRZ T1,GOLST		;GET TOP ENTRY OF GOLST
  4732	004720'01  322 01 0 00 004652*	COUNT5:	JUMPE T1,R		;IF AT THE END, DONE
  4733	004721'01  201 07 0 01 000000#		MOVEI FX,-FKPT(T1)	;GET FORK INDEX
  4734	004722'01  554 02 0 07 004657*		LOAD T2,FKJBN		;GET JOB NUMBER
  4735	004723'01  205 16 0 00 000001 		MOVSI CX,1		;AN INCREMENTOR
  4736	004724'01  273 16 1 00 011061'		ADDB CX,@[EP. JOBCLS(T2)]	;ONE MORE ON GOLST
  4737	004725'01  603 16 0 00 777776 		TLNE CX,777776		;FIRST ONE?
  4738	004726'01  254 00 0 00 004732'		JRST COUNT6		;NO
  4739	004727'01  550 02 1 00 011062'		HRRZ T2,@[EP. JOBCLS(T2)]	;GET CLASS
  4740	004730'01  205 16 0 00 000001 		INCR CLGLC,(T2)		;INCREMENT COUNT
  4741	004731'01  272 16 1 00 011063'
  4742	004732'01  550 01 0 07 004654*	COUNT6:	HRRZ T1,FKPT(FX)	;GET NEXT FORK
  4743	004733'01  254 00 0 00 004720'		JRST COUNT5		;AND STEP
  4744
  4745					;ADJUST GOLST COUNTS WHEN A JOB CHANGES CLASSES
  4746					;	T1/ OLD CLASS
  4747					;	T2/ JOB #
  4748
  4749	004734'01  265 16 0 00 010326'	CHGCNT:	SAVEAC <FX>		;SAVE A REG
  4750	004735'01  550 04 1 00 011064'		HRRZ T4,@[EP. JOBCLS(T2)]	;GET NEW CLASS
  4751	004736'01  336 07 0 00 004717*		SKIPN FX,GOLST		;ANYTHING ON GOLST?
  4752	004737'01  263 17 0 00 000000 		RET			;NO
  4753	004740'01  275 07 0 00 004732*	CHGCN0:	SUBI FX,FKPT		;GET FORK #
  4754	004741'01  554 03 0 07 004722*		LOAD T3,FKJBN		;GET JOB #
  4755	004742'01  302 03 0 02 000000 		CAIE T3,0(T2)		;SAME AS TARGET?
  4756	004743'01  254 00 0 00 004751'		JRST CHGCNX		;NO
  4757	004744'01  205 16 0 00 777777 		DECR CLGLC,(T1)		;YES. ONE LESS IN OLD CLASS
  4758	004745'01  272 16 1 00 011065'
  4759	004746'01  205 16 0 00 000001 		INCR CLGLC,(T4)		;AND ONE MORE IN NEW CLASS
  4760	004747'01  272 16 1 00 011066'
  4761	004750'01  263 17 0 00 000000 		RET
  4762	004751'01  550 07 0 07 004740*	CHGCNX:	HRRZ FX,FKPT(FX)	;GET NEXT ITEM
  4763	004752'01  326 07 0 00 004740'		JUMPN FX,CHGCN0		;DO IT
  4764	004753'01  263 17 0 00 000000 		RET			;ALL DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 118
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4765
  4766					;ROUTINE TO CHANGE CLASS FOR A JOB.
  4767					;	T1/ NEW CLASS
  4768					;	T2/ JOB NUMBER
  4769					;MUST BE IN THE SCHEDULER
  4770
  4771	004754'01  265 16 0 00 000000*	CHGCLS:	SASUBR <NCLASS,JOBNOM>
  4772	004755'01  316 02 0 00 003712*		CAMN T2,JOBNO		;THIS JOB?
  4773						CALL [	SAVET		;YES
  4774	004756'01  260 17 0 00 011067'			CALLRET UCLOCK]	;UPDATE CLOCKS
  4775	004757'01  335 00 0 02 004706*		SKIPGE JOBRT(T2)	;HAS JOB LOGGED OUT
  4776	004760'01  263 17 0 00 000000 		 RET			;YES, DON'T CHANGE ITS CLASS
  4777	004761'01  550 03 1 00 011071'		HRRZ T3,@[EP. JOBCLS(T2)]	;GET CURRENT CLASS VALUE
  4778	004762'01  370 00 1 00 011072'		SOS @[EP. CLSCNT(T3)]	;ONE LESS IN THIS CLASS
  4779	004763'01  350 00 1 00 011073'		AOS @[EP. CLSCNT(T1)]	;ONE MORE IN THIS CLASS
  4780	004764'01  542 01 1 00 011074'		HRRM T1,@[EP. JOBCLS(T2)]	;SET NEW CLASS
  4781	004765'01  336 00 0 00 004667*		SKIPN CLASSF		;DOING CLASS SCHEDULING?
  4782	004766'01  263 17 0 00 000000 		RET			;NO .DONE THEN
  4783	004767'01  202 03 0 15 000001 		MOVEM T3,NCLASS		;SAVE OLD CLASS IN NEW CLASS PLACE
  4784	004770'01  260 17 0 00 005000'		CALL ADJCLS		;ADJUST CLASS PARAMETERS
  4785	004771'01  200 01 0 15 000001 		MOVE T1,NCLASS		;GET BACK OLD CLASS
  4786	004772'01  260 17 0 00 005000'		CALL ADJCLS		;AND ADJUST THIS AS WELL
  4787	004773'01  200 02 0 15 000002 		MOVE T2,JOBNOM		;RECOVER JOB NUMBER
  4788	004774'01  254 00 0 00 004734'		CALLRET CHGCNT		;AND ADJUST GOLST COUNTS
  4789
  4790					;ROUTINE TO SET CLASS PARAMETERS
  4791					;	T1/ SHARE OF MACHINE TO GET
  4792					;	T2/ CLASS #
  4793
  4794	004775'01  202 01 1 00 011075'	CRTSHR:	MOVEM T1,@[EP. CLSSHR(T2)]	;SET CLASSES SHARE
  4795	004776'01  200 01 0 00 000002 		MOVE T1,T2		;GET CLASS I.D.
  4796	004777'01  254 00 0 00 005000'		CALLRET ADJCLS		;GO ADJUST CLASS PARAMETERS
  4797
  4798					;ROUTINE TO ADJUST CLSSHI AND CLSQ WHEN SOMETHING CHANGES
  4799					;	T1/ CLASS
  4800
  4801	005000'01  336 02 1 00 011076'	ADJCLS:	SKIPN T2,@[EP. CLSCNT(T1)]	;ANY MEMBERS OF THIS CLASS?
  4802	005001'01  201 02 0 00 000001 		MOVEI T2,1		;NO. ASSUME ONE FOR CONVENIENCE
  4803	005002'01  553 00 0 00 000002 		HRRZS T2		;GET POPULATION COUNT ONLY
  4804	005003'01  127 02 0 00 000002 		FLTR T2,T2		;GET FLOAT OF POPULATION
  4805	005004'01  200 03 1 00 011077'		MOVE T3,@[EP. CLSSHR(T1)]	;GET CLASS'S SHARE
  4806	005005'01  174 03 0 00 000002 		FDVR T3,T2		;GET EACH MEMBER'S FAIR SHARE
  4807	005006'01  202 03 1 00 011100'		MOVEM T3,@[EP. CLSSHI(T1)]	;SAVE IT
  4808	005007'01  263 17 0 00 000000 		RET			;DONE
  4809
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 119
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4810					;ROUTINE USED BY CACCT AND LOGIN TO SET CLASS OF JOB.
  4811					;	T1/ CLASS TO SET
  4812
  4813	005010'01  265 16 0 00 000000*	SETCLS::ASUBR <CLSNUM>		;SAVE INCOMING ARG
  4814	005011'01  331 01 0 00 000000*		SKIPL T1,CTRLTT		;ATTACHED?
  4815	005012'01  260 17 0 00 000000*		CALL CHKBCH		;SEE IF A BATCH JOB
  4816	005013'01  254 00 0 00 005026'		 JRST SETCL0		;NO. PROCEED
  4817	005014'01  200 16 0 00 000000*		IFQN. CLSBD,
  4818	005015'01  325 16 0 00 005024'
  4819	005016'01  332 00 0 00 003522*		  SKIPE JOBSKD		;ALREADY PRIORITZED?
  4820	005017'01  254 00 0 00 005024'		ANSKP.
  4821	005020'01  200 01 0 00 000000*		  MOVE T1,GBLJNO	;NO. GET JOB NUMBER
  4822	005021'01  201 02 0 00 000607 		  MOVX T2,DREGS		;GET DREGS PRIORITY WORD
  4823	005022'01  104 00 0 00 000245 		  SJPRI			;SET PRIORITY WORD
  4824	005023'01  320 16 0 00 005024'		   ERJMP .+1		;IF FAILED, PROCEED ANYWAY
  4825	005024'01				ENDIF.
  4826	005024'01  135 01 0 00 011101'		LOAD T1,CLSBT		;GET BATCH CLASS
  4827	005025'01  375 00 0 00 000001 		SOSGE T1		;IF A BATCH CLASS, USE IT
  4828	005026'01  200 01 0 15 000001 	SETCL0:	MOVE T1,CLSNUM		;GET CLASS
  4829	005027'01  200 16 0 00 005014*		JE CLSAC,,R		;IF NOT USING ACCOUNTS, RETURN NOW
  4830	005030'01  606 16 0 00 200000 
  4831	005031'01  254 00 0 00 004720*
  4832	005032'01  265 16 0 00 000310'		NOSKED			;OWN MACHINE
  4833	005033'01  331 00 0 00 000001 		SKIPL T1		;VALID CLASS?
  4834	005034'01  301 01 0 00 000000*		CAIL T1,MAXCLS		;""
  4835	005035'01  402 00 0 00 000001 		SETZM T1		;NO. USE ZERO THEN
  4836	005036'01  200 02 0 00 004755*		MOVE T2,JOBNO		;GET JOB NUMBER
  4837	005037'01  550 03 1 00 011102'		HRRZ T3,@[EP. JOBCLS(T2)]	;GET PRESENT CLASS
  4838	005040'01  302 03 0 01 000000 		CAIE T3,0(T1)		;CHANGING?
  4839	005041'01  260 17 0 00 004754'		CALL CHGCLS		;YES
  4840	005042'01  265 16 0 00 000315'		OKSKED			;ALL DONE
  4841	005043'01  263 17 0 00 000000 		RET			;""
  4842
  4843					;ROUTINE CALLED WHEN LOGIN WILL SUCCEED.
  4844
  4845	005044'01  200 16 0 00 005027*	SKDLOG::TMNN CLSAC	;CLASS BY ACCOUNT?
  4846	005045'01  606 16 0 00 200000 
  4847	005046'01  336 00 0 00 004765*		SKIPN CLASSF		;NO. CLASS SCHEDULING OFF THEN?
  4848	005047'01  263 17 0 00 000000 		RET			;YES. NOTHING TO DO
  4849	005050'01  335 16 0 00 000000#		GTOKM (.GOCL0,,R) 	;IF FAILURE, USE DEFAULT
  4850	005051'01  334 00 0 00 000000 
  4851	005052'01  607 16 0 00 200000 
  4852	005053'01  260 17 0 00 011112'
  4853	005054'01  334 00 0 00 000000 
  4854	005055'01  254 00 0 00 005031*
  4855	005056'01  263 17 0 00 000000 		RET			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 120
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4856
  4857					;QUEUE PARAMETER TABLES
  4858
  4859						RADIX 10
  4860
  4861					;QUANTA FOR EACH QUEUE (IN HIGH PRECISION UNITS)
  4862					;HEURISTIC: A JOB SHOULD GET AT LEAST A FULL LOWEST QUEUE QUANTUM
  4863					;BEFORE FALLING TO LOW QUEUE AND THEREBY YEILDING TO ALL THE COMPUTE
  4864					;BOUND JOBS.  HENCE, THE SUM OF QUANTA FOR QUEUES 0 TO MAXQ-1
  4865					;SHOULD BE .GE. THE QUANTUM FOR MAXQ
  4866
  4867					;DEFINE PROTO TABLE FOR BIAS CONTROL
  4868	005057'01  000000000000#	QUANTB:	300*NTMS		;0 - SPECIAL HIGH PRIO QUEUE *
  4869	005060'01  000000000000#		200*NTMS		;1 - QUICK INTERACTIVE QUEUE
  4870	005061'01  000000000000#		400*NTMS		;2 - REGULAR INTERACTIVE
  4871	005062'01  000000000000#		1500*NTMS		;3 - LOW PRIO INTERACTIVE OR HIGH PRIO COMPUTE
  4872									;    TRANSITIONAL QUEUE
  4873	005063'01  000000000000#		3000*NTMS		;4 - MIDDLE QUEUE (HIGH PRIO COMPUTE QUEUE)
  4874	005064'01  000000000000#		5000*NTMS		;5 - COMPUTE QUEUE
  4875	005065'01  000000000000#		10000*NTMS		;6 - "DREGS" QUEUE *
  4876
  4877		   	   000007	NQUEUE==:.-QUANTB		;NUMBER OF QUEUES
  4878	000026'01			RS QUANTT,NQUEUE		;ACTIVE QUANTA TABLE
  4879
  4880					;DEFINE PROTO TABLE FOR CLASS SCHEDULER
  4881
  4882	005066'01  000000000000#	QUANTC:	300*NTMS
  4883		   	   000001	  INTQ0==.-QUANTC		;HIGHEST INTERACTIVE QUEUE
  4884	005067'01  000000000000#		100*NTMS
  4885	005070'01  000000000000#		400*NTMS
  4886		   	   000003	  INTQ1==.-QUANTC		;LOWEST INTERACTIVE QUEUE
  4887	005071'01  000000000000#		1000*NTMS
  4888	005072'01  000000000000#		2000*NTMS
  4889	005073'01  000000000000#		3000*NTMS
  4890	005074'01  000000000000#		10000*NTMS
  4891
  4892					IFN .-QUANTC-NQUEUE,<PRINTX ?QUANTA TABLE LENGTHS DIFFER>
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 121
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4893
  4894		   	   000000	HIGHQ==0			;SPECIAL HI PRI QUEUE
  4895					;INTQ0==1			;QUICK INTERACTIVE QUEUE
  4896					;INTQ1==INTQ0+2			;REGULAR INTERACTIVE QUEUE
  4897		   	   000006	LOWQ==:NQUEUE-1			;SPECIAL LOW-PRIORITY QUEUE
  4898		   	   000005	MAXQ==:LOWQ-1		;NORMAL LOW QUEUE
  4899
  4900	005075'01  000000000000#	BQUANT:	100*NTMS		;QUANTUM GIVEN FOR PSI 'BUMP'
  4901
  4902					DEFINE GETFLQ(N)<
  4903					EXP N'.0
  4904					>
  4905	005076'01  203600  000000	FLOWQ:	GETFLQ(\LOWQ)
  4906		   	   400000	MFRKWD==:JP%SYS			;PRIORITY WORD FOR JOB 0
  4907
  4908						RADIX 8
  4909
  4910	000035'01			RS QSUM,NQUEUE			;ACCUMULATED RUNTIMES OF QUEUES
  4911	000044'01			RS LQWBAS,<LOWQ-INTQ0>		;# OF WORDS IN TABLE
  4912
  4913					;NON-CLASS BIASES
  4914
  4915	005077'01  020000  000000	NSKBAS:	1B4			;BASE FOR NOSKED FORK
  4916	005100'01  010000  000000	CSKBAS:	1B5			;BASE FOR CRSKED FORK
  4917
  4918		   	   000006	TBASE:	XX==NQUEUE-1
  4919						REPEAT NQUEUE,<
  4920						<XX+1>B8-1
  4921						XX==XX-1>
  4922	005101'01  006777  777777
  4923	005102'01  005777  777777
  4924	005103'01  004777  777777
  4925	005104'01  003777  777777
  4926	005105'01  002777  777777
  4927	005106'01  001777  777777
  4928	005107'01  000777  777777
  4929		   777777  777777
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 122
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4930
  4931					;ROUTINE TO INIT QUANTT TABLE
  4932
  4933					;FIRST, TO INIT TO BIAS CONTROL SETTINGS
  4934
  4935	005110'01  334 01 0 00 011131'	QBIAS:	SKIPA T1,[QUANTB,,QUANTT]
  4936
  4937					;NOW FOR CLASS SCHEDULER
  4938
  4939	005111'01  200 01 0 00 011132'	QCLASS:	MOVE T1,[QUANTC,,QUANTT]
  4940	005112'01  251 01 0 00 000000#		BLT T1,QUANTT+NQUEUE-1	;DO TABLE
  4941	005113'01  263 17 0 00 000000 		RET			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 123
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4942
  4943					;HEURISTIC FOR ADJUSTING QUEUE LEVEL AFTER I/O WAIT
  4944
  4945					;THIS ROUTINE IS THE PRINCIPLE CONTROL OVER THE EXTENT TO WHICH
  4946					;'INTERACTIVE' OR 'COMPUTE-BOUND' JOBS ARE FAVORED.  IT GIVES
  4947					;PRIORITY 'CREDIT' TO A FORK AS A RESULT OF WAITING.  THE MORE
  4948					;CREDIT GIVEN FOR A CERTAIN LENGTH WAIT (OR THE SHORTER THE WAIT
  4949					;REQUIRED TO BECOME HIGH-Q), THE MORE THE SYSTEM WILL FAVOR
  4950					;INTERACTIVE FORKS, AND THE GREATER THE CHANCE THAT FREQUENT OR
  4951					;WELL-TIMED INTERACTIONS WILL GIVE A PROCESS AN EXCESSIVELY LARGE
  4952					;SHARE OF COMPUTE TIME.  IT HAS BEEN DEMONSTRATED HOWEVER, THAT
  4953					;A COMPLETELY 'FAIR' ALGORITHM HERE, I.E. ONE WHICH PREVENTS AN
  4954					;INTERACTIVE FORK FROM GETTING ANY GREATER SHARE OF THE MACHINE
  4955					;THAN A COMPUTE-BOUND FORK, IS HIGHLY UNSATISFACTORY TO INTERACTIVE
  4956					;USERS UNDER MEDIUM AND HEAVY LOADS (AND ALL USERS ARE INTERACTIVE
  4957					;SOMETIMES), AND RESULTS IN EXPONENTIALLY INCREASING LEVELS OF
  4958					;FRUSTRATION, CURSING AND BEATING OF TERMINALS, ETC.  THEREFORE
  4959					;THIS ROUTINE IS GENUINELY A HEURISTIC, MODIFIED AS A RESULT OF
  4960					;PRESSURES BROUGHT TO BEAR ON SYSTEM PROGRAMMERS.
  4961
  4962					;THE FOLLOWING DESCRIBES THE CURRENT PRACTICE:
  4963					; 1. TTY INPUT WAITS OF .GE. 1 SEC GIVE HIGH-Q.  GREATLY REDUCES
  4964					;    USER FRUSTRATION LEVEL.
  4965					; 2. WAITS BY FORKS ON QUEUE 0 RESULT IN NO CHANGE TO Q VALUE
  4966					; 3. FORKS ON QUEUES 1 TO MAXQ-1 WILL BE HIGH-Q IF WAITING TIME IS
  4967					;    LONGER THAN LAST RUNTIME AS IMPLIED BY Q LEVEL.
  4968					; 4. FORKS ON MAXQ WILL BE HIGH-Q IF WAITING TIME IS LONGER THAN
  4969					;    THE MAXQ QUANTUM, AND WILL BE MOVED UP TO MAXQ-1 IF WAITING
  4970					;    TIME IS LONGER THAN SOME 'MINIMAL' TIME (500 MS)
  4971
  4972					;'WAITING TIME' ABOVE MEANS ACTUAL ELAPSED WAITING TIME
  4973					;DIVIDED BY THE 1-MINUTE LOAD AVERAGE.  THIS KEEPS 'WELL-TIMED'
  4974					;INTERACTIONS FROM USING MORE THAN ABOUT 1/LDAV OF THE CPU.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 124
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  4975
  4976					;COMPUTE NEW Q VALUE
  4977
  4978	005114'01  200 01 0 00 004645*	NEWST:	MOVE T1,TODCLK		;CALCULATE ACTUAL WAITING TIME
  4979	005115'01  274 01 0 07 003754*		OPSTR <SUB T1,>,FKPTX,(FX)
  4980	005116'01  272 01 0 07 004540*		OPSTRM <ADDM T1,>,FKTIM,(FX) ;DON'T COUNT WAIT TIME
  4981	005117'01  305 01 0 00 000144 		CAIGE T1,^D100		;ABOVE MIN WAIT TIME?
  4982						JRST [	LOAD T1,FKQN	;NO, NO CHANGE
  4983	005120'01  254 00 0 00 011133'			JRST NEWSTX]
  4984	005121'01  205 16 0 00 000600 		SETZRO <BSNST,BSOVRD>	;YES, NOTE
  4985	005122'01  412 16 0 07 004522*
  4986	005123'01  305 01 0 00 003720 		CAIGE T1,^D2000		;ABOVE THRESHOLD?
  4987	005124'01  254 00 0 00 005126'		IFSKP.
  4988	005125'01  260 17 0 00 005230'		  CALL NEWWSS		;RESET WS SIZE
  4989	005126'01				ENDIF.
  4990	005126'01  221 01 0 00 004566*		IMULI 1,NTMS		;CONVERT TO HIGH PRECISION UNITS
  4991	005127'01  602 00 0 00 000400 		TXNE F,SK%TTP		;CONSIDER INTERACTIONS?
  4992	005130'01  315 01 0 00 011135'		CAMGE 1,[^D1000*NTMS]	;YES, ABOVE MIN WAIT TIME?
  4993	005131'01  254 00 0 00 005140'		JRST NEWST2		;NO FOLLOW REGULAR ALGORITHM
  4994	005132'01  550 02 0 07 004441*		LOAD 2,FKSTR,(FX)	;GET SCHEDULER TEST
  4995	005133'01  302 02 0 00 003760*		CAIE T2,TCOTST		;TTY OUTPUT?
  4996	005134'01  306 02 0 00 003761*		CAIN T2,TTOBET
  4997	005135'01  606 00 0 00 000100 		TXNN F,SK%TOP		;YES, SKIP IF WANT TTY OUTPUT PRIORITY
  4998	005136'01  306 02 0 00 003756*		CAIN T2,TCITST		;TTY INPUT?
  4999						JRST [	LOAD T2,FKSTD,(FX) ;YES. GET LINE NUMBER
  5000							CALL CKPHYT	;IS IT A PSEUDO TTY?
  5001							 JRST NEWST2	;FOR PTY, FOLLOW NORMAL ALGORITHM
  5002	005137'01  254 00 0 00 011136'			JRST NEWST1]	;NO, BE MORE GENEROUS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 125
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  5003
  5004	005140'01  602 00 0 00 000200 	NEWST2:	TXNE F,SK%WCF		;CONSIDER LOAD AVG?
  5005	005141'01  254 00 0 00 005150'		JRST NEWST5		;NO
  5006	005142'01  200 02 0 00 001410*		MOVE 2,IRJAV		;AV NUMBER RUNNABLE FORKS
  5007	005143'01  303 02 0 00 000012 		CAILE T2,^D10		;BUT LIMIT IT TO 10 MAX
  5008	005144'01  201 02 0 00 000012 		MOVEI T2,^D10
  5009	005145'01  275 02 0 00 000002 		SUBI T2,2		;IGNORE LOAD AVERAGE IF .LT. IGNORED VALUE
  5010	005146'01  333 00 0 00 000002 		SKIPLE T2
  5011	005147'01  230 01 0 00 000002 		IDIV T1,T2		;WAIT CREDIT INV PROP'L TO LOAD AV - IGNORED
  5012	005150'01  200 02 0 00 000001 	NEWST5:	MOVE T2,T1
  5013	005151'01  135 01 0 00 010532'		LOAD T1,FKQN		;CURRENT QUEUE
  5014	005152'01  306 01 0 00 000006 		CAIN T1,LOWQ		;DREGS QUEUE?
  5015	005153'01  254 00 0 00 005223'		JRST NEWSTX		;YES, NO CHANGE
  5016	005154'01  301 01 0 00 000003 		CAIL T1,INTQ1		;ELIGIBLE FOR BIG BONUS IF LOW INT OR WORSE
  5017	005155'01  315 02 0 01 000000#		CAMGE T2,QUANTT+1(T1)	;WAITED LONGER THAN Q+1 QUANTUM?
  5018	005156'01  334 00 0 00 000000 		SKIPA			;NOT ELIGIBLE OR NOT LONG ENOUGH
  5019	005157'01  254 00 0 00 005213'		JRST NEWST1		;YES. MAJOR BONUS
  5020	005160'01  200 03 0 07 003541*		LOAD T3,FKQTM		;CREDIT REMAINING QUANTUM
  5021	005161'01  270 03 0 00 000002 		ADD T3,T2
  5022	005162'01  317 03 0 01 000000#		CAMG T3,QUANTT(T1)	;GREATER THAN INITIAL QUANTUM?
  5023	005163'01  254 00 0 00 005173'		JRST NEWST7		;NO, JUST UPDATE
  5024	005164'01  307 01 0 00 000003 		CAIG T1,INTQ1		;ONE OF THE HIGHEST?
  5025	005165'01  254 00 0 00 005215'		JRST NEWST3		;YES, DON'T MOVE UP BUT GIVE FULL QUANT AGAIN
  5026	005166'01  274 03 0 01 000000#	NEWST6:	SUB T3,QUANTT(T1)	;SUBTRACT QUANT FOR THIS QUEUE
  5027						SOJG T1,[CAMLE T3,QUANTT(T1) ;BUMP UP ONE QUEUE, FULL QUANT HERE?
  5028					TAMQB2:		JRST NEWST6	;YES, KEEP GOING HIGHER
  5029	005167'01  367 01 0 00 011142'			JRST .+1]	;EXIT QUEUE NUMBER IN T1
  5030	005170'01  305 01 0 00 000003 		CAIGE T1,INTQ1		;BUT LIMIT TO LOW INT Q
  5031	005171'01  201 01 0 00 000003 		MOVEI T1,INTQ1
  5032	005172'01  254 00 0 00 005215'		JRST NEWST3		;SET NEW QUEUE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 126
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  5033
  5034					;ESTABLISH VALUES FOR NEW QUEUE
  5035
  5036	005173'01  302 01 0 00 000005 	NEWST7:	CAIE T1,MAXQ		;STILL ON MAXQ?
  5037	005174'01  254 00 0 00 005216'		JRST NEWST8		;NO, STORE NEW QUANT = (OLD QUANT + PWC)
  5038	005175'01  350 00 0 00 000000#		AOS MXQNBO		;***COUNT THIS TEMP
  5039	005176'01  201 03 0 00 000001 		MOVEI T3,1		;USE 1 UNLESS
  5040	005177'01  606 00 0 00 000200 		TXNN F,SK%WCF		;PROPORTIONAL TO LDAV?
  5041	005200'01  200 03 0 00 005142*		MOVE T3,IRJAV		;YES, GET LDAV
  5042	005201'01  303 03 0 00 000012 		CAILE T3,^D10		;OR 10 MAX (NOTE: 10*500 = MAXQ QUANTUM)
  5043	005202'01  201 03 0 00 000012 		MOVEI T3,^D10
  5044	005203'01  221 03 0 00 000000#		IMULI T3,NTMS*^D500	;GET LDAV * 500 MS IN HP UNITS
  5045	
  5046	005204'01  311 02 0 00 000003 		CAML T2,T3		;WAITED THAT LONG?
  5047	005205'01  604 00 0 00 000000 		IFNSK.
  5048	005206'01  254 00 0 00 005212'
  5049	005207'01  350 00 0 00 000000#		  AOS MXQGBO		;***
  5050	005210'01  275 01 0 00 000001 		  SUBI T1,1		;BUMP ONE QUEUE
  5051	005211'01  254 00 0 00 005215'		  JRST NEWST3		;AND GIVE FULL QUANTUM 
  5052	005212'01				ENDIF.
  5053	005212'01  254 00 0 00 005223'		JRST NEWSTX		;NOT ABOVE THRESHOLD FORGET IT
  5054
  5055	005213'01  260 17 0 00 005230'	NEWST1:	CALL NEWWSS		;SET NEW WS SIZE
  5056	005214'01  260 17 0 00 005240'		CALL INIQ		;GET INITIAL INT QUEUE
  5057	005215'01  334 02 0 01 000000#	NEWST3:	SKIPA T2,QUANTT(1)
  5058	005216'01  200 02 0 00 000003 	NEWST8:	MOVE T2,T3
  5059	005217'01  202 02 0 07 005160*		STOR T2,FKQTM		;SET NEW QUEUE VALUE
  5060	005220'01  137 01 0 00 010532'		STOR T1,FKQN		;SET NEW QUEUE NUMBER
  5061	005221'01  200 02 0 00 005114*		MOVE T2,TODCLK
  5062	005222'01  202 02 0 07 005116*		STOR T2,FKTIM,(FX)
  5063	005223'01  135 03 0 00 010643'	NEWSTX:	LOAD T3,FKMNQ		;GET MIN QUEUE
  5064	005224'01  311 01 0 00 000003 		CAML T1,T3		;WITHIN RANGE?
  5065	005225'01  263 17 0 00 000000 		RET			;YES, DONE
  5066	005226'01  200 01 0 00 000003 		MOVE T1,T3		;NO, USE MIN
  5067	005227'01  254 00 0 00 005215'		JRST NEWST3		;AND SET VALUES
  5068
  5069					;ADJUST WS SIZE AFTER BLOCK
  5070
  5071	005230'01  265 16 0 00 004546*	NEWWSS:	SAVEAC <T1>
  5072	005231'01  550 01 0 07 003412*		LOAD T1,FKCSIZ		;SET NR TO MAX(6, WSP)
  5073	005232'01  315 01 0 00 000000'		CAMGE T1,MINWSS		;ABOVE MIN WS SIZE?
  5074	005233'01  200 01 0 00 000000'		MOVE T1,MINWSS		;NO, SET TO IT
  5075	005234'01  550 02 0 07 003415*		LOAD T2,FKWSS		;GET CURRENT SIZE
  5076	005235'01  313 02 0 00 000001 		CAMLE T2,T1
  5077	005236'01  260 17 0 00 003254'		CALL ADJWSS		;CHANGE FKNR FOR FORK
  5078	005237'01  263 17 0 00 000000 		RET
  5079
  5080					;SELECT INITIAL QUEUE FOR FORK
  5081
  5082	005240'01  201 01 0 00 000002 	INIQ:	MOVEI T1,INTQ0+1
  5083	005241'01  606 00 0 00 001000 		TXNN F,SK%RQ1
  5084	005242'01  332 00 0 00 005046*		SKIPE CLASSF		;ALWAYS USE FIRST INTQ IF CLASS SCHED
  5085	005243'01  201 01 0 00 000001 		MOVEI T1,INTQ0		;USE HIGHEST INT QUEUE
  5086	005244'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 127
SCHED	MAC	 7-Nov-88 20:50		Miscellaneous global routines

  5087
  5088					;BUMP PRIORITY OF FORK SO PSI WILL BE HANDLED PROMPTLY.  GIVE
  5089					;GIVE PRIORITY TO SEE IF PSI IS OF INTEREST.
  5090					; FX/ FORK INDEX
  5091					;	CALL PSBUMP
  5092					; RETURN +1 ALWAYS
  5093
  5094	005245'01  260 17 0 00 007137'	PSBUMP:	CALL CHKBMP		;SEE IF NEED BUMP PRIORITY
  5095	005246'01  263 17 0 00 000000 		 RET			;NO. SO RETURN NOW
  5096	005247'01  200 16 0 07 005122*		JN FKBLK,,R		;IF NOW BLOCKED, DONE
  5097	005250'01  603 16 0 00 200000 
  5098	005251'01  254 00 0 00 005055*
  5099	005252'01  260 17 0 00 004354'		CALL GLREM		;REMOVE FROM GOLST
  5100	005253'01  254 00 0 00 004302'		CALLRET GOCONC		;AND REQUEUE WITH NEW PRIORITY
  5101
  5102					;ROUTINES USED BY SJPRI AND SPRIW TO CAUSE PSI FOR FKMNQ UPDATE
  5103
  5104					;INTERRUPT SPECIFIC PROCESS
  5105					;	T2/ SYSTEM FORK HANDLE
  5106
  5107	005254'01  201 01 0 00 400000 	SETPRF::MOVX T1,PSIPRI
  5108	005255'01  254 00 0 00 006033'		CALLRET PSIGR		;AND COMPLETE TASK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 128
SCHED	MAC	 7-Nov-88 20:50		HLTJB - Halt job

  5109						SUBTTL HLTJB - Halt job
  5110
  5111					;Here in top fork of job that is on its way out
  5112
  5113	005256'01  570 06 0 00 005011*	HLTJB::	HRRE 6,CTRLTT
  5114	005257'01  321 06 0 00 005274'		JUMPL 6,HLTJB1		;IF JOB DETACHED
  5115	005260'01  260 17 0 00 000000*		CALL LCKDVL		;LOCK DEVICE LOCK, GO NOINT
  5116	005261'01  200 02 0 00 000006 		MOVE 2,6
  5117	005262'01  260 17 0 00 000000*		CALL TTYDAS		;DEASSIGN CTRLTT
  5118	005263'01  254 00 0 00 005356'		 JRST HLTJB3		;GO CHECK FOR ERROR OR DISMISS
  5119	005264'01  261 17 0 00 000001 		UNLOKK DEVLKK		;UNLOCK THE DEVICE LOCK
  5120	005265'01  261 17 0 00 000002 
  5121	005266'01  400 02 0 00 000000 
  5122	005267'01  200 01 0 00 011145'
  5123	005270'01  260 17 0 00 000000*
  5124	005271'01  262 17 0 00 000002 
  5125	005272'01  262 17 0 00 000001 
  5126	005273'01  256 00 0 00 000606*		OKINT			;DEVLCK WENT NOINT
  5127	005274'01  200 05 0 00 005036*	HLTJB1:	MOVE 5,JOBNO
  5128	005275'01  476 00 0 00 005256*		SETOM CTRLTT		;CLEAR CONTROL TTY WORDS
  5129	005276'01  563 00 0 05 003707*		HRROS JOBPT(5)
  5130	005277'01  260 17 0 00 000000*		CALL UNMIDX		;UNMAP THE DIRECTORY AND INDEX FILE
  5131	005300'01  260 17 0 00 000000*		CALL CLNZSC		;CLEAR ALL NON-ZERO SECTIONS
  5132	005301'01  255 00 0 00 000000 		 JFCL			;UNABLE TO CLEAR ALL - CONTINUE ANYWAY
  5133	005302'01  402 00 0 00 000000#		SETZM JOBM0+JSBPG	;CLEAR FAKE JSB MAPPING
  5134	005303'01  200 07 0 00 004416*		MOVE FX,FORKX		;THIS FORK.
  5135	005304'01  550 01 0 07 004741*		LOAD 1,FKJSB		;GET JSB
  5136	005305'01  260 17 0 00 005445'		CALL WTSPT		;WAIT FOR IT TO BE UNSHARED
  5137	005306'01  400 01 0 00 000000 		SETZ 1,
  5138	005307'01  550 02 0 07 005304*		LOAD T2,FKJSB		;GET SPT INDEX OF JSB
  5139	005310'01  507 00 0 00 000002 		HRLS T2			; INTO LEFT HALF
  5140	005311'01  541 02 0 00 000000#		HRRI 2,JOBMAP-JSBPGA	;(SPT INDEX FOR JSB,,OFFSET FOR JOB MAP)
  5141	005312'01  201 04 0 00 000000#		MOVEI 4,JSLST-JSBPG
  5142	005313'01  260 17 0 00 005353'		CALL MSETP1		;CLEAR JOB MAP
  5143	005314'01  550 02 0 07 003330*		LOAD 2,FKPSB		;GET SPT INDEX OF PSB
  5144	005315'01  507 00 0 00 000002 		HRLS T2			; INTO LEFT HALF
  5145	005316'01  541 02 0 00 000000*		HRRI 2,PPLOW		;(SPT INDEX FOR PSB,,OFFSET FOR PROCESS MAP)
  5146	005317'01  400 01 0 00 000000 		SETZ 1,
  5147	005320'01  201 04 0 00 000000#		MOVEI 4,PPHI+1-PPLOW
  5148	005321'01  260 17 0 00 005353'		CALL MSETP1		;CLEAR ALL PAGES OF PROCESS MAP
  5149					   IFN EXTJSB,<
  5150						;Clear page-table for extended JSB
  5151						LOAD T1,FKJPT		;Get SPT index
  5152						CALL WTSPT		;Wait for it to be unshared
  5153						SETZ 1,			;Indicate we want the map cleared
  5154						LOAD T2,FKJPT		;Get SPT index
  5155						HRLZS T2		;Move to left half for PTN.PN
  5156						MOVEI 4,PGSIZ		;Do the whole map
  5157						CALL MSETP1		;Clear it
  5158					   >
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 129
SCHED	MAC	 7-Nov-88 20:50		HLTJB - Halt job

  5159
  5160	005322'01  550 01 0 07 005307*		LOAD 1,FKJSB		;SPT INDEX OF JSB
  5161	005323'01  260 17 0 00 005445'		CALL WTSPT		;WAIT FOR IT TO BE UNSHARED
  5162	005324'01  260 17 0 00 005440'		CALL WTFPGS		;WAIT FOR PSB AND UPT TO BE IN NO MAPS
  5163	005325'01  200 02 0 00 005274*		MOVE T2,JOBNO		;RELEASE JOB NUMBER
  5164	005326'01  402 00 0 02 000000*		SETZM JOBPNM(T2)	;[7113] CLEAR OUT OLD PROGRAM NAME
  5165	005327'01  332 00 0 00 004262*		ENTSKD			;ENTER SCHED
  5166	005330'01  260 17 0 00 000537'
  5167	005331'01  350 00 0 00 005327*
  5168	005332'01  254 07 0 00 000635*
  5169	005333'01  402 00 0 02 001020*		SETZM JOBDIR(T2)	;CLEAR DIRECTORY NUMBER
  5170	005334'01  476 00 0 02 004757*		SETOM JOBRT(T2)		;INDICATE JOB NUMBER NOT IN USE
  5171	005335'01  550 01 1 00 011146'		HRRZ T1,@[EP. JOBCLS(T2)]	;SAVE CLASS OF JOB
  5172	005336'01  271 02 0 00 005276*		ADDI T2,JOBPT
  5173	005337'01  250 02 0 00 001622*		EXCH T2,FREJOB		;PUT SLOT ON FREE LIST
  5174	005340'01  202 02 1 00 005337*		MOVEM T2,@FREJOB
  5175	005341'01  370 00 1 00 011147'		SOS @[EP. CLSCNT(T1)]		;ONE LESS JOB IN THIS CLASS
  5176	005342'01  200 02 0 00 005325*		MOVE T2,JOBNO		;GET THE JOB NUMBER
  5177	005343'01  312 02 0 00 004620*		CAME T2,MJBUSE		;WAS THIS THE HIGHEST JOB IN USE?
  5178	005344'01  254 00 0 00 005350'		IFSKP.
  5179	005345'01				DO.
  5180	005345'01  370 02 0 00 005343*		  SOS T2,MJBUSE		;YES. NO LONGER IN USE
  5181	005346'01  335 00 0 02 005334*		  SKIPGE JOBRT(T2) 	;PREVIOUS JOB IN USE?
  5182	005347'01  254 00 0 00 005345'		  LOOP.			;NO. DISCOUNT IT TOO
  5183	005350'01				OD.
  5184	005350'01				ENDIF.
  5185	005350'01  332 00 0 00 005242*		SKIPE CLASSF		;DOING CLASS SCHEDULING?
  5186	005351'01  260 17 0 00 005000'		CALL ADJCLS		;NOW UPDATE CLASS VALUES
  5187	005352'01  254 00 0 00 005377'		JRST HLTFK2		;FLUSH THIS LAST FORK
  5188
  5189					;LOCAL MSETPT - BUGCHK ON FAILURE
  5190
  5191	005353'01  260 17 0 00 000000*	MSETP1:	CALL MSETPT		;CLEAR ALL PAGES OF JOB MAP
  5192						 BUG.(CHK,MAPCLF,SCHED,SOFT,<Failed to clear maps when killing job>,,<
  5193					
  5194					Cause:	A call to MSETPT to clear the job map or process map for
  5195						the top fork of a job being killed has failed.
  5196					
  5197					Action:	Continue.
  5198	000012'04  000000  000000	>)
  5199	005354'01  256 00 0 00 011150'
  5200
  5201	005355'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 130
SCHED	MAC	 7-Nov-88 20:50		HLTJB - Halt job

  5202
  5203					;HLTJB CONTINUED..
  5204					;DEASSIGN OF JOB CONTROLLING FAILED
  5205
  5206	005356'01  627 01 0 00 400000 	HLTJB3:	TXZN T1,1B0		;FAILED. NEED TO WAIT?
  5207						BUG.(HLT,TTDAS1,SCHED,HARD,<HLTJB - Unable to deassign controlling terminal>,,<
  5208					
  5209					Cause:	The monitor is killing the last (top) fork in a job and is trying to
  5210						deassign the job's controlling terminal.  The attempt has failed for an
  5211						unexpected reason (one that will not be corrected if the fork waits a
  5212						while).  This indicates inconsistency in the monitor's data base.
  5213					
  5214	005357'01  256 00 0 00 011153'	>)
  5215
  5216	005360'01  261 17 0 00 000001 		UNLOKK DEVLKK		;YES. UNLOCK THE DEVICE LOCK
  5217	005361'01  261 17 0 00 000002 
  5218	005362'01  400 02 0 00 000000 
  5219	005363'01  200 01 0 00 011145'
  5220	005364'01  260 17 0 00 005270*
  5221	005365'01  262 17 0 00 000002 
  5222	005366'01  262 17 0 00 000001 
  5223	005367'01  256 00 0 00 005273*		OKINT			;LCKDVL WENT NOINT
  5224	005370'01  504 01 0 00 005275*		HRL T1,CTRLTT		;T1/(LINE NUMBER,,ADDRESS OF ROUTINE)
  5225	005371'01  265 16 0 00 000362'		MDISMS			;WAIT UNTIL DEALLOCATION IS POSSIBLE
  5226	005372'01  254 00 0 00 005256'		JRST HLTJB		; AND TRY AGAIN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 131
SCHED	MAC	 7-Nov-88 20:50		HLTJB - Halt job

  5227
  5228					;FINISH DELETE OF FORK
  5229
  5230	005373'01  332 00 0 00 005331*	HLTFK1::ENTSKD			;ENTER SCHEDULER
  5231	005374'01  260 17 0 00 000537'
  5232	005375'01  350 00 0 00 005373*
  5233	005376'01  254 07 0 00 005332*
  5234	005377'01  260 17 0 00 003142'	HLTFK2:	CALL REMBSJ		;REMOVE FORK FROM BAL SET
  5235	005400'01  260 17 0 00 003312'		CALL REMWSN		;REMOVE WS WO POSTPURGING
  5236	005401'01  260 17 0 00 004354'		CALL GLREM		;REMOVE FORK FROM GOLST
  5237	005402'01  260 17 0 00 001537*		CALL SETPSK		;Set to scheduler context
  5238	005403'01  550 01 0 07 005322*		LOAD 1,FKJSB		;JSB
  5239	005404'01  260 17 0 00 000000*		CALL GETSHR		;GET SHARE COUNT
  5240	005405'01  200 02 0 00 000001 		MOVE 2,1		;SAVE IT
  5241	005406'01  550 01 0 07 005403*		LOAD 1,FKJSB		;GET BACK JSB
  5242	005407'01  306 02 0 00 000001 		CAIN 2,1		;LAST USE OF JSB?
  5243	005410'01  254 00 0 00 005413'		IFSKP.
  5244	005411'01  260 17 0 00 000000*		  CALL DWNSHR		;NO. REDUCE SHARE COUNT
  5245	005412'01  254 00 0 00 005414'		ELSE.
  5246	005413'01  260 17 0 00 000000*		  CALL DESPT		;YES, DELETE IT (LOGOUT CASE)
  5247	005414'01				ENDIF.
  5248					   IFN EXTJSB,<
  5249						;Decrement share count/delete page table for extended JSB
  5250						LOAD T1,FKJPT		;Get SPTX for extended JSB PT
  5251						CALL GETSHR		;Get share count
  5252						MOVE T2,T1		;Save it
  5253						LOAD T1,FKJPT		;Get JSB PT SPTX again
  5254						CAIN T2,T1		;Last use of page table?
  5255						IFSKP.
  5256						  CALL DWNSHR		;No, merely reduce share count
  5257						ELSE.
  5258						  CALL DESPT		;Yes, delete page table
  5259						ENDIF.
  5260					   >
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 132
SCHED	MAC	 7-Nov-88 20:50		HLTJB - Halt job

  5261
  5262	005414'01  554 01 0 07 005314*		LOAD 1,FKUPT		;UPT
  5263	005415'01  260 17 0 00 005413*		CALL DESPT		;DELETE IT
  5264	005416'01  554 01 0 07 003332*		LOAD T1,FKPS2		;GET STACK I.D.
  5265	005417'01  260 17 0 00 005415*		CALL DESPT		;RELEASE IT AS WELL
  5266	005420'01  550 01 0 07 005414*		LOAD 1,FKPSB
  5267	005421'01  260 17 0 00 005417*		CALL DESPT		;DEASSIGN PSB
  5268	005422'01  476 00 0 00 005303*		SETOM FORKX
  5269	005423'01  201 01 0 07 004751*		MOVEI T1,FKPT(FX)
  5270	005424'01  250 01 0 00 001674*		EXCH T1,FREFK		;PUT FORK NUMBER ON FREE LIST
  5271	005425'01  661 01 0 00 400000 		TLO T1,400000
  5272	005426'01  202 01 1 00 005424*		MOVEM T1,@FREFK
  5273	005427'01  260 17 0 00 002555*		CALL FKGC		;CLEAN UP ALL PAGES OF FORK
  5274	005430'01  402 00 0 07 005420*		SETZM FKPGS(FX)		;ZERO FKPGS AS A FLAG OF NON ASSIGNED FORK
  5275	005431'01  550 01 0 07 005231*		LOAD 1,FKCSIZ		;MAKE SURE FORK CLEANED UP
  5276	005432'01  302 01 0 00 000000 		CAIE 1,0
  5277						BUG.(CHK,FRKNDL,SCHED,HARD,<HLTFRK - Fork not properly deleted>,,<
  5278					
  5279					Cause:	HLTFRK was called to complete the deletion process for a fork but
  5280						a check of FKCSIZ showed that not all pages belonging to this fork
  5281						have been deleted. This indicates an inconsistency in the monitor's
  5282						data base.
  5283					
  5284					Action:	Contine deletion process
  5285					
  5286	000013'04  000000  000000	>)
  5287	005433'01  256 00 0 00 011155'
  5288
  5289	005434'01  260 17 0 00 001052'		CALL RDSIVL		;GET TIME SINCE ENTSKD
  5290	005435'01  231 01 0 00 005126*		IDIVI T1,NTMS		;CONVERT TO MS
  5291	005436'01  272 01 0 00 004560*		ADDM T1,USRTIM		;ACCUMULATE TOTAL USER TIME
  5292	005437'01  254 00 0 00 001063'		JRST SCHED0		;NOW THERE IS NOTHING LEFT OF JOB...
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 133
SCHED	MAC	 7-Nov-88 20:50		HLTJB - Halt job

  5293
  5294					;WAIT FOR PSB AND UPT TO HAVE SHARE COUNT OF 1
  5295
  5296	005440'01  550 01 0 07 005430*	WTFPGS::LOAD 1,FKPSB		;PSB
  5297	005441'01  260 17 0 00 005445'		CALL WTSPT
  5298	005442'01  554 01 0 07 005416*		LOAD T1,FKPS2		;GET STACK PAGE
  5299	005443'01  260 17 0 00 005445'		CALL WTSPT		;WAIT FOR THIS AS WELL
  5300	005444'01  554 01 0 07 005440*		LOAD 1,FKUPT		;UPT
  5301						;CALLRET WTSPT
  5302
  5303					;WAIT FOR SPECIFIED SPT TO HAVE SHARE COUNT OF 1
  5304					; T1/ SPT INDEX
  5305					;	CALL WTSPT
  5306					;RETURN +1: ALWAYS, COUNT NOW 1
  5307
  5308	005445'01  265 16 0 00 004415*	WTSPT::	SAVEAC <T4>
  5309	005446'01  200 02 0 00 000001 	WTSPT2:	MOVE 2,1		;SAVE 1 SINCE WTSPTT CLOBBERS IT
  5310	005447'01  260 17 0 00 005460'		CALL WTSPTT		;(T1,FX)
  5311	005450'01  604 00 0 00 000000 		IFNSK.
  5312	005451'01  254 00 0 00 005457'
  5313	005452'01  205 01 0 02 000000 		  MOVSI 1,0(2)
  5314	005453'01  541 01 0 00 005460'		  HRRI 1,WTSPTT
  5315	005454'01  265 16 0 00 000362'		  MDISMS
  5316	005455'01  554 01 0 00 000001 		  HLRZ 1,1
  5317	005456'01  254 00 0 00 005446'		  JRST WTSPT2
  5318	005457'01				ENDIF.
  5319	005457'01  263 17 0 00 000000 		RET
  5320
  5321	005460'01  260 17 0 00 005404*	WTSPTT::CALL GETSHR		;GET SHARE COUNT
  5322	005461'01  302 01 0 00 000001 		CAIE 1,1
  5323	005462'01  263 17 0 00 000000 		RET
  5324	005463'01  254 00 0 00 004445*		RETSKP
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 134
SCHED	MAC	 7-Nov-88 20:50		Fork initialization

  5325						SUBTTL Fork initialization
  5326
  5327					;Here when NEWFK% was set in FKINT. Initialize the fork. If this is the top
  5328					;fork in a newly-created job, NEWJB% is set, too.
  5329
  5330	005464'01  200 01 0 00 010150'	FKSET:	MOVE 1,UPP		;GET USUAL MON STACK
  5331	005465'01  202 01 0 00 000000#		MOVEM 1,PIAC+P		;PUT IN AC17
  5332	005466'01  200 01 0 00 011160'		MOVE T1,[IOWD NPSIPG*PGSIZ,PSIPGA] ;SET UP STACK POINTER
  5333	005467'01  202 01 0 00 000000*		MOVEM 1,PSIPT		;PSI STORAGE STACK
  5334	005470'01  201 01 0 00 000000#		MOVEI 1,<UACB>B39-1	;SETUP AC BASE
  5335	005471'01  202 01 0 00 000000*		MOVEM 1,ACBAS
  5336	005472'01  260 17 0 00 000000*		CALL FKSETK		;SETUP HWPT STUFF
  5337	005473'01  205 01 0 00 600000 		MOVX T1,<NOP>
  5338	005474'01  202 01 0 00 000000*		MOVEM T1,FRKNOP
  5339	005475'01  200 01 0 00 007070'		MOVE 1,INTDF0		;INTERRUPT SWITCHES
  5340	005476'01  202 01 0 00 005367*		MOVEM 1,INTDFF
  5341	005477'01  200 01 0 00 007066'		MOVE 1,MJRST0
  5342	005500'01  202 01 0 00 000050*		MOVEM 1,MJRSTF
  5343	005501'01  200 01 0 00 011161'		MOVX T1,MONENV		;INITIALIZE XPCW BLOCK USED BY PSI SERVICE
  5344	005502'01  202 01 0 00 000000#		MOVEM T1,PIPC+1		;NEW FLAGS WORD
  5345	005503'01  415 01 0 00 007072'		XMOVEI 1,PSISV1
  5346	005504'01  202 01 0 00 000000#		MOVEM 1,PIPC+2		;NEW PC WORD
  5347	005505'01  402 00 0 00 003426*		SETZM NSKED
  5348	005506'01  402 00 0 00 003430*		SETZM CRSKED
  5349	005507'01  402 00 0 00 000000*		SETZM SNPPGS		;INITIALIZE SNOOP BREAK POINTS
  5350	005510'01  402 00 0 00 000000*		SETZM SNPLST		;  NONE TO START WITH
  5351	005511'01  476 00 0 00 000000*		SETOM PSISYS		;INIT PI SYSTEM OFF
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 135
SCHED	MAC	 7-Nov-88 20:50		Fork initialization

  5352
  5353					IFN <FTKLIPA>,<
  5354	005512'01  476 00 0 00 000000*		SETOM SCSPS0		;Init SCS% PSI channels as off
  5355	005513'01  476 00 0 00 000000*		SETOM SCSPS1		;.	.	.
  5356
  5357	005514'01  402 00 0 00 000000*		SETZM SCSTMQ		;Zero top of message queue
  5358	005515'01  415 01 0 00 005514*		XMOVEI T1,SCSTMQ	;Get a pointer to the top of the queue
  5359	005516'01  202 01 0 00 000000*		MOVEM T1,SCSBMQ		;Init tail as pointer to head
  5360
  5361	005517'01  402 00 0 00 000000*		SETZM SCSTDQ		;Zero top of datagram queue
  5362	005520'01  415 01 0 00 005517*		XMOVEI T1,SCSTDQ	;Get a pointer to the top of the queue
  5363	005521'01  202 01 0 00 000000*		MOVEM T1,SCSBDQ		;Init tail as pointer to head
  5364
  5365	005522'01  402 00 0 00 000000*		SETZM SCSTEQ		;Zero top of event queue
  5366	005523'01  415 01 0 00 005522*		XMOVEI T1,SCSTEQ	;Get a pointer to the top of the queue
  5367	005524'01  202 01 0 00 000000*		MOVEM T1,SCSBEQ		;Init tail as pointer to head
  5368
  5369	005525'01  402 00 0 00 000000*		SETZM SCSTXQ		;Zero top of DMA queue
  5370	005526'01  415 01 0 00 005525*		XMOVEI T1,SCSTXQ	;Get a pointer to the top of the queue
  5371	005527'01  202 01 0 00 000000*		MOVEM T1,SCSBXQ		;Init tail as pointer to head
  5372
  5373	005530'01  402 00 0 00 000000*		SETZM SCSTCQ		;Zero top of CB queue
  5374	005531'01  415 01 0 00 005530*		XMOVEI T1,SCSTCQ	;Get a pointer to the top of the queue
  5375	005532'01  202 01 0 00 000000*		MOVEM T1,SCSBCQ		;Init tail as pointer to head
  5376					>;End IFN <FTKLIPA>
  5377
  5378	005533'01  200 01 0 00 000223'		MOVE 1,RSKEDN
  5379	005534'01  202 01 0 00 000346*		MOVEM 1,RSKED
  5380	005535'01  205 01 0 00 202040 		MOVSI 1,<MOVEM 1,0>B53
  5381	005536'01  202 01 0 00 000000*		MOVEM 1,PATU40		;SETUP INSTRUCTION PART FOR COMPAT
  5382	005537'01  202 01 0 00 000000*		MOVEM 1,PATUPC		;ENTRY PROCEDURE
  5383	005540'01  202 01 0 00 000000*		MOVEM 1,DMSU40		;SET UP FOR DMS CALLS
  5384	005541'01  202 01 0 00 000000*		MOVEM 1,DMSUPC
  5385	005542'01  476 00 0 00 000547*		SETOM SLOWF
  5386	005543'01  476 00 0 00 000555*		SETOM INTDF
  5387	005544'01  476 00 0 00 000000*		SETOM TRAPC
  5388	005545'01  200 01 0 00 000000*		MOVE 1,NPMAX		;INIT LOCAL NPMAX TO SYSTEM NPMAX
  5389	005546'01  202 01 0 00 000000*		MOVEM 1,FNPMAX
  5390	005547'01  476 00 0 00 000000*		SETOM FKTAB
  5391	005550'01  201 01 0 00 000000#		MOVEI 1,FKTAB+1
  5392	005551'01  505 01 0 01 777777 		HRLI 1,-1(1)
  5393	005552'01  251 01 0 00 000000#		BLT 1,FKTAB+NLFKS/2-1
  5394	005553'01  402 00 0 00 000000*		SETZM JTTRW		; Clear JSYS trap word
  5395	005554'01  513 00 0 00 000000*		SETZRO JTFRK		; Clear trapped fork
  5396	005555'01  201 01 0 00 007777 		MOVEI T1,7777		; We haven't interrupted anyone yet
  5397	005556'01  542 01 0 00 000000*		STOR T1,JTMNI		; ...
  5398	005557'01  201 01 0 00 000077 		MOVEI T1,77		; And we don't want to be interrupted
  5399	005560'01  137 01 0 00 011162'		STOR T1,JTMCN
  5400	005561'01  200 01 0 00 011163'		MOVE T1,[IFIW!FKJTB]	; Put under top fork's environment
  5401	005562'01  202 01 0 00 000000*		MOVEM T1,JTBLK		;  until CFROK can update to FKJTB+forkn
  5402	005563'01  476 00 0 00 000000*		SETOM JTLCK		; Clear lock
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 136
SCHED	MAC	 7-Nov-88 20:50		Fork initialization

  5403
  5404	005564'01  200 07 0 00 005422*		MOVE FX,FORKX
  5405	005565'01  350 00 0 00 005543*		NOINT			;FORK MUST BE NOINT DURING PAGE CREATION
  5406	005566'01  260 17 0 00 000000*		CALL FKSETP		;SETUP PSB AND UPT POINTERS
  5407	005567'01  201 01 0 00 000000*		MOVEI T1,NPSIPG		;MUST CREATE ALL PI PAGES
  5408	005570'01  201 02 0 00 000000*		MOVEI T2,PSIPGA		;THE FIRST ONE
  5409	005571'01			      DO.
  5410	005571'01  402 00 0 02 000000 		SETZM 0(T2)		;CREATE THIS ONE
  5411	005572'01  271 02 0 00 001000 		ADDI T2,PGSIZ		;NEXT PAGE
  5412	005573'01  367 01 0 00 005571'		SOJG T1,TOP.		;DO ALL OF THEM
  5413	005574'01			      ENDDO.
  5414	005574'01  256 00 0 00 005476*		OKINT			;MAKE INTDF LOOK NORMAL AGAIN
  5415	005575'01  554 01 0 07 005406*		LOAD 1,FKJBN		;GET JOB NUMBER
  5416	005576'01  202 01 0 00 005342*		MOVEM 1,JOBNO
  5417	005577'01  200 06 0 00 001122*		MOVE 6,PIMSK		;GET REQUEST BITS
  5418
  5419					;See if this is part of job creation. If yes, go initialize the job.
  5420
  5421	005600'01  603 06 0 00 040000 		TXNE 6,NEWJB%		;NEW JOB TOO?
  5422	005601'01  254 00 0 00 005612'		JRST FKSET1		;YES
  5423	005602'01  550 01 0 07 005575*		LOAD 1,FKJSB		;GET JSB
  5424	005603'01  260 17 0 00 000000*		CALL UPSHR		;BUMP SHARE COUNT
  5425					   IFN EXTJSB,<
  5426						LOAD T1,FKJPT		;Get SPT slot for PT of extended JSB
  5427						CALL UPSHR		;Bump share count on page table
  5428					   >
  5429	005604'01  415 01 0 00 005652'		XMOVEI 1,FKSET2
  5430	005605'01  202 01 0 00 000000*	FKSET3:	MOVEM 1,PIPC
  5431	005606'01  200 01 0 00 011164'		MOVX T1,MONENV		;GET AC BLOCK DEFINITION FOR MONITOR MODE
  5432	005607'01  202 01 0 00 001124*		MOVEM T1,PIFL		;MAKE THIS BE THE OLD FLAGS WORD FOR INTERRUPT
  5433	005610'01  402 00 0 00 000000*		SETZM PIOLDS
  5434	005611'01  254 00 0 00 005726'		JRST PIRQR		;DEBREAK - RUN IN NORMAL MODE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 137
SCHED	MAC	 7-Nov-88 20:50		Fork initialization

  5435
  5436					;INIT NEW JOB
  5437
  5438					;Here when NEWJB% was set in PIMSK during fork initialization.
  5439					;FKSET was called because NEWFK% was set, too.
  5440
  5441	005612'01  571 02 0 06 000000 	FKSET1:	HRREI T2,0(6)		;GET NUMBER OF CONTROLLING TTY, IF ANY
  5442	005613'01  200 01 0 00 005576*		MOVE T1,JOBNO
  5443	005614'01  506 02 0 01 005336*		STOR T2,JBTTY,(T1)	;TTY ASSIGNED TO JOB
  5444	005615'01  261 17 0 00 000001 	FKSE01:	PUSH P,T1		;SAVE JOB NUMBER
  5445	005616'01  200 01 0 00 005564*		MOVE T1,FORKX		;SET FORKX INTO THIS TTY'S PSI DESTINATION
  5446	005617'01  331 00 0 00 000002 		SKIPL T2		;IF THERE IS A TTY,
  5447	005620'01  260 17 0 00 000000*		CALL STTOPF		; PUT IN THE FORKX
  5448	005621'01  262 17 0 00 000001 		POP P,T1		;RESTORE JOB NUMBER
  5449	005622'01  550 02 1 00 011165'		HRRZ T2,@[EP. JOBCLS(1)]	;GET CLASS OF THIS JOB
  5450	005623'01  200 01 0 00 000002 		MOVE T1,T2		;GET CLASS
  5451	005624'01  332 00 0 00 005350*		SKIPE CLASSF		;IF DOING CLASS SCHEDULING, ADJUST
  5452	005625'01  260 17 0 00 005000'		CALL ADJCLS		;AND SET UP PARAMETERS
  5453	005626'01  260 17 0 00 000000*		CALL LGTAD		;GET CURRENT TIME
  5454	005627'01  202 01 0 00 000000*		MOVEM T1,SRTTIM		;REMEMBER TIME JOB STARTED (MAYBE -1)
  5455	005630'01  211 01 0 00 000001 		MOVNI T1,1		;INITIALLY SET CONTROLLING TERMINALS TO -1
  5456	005631'01  205 02 0 00 000000#		MOVSI T2,-NUFKS		;DO FOR ALL FORKS
  5457	005632'01  542 01 0 02 000000*	ICTTY:	STOR T1,FRKTTY,(T2)
  5458	005633'01  253 02 0 00 005632'		AOBJN T2,ICTTY		;LOOP FOR ALL FORK SLOTS
  5459	005634'01  200 01 0 00 005613*		MOVE T1,JOBNO
  5460	005635'01  574 02 0 01 005614*		HLRE T2,JOBPT(T1)	;CONTROLLING TTY, IF ANY, -1 IF NONE
  5461	005636'01  202 02 0 00 005370*		MOVEM T2,CTRLTT		;IN JSB
  5462	005637'01  550 01 0 07 005602*		LOAD T1,FKJSB		;GET JSB IDENT
  5463	005640'01  200 02 0 00 000000*		MOVE T2,SHRPTR		;CONSTRUCT JSB MAPPING
  5464	005641'01  542 01 0 00 000002 		STOR T1,SPTX,T2
  5465	005642'01  202 02 0 00 000000#		MOVEM T2,JOBM0+JSBPG
  5466	005643'01  402 00 1 00 005562*		SETZM @JTBLK		; No jsys traps for top fork
  5467	005644'01  201 01 0 00 000000*		MOVEI T1,DCOPNM		;DEFAULT MAX DECNET LINKS
  5468	005645'01  506 01 0 00 000000*		STOR T1,DCMAX		;TO THE JSB
  5469	005646'01  201 01 0 00 000000*		MOVEI T1,ATJBMX		;MAXIMUM HTN'S FOR A JOB
  5470	005647'01  506 01 0 00 000000*		STOR T1,JSAMX		;STORE IN JSB
  5471	005650'01  415 01 0 00 000000*		XMOVEI T1,EXEC0		;RUN AT EXEC0
  5472	005651'01  254 00 0 00 005605'		JRST FKSET3
  5473
  5474					;Here when PSI processing is complete. FKSET stored this location in FPC,
  5475					;and process is continued here after the interrupt.
  5476
  5477	005652'01  256 04 0 00 011166'	FKSET2:	XCTU [SETZM 0]		;CLEAR USER AC'S
  5478	005653'01  201 16 0 00 000001 		MOVEI CX,1
  5479	005654'01  256 05 0 00 011167'		XBLTUU [BLT CX,17]
  5480	005655'01  332 00 0 00 005375*		ENTSKD
  5481	005656'01  260 17 0 00 000537'
  5482	005657'01  350 00 0 00 005655*
  5483	005660'01  254 07 0 00 005376*
  5484	005661'01  402 00 0 00 000634*		SETZM PPC		;SET PC 0
  5485	005662'01  200 01 0 00 011170'		MOVX 1,USRCTX		;SET USER MODE CONTEXT
  5486	005663'01  202 01 0 00 001126*		MOVEM 1,PFL
  5487	005664'01  201 01 0 00 000307'		MOVEI 1,HALTT
  5488	005665'01  254 00 0 00 000372'		JRST DISMSE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 138
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5489						SUBTTL Software Interrupt Service
  5490
  5491	005666'01  000547  500000	CHNSON::EXP 1B9+1B11+1B12+1B15+1B16+1B17+1B18+1B20 ;ALWAYS ON PSI CHANS
  5492
  5493					;SCHEDULER CAUSES JOB TO BE STARTED HERE ON PI REQUEST
  5494					;SAVED PC IN PIPC, FLAGS IN PIFL
  5495					;PIMSK CONTAINS INTERRUPT REQUEST WORD
  5496
  5497					;Here from main scheduler loop if FKINT indicates interrupt is pending
  5498					;(bit FKPSI1 is on).
  5499					;PCU is set so that previous context references go to user
  5500					;FKINT has been copied to PIMSK
  5501
  5502	005667'01  202 17 0 00 000000#	PIRQ:	MOVEM P,PIAC+17
  5503	005670'01  201 17 0 00 000000*		MOVEI P,PIAC		;SAVE USER AC'S
  5504	005671'01  251 17 0 00 000000#		BLT P,PIAC+16
  5505	005672'01  200 17 0 00 006011'		MOVE P,PIPDL		;SET UP LOCAL STACK
  5506	005673'01  200 11 0 00 000000*		MOVE P2,TRAPFL
  5507	005674'01  200 12 0 00 000534*		MOVE P3,KIMUFL
  5508	005675'01  200 13 0 00 000000*		MOVE P4,TRAPPC		;SAVE IMMEDIATELY VULNERABLE CELLS
  5509	005676'01  200 14 0 00 000000*		MOVE P5,KIMUPC
  5510	005677'01  200 15 0 00 000530*		MOVE P6,KIMUEF
  5511	005700'01  200 07 0 00 005577*		MOVE FX,PIMSK		;INTERRUPT REQUEST WORD
  5512	005701'01  200 06 0 00 005616*		MOVE Q2,FORKX
  5513
  5514					;Save wait state at time of interrupt
  5515
  5516	005702'01  400 02 0 00 000000 		SETZ T2,
  5517	005703'01  603 07 0 00 001000 		TXNE FX,PSIWT%		;WAS FORK IN WAIT STATUS?
  5518	005704'01  200 02 0 06 005132*		LOAD T2,FKSTX,(Q2)	;YES, GET OLD STATUS
  5519	005705'01  202 02 0 00 005610*		MOVEM T2,PIOLDS		;SAVE OLD STATUS, OR 0 IF WAS RUNNING
  5520	005706'01  400 02 0 00 000000 		SETZ T2,
  5521	005707'01  623 07 0 00 001000 		TXZE FX,PSIWT%		;WAS FORK IN WAIT STATUS
  5522	005710'01  200 02 0 06 004442*		LOAD T2,FKST2,(Q2)	;YES GET OLD STATUS
  5523	005711'01  202 02 0 00 000000*		MOVEM T2,PIOLD2		;SAVE OLD STATUS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 139
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5524
  5525					;Determine reason for interrupt and go handle some cases.
  5526
  5527	005712'01  623 07 0 00 100000 		TXZE FX,NEWFK%		;START NEW FORK?
  5528	005713'01  254 00 0 00 005464'		JRST FKSET		;YES
  5529	005714'01  623 07 0 00 010000 		TXZE FX,PSIT1%
  5530	005715'01  254 00 0 00 006117'		JRST PSIT1		;TERMINAL, PHASE 1
  5531	005716'01  623 07 0 00 004000 		TXZE FX,PSIT2%
  5532	005717'01  254 00 0 00 006227'		JRST PSIT2		;TERMINAL, PHASE 2
  5533	005720'01  623 07 0 00 000004 		TXZE FX,PSITL%		;TIME LIMIT EXCEEDED INTERRUPT?
  5534	005721'01  254 00 0 00 006236'		JRST TLEINT		;YES, GO INTERRUPT THE FORK
  5535	005722'01  622 07 0 00 400000 		TXZE FX,PSIPRI		;SET PRIORITY WORD?
  5536	005723'01  254 00 0 00 006253'		JRST PRISET		;YES. GO FIX UP DATA BASE
  5537
  5538	005724'01  612 07 0 00 011171'	PSITR1::TXNE FX,PSIIF%+SUSFK%+PSILO%+PSICO%+PSIJT%+ADRBK%+PSIDP%+PSISC%
  5539	005725'01  254 00 0 00 006504'		JRST PSII		;CHANNEL INTERRUPT SPEC. BY FKINTB -
  5540									; PSIIF%, PSIJT%.
  5541									;Interrupt superior - ADRBK%.
  5542									;Special request - SUSFK%.
  5543									;Dispatch to action procedure -
  5544									; PSILO%, PSICO%, PSIDP%
  5545									;Call special SCS% routine
  5546									; PSISC%
  5547						;..
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 140
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5548					;Here to finish the interrupt.
  5549					;Restore data as before the interrupt and allow rescheduling.
  5550
  5551						;..
  5552	005726'01  260 17 0 00 005745'	PIRQR:	CALL UNPIR		;LEAVE PI STATE
  5553	005727'01  336 01 0 00 005705*	PSIDF1:	SKIPN 1,PIOLDS		;WAS RUNNING BEFORE PSI?
  5554	005730'01  254 00 0 00 001063'		JRST SCHED0		;YES
  5555	005731'01  302 01 0 00 004206*		CAIE 1,TRMTS1		;WAITING FOR ARBITRARY FORK TERM?
  5556	005732'01  254 00 0 00 005741'		JRST PSIDF2		;NO, RETURN TO WAIT STATE
  5557	005733'01  402 00 0 00 005727*		SETZM PIOLDS		;CLEAR OLD STATE
  5558	005734'01  415 01 0 00 000000*		XMOVEI 1,WFORKA		;GO BACK INTO JSYS TO DO TEST
  5559	005735'01  202 01 0 00 005661*		MOVEM 1,PPC		; AND MAKE THIS THE PC
  5560	005736'01  200 01 0 00 011172'		MOVX T1,MONENV		;SET UP AC BLOCKS FOR MONITOR MODE
  5561	005737'01  202 01 0 00 005663*		MOVEM T1,PFL		; AND MAKE THIS THE NEW FLAGS
  5562	005740'01  254 00 0 00 001063'		JRST SCHED0		;GO RESCHEDULE THIS PROCESS
  5563
  5564	005741'01  200 02 0 00 005711*	PSIDF2:	MOVE T2,PIOLD2		;GET THE OLD FKSTA2 WORD
  5565	005742'01  202 02 0 07 005710*		STOR T2,FKST2,(FX)	;AND RESTORE IT
  5566	005743'01  254 00 0 00 000372'		JRST DISMSE		;AND GO DISMISS
  5567
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 141
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5568
  5569					;LEAVE PSI CONTEXT.  RETURN THROUGH SCHEDULER
  5570					;Leaves with P pointing to SKDPDL
  5571					;Caller set up PIFL and PIPC to point to where process should start running.
  5572					;PIOLDS contains 0 if process is runnable.
  5573
  5574	005744'01  634 01 0 00 000001 	UNPIRN:	TDZA T1,T1		;DON'T REQUEUE IF BUMPED
  5575	005745'01  201 01 0 00 000001 	UNPIR:	MOVEI T1,1		;CONDITIONAL REQUEUE IF BUMPED
  5576	005746'01  350 00 0 00 005657*		AOS INSKED		;ENTER SCHEDULER
  5577	005747'01  262 17 0 00 000016 		POP P,CX		;GET LOCAL RETURN
  5578	005750'01  200 17 0 00 001235'		MOVE P,PI7P		;SETUP SCHED STACK
  5579	005751'01  261 17 0 00 000016 		PUSH P,CX		;PUT LOCAL RETURN ON IT
  5580	005752'01  261 17 0 00 000001 		PUSH P,T1		;SAVE ENTRY FLAG ON STACK
  5581	005753'01  202 11 0 00 005673*		MOVEM P2,TRAPFL
  5582	005754'01  202 12 0 00 005674*		MOVEM P3,KIMUFL
  5583	005755'01  202 13 0 00 005675*		MOVEM P4,TRAPPC		;RESTORE VULNERABLE CELLS
  5584	005756'01  202 14 0 00 005676*		MOVEM P5,KIMUPC
  5585	005757'01  202 15 0 00 005677*		MOVEM P6,KIMUEF
  5586	005760'01  200 01 0 00 011173'		MOVE 1,[XWD PIAC,PAC]
  5587	005761'01  251 01 0 00 000000#		BLT 1,PAC+17		;PUT AC'S BACK
  5588	005762'01  265 07 0 00 000513*		JSP FX,KISSAV		;SAVE APR-DEPENDENT STUFF
  5589	005763'01  200 01 0 00 005607*		MOVE 1,PIFL
  5590	005764'01  202 01 0 00 005737*		MOVEM 1,PFL
  5591	005765'01  200 01 0 00 005605*		MOVE 1,PIPC
  5592	005766'01  202 01 0 00 005735*		MOVEM 1,PPC
  5593	005767'01  200 07 0 00 005701*		MOVE FX,FORKX
  5594	005770'01  200 16 0 07 004031*		TMNN FKPS1,(FX)		;INTERRUPT IN PROGRESS?
  5595	005771'01  607 16 0 00 200000 
  5596						BUG.(CHK,UNPIRX,SCHED,HARD,<UNPIR - No PSI in progress>,,<
  5597					
  5598					Cause:	UNPIR was called to leave PSI context but there was no PSI in
  5599						progress.
  5600					
  5601					Action:	Continue.
  5602					
  5603	000014'04  000000  000000	>)
  5604	005772'01  256 00 0 00 011174'
  5605
  5606	005773'01  205 16 0 00 200000 		SETZRO FKPS1,(FX)	;YES. CLEAR IT
  5607	005774'01  412 16 0 07 005770*
  5608						JE PIBMP,,[POP P,0(P)	;CLEAN UP THE STACK
  5609	005775'01  200 16 0 07 004525*			   RET]		;AND DONE
  5610	005776'01  607 16 0 00 200000 
  5611	005777'01  254 00 0 00 011177'
  5612	006000'01  205 16 0 00 200000 		SETZRO PIBMP		;CLEAR BUMPING
  5613	006001'01  412 16 0 07 005775*
  5614	006002'01  262 17 0 00 000016 		POP P,CX		;GET BACK ENTFLG
  5615	006003'01  332 00 0 00 000016 		SKIPE CX		;REQUEUEING WANTED?
  5616	006004'01  332 00 0 00 005733*		SKIPE PIOLDS		;YES. CONTINUE AS RUNNABLE?
  5617	006005'01  263 17 0 00 000000 		RET			;NO. DONE THEN
  5618	006006'01  265 16 0 00 001572*		SAVET			;YES. SAVE ALL REGS
  5619	006007'01  260 17 0 00 004354'		CALL GLREM		;REMOVE FROM GOLST
  5620	006010'01  254 00 0 00 004302'		CALLRET GOCONC		;AND DONE
  5621
  5622	006011'01  000000#  000000#	PIPDL:	IOWD NPIPDL,PIPDB	;INTERRUPT ROUTINES LOCAL PDL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 141-1
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5623
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 142
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5624					;REQUEST PSEUDO INTERRUPT
  5625
  5626					;IIC TO SELF - FOR MONITOR INTERNAL USE.  FASTER THAN IIC AND DOES
  5627					;NOT REQUIRE PROCESS TO BE ABLE TO SET FKLOCK.
  5628					; 1/ CHANNEL MASK
  5629					;	CALL IICSLF
  5630					; RETURN +1 ALWAYS
  5631
  5632					;PSIRQ0 - SAME AS IICSLF EXCEPT TAKES CHANNEL NUMBER IN 1 RATHER THAN MASK
  5633
  5634	006012'01  200 01 0 01 004443*	PSIRQ0::MOVE 1,BITS(1)		;GET MASK FOR CHANNEL
  5635	006013'01  616 01 0 00 000000*	IICSLF::TDNN 1,PSICHM		;SEE IF INTERRUPT WILL BE TAKEN
  5636	006014'01  612 01 0 00 005666'		TDNE 1,CHNSON
  5637	006015'01  254 00 0 00 006020'		JRST IICSL1		;YES
  5638	006016'01  616 01 0 00 000000*		TDNN 1,SUPCHN
  5639	006017'01  263 17 0 00 000000 		RET			;NO, DON'T SEND IT
  5640	006020'01  350 00 0 00 005565*	IICSL1:	NOINT
  5641	006021'01  200 02 0 00 005767*		MOVE 2,FORKX
  5642	006022'01  260 17 0 00 006027'		CALL PSIRQB		;REQUEST THE INTERRUPT
  5643	006023'01  256 00 0 00 005574*		OKINT
  5644	006024'01  260 17 0 00 000325'		CHKINT			;GET IT PROCESSED IF POSSIBLE
  5645	006025'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 143
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5646
  5647					;GENERAL PSI REQUEST HANDLER
  5648					; 1/ CHANNEL MASK FOR PSIRQB, CHANNEL NUMBER FOR PSIRQ
  5649					; 2/ FORK INDEX
  5650					;	CALL ...
  5651					; RETURN +1 ALWAYS
  5652
  5653					;VARIENTS:
  5654					; PSITQ - CHANNEL BITS ALREADY SET, JUST REQUEST CHECK
  5655					; PSIGR - T1/ MASK FOR OTHER REQUESTS
  5656
  5657	006026'01  200 01 0 01 006012*	PSIRQ::	MOVE 1,BITS(1)
  5658	006027'01  553 00 0 00 000002 	PSIRQB::HRRZS 2
  5659	006030'01  265 16 0 00 004062*		EA.ENT
  5660	006031'01  436 01 0 02 001716*		OPSTRM <IORM 1,>,FKIBX,(2);SET BIT IN INTERRUPT WAITING BUFFER
  5661	006032'01  205 01 0 00 020000 	PSITQ:	MOVX T1,PSIIF%		;REGULAR INTERRUPT FLAGS
  5662	006033'01  661 01 0 00 400000 	PSIGR::	TXO T1,FKPSI0
  5663	006034'01  436 01 0 02 005774*		OPSTRM <IORM 1,>,FKINX,(2)
  5664	006035'01  316 02 0 00 006021*		CAMN 2,FORKX		;FOR THIS FORK?
  5665	006036'01  263 17 0 00 000000 		RET			;YES
  5666	006037'01  7 004 34 0 00 077400 PSIR4::	CONSO PI,177B27		;AT PI LEVEL ?
  5667	006040'01  265 16 0 00 000310'		NOSKD1			;NO. KEEP SCHEDULER OUT.
  5668	006041'01  261 17 0 00 000007 		PUSH P,FX
  5669	006042'01  201 07 0 02 000000 		MOVEI FX,0(2)
  5670	006043'01  200 16 0 07 006034*		JN FKPS1,(FX),PSIR61	;IF NOT INTERRUPT, DON'T DO THIS
  5671	006044'01  603 16 0 00 200000 
  5672	006045'01  254 00 0 00 006057'
  5673	006046'01  200 16 0 07 005247*		IFQN. FKBLK,
  5674	006047'01  607 16 0 00 200000 
  5675	006050'01  254 00 0 00 006054'
  5676	006051'01  205 16 0 00 001000 		  SETONE FKIWT,(FX)	;SET WAKE FLAG
  5677	006052'01  436 16 0 07 006043*
  5678	006053'01  260 17 0 00 004100'		  CALL UNBLK1		;WAKE UP THE FORK
  5679	006054'01				ENDIF.
  5680	006054'01  261 17 0 00 000003 		PUSH P,3
  5681	006055'01  260 17 0 00 005245'		CALL PSBUMP		;NO, GIVE FORK 'BUMP' TO GET PSI HANDLED
  5682	006056'01  262 17 0 00 000003 		POP P,3
  5683	006057'01  201 02 0 07 000000 	PSIR61:	MOVEI 2,0(FX)
  5684	006060'01  262 17 0 00 000007 		POP P,FX
  5685	006061'01  7 004 34 0 00 077400 	CONSO PI,177B27		;AT PI LEVEL ?
  5686	006062'01  265 16 0 00 000315'		OKSKD1			;NO. ALLOW SCHEDULER TO RUN
  5687	006063'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 144
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5688
  5689					;TERMINAL INTERRUPT
  5690					;PHASE ONE - CALLED FROM TERM SERVICE ROUTINES
  5691					; 2/ LINE NO.,   3/ INTERRUPT CODE
  5692					;SEND TO TOP FORK TO FIND PROPER DESTINATION
  5693
  5694	006064'01  261 17 0 00 000003 	TTPSRQ::PUSH P,T3		;SAVE INTERRUPT CODE
  5695	006065'01  260 17 0 00 000000*		CALL GTCJOB		;GET CONTROLLING JOB
  5696					TTPSRX:	 JRST [	POP P,T3	;NONE (SHOULDN'T HAPPEN)
  5697	006066'01  254 00 0 00 011201'			RET]
  5698	006067'01  306 03 0 00 777777 		CAIN T3,-1		;IS THERE A CONTROLLING JOB?
  5699	006070'01  254 00 0 00 006066'		JRST TTPSRX		;NO. SHOULDN'T HAPPEN
  5700					IFN STANSW,<
  5701	006071'01  335 00 0 03 005346*		SKIPGE JOBRT(T3)	;DOES JOB REALLY EXIST?
  5702	006072'01  254 00 0 00 006112'		 JRST TTPSER		;NO.  SET JOB AND FORK INVALID
  5703					>;IFN STANSW
  5704	006073'01  554 04 0 03 005635*		HLRZ T4,JOBPT(T3)	;GET THE JOB'S CONTROLLING LINE
  5705	006074'01  302 04 0 02 000000 		CAIE T4,0(T2)		;IS IT THIS LINE?
  5706	006075'01  254 00 0 00 006103'		JRST TTPSR2		;NO, LOOK ELSEWHERE IN THAT JOB
  5707	006076'01  550 02 0 03 006073*		HRRZ 2,JOBPT(3)		;GET INDEX OF TOP FORK
  5708	006077'01  262 17 0 00 000003 	TTPSR1:	POP P,T3		;RESTORE INTERRUPT CODE
  5709	006100'01  137 03 0 00 011203'		STOR T3,TRMCD,(T2)	;INTERRUPT CODE
  5710	006101'01  205 01 0 00 010000 		MOVX T1,PSIT1%		;PHASE ONE REQUEST
  5711	006102'01  254 00 0 00 006033'		CALLRET PSIGR
  5712
  5713	006103'01  260 17 0 00 000000*	TTPSR2:	CALL GTTOPF		;GET TOP FORK OF TTY'S CTTY GROUP
  5714	006104'01  254 00 0 00 006066'		 JRST TTPSRX		;THAT TTY ISN'T ACTIVE
  5715	006105'01  201 02 0 03 000000 		MOVEI T2,(T3)		;COPY THE FORKX
  5716	006106'01  301 02 0 00 004264*		CAIL T2,NFKS		;IS IT VALID? (ELSE -1 FOR NONE)
  5717	006107'01  254 00 0 00 006066'		JRST TTPSRX		;NO
  5718					IFE STANSW,<
  5719						JRST TTPSR1		;YES, GO INTERRUPT THIS FORK
  5720					>;IFE STANSW
  5721					IFN STANSW,<
  5722	006110'01  331 00 0 02 005423*		SKIPL FKPT(T2)		;DOES THIS FORK REALLY EXIST?
  5723	006111'01  254 00 0 00 006077'		 JRST TTPSR1		;YES, GO INTERRUPT THIS FORK
  5724
  5725					;FORK DOESN'T EXIST, DON'T INTERRUPT IT
  5726	006112'01  201 01 0 00 777777 	TTPSER:	MOVEI T1,-1		;ENTRY MEANING "NONE"
  5727	006113'01  260 17 0 00 005620*		CALL STTOPF		;MARK NO TOP FORK FOR TTY'S CTTY GROUP
  5728					;; The following line must be a CALLX since it is SWAPCD and we may be
  5729					;; called from XRESCD.
  5730	006114'01  260 17 1 00 011204'		CALLX (MSEC1,STCJOB)	;MARK NO CONTROLLING JOB FOR THIS TTY
  5731	000015'04  000000  000000		BUG.(CHK,TTPSNJ,SCHED,SOFT,<Controlling TTY fork or job vanished>)
  5732	006115'01  256 00 0 00 011205'
  5733
  5734	006116'01  254 00 0 00 006066'		JRST TTPSRX		;NOW RETURN
  5735					>;IFN STANSW
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 145
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5736
  5737					;ROUTINES TO HANDLE INTERRUPT CONDITIONS AS SPECIFIED BY BITS
  5738					;IN LEFT HALF OF FKINT
  5739
  5740					;TERMINAL INTERRUPT, PHASE ONE
  5741					;THIS CODE RUN IN TOP FORK ONLY
  5742
  5743					;Here when PSIT1% is set in FKINT
  5744
  5745	006117'01  135 06 0 00 011210'	PSIT1:	LOAD Q2,TRMCOD,FX	;GET TERM INTERRUPT CODE
  5746	006120'01  200 06 0 06 006026*		MOVE Q2,BITS(Q2)
  5747	006121'01  550 01 0 00 004123*		HRRZ 1,FORKN		;START WITH TOP FORK
  5748	006122'01  550 04 0 01 005632*		LOAD T4,FRKTTY,(T1)	;GET CONTROLLING TERMINAL
  5749	006123'01  474 05 0 00 000000 		SETO Q1,
  5750	006124'01  612 06 0 01 000000*		TDNE Q2,FKPSIE(1)	;TERM CODE ON IN FORK?
  5751	006125'01  201 05 0 01 000000 		MOVEI Q1,0(1)		;YES, REMEMBER FORK
  5752	006126'01  260 17 0 00 006162'		CALL PSIT1A		;LOOK AT ALL INFERIORS
  5753	006127'01  321 05 0 00 006142'		JUMPL Q1,PSIT11		;NOT FOUND, SO TURN OFF CODE
  5754	006130'01  550 02 0 05 004127*		HRRZ 2,SYSFK(Q1)		;GET SYSTEM INDEX OF FORK TO GET INTERPT
  5755	006131'01  316 02 0 00 006035*		CAMN 2,FORKX		;THIS FORK?
  5756	006132'01  254 00 0 00 006227'		JRST PSIT2		;YES, GO DIRECTLY TO PHASE TWO
  5757	006133'01  265 16 0 00 000310'		NOSKED
  5758	006134'01  135 01 0 00 011210'		LOAD T1,TRMCOD,FX	;NO. GET TERM INTERRUPT CODE
  5759	006135'01  137 01 0 00 011203'		STOR T1,TRMCD,(T2)	; AND SET UP INT FOR PROPER FORK
  5760	006136'01  205 01 0 00 004000 		MOVX 1,PSIT2%		;PHASE TWO REQUEST FLAG
  5761	006137'01  260 17 0 00 006033'		CALL PSIGR
  5762	006140'01  265 16 0 00 000315'		OKSKED
  5763	006141'01  254 00 0 00 005724'		JRST PSITR1
  5764
  5765	006142'01  306 04 0 00 777777 	PSIT11:	CAIN T4,-1		;SOURCE OF PSI = JOB CTTY?
  5766	006143'01  254 00 0 00 006154'		JRST PSIT12		;YES
  5767	006144'01  626 04 0 00 400000 		TRZN T4,1B18		;MAYBE, CONVERT TO LINE #
  5768	006145'01  254 00 0 00 005724'		JRST PSITR1		;DESIGNATOR, NOT TTY. RETURN.
  5769	006146'01  316 04 0 00 005636*		CAMN T4,CTRLTT		;CTTY OF JOB?
  5770	006147'01  254 00 0 00 006154'		JRST PSIT12		;YES
  5771	006150'01  305 04 0 00 000000*		CAIGE T4,NLINES		;VALID TTY NUMBER?
  5772	006151'01  335 02 0 00 000004 		SKIPGE T2,T4		;[8816] Really valid (and set up T2)?
  5773	006152'01  254 00 0 00 005724'		JRST PSITR1
  5774	006153'01  254 00 0 00 006157'		JRST PSIT13		;YES
  5775
  5776	006154'01  412 06 0 00 000000*	PSIT12:	ANDCAM Q2,TTSPSI ;NOT FOUND, SO TURN OFF CODE
  5777	006155'01  335 02 0 00 006146*		SKIPGE T2,CTRLTT
  5778	006156'01  254 00 0 00 005724'		JRST PSITR1
  5779	006157'01  200 01 0 00 000006 	PSIT13:	MOVE T1,Q2		;T1/ INTERRUPT BIT
  5780	006160'01  260 17 0 00 000000*		CALL CLRINT		;CLEAR THE INTERRUPT IN TERMINAL'S DATA
  5781	006161'01  254 00 0 00 005724'		JRST PSITR1
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 146
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5782
  5783					;SEARCH FORK STRUCTURE FOR FORK TO INTERRUPT
  5784					; T4/ DESIGNATOR OF SOURCE OF THIS PSI
  5785
  5786	006162'01  270 01 0 00 006226'	PSIT1A::ADD 1,INFERP		;LOOK AT INFERIOR LIST
  5787	006163'01  135 01 0 00 000001 	PSIT1B:	LDB 1,1			;GET NEXT IN LIST
  5788	006164'01  322 01 0 00 005251*		JUMPE 1,R		;RETURN AT END OF LIST
  5789	006165'01  550 02 0 01 006122*		LOAD T2,FRKTTY,(T1)	;GET CONTROLLING TERMINAL
  5790	006166'01  302 02 0 04 000000 		CAIE T2,0(T4)		;IS IT THE ONE THAT MADE THIS PSI?
  5791	006167'01  254 00 0 00 006206'		JRST PSIT1E		;NO, SO DON'T CONSIDER FORK.
  5792	006170'01  550 02 0 01 006130*		HRRZ 2,SYSFK(1)		;CHECK STATE OF FORK
  5793	006171'01  261 17 0 00 000007 		PUSH P,FX		;SAVE FX
  5794	006172'01  201 07 0 02 000000 		MOVEI FX,0(T2)		;SEE IF THIS FORK IS FROZEN OR HALTED
  5795	006173'01  260 17 0 00 004052'		CALL CHKWT		; ..
  5796						 JRST [	POP P,FX	;IT'S NOT.
  5797	006174'01  254 00 0 00 011211'			JRST PSIT1D]
  5798	006175'01  262 17 0 00 000007 		POP P,FX		;YES, SEE WHICH
  5799	006176'01  550 03 0 02 005704*		LOAD T3,FKSTR,(T2)	;GET ITS STATE
  5800	006177'01  306 03 0 00 003771*		CAIN T3,FRZWT		;FROZEN?
  5801	006200'01  254 00 0 00 006215'		JRST PSIT1G		;YUP
  5802	006201'01  302 03 0 00 000307'		CAIE T3,HALTT		;NO, HALTED OR FORCED TERM?
  5803	006202'01  306 03 0 00 007031'		CAIN T3,FORCTM		; ..
  5804	006203'01  254 00 0 00 006213'		JRST PSIT1C		;YES.
  5805	006204'01  612 06 0 01 006124*	PSIT1D:	TDNE Q2,FKPSIE(1)	;FORK HAS CODE ENABLED?
  5806	006205'01  201 05 0 01 000000 		MOVEI Q1,0(1)		;YES, REMEMBER IT
  5807	006206'01  506 01 0 17 000000 	PSIT1E:	HRLM T1,0(P)		;REMEMBER CURRENT FORK
  5808	006207'01  260 17 0 00 006162'		CALL PSIT1A		;CHECK ITS INFERIORS
  5809	006210'01  554 01 0 17 000000 		HLRZ T1,0(P)		;RECOVER CURRENT FORK
  5810	006211'01  415 02 0 00 000020 		XMOVEI T2,20		;RESTORE RETURN ADDRESS
  5811	006212'01  502 02 0 17 000000 		HLLM T2,0(P)
  5812	006213'01  270 01 0 00 006225'	PSIT1C:	ADD T1,PARALP		;LOOK AT ITS PARALLELS
  5813	006214'01  254 00 0 00 006163'		JRST PSIT1B		;DO PARALLELS
  5814
  5815	006215'01  200 16 0 02 006052*	PSIT1G:	JE FKFRJ,(T2),PSIT1C	;ORDINARY FREEZE IF NOT FROZEN BY JSYS TRAP
  5816	006216'01  607 16 0 00 000040 
  5817	006217'01  254 00 0 00 006213'
  5818	006220'01  200 16 0 02 006215*		JN FKEFR,(T2),PSIT1C	;IF OTHER TRAPS, TOO, DON'T CONSIDER THIS FORK
  5819	006221'01  603 16 0 00 000300 
  5820	006222'01  254 00 0 00 006213'
  5821	006223'01  254 00 0 00 006204'		JRST PSIT1D		;JUST JSYS TRAP. IT MAY STILL
  5822									; TAKE THE PSI, SO CONSIDER THIS FK.
  5823
  5824					;FORK STRUCTURE POINTERS
  5825
  5826	006224'01  30 14 0 00 000000*	SUPERP::POINT 12,FKPTRS,11	;SUPERIOR
  5827	006225'01  14 14 0 00 006224*	PARALP::POINT 12,FKPTRS,23	;PARALLEL
  5828	006226'01  00 14 0 00 006225*	INFERP::POINT 12,FKPTRS,35
  5829
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 147
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5830					;TERMINAL INTERRUPT, PHASE TWO
  5831
  5832					;Here when PSIT2% is set in FKINT or directly from PSIT1.
  5833
  5834	006227'01  135 01 0 00 011210'	PSIT2:	LOAD T1,TRMCOD,FX	;GET TERM INTERRUPT CODE
  5835	006230'01  260 17 0 00 007047'		CALL GETCHA
  5836	006231'01  135 02 0 00 000002 		LDB 2,2
  5837	006232'01  200 01 0 02 006120*		MOVE 1,BITS(2)		;AND SET BIT IN INT. WAITING WORD
  5838	006233'01  404 01 0 00 006013*		AND 1,PSICHM		;BUT ONLY FOR ENABLED CHANNELS
  5839	006234'01  436 01 0 00 000602*		IORM 1,PSIBW
  5840	006235'01  254 00 0 00 006504'		JRST PSII		;THEN GO PROCESS IT
  5841
  5842					;TIME LIMIT EXCEEDED INTERRUPT
  5843					;ROUTINE TO ISSUE TIME LIMIT EXCEEDED INTERRUPT
  5844					;  RUN BY TOP FORK OF JOB ONLY
  5845
  5846					;Here when PSITL% is set in FKINT
  5847
  5848	006236'01  200 01 0 00 005634*	TLEINT:	MOVE T1,JOBNO		; Get the job
  5849	006237'01  135 02 0 00 011213'		LOAD T2,JOBRTP,(T1)	; And then ptr to runtime limit blk
  5850	006240'01  322 02 0 00 005724'		JUMPE T2,PSITR1		; If none, then don't do this
  5851	006241'01  261 17 0 00 000002 		PUSH P,T2		; Save so we can release blk
  5852	006242'01  135 01 0 00 011214'		LOAD T1,TIMCHN,(T2)	; Channel for poke
  5853	006243'01  550 02 0 02 000002 		LOAD T2,TIMFRK,(T2)	; And fork to poke
  5854	006244'01  260 17 0 00 006026'		CALL PSIRQ
  5855	006245'01  262 17 0 00 000004 		POP P,T4		; Blk to be released
  5856	006246'01  260 17 0 00 000000*		CALL CLKKIL		; Release storage for clock
  5857	006247'01  200 01 0 00 006236*		MOVE T1,JOBNO
  5858	006250'01  525 16 0 00 000037 		SETZRO JOBRTP,(T1)	; And finally clear the ptr
  5859	006251'01  412 16 0 01 003666*
  5860	006252'01  254 00 0 00 005724'		JRST PSITR1		;CONTINUE ON
  5861
  5862					;PRIORITY WORD WAS SET. COMPUTE NEW FKMNQ
  5863
  5864					;Here when PSIPRI is set in FKINT
  5865
  5866	006253'01  261 17 0 00 000007 	PRISET:	PUSH P,FX		;SAVE INT BITS
  5867	006254'01  200 07 0 00 006131*		MOVE FX,FORKX		;GET FORK HANDLE
  5868	006255'01  336 01 0 00 003521*		SKIPN T1,JOBBIT		;GET LOCAL PRIORITY WORD
  5869	006256'01  200 01 0 00 005016*		MOVE T1,JOBSKD		;GET JOB PRIORITY WORD
  5870	006257'01  135 01 0 00 011215'		LDB T1,[POINT 6,T1,29]	;GET HIGH Q NUMBER FROM PRIORITY WORD
  5871	006260'01  137 01 0 00 010643'		STOR T1,FKMNQ		;NEW MIN Q FOR PROCESS
  5872	006261'01  262 17 0 00 000007 		POP P,FX
  5873	006262'01  254 00 0 00 005724'		JRST PSITR1		;PROCEED
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 148
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5874
  5875					;SUSPEND FORK REQUEST
  5876
  5877					;Here when SUSFK% is set in FKINT
  5878
  5879	006263'01  200 01 0 00 000007 	PIRSFK:	MOVE 1,FX		;GET PIMSK
  5880	006264'01  200 07 0 00 006254*		MOVE FX,FORKX
  5881	006265'01  621 01 0 00 402000 		TXZ 1,FKPSI0+SUSFK%	;CLEAR THIS REQUEST
  5882	006266'01  436 01 0 07 006220*		OPSTRM <IORM 1,>,FKINX,(FX) ;KEEP OTHER REQUESTS
  5883	006267'01  120 01 0 00 005763*		DMOVE 1,PIFL
  5884	006270'01  260 17 0 00 007126'		CALL PITEST		;NOW INTERRUPTABLE?
  5885	006271'01  254 00 0 00 006310'		 JRST PIRSF1		;NO
  5886	006272'01  201 03 0 00 006333'		MOVEI 3,SUSWT		;SUSPENDED FORK TEST
  5887	006273'01  200 02 0 00 006264*	PIRSK1:	MOVE 2,FORKX
  5888	006274'01  205 16 0 00 002000 		SETZRO FKSUS,(T2)
  5889	006275'01  412 16 0 02 006266*
  5890	006276'01  260 17 0 00 005744'		CALL UNPIRN		;LEAVE INTERRUPT STATE
  5891	006277'01  205 16 0 00 200000 		SETONE FKPS1,(FX)	;SET INTERRUPT STARTING BIT
  5892	006300'01  436 16 0 07 006275*
  5893	006301'01  201 01 0 03 000000 		MOVEI 1,0(3)		;SUSWT OR FRZWT
  5894	006302'01  504 01 0 00 006004*		HRL 1,PIOLDS		;WITH OLD STATUS
  5895	006303'01  261 17 0 00 000001 		PUSH P,T1
  5896	006304'01  201 01 0 00 000000*		MOVEI T1,SUSFKT
  5897	006305'01  260 17 0 00 004121'		CALL WAKSUP		;WAKEUP SUPERIOR IF WAITING FOR SUSP
  5898	006306'01  262 17 0 00 000001 		POP P,T1
  5899	006307'01  254 00 0 00 000372'		JRST DISMSE		;DISMISS
  5900
  5901	006310'01  200 07 0 00 006273*	PIRSF1:	MOVE FX,FORKX
  5902	006311'01  265 16 0 00 000310'		NOSKED			;
  5903	006312'01  550 01 0 07 006176*		LOAD T1,FKSTR,(FX)	;
  5904	006313'01  306 01 0 00 007440'		CAIN T1,JTQWT		; IN JSYS TRAP QUEUE WAIT?
  5905	006314'01  254 00 0 00 006321'		JRST PIRSF2		; YES, ALLOW SUSPENSION
  5906	006315'01  265 16 0 00 000315'		OKSKED			;
  5907	006316'01  205 16 0 00 002000 		SETONE FKSUS,(FX)	;TURN REQUEST BIT BACK ON
  5908	006317'01  436 16 0 07 006300*
  5909	006320'01  254 00 0 00 007054'		JRST PSIDFR		;AND SET DEFERRED INTERRUPTS
  5910
  5911	006321'01  201 01 0 07 000000*	PIRSF2:	MOVEI T1,FKJTQ(FX)	; FORK IN JSYS TRAP QUEUE WAIT
  5912	006322'01  260 17 0 00 007477'		CALL JTDEQ		; REMOVE IT FROM QUEUE
  5913	006323'01  200 01 0 00 011216'		MOVX T1,MONENV		;SET AC BLOCKS
  5914	006324'01  202 01 0 00 006267*		MOVEM T1,PIFL		;SAVE AS FLAGS WORD
  5915	006325'01  415 01 0 00 007416'		XMOVEI T1,JTRLCK	; SET RESUME ADDR. TO LOCK ROUTINE
  5916	006326'01  402 00 0 00 006302*		SETZM PIOLDS		;
  5917	006327'01  202 01 0 00 005765*		MOVEM T1,PIPC		;
  5918	006330'01  265 16 0 00 000315'		OKSKED			;
  5919	006331'01  201 03 0 00 006333'		MOVEI T3,SUSWT		;
  5920	006332'01  254 00 0 00 006273'		JRST PIRSK1		;
  5921
  5922	006333'01  254 00 0 04 000000 	SUSWT::	JRST 0(4)		;SCHEDULER TEST FOR SUSPENDED FORK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 149
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5923
  5924					;CARRIER OFF ACTION REQUEST
  5925
  5926					;Here when PSICO% is set in FKINT
  5927
  5928	006334'01  120 01 0 00 006324*	PIRCOF:	DMOVE T1,PIFL
  5929	006335'01  260 17 0 00 006400'		CALL TFTEST		;INTERRUPT OK NOW?
  5930						 JRST [	MOVE FX,FORKX	;NO, SETUP DEFER
  5931							SETONE FKICO,(FX) ;KEEP REQUEST IN FKINT
  5932	006336'01  254 00 0 00 011217'			JRST PSIDFR]	;GO SET DEFER
  5933	006337'01  205 01 0 00 001000 		MOVX T1,PSIWT%		;SEE IF PROCESS WAS WAITING
  5934	006340'01  612 01 0 00 005700*		TDNE T1,PIMSK		;WAS IT?
  5935	006341'01  370 00 0 00 006327*		SOS PIPC		;YES. MAKE IT GO BACK INTO WAIT THEN
  5936	006342'01  200 07 0 00 006310*		MOVE FX,FORKX		;GET THIS FORK'S ID
  5937	006343'01  205 16 0 00 000010 		SETZRO FKICO,(FX)	;CLEAR THIS CONDITION (NECESSARY
  5938	006344'01  412 16 0 07 006317*
  5939									; IF THIS WAS DEFERRED).
  5940	006345'01  415 01 0 00 000000*		XMOVEI T1,JOBCOF	;SET TO DEBREAK TO ACTION PROCEDURE
  5941
  5942	006346'01  402 00 0 00 006326*	PIRLG1:	SETZM PIOLDS		;MAKE FORK RUNNABLE
  5943	006347'01  250 01 0 00 006341*		EXCH T1,PIPC
  5944	006350'01  200 02 0 00 011223'		MOVX T2,MONENV		;SET AC BLOCKS FOR NEW FLAGS WORD
  5945	006351'01  250 02 0 00 006334*		EXCH T2,PIFL		;GET FLAGS, SET NEW ONES FOR DEBREAK
  5946	006352'01  607 02 0 00 010000 		TXNN T2,UMODF
  5947	006353'01  254 00 0 00 006357'		IFSKP.
  5948	006354'01  202 01 0 00 000014 		  MOVEM T1,P5		;IN USER MODE, SIMULATE JSYS
  5949	006355'01  202 02 0 00 000012 		  MOVEM T2,P3		;Store new flags as well
  5950	006356'01  254 00 0 00 005726'		  JRST PIRQR
  5951	006357'01				ENDIF.
  5952	006357'01  200 02 0 00 000000#		MOVE T2,PIAC+17		;IN MON MODE, SIMULATE PUSHJ
  5953	006360'01  261 02 0 00 000001 		PUSH T2,T1
  5954	006361'01  202 02 0 00 000000#		MOVEM T2,PIAC+17
  5955	006362'01  205 01 0 00 004000 		MOVX T1,PCU		;GET THE MASK FOR PCU
  5956	006363'01  436 01 0 00 006351*		IORM T1,PIFL		;AND TURN IT ON
  5957	006364'01  254 00 0 00 005726'		JRST PIRQR
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 150
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5958
  5959					;LOGOUT REQUEST
  5960
  5961					;Here when PSILO% is set in FKINT
  5962
  5963	006365'01  120 01 0 00 006363*	PIRLGO:	DMOVE T1,PIFL
  5964	006366'01  260 17 0 00 006400'		CALL TFTEST		;OK TO INTERRUPT?
  5965						 JRST [	MOVE FX,FORKX	;NO, REMEMBER REQUEST
  5966							SETONE FKILO,(FX)
  5967	006367'01  254 00 0 00 011224'			JRST PSIDFR]
  5968	006370'01  415 01 0 00 000000*		XMOVEI T1,FLOGO
  5969	006371'01  402 00 0 00 006346*		SETZM PIOLDS		;MAKE FORK RUNNABLE
  5970	006372'01  202 01 0 00 006347*		MOVEM T1,PIPC
  5971	006373'01  200 02 0 00 011230'		MOVX T2,MONENV		;SET AC BLOCKS FOR NEW FLAGS WORD
  5972	006374'01  202 02 0 00 006365*		MOVEM T2,PIFL		;Set new ones for DEBREAK
  5973	006375'01  200 12 0 00 011231'		MOVX P3,USRCTX		;Force reinit of stack at FLOGO
  5974	006376'01  402 00 0 00 000014 		SETZM P5		;Unique address for new PC
  5975	006377'01  254 00 0 00 005726'		JRST PIRQR
  5976
  5977					;SPECIAL TEST USED BEFORE INTERRUPT TOP FORK FOR LOGOUT OR CARRIER OFF
  5978
  5979	006400'01  260 17 0 00 007126'	TFTEST:	CALL PITEST		;INTERRUPTABLE NORMALLY?
  5980	006401'01  263 17 0 00 000000 		 RET			;NO, NOT HERE EITHER
  5981	006402'01  205 02 0 00 400000 		MOVX T2,LOGIOB
  5982	006403'01  612 02 0 00 006255*		TDNE T2,JOBBIT		;LOGGING IN OR OUT?
  5983	006404'01  263 17 0 00 000000 		RET			;YES, NO INTERRUPT
  5984	006405'01  254 00 0 00 005463*		RETSKP			;NO, INTERRUPT OK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 151
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  5985
  5986					;DAP attention interrupt
  5987					;Here when PSIDP% is set in FKINT
  5988	006406'01  120 01 0 00 006374*	FKDAP: 	DMOVE T1,PIFL
  5989	006407'01  260 17 0 00 007126'		CALL PITEST		;interrupt OK now?
  5990	006410'01  604 00 0 00 000000 		IFNSK.
  5991	006411'01  254 00 0 00 006416'
  5992	006412'01  200 07 0 00 006342*		  MOVE FX,FORKX		;no, setup defer
  5993	006413'01  201 16 0 00 200000 		  SETONE FKIDP,(FX)	;keep request
  5994	006414'01  436 16 0 07 006344*
  5995	006415'01  254 00 0 00 007054'		  JRST PSIDFR 		;go set defer
  5996	006416'01				ENDIF.
  5997	006416'01  205 01 0 00 001000 		MOVX T1,PSIWT%		;see if process was waiting
  5998	006417'01  612 01 0 00 006340*		TDNE T1,PIMSK		;was it?
  5999	006420'01  370 00 0 00 006372*		SOS PIPC		;yes. make it go back into wait when finished
  6000	006421'01  200 07 0 00 006412*		MOVE FX,FORKX		;get this fork's id
  6001	006422'01  201 16 0 00 200000 		SETZRO FKIDP,(FX)	;clear interrupt condition bits
  6002	006423'01  412 16 0 07 006414*
  6003	006424'01  415 01 0 00 000000*		XMOVEI T1,DAPHND	;get addr of action procedure
  6004	006425'01  254 00 0 00 006346'		JRST PIRLG1		;set to debreak to action procedure
  6005
  6006
  6007					;SCS% interrupt
  6008					;Here when PSISC% is set in FKINT. Need to see if the fork is NOINT
  6009					;before adding entries to the fork's SCS% queues.
  6010
  6011	006426'01  120 01 0 00 006406*	SCSSPC:	DMOVE T1,PIFL
  6012	006427'01  200 07 0 00 006421*		MOVE FX,FORKX
  6013	006430'01  260 17 0 00 007126'		CALL PITEST
  6014	006431'01  604 00 0 00 000000 		IFNSK.			;YES.
  6015	006432'01  254 00 0 00 006436'
  6016	006433'01  201 16 0 00 100000 		 SETONE FKISC,(FX)	;SET PSISC% AGAIN
  6017	006434'01  436 16 0 07 006423*
  6018	006435'01  254 00 0 00 007054'		 JRST PSIDFR		;DEFER THIS INTERRUPT
  6019	006436'01				ENDIF.
  6020	006436'01  260 17 0 00 000000*		CALL SCSPSI		;( ) DO THIS SCS% ROUTINE WHICH
  6021									;UPDATES THE FORK'S SCS% QUEUES
  6022									;FROM A SYSTEM WIDE QUEUE.
  6023	006437'01  201 16 0 00 100000 		SETZRO FKISC,(FX)
  6024	006440'01  412 16 0 07 006434*
  6025	006441'01  254 00 0 00 005726'		JRST PIRQR		;FINISHED WITH INTERRUPT
  6026
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 152
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6027
  6028					; JSYS TRAP REQUEST
  6029
  6030					;Here when PSIJT% is set in FKINT
  6031					;A process executed a JSYS that this process was monitoring. This process
  6032					;will receive an interrupt on the channel that it specified.
  6033
  6034	006442'01  120 01 0 00 006426*	PIRJTP:	DMOVE T1,PIFL		; Pick up flags
  6035	006443'01  260 17 0 00 007126'		CALL PITEST		; FORK INTERRUPTABLE?
  6036	006444'01  254 00 0 00 006455'		 JRST PIRJT1		; NO, DEFER IT
  6037	006445'01  200 07 0 00 006427*		MOVE FX,FORKX		; IN CASE THIS PSI WAS DEFERRED
  6038	006446'01  205 16 0 00 000002 		SETZRO FKIJT,(FX)	; CLEAR IT FROM FKINT
  6039	006447'01  412 16 0 07 006440*
  6040	006450'01  135 01 0 00 011162'		LOAD T1,JTMCN		; GET PSI CHANNEL FOR TRAP
  6041	006451'01  200 01 0 01 006232*		MOVE T1,BITS(T1)	;
  6042	006452'01  436 01 0 00 006234*		IORM T1,PSIBW		; SET BIT IN INT WAITING WORD
  6043	006453'01  400 07 0 00 000000 		SETZ FX,		;
  6044	006454'01  254 00 0 00 006504'		JRST PSII		; GO PROCESS THE TRAP
  6045
  6046	006455'01  200 07 0 00 006445*	PIRJT1:	MOVE FX,FORKX		; DEFER THE JSYS TRAP PSI
  6047	006456'01  205 16 0 00 000002 		SETONE FKIJT,(FX)
  6048	006457'01  436 16 0 07 006447*
  6049	006460'01  254 00 0 00 007054'		JRST PSIDFR
  6050
  6051					;ADDRESS BREAK REQUEST - FREEZE FORK AND INTERRUPT SUPERIOR
  6052
  6053					;Here when ADRBK% is set in FKINT
  6054
  6055	006461'01  200 01 0 00 000007 	PIRABK:	MOVE T1,FX		;GET REQUEST BITS
  6056	006462'01  200 07 0 00 006455*		MOVE FX,FORKX		; AND FORK INDEX
  6057	006463'01  621 01 0 00 400001 		TXZ T1,FKPSI0+ADRBK%	;CLEAR BITS FOR THIS REQUEST
  6058	006464'01  436 01 0 07 006457*		OPSTRM <IORM T1,>,FKINX,(FX) ;SAVE OTHERS
  6059	006465'01  120 01 0 00 006442*		DMOVE T1,PIFL		;GET INTERRUPTED PC DOUBLEWORD
  6060	006466'01  260 17 0 00 007126'		CALL PITEST		;INTERRUPTABLE?
  6061	006467'01  254 00 0 00 006501'		 JRST PIRBK1		;NO
  6062	006470'01  205 16 0 00 000220 		SETONE <FKFR1,FKFRA>,(FX) ;YES. INDICATE FREEZE DUE TO ADDRESS BREAK
  6063	006471'01  436 16 0 07 006464*
  6064	006472'01  205 16 0 00 000001 		SETZRO FKABK,(FX)	;CLEAR ORIGINAL REQUEST BIT
  6065	006473'01  412 16 0 07 006471*
  6066	006474'01  260 17 0 00 007032'		CALL FKTMI		;INTERRUPT SUPERIOR FORK
  6067	006475'01  260 17 0 00 005744'		CALL UNPIRN		;LEAVE PSI CONTEXT
  6068	006476'01  402 00 0 00 006371*		SETZM PIOLDS		;SET OLD STATE TO RUNNING
  6069	006477'01  201 01 0 00 006177*		MOVEI T1,FRZWT		;WAIT LIST ON WHICH WE WISH TO LIVE
  6070	006500'01  254 00 0 00 000372'		JRST DISMSE		;DISMISS
  6071
  6072	006501'01  205 16 0 00 000001 	PIRBK1:	SETONE FKABK,(FX)	;RE-LIGHT REQUEST BIT
  6073	006502'01  436 16 0 07 006473*
  6074	006503'01  254 00 0 00 007054'		JRST PSIDFR		;AND DEFER THE INTERRUPT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 153
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6075
  6076					;PROCESS INTERRUPT(S) FOR THIS FORK AS SPECIFIED BY FKINTB
  6077					;THIS CODE *CAN* CAUSE PAGE FAULTS WHEN REFERENCING THE USER
  6078					;CHANNEL AND LEVEL TABLES.
  6079
  6080					;FX/ flags from FKINT
  6081
  6082	006504'01  200 01 0 00 007066'	PSII:	MOVE 1,MJRST0		;NORMALIZE ALL DEFER TRAPS
  6083	006505'01  202 01 0 00 005500*		MOVEM 1,MJRSTF
  6084	006506'01  200 01 0 00 007070'		MOVE 1,INTDF0
  6085	006507'01  202 01 0 00 006023*		MOVEM 1,INTDFF
  6086	006510'01  254 14 0 00 000001 		XSFM T1			;SEE IF CONTEXT BEING SETUP RIGHT
  6087	006511'01  603 01 0 00 004000 		TXNE T1,PCU
  6088	006512'01  606 01 0 00 000037 		TXNN T1,EXPCS
  6089	006513'01  604 00 0 00 000000 		IFNSK.
  6090	006514'01  254 00 0 00 006517'
  6091					   IFN SKEDSW,<
  6092						  BUG.(CHK,PSIIBE,SCHED,SOFT,<PSII - Flags not set properly>,<<T1,FLAGS>>,<
  6093					
  6094					Cause:	At PSII, the PC flags were not set properly.  All paths
  6095						to PSII should ensure that PCU is 1 and PCS is non-0.  This
  6096						is under a debug conditional and so should not be seen in the
  6097						field.
  6098					
  6099					Data:	FLAGS - Flags from XSFM.
  6100					>)
  6101					   >				;END DEBUG CONDITIONAL
  6102	006515'01  200 01 0 00 011232'		  MOVX T1,MONENV
  6103	006516'01  265 02 0 00 011233'		  JSP T2,[XJRSTF T1]	;MAKE THEM RIGHT
  6104	006517'01				ENDIF.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 154
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6105
  6106					;DETERMINE REASON FOR THE INTERRUPT AND GO PROCESS IT.
  6107
  6108	006517'01  603 07 0 00 002000 		TXNE FX,SUSFK%		;FORK SUSPENSION REQUEST?
  6109	006520'01  254 00 0 00 006263'		JRST PIRSFK		;YES
  6110	006521'01  603 07 0 00 000400 		TXNE FX,PSILO%		;LOGOUT REQUEST?
  6111	006522'01  254 00 0 00 006365'		JRST PIRLGO
  6112	006523'01  603 07 0 00 000010 		TXNE FX,PSICO%		;CARRIER OFF REQUEST?
  6113	006524'01  254 00 0 00 006334'		JRST PIRCOF		;YES
  6114	006525'01  603 07 0 00 000002 		TXNE FX,PSIJT%		; JSYS trap requested?
  6115	006526'01  254 00 0 00 006442'		 JRST PIRJTP		; Yes
  6116	006527'01  603 07 0 00 000001 		TXNE FX,ADRBK%		;ADDRESS BREAK REQUEST?
  6117	006530'01  254 00 0 00 006461'		JRST PIRABK		;YES, HANDLE
  6118	006531'01  602 07 0 00 200000 		TXNE FX,PSIDP%		;DAP attention ?
  6119	006532'01  254 00 0 00 006406'		JRST FKDAP		;yes. handle it
  6120	006533'01  602 07 0 00 100000 		TXNE FX,PSISC%		;SCS% ATTENTION?
  6121	006534'01  254 00 0 00 006426'		JRST SCSSPC		;YES. GO LOOK AT IT.
  6122
  6123					;HERE BECAUSE BIT PSIIF% IS SET IN FKINT, INDICATING A CHANNEL
  6124					;INTERRUPT. FKINTB HAS BIT SET FOR EACH CHANNEL THAT NEEDS TO
  6125					;INTERRUPT.
  6126
  6127	006535'01  200 02 0 00 006462*		MOVE 2,FORKX
  6128	006536'01  201 01 0 00 000000 		MOVEI 1,0
  6129	006537'01  250 01 0 02 006031*		OPSTRM <EXCH 1,>,FKIBX,(2) ;RESET FKINTB TO 0
  6130	006540'01  436 01 0 00 006452*		IORM 1,PSIBW		;INCLUDE IN PROCESS WAITING BREAKS
  6131	006541'01  200 01 0 00 006233*		MOVE 1,PSICHM		;USERS ENABLED CHANNELS
  6132	006542'01  434 01 0 00 005666'		IOR 1,CHNSON		;WITH ALWAYS ON CHANNELS
  6133	006543'01  434 01 0 00 006016*		IOR 1,SUPCHN		;WITH SUPERIOR RESERVED CHANNELS
  6134	006544'01  404 01 0 00 006540*		AND 1,PSIBW		;FLUSH DISABLED CHANS
  6135	006545'01  616 01 0 00 000000*		TDNN 1,MONCHN		;MONITOR CHANNEL?
  6136	006546'01  336 03 0 00 006476*		SKIPN 3,PIOLDS		;NO. WAS FORK WAITING?
  6137	006547'01  254 00 0 00 006556'		IFSKP.
  6138	006550'01  336 00 0 00 006121*		  SKIPN FORKN		;AND NOT TOP FORK?
  6139	006551'01  254 00 0 00 006556'		ANSKP.
  6140	006552'01  201 03 0 03 000000 		  MOVEI 3,0(3)		;YES, HALT OR FORCED TERM?
  6141	006553'01  302 03 0 00 000307'		  CAIE 3,HALTT
  6142	006554'01  306 03 0 00 007031'		  CAIN 3,FORCTM
  6143	006555'01  254 00 0 00 005726'		  JRST PIRQR		;YES. IGNORE REQUEST UNTIL LATER
  6144	006556'01				ENDIF.
  6145	006556'01  202 01 0 00 006544*		MOVEM 1,PSIBW		;FLUSH DISABLED CHANS
  6146	006557'01  322 01 0 00 005726'		JUMPE 1,PIRQR		;RETURN IF NO BREAKS WAITING
  6147						;..
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 155
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6148						;..
  6149
  6150					;Here when an interrupt is pending and it is enabled (or a panic channel)
  6151
  6152	006560'01  120 01 0 00 006465*		DMOVE 1,PIFL		;PROCESS PC
  6153	006561'01  260 17 0 00 007126'		CALL PITEST		;CAN PROCESS BE INTERRUPTED NOW?
  6154	006562'01  254 00 0 00 007054'		 JRST PSIDFR		;NO, GO SETUP DEFERRED INTERRUPT
  6155	006563'01  200 01 0 00 006556*		MOVE 1,PSIBW
  6156	006564'01  612 01 0 00 006545*		TDNE 1,MONCHN		;MONITOR RESERVED CHANNEL?
  6157	006565'01  254 00 0 00 006710'		JRST PSIMB		;YES
  6158	006566'01  616 01 0 00 005666'		TDNN T1,CHNSON		;PANIC CHANNEL?
  6159	006567'01  254 00 0 00 006606'		JRST PSIN5		;NO
  6160
  6161					;Panic channel. If ERJMP follows user's instruction, go there.
  6162
  6163	006570'01  120 01 0 00 006560*		DMOVE T1,PIFL		;YES, CHECK FOR ERJMP/ERCAL
  6164	006571'01  603 01 0 00 010000 		TXNE T1,UMODF		;USER PC NOW?
  6165	006572'01  254 00 0 00 006575'		IFSKP.
  6166	006573'01  120 01 0 00 000000*		  DMOVE T1,UPDL		;NO, GET IT
  6167	006574'01  250 01 0 00 000002 		  EXCH T1,T2		;(IN PROPER ORDER)
  6168	006575'01				ENDIF.
  6169	006575'01  260 17 0 00 010121'		CALL SETPCV		;SET PREVIOUS CONTEXT FOR ITRSIM
  6170	006576'01  260 17 0 00 010020'		CALL ITRSIM		;CHECK AND INTERPRET ER INSTRUCTION
  6171	006577'01  254 00 0 00 006605'		 JRST PSIN6		;NONE THERE, CONTINUE WITH INTERRUPT
  6172	006600'01  202 03 0 00 006420*		MOVEM T3,PIPC		;FOUND, SET PC TO E OF INSTRUCTION
  6173	006601'01  202 01 0 00 006570*		MOVEM T1,PIFL		;AND FLAGS TO USER FLAGS
  6174	006602'01  200 03 0 00 005666'		MOVE T3,CHNSON		;CLEAR INTERRUPT REQUEST
  6175	006603'01  412 03 0 00 006563*		ANDCAM T3,PSIBW
  6176	006604'01  254 00 0 00 005726'		JRST PIRQR		;RETURN TO USER
  6177
  6178					;Not a panic channel, or panic channel with no ERJMP. Terminate the process if
  6179					;it can't take the interrupt or the superior wants it.
  6180
  6181	006605'01  200 01 0 00 006603*	PSIN6:	MOVE T1,PSIBW
  6182	006606'01  404 01 0 00 006543*	PSIN5:	AND 1,SUPCHN		;LOOK AT SUPERIOR RESERVED CHANS
  6183	006607'01  326 01 0 00 007006'		JUMPN 1,PSIN3		;TERMINATE IF ANY
  6184	006610'01  200 01 0 00 006605*		MOVE 1,PSIBW
  6185	006611'01  404 01 0 00 005666'		AND 1,CHNSON		;LOOK AT SPECIAL CHANNELS
  6186	006612'01  332 00 0 00 005511*		SKIPE PSISYS		;IF THIS PROCESS NOT TAKING PSI'S,
  6187	006613'01  326 01 0 00 007006'		JUMPN 1,PSIN3		;TERMINATE IT IF ANY SPECIALS
  6188	006614'01  420 01 0 00 006541*		ANDCM 1,PSICHM		;AND'ING WITH USER'S 'OFF' CHANNELS
  6189	006615'01  326 01 0 00 007006'		JUMPN 1,PSIN3		;TERMINATE CAUSE CHANNEL NOT ACTIVE
  6190	006616'01  332 00 0 00 006612*		SKIPE PSISYS		;PSI SYSTEM ON?
  6191	006617'01  254 00 0 00 005726'		JRST PIRQR		;NO
  6192	006620'01  336 00 0 00 000000*		SKIPN PSLEVT		;THIS PROCESS TAKING INTERRUPTS?
  6193	006621'01  254 00 0 00 007005'		JRST PSIN1		;NO, GO TRANSMIT THE PSI
  6194						;..
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 156
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6195						;..
  6196
  6197					;PSIBW (AND AC 1) HAS A BIT SET FOR EACH CHANNEL TO GIVE AN INTERRUPT.
  6198					;CHECK THEM ALL TO FIND THE HIGHEST PRIORITY (LOWEST LEVEL NUMBER)
  6199
  6200	006622'01  200 01 0 00 006610*		MOVE 1,PSIBW		;GET CHANNELS NEEDING INTERRUPTS
  6201	006623'01  201 02 0 00 000000 		MOVEI 2,0		;INIT CHANNEL NUMBER
  6202	006624'01  205 03 0 00 000001 		MOVSI 3,1		;INIT LOWEST LEVEL
  6203	006625'01  243 01 0 00 006627'	PSIS4:	JFFO T1,PSIS2		;JUMP WITH FIRST CHN FOUND IN T2
  6204	006626'01  254 00 0 00 006646'		JRST PSIS10		;NO MORE. GO FINISH
  6205
  6206					;T2/ CHANNEL NUMBER
  6207					;T3/ PREVIOUS LOW LEVEL NUMBER
  6208
  6209	006627'01  420 01 0 02 006451*	PSIS2:	ANDCM T1,BITS(T2)	;DON'T LOOK AT THIS BIT NEXT TIME
  6210	006630'01  200 04 0 00 000000*		MOVE 4,PSCHNT		;GET ADR OF USER'S CHANNEL TABLE
  6211	006631'01  271 04 0 02 000000 		ADDI 4,0(2)		;COMPUTE ADR OF USER'S CHANNEL WORD
  6212	006632'01  256 04 0 00 011234'		UMOVE T4,@T4		;GET LEVEL NUMBER FOR THIS CHANNEL
  6213	006633'01  320 16 0 00 007005'		 ERJMP PSIN1
  6214						JN PSXSIR,,[
  6215							LOAD T4,SILEV,T4 ;GET LEVEL NUMBER
  6216	006634'01  200 16 0 00 000000*			JRST PSIS3]
  6217	006635'01  321 16 0 00 011236'
  6218	006636'01  557 00 0 00 000004 		HLRZS T4		;GET LEVEL NUMBER
  6219	006637'01  303 04 0 00 000003 	PSIS3:	CAILE 4,NPILEV		;LEGAL LEVEL?
  6220	006640'01  400 04 0 00 000000 		SETZ 4,			;NO, TREAT AS 0
  6221	006641'01  307 03 0 04 000000 		CAIG 3,0(4)		;OLD LEVEL GREATER THAN CURRENT?
  6222	006642'01  254 00 0 00 006625'		JRST PSIS4		;NO
  6223	006643'01  201 03 0 04 000000 		MOVEI 3,0(4)		;YES, REMEMBER NEW LEVEL
  6224	006644'01  201 05 0 02 000000 		MOVEI Q1,0(2)		;AND CHANNEL NUMBER
  6225	006645'01  254 00 0 00 006625'		JRST PSIS4		;RESUME SCAN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 157
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6226
  6227					;HERE WHEN ALL BITS HAVE BEEN LOOKED AT.
  6228					;T3/ LEVEL OF HIGHEST PRIORITY INTERRUPT FOUND
  6229					;Q1/ CORRESPONDING CHANNEL NUMBER
  6230
  6231	006646'01  322 03 0 00 007003'	PSIS10:	JUMPE 3,PSID1		;NO LEVEL ASSIGNED? GO XMIT INTERRUPT
  6232	006647'01  200 01 0 03 006627*		MOVE 1,BITS(3)
  6233	006650'01  317 01 0 00 000000*		CAMG 1,PSIBIP		;OK TO BREAK ON THIS LEVEL?
  6234						JRST [	MOVE 2,PSIBW	;NO, .GE. PRIORITY LEVEL IN PROGRESS
  6235							TDNN 2,CHNSON	;BREAKS ON PANIC CHNS WAITING?
  6236							JRST PIRQR	;NO, HOLD WAITING BREAKS
  6237							MOVE 1,2
  6238	006651'01  254 00 0 00 011240'			JRST PSIN3]	;YES, MUST TERMINATE
  6239	006652'01  436 01 0 00 006650*		IORM 1,PSIBIP		;YES, REMEMBER  BREAK THIS LEVEL
  6240	006653'01  200 01 0 00 006630*		MOVE 1,PSCHNT		;GET ADR OF USER'S CHANNEL TABLE
  6241	006654'01  271 01 0 05 000000 		ADDI 1,0(Q1)		;COMPUTE ADR OF USER'S CHANNEL WORD
  6242	006655'01  256 04 0 00 011245'		UMOVE T4,@1		;GET LEVEL + ADDR OF USER'S INT ROUTINE
  6243	006656'01  320 16 0 00 007005'		 ERJMP PSIN1		;IF FAILED, TERMINATE
  6244						JN PSXSIR,,[
  6245							ANDX T4,SIADR	;IF EXTENDED, GET ROUTINE ADDRESS
  6246	006657'01  200 16 0 00 006634*			JRST PSIS9]
  6247	006660'01  321 16 0 00 011246'
  6248	006661'01  500 04 0 00 006653*		HLL T4,PSCHNT		;APPLY SECTION USED IN SIR JSYS
  6249
  6250					;User has provided routine address for this level.
  6251					;	T4/ address
  6252					;Set up PIPC to go to the interrupt routine provided in user's CHNTAB
  6253
  6254	006662'01  200 01 0 00 006601*	PSIS9:	MOVE 1,PIFL		;GET FLAGS WHEN INTERRUPTED
  6255	006663'01  250 04 0 00 006600*		EXCH 4,PIPC		;GET PC WHEN INTERRUPTED,SAVE NEW PC
  6256	006664'01  607 01 0 00 010000 		TLNN 1,(UMODF)		;WAS IN USER MODE?
  6257	006665'01  254 00 0 00 006717'		JRST PSISM		;NO, MUST SAVE MONITOR CONTEXT
  6258
  6259					;This removes op code and AC, which may have been in the flags word if it
  6260					;came from FFL. This may not be necessary on the KL. On the KC, it is wrong
  6261
  6262					   IFN KLFLG,<
  6263	006666'01  512 01 0 00 006662*		HLLZM T1,PIFL		;PRESERVE USERS FLAGS
  6264					   >				;END OF IFN KLFLG
  6265						;..
  6266
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 158
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6267					;HERE WHEN MONITOR CONTEXT HAS BEEN SAVED (IF NECESSARY). READY TO
  6268					;STORE PC INTO USER'S LEVTAB. PIFL AND PIPC ARE SET UP FOR GOING TO
  6269					;USER'S INTERRUPT ROUTINE.
  6270
  6271					;	T1/ FLAGS TO GO INTO LEVTAB
  6272					;	T4/ PC TO GO INTO LEVTAB
  6273					;	Q1/ CHANNEL NUMBER
  6274
  6275						;..
  6276	006667'01  402 00 0 00 006546*	PSIS5:	SETZM PIOLDS
  6277	006670'01  200 02 0 00 006620*		MOVE 2,PSLEVT		;GET ADR OF USER'S LEVEL TABLE
  6278	006671'01  271 02 0 03 777777 		ADDI 2,-1(3)		;COMPUTE ADR OF USER'S LEVEL WORD
  6279	006672'01  256 04 0 00 011250'		UMOVE 2,@2		;GET ADR OF PC WORD FOR THIS LEVEL
  6280	006673'01  320 16 0 00 007005'		 ERJMP PSIN1		;IF FAILED, TERMINATE
  6281						JN PSXSIR,,[
  6282							ANDX T1,EXFLBT	;DON'T RETURN BITS THE USER SHOULDN'T SEE
  6283							UMOVEM T1,@T2	;SAVE FLAGS WORD
  6284							ERJMP PSIN1	;QUIT IF FAILED
  6285							AOS T2
  6286							UMOVEM T4,@T2	;SAVE PC WORD
  6287							 ERJMP PSIN1	;QUIT IF FAILED
  6288	006674'01  200 16 0 00 006657*			JRST PSID3]
  6289	006675'01  321 16 0 00 011253'
  6290	006676'01  540 01 0 00 000004 		HRR T1,T4		;COMBINE PC
  6291	006677'01  430 04 0 00 006670*		XOR T4,PSLEVT		;SEE IF SECTIONS ARE THE SAME
  6292	006700'01  603 04 0 00 777777 		TLNE T4,-1		;ARE THEY?
  6293	006701'01  254 00 0 00 007005'		JRST PSIN1		;NO. ERROR THEN
  6294	006702'01  500 02 0 00 006677*		HLL T2,PSLEVT		;FORCE CORRECT SECTION
  6295	006703'01  256 04 0 00 011251'		UMOVEM 1,@2		;STORE BREAK PC IN USER'S MEMORY
  6296	006704'01  320 16 0 00 007005'		ERJMP PSIN1		;IF FAILED, TERMINATE
  6297	006705'01  200 01 0 05 006647*	PSID3:	MOVE 1,BITS(Q1)		;CLEAR WAITING BREAK BIT FOR THIS CHANNEL
  6298	006706'01  412 01 0 00 006622*		ANDCAM 1,PSIBW
  6299	006707'01  254 00 0 00 005726'		JRST PIRQR		;TO USER
  6300
  6301
  6302					;MONITOR ROUTINE IS SHORTSTOPPING INTERRUPTS
  6303					;MONBK/ 30 bit address of interrupt routine (include section number !!)
  6304					;Copy new PC to PIPC, and new flags to PIFL
  6305					;Store old flags in ITFFL, and old PC in ITFPC
  6306
  6307	006710'01  200 01 0 00 011262'	PSIMB:	MOVX T1,MONENV		;COOK UP NEW FLAGS
  6308	006711'01  250 01 0 00 006666*		EXCH T1,PIFL		;GET OLD FLAGS & SET UP NEW FLAGS
  6309	006712'01  200 02 0 00 000000*		MOVE T2,MONBK		;GET ROUTINE ADDRESS (30 BIT ADDRESS)
  6310	006713'01  250 02 0 00 006663*		EXCH T2,PIPC		;GET OLD PC - SET NEW PC
  6311	006714'01  124 01 0 00 000000*		DMOVEM T1,ITFFL		;SAVE OLD FLAGS & OLD PC
  6312	006715'01  402 00 0 00 006667*		SETZM PIOLDS		;WE WERE RUNNING BEFORE PSI.
  6313	006716'01  254 00 0 00 005726'		JRST PIRQR		;GO TO IT.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 159
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6314
  6315					;HERE WHEN INTERRUPTED OUT OF MONITOR CONTEXT. SAVE ALL RELEVANT
  6316					;INFO BEFORE GIVING THE INTERRUPT.
  6317
  6318					;THIS CODE SAVES ONTO A SPECIAL PSI STACK. IT USES AC FX AS ITS STACK
  6319					;POINTER. THE DEBRK JSYS USERS THIS INFORMATION TO CONTINUE THE INTERRUPTED
  6320					;JSYS
  6321
  6322					;T1/ FLAGS AT TIME OF INTERRUPT (FROM PIFL)
  6323					;T4/ PC AT TIME OF INTERRUPT (FROM PIPC)
  6324
  6325	006717'01  554 02 0 03 006705*	PSISM:	HLRZ 2,BITS(3)		;NO, REMEMBER MONITOR INTERRUPT
  6326	006720'01  436 02 0 00 006652*		IORM 2,PSIBIP		;IN RH OF BIP WORD
  6327	006721'01  200 07 0 00 005467*		MOVE FX,PSIPT		;STORAGE STACK POINTER
  6328	006722'01  200 10 0 00 000007 		MOVE P1,FX		;SAVE CURRENT STACK POINTER
  6329	006723'01  261 07 0 00 000001 		PUSH FX,1
  6330	006724'01  261 07 0 00 000004 		PUSH FX,4		;SAVED PC AND FLAGS
  6331
  6332					;SAVE A SET OF IMPORTANT CELLS. SAVCT CONTAINS A LIST OF THEM.
  6333
  6334	006725'01  205 06 0 00 777771 		MOVSI Q2,-NSAVC		;SAVE VULNERABLE CELLS
  6335	006726'01  261 07 1 06 007270'		PUSH FX,@SAVCT(Q2)
  6336	006727'01  253 06 0 00 006726'		AOBJN Q2,.-1
  6337
  6338					;SAVE THE UPDL STACK
  6339
  6340	006730'01  205 06 0 00 006573*		MOVSI Q2,UPDL		;STORE ENTIRE MONITOR STACK
  6341	006731'01  541 06 0 07 000001 		HRRI Q2,1(FX)
  6342	006732'01  270 07 0 00 011263'		ADD FX,[XWD NUPDL,NUPDL]
  6343	006733'01  325 07 0 00 007002'		JUMPGE FX,PIOVFW	;IF POSITIVE NO ROOM
  6344	006734'01  251 06 0 07 000000 		BLT Q2,0(FX)
  6345
  6346					;STORE THE CURRENT CONTEXT AC'S AT THE TIME OF THE INTERRUPT (IN PIAC)
  6347
  6348	006735'01  205 01 0 00 005670*		MOVSI 1,PIAC		;STORE CURRENT MONITOR AC'S
  6349	006736'01  541 01 0 07 000001 		HRRI 1,1(FX)		;NOW LIVING IN PIAC
  6350	006737'01  270 07 0 00 011264'		ADD FX,[XWD 20,20]
  6351	006740'01  325 07 0 00 007002'		JUMPGE FX,PIOVFW	;IF POSISTVE NO ROOM
  6352	006741'01  251 01 0 07 000000 		BLT 1,0(FX)
  6353						;..
  6354
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 160
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6355					;SAVE ALL AC BLOCKS (THOSE IN ACBAS BLOCKS AND PREVIOUS
  6356					;CONTEXT AC'S)
  6357
  6358						;..
  6359	006742'01  550 01 0 00 005471*		HRRZ 1,ACBAS		;STORE ALL AC BLOCKS IN USE
  6360	006743'01  275 01 0 00 000000#		SUBI 1,<UACB>B39-1	;COMPUTE NUMBER BLOCKS IN USE
  6361	006744'01  323 01 0 00 006762'		JUMPLE 1,PSISM1		;JUMP IF NONE
  6362
  6363					;Copy previous context AC's onto the PI stack.
  6364
  6365	006745'01  270 07 0 00 011264'		ADD FX,[20,,20]		;POINT TO END OF BLT
  6366	006746'01  325 07 0 00 007002'		JUMPGE FX,PIOVFW	;IF POSITIVE NO ROOM
  6367	006747'01  201 02 0 07 777761 		STPAC. T2,-17(FX)	;COPY PREVIOUS AC'S TO THE STACK
  6368	006750'01  256 01 0 00 011265'
  6369
  6370					;Load previous context AC's saved during JSYS entry
  6371
  6372	006751'01  205 02 0 00 000000*		LDPAC. T2,UACB		;LOAD PREVIOUS CONTEXT AC'S
  6373	006752'01  256 04 0 00 011266'
  6374
  6375					;Copy all AC blocks (saved in UACB during nested JSYS entry) onto the PI stack
  6376
  6377	006753'01  205 02 0 00 006751*		MOVSI 2,UACB		;SETUP TO BLT ENTIRE AC STACK
  6378	006754'01  541 02 0 07 000001 		HRRI 2,1(FX)		; .. TO PSI STACK ..
  6379	006755'01  242 01 0 00 000004 		LSH 1,4			;COMPUTE NUMBER WORDS IN USE
  6380	006756'01  505 01 0 01 000000 		HRLI 1,0(1)		;NUMBER OF WORDS BOTH HALFS
  6381	006757'01  270 07 0 00 000001 		ADD FX,1
  6382	006760'01  325 07 0 00 007002'		JUMPGE FX,PIOVFW	;IF POSITIVE NO ROOM
  6383	006761'01  251 02 0 07 000000 		BLT 2,0(FX)
  6384
  6385					;Set up to return to user mode
  6386
  6387	006762'01  261 07 0 00 000001 	PSISM1:	PUSH FX,1		;SAVE COUNT FOR DEBRK
  6388	006763'01  261 07 0 00 006742*		PUSH FX,ACBAS		;AND CURRENT ACBAS
  6389	006764'01  200 01 0 00 010150'		MOVE 1,UPP		;RESET MON STACK
  6390	006765'01  202 01 0 00 000000#		MOVEM 1,PIAC+P
  6391	006766'01  200 01 0 00 000000#		MOVE 1,UPDL+1		;USER FLAGS AT MONITOR CALL
  6392	006767'01  630 01 0 00 010707'		ANDX T1,EXFLBT		;GET ONLY FLAGS BITS
  6393	006770'01  670 01 0 00 011267'		TXO T1,USRCTX		;MAKE DAMN SURE IT'S USER MODE
  6394	006771'01  202 01 0 00 006711*		MOVEM T1,PIFL		;PRESERVE USERS FLAGS
  6395	006772'01  200 04 0 00 006730*		MOVE T4,UPDL		;GET PC AT JSYS ENTRY
  6396	006773'01  261 07 0 00 000010 		PUSH FX,P1		;PSI STACK BEFORE ALL THIS PUSHING
  6397	006774'01  261 07 0 00 000001 		PUSH FX,1		;SAVE FLAGS AT JSYS ENTRY
  6398	006775'01  261 07 0 00 000004 		PUSH FX,T4		;SAVE PC AT JSYS ENTRY
  6399	006776'01  202 07 0 00 006721*		MOVEM FX,PSIPT		;SAVE CURRENT STACK POINTER
  6400	006777'01  630 01 0 00 011270'		TXZ T1,USRCTX		;SO HE CAN TELL IT WAS MON INTERRUPT
  6401	007000'01  476 00 0 00 005542*		SETOM SLOWF
  6402	007001'01  254 00 0 00 006667'		JRST PSIS5		;FINISH INTERRUPT START
  6403
  6404					;At this point,
  6405					;	PIFL/ flags from top of UPDL with user context forced on
  6406					;	PIPC/ New PC as provided by user's channel table
  6407					;	T1/ flags from top of UPDL with user context forced off
  6408					;	T4/ PC from the top of UPDL
  6409
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 160-1
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6410					;T1 and T4 will be stored into the user's LEVTAB
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 161
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6411
  6412					PIOVFW:	BUG.(HLT,PSISTK,SCHED,HARD,<PSI Storage stack overflow>,,<
  6413					
  6414					Cause:	A software interrupt occurred while a process was running
  6415						in the monitor. The monitor is saving information regarding
  6416						the state of the process so that in can restore that state
  6417						when the process dismisses the interrupt. The BUGHLT indicates
  6418						that the storage area has overflowed.
  6419	007002'01  256 00 0 00 011271'	>)
  6420
  6421
  6422					;THIS FORK WON'T TAKE INTERRUPT, DISMISS IT AND RECORD WHY
  6423					;Get the channel number
  6424
  6425	007003'01  201 02 0 05 000000 	PSID1:	MOVEI 2,0(Q1)		;CHANNEL WITH NO LEVEL ASSIGNED
  6426	007004'01  254 00 0 00 007007'		JRST PSIN2
  6427
  6428					;Determine channel number from waiting interrupts
  6429
  6430	007005'01  200 01 0 00 006706*	PSIN1:	MOVE 1,PSIBW		;INTERRUPTS OFF OR NO LEVCHN
  6431	007006'01  243 01 0 00 007007'	PSIN3:	JFFO 1,.+1		;CALCULATE CHANNEL NUMBER
  6432
  6433					;T2/ channel number on which interrupt was attempted
  6434
  6435	007007'01  202 02 0 00 000000*	PSIN2:	MOVEM 2,FORCTC		;SAVE CHANNEL NUMBER FOR STATUS
  6436	007010'01  200 01 0 02 006717*		MOVE 1,BITS(2)		;JUST ONE CHANNEL AT A TIME
  6437	007011'01  412 01 0 00 007005*		ANDCAM 1,PSIBW		;RESET WAITING BIT
  6438	007012'01  200 01 0 00 000000*		MOVE 1,CAPENB
  6439	007013'01  603 01 0 00 000001 		TLNE 1,(1B17)		;SUPERIOR WANTS FROZEN STEAD HALT?
  6440						JRST [	CALL FKTMI	;YES. GO INTERRUPT IT THEN
  6441							MOVEI 3,FRZWT	;AND GET PROPER STATUS
  6442	007014'01  254 00 0 00 011273'			JRST PIRSK1]	;AND GO DO THE FREEZE
  6443	007015'01  260 17 0 00 007024'		CALL GETSFX		;GET SUPERIOR FORK INDEX
  6444	007016'01  200 06 0 00 000001 		MOVE Q2,1		;SAVE IT
  6445	007017'01  260 17 0 00 005744'		CALL UNPIRN		;LEAVE PI STATE, MOVE AC'S ETC.
  6446	007020'01  200 17 0 00 001235'		MOVE P,PI7P
  6447	007021'01  200 01 0 00 000006 		MOVE 1,Q2		;RECOVER SUPERIOR FORK INDEX
  6448	007022'01  541 01 0 00 007031'		HRRI 1,FORCTM
  6449	007023'01  254 00 0 00 000372'		JRST DISMSE		;THIS ONE IS BEING DISMISSED
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 162
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6450
  6451					;GET SUPERIOR FORK INDEX FOR HALT OR FORCED TERMINATION
  6452
  6453	007024'01  550 01 0 00 006550*	GETSFX:	HRRZ 1,FORKN
  6454	007025'01  270 01 0 00 006224'		ADD 1,SUPERP		;MAKE POINTER TO SUPERIOR
  6455	007026'01  135 01 0 00 000001 		LDB 1,1
  6456	007027'01  514 01 0 01 006170*		HRLZ 1,SYSFK(1)		;PUT INDEX IN LH FOR DISMISS TEST WORD
  6457	007030'01  263 17 0 00 000000 		RET
  6458
  6459	007031'01  254 00 0 04 000000 	FORCTM::JRST 0(4)		;SCHEDULER TEST FOR FORCED TERM FORK
  6460
  6461					;INTERRUPT SUPERIOR FORK ON TERMINATION
  6462
  6463	007032'01  550 01 0 00 007024*	FKTMI::	HRRZ 1,FORKN
  6464	007033'01  332 00 0 00 006564*		SKIPE MONCHN		;MONITOR CHANNELS ACTIVATED
  6465						JRST [	MOVEI T1,^D35	;YES GIVE CH 35 INTERRUPT TO THIS FORK
  6466							MOVE T2,FORKX
  6467	007034'01  254 00 0 00 011276'			CALLRET PSIRQ]
  6468	007035'01  336 00 0 00 000001 		SKIPN 1			;OR
  6469	007036'01  334 01 0 00 011301'		SKIPA 1,[^D35]		;TERMINATING TOP FORK, GIVE CH 35
  6470	007037'01  201 01 0 00 000023 		MOVEI 1,TRMINT		;19 IS FORK TERMINATED
  6471	007040'01  260 17 0 00 007042'		CALL PSIT		;TRANSMIT IT
  6472	007041'01  263 17 0 00 000000 		RET
  6473
  6474					;XMIT INTERRUPT TO SUPERIOR FORK
  6475
  6476	007042'01  550 02 0 00 007032*	PSIT:	HRRZ 2,FORKN
  6477	007043'01  270 02 0 00 006224'		ADD 2,SUPERP		;GET SUPERIOR
  6478	007044'01  135 02 0 00 000002 		LDB 2,2
  6479	007045'01  550 02 0 02 007027*		HRRZ 2,SYSFK(2)		;SYSTEM FORK INDEX
  6480	007046'01  254 00 0 00 006026'		CALLRET PSIRQ		;REQUEST INTERRUPT
  6481
  6482
  6483					;CONSTRUCT BYTE PTR TO CHANNEL NUMBER FOR TERM CODE
  6484					; 1/ TERMINAL CODE
  6485					;	CALL GETCHA
  6486					; RETURN +1: ALWAYS, 2/ BYTE PTR TO CHANNEL NUMBER
  6487
  6488	007047'01  201 02 0 01 000000 	GETCHA::MOVEI 2,0(1)
  6489	007050'01  231 02 0 00 000006 		IDIVI 2,6
  6490	007051'01  271 02 0 00 000000*		ADDI 2,PSICHA
  6491	007052'01  500 02 0 03 000000*		HLL 2,CH6TAB(3)
  6492	007053'01  263 17 0 00 000000 		RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 163
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6493
  6494					;DEFERRED INTERRUPT LOGIC
  6495					;SET TRAPS TO RECHECK INTERRUPTS WHEN STATE CHANGES
  6496					;HERE WHEN PROCESS IS NOINT AND CAN'T TAKE AN INTERRUPT. SET UP INTDFF
  6497					;AND MJRSTF TO HANDLE THIS LATER
  6498
  6499	007054'01  200 01 0 00 007067'	PSIDFR:	MOVE 1,MJRST1
  6500	007055'01  202 01 0 00 006505*		MOVEM 1,MJRSTF
  6501	007056'01  200 01 0 00 007071'		MOVE 1,INTDF1
  6502	007057'01  202 01 0 00 006507*		MOVEM 1,INTDFF
  6503	007060'01  260 17 0 00 005744'		CALL UNPIRN		;LEAVE BREAK STARTING STATE
  6504	007061'01  205 16 0 00 200000 		SETONE FKPS1,(FX)	; BUT LEAVE PENDING BIT
  6505	007062'01  436 16 0 07 006502*
  6506	007063'01  260 17 0 00 007137'		CALL CHKBMP		;SEE IF NEED PI BUMPING AGAIN
  6507	007064'01  600 00 0 00 000000 		 NOP
  6508	007065'01  254 00 0 00 005727'		JRST PSIDF1		;RESUME
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 164
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6509
  6510					;These are two possible contents of MJRSTF. JSYS return executes this
  6511					;location. MJRST0 causes a return to the previous context. If a process
  6512					;is NOINT when an interrupt occurs, PSIDFR stores MJRST1 in MJRSTF (see
  6513					;above). WHen the process executes MJRSTF, the code at PSISV0 is executed.
  6514
  6515	007066'01  254 05 0 00 000000*	MJRST0:	XJRSTF FFL		;NORMAL CONTENTS OF MJRSTF
  6516	007067'01  254 00 0 00 007076'	MJRST1:	JRST PSISV0		;TRY FOR INTERRUPT NOW
  6517
  6518					;These are two possible contents of INDTFF. The OKINT macro executes this
  6519					;location. INTDF0 decrements the noint count. If a process is NOINT when an
  6520					;interrupt occurs, PSIDFR stores INTDF1 in INTDFF (see above). When the
  6521					;process executes an OKINT, the code at PSISV1 is executed, and the flags
  6522					;and PC are stored in PIFL/PIPC.
  6523
  6524	007070'01  370 00 0 00 006020*	INTDF0:	SOS INTDF		;NORMAL CONTENTS OF INTDFF
  6525	007071'01  254 07 0 00 006771*	INTDF1:	XPCW PIFL		;CONTENTS OF INTDFF WHEN TRAP SET
  6526									;PIPC+1 CONTAINS JRST PSISV1
  6527
  6528					;HERE WHEN PROCESS DID AN OKINT AND THERE WAS AN INTERRUPT PENDING FOR
  6529					;THE PROCESS. DON'T LET IT TAKE IF PROCESS IS STILL NOINT.
  6530
  6531	007072'01			PSISV1:
  6532					   IFN KLFLG,<
  6533	007072'01  7 010 14 0 00 000261*	DATAO PAG,SETMON	;SET MON AC BLOCK CURRENT
  6534					   >				;END OF IFN KLFLG
  6535	007073'01  371 00 0 00 007070*		SOSL INTDF
  6536	007074'01  254 05 0 00 007071*		XJRSTF PIFL		;IF STILL NOINT, PROCEED
  6537	007075'01  254 00 0 00 007111'		JRST PSISV2		;GO ON
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 165
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6538
  6539					;HERE WHEN PROCESS WENT TO MRETN (TO RETURN FROM A JSYS OR UUO),
  6540					;AN INTERRUPT WAS PENDING, AND THE PROCESS HAS BEEN NOINT UNTIL NOW.
  6541					;IF JSYS WAS NESTED (I.E., PROCESS IS NOT RETURNING TO USER) AND
  6542					;PROCESS IS STILL NOINT, DON'T LET THE INTERRUPT TAKE.
  6543
  6544	007076'01			PSISV0:
  6545					   IFN KLFLG,<
  6546	007076'01  7 010 14 0 00 007072*	DATAO PAG,SETMON	;SET MON AC BLOCK CURRENT
  6547					   >				;END OF IFN KLFLG
  6548	007077'01  124 01 0 00 007074*		DMOVEM 1,PIFL		;SAVE AC1
  6549	007100'01  120 01 0 00 007066*		DMOVE 1,FFL		;FFL NOW CONTAINS USER'SPC
  6550	007101'01  603 01 0 00 010000 		TXNE T1,UMODF		;A USER-MODE PC?
  6551	007102'01  254 00 0 00 007107'		IFSKP.
  6552	007103'01  335 00 0 00 007073*		  SKIPGE INTDF		;NO. NOW INTERRUPTABLE?
  6553	007104'01  254 00 0 00 007107'		ANSKP.
  6554	007105'01  120 01 0 00 007077*		  DMOVE T1,PIFL		;NO. RECOVER AC CONTENTS
  6555	007106'01  254 05 0 00 007100*		  XJRSTF FFL		;AND RETURN FROM MUUO
  6556	007107'01				ENDIF.
  6557	007107'01  250 01 0 00 007105*		EXCH 1,PIFL		;COPY FFL TO PIFL, RESTORE AC
  6558	007110'01  250 02 0 00 006713*		EXCH 2,PIPC		;COPY FPC TO PIPC, RESTORE AC
  6559
  6560					;Allow deferred interrupt to happen
  6561
  6562	007111'01  202 17 0 00 000000#	PSISV2:	MOVEM P,PIAC+17		;SAVE USER'S AC17
  6563	007112'01  201 17 0 00 006735*		MOVEI P,PIAC		;AND AC'S 0-16
  6564	007113'01  251 17 0 00 000000#		BLT P,PIAC+16
  6565	007114'01  200 17 0 00 006011'		MOVE P,PIPDL		;RESTORE INTERRUPT STARTING STATE
  6566	007115'01  200 11 0 00 005753*		MOVE P2,TRAPFL
  6567	007116'01  200 12 0 00 005754*		MOVE P3,KIMUFL
  6568	007117'01  200 13 0 00 005755*		MOVE P4,TRAPPC		;SAVE VULNERABLE CELLS
  6569	007120'01  200 14 0 00 005756*		MOVE P5,KIMUPC
  6570	007121'01  200 15 0 00 005757*		MOVE P6,KIMUEF
  6571	007122'01  402 00 0 00 006715*		SETZM PIOLDS
  6572	007123'01  200 02 0 00 006535*	PSISV3:	MOVE 2,FORKX
  6573	007124'01  200 07 0 02 007062*		LOAD FX,FKINX,(2)
  6574						XJRSTF [MONENV		;ESTABLISH PROPER CONTEXT
  6575	007125'01  254 05 0 00 011302'			MSEC1,,PSII]	;AND ENTER MAIN SEQUENCE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 166
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6576
  6577					;TEST FOR IMMEDIATE OR DEFERRED INTERRUPT
  6578					;SKIP => IMMEDIATE
  6579					;NOSKIP => DEFERRED
  6580					;CALLED WITH TEST USER PC IN AC1,AC2
  6581
  6582	007126'01  603 01 0 00 010000 	PITEST::TLNE 1,(UMODF)		;USER MODE?
  6583						JRST [	SKIPE NSKED	;ARE WE NOSKED?
  6584							SKIPN PNSKDC	;YES. SHOULD WE BE BECAUSE OF RESOURCES?
  6585							RETSKP		;NO. SAY CAN INTERRUPT THEN
  6586	007127'01  254 00 0 00 011304'			RET]		;YES. DEFER THE INT
  6587	007130'01  331 00 0 00 007000*		SKIPL SLOWF		;NO, SLOW CODE?
  6588	007131'01  331 00 0 00 007103*		SKIPL INTDF		;YES, INTERRUPTABLE
  6589	007132'01  263 17 0 00 000000 		RET			;NO, DEFER
  6590	007133'01  336 00 0 00 005506*		SKIPN CRSKED
  6591	007134'01  332 00 0 00 005505*		SKIPE NSKED		;IN CASE NOSKED W/O NOINT
  6592						BUG.(CHK,PSINSK,SCHED,HARD,<PSI From NOSKED or CRSKED context>,,<
  6593					
  6594					Cause:	This process is NOSKED or CSKED, but is not NOINT.
  6595					
  6596	000016'04  000000  000000	>)
  6597	007135'01  256 00 0 00 011310'
  6598
  6599	007136'01  254 00 0 00 006405*		JRST RSKP		;IMMEDIATE
  6600
  6601					;TEST FOR PI BUMPING NEEDED
  6602					;	FX/ FORK INDEX
  6603
  6604	007137'01  200 16 0 07 007124*	CHKBMP:	LOAD CX,FKINX,(FX)
  6605	007140'01  612 16 0 00 011313'		TXNE CX,SUSFK%!PSILO%!PSIT1%!PSIT2%!PSIDP%!PSIPRI ;ANY INTERRUPT BITS ON?
  6606	007141'01  603 16 0 00 200000 		TXNE CX,FKPSI1		;AND NOT DEFERRING
  6607						JRST [	SETZRO PIBMP	;MAKE SURE BIT IS OFF
  6608	007142'01  254 00 0 00 011314'			RET]
  6609	007143'01  205 16 0 00 200000 		SETONE PIBMP		;YES. BUMP IT
  6610	007144'01  436 16 0 07 006001*
  6611	007145'01  254 00 0 00 007136*		RETSKP			;AND INFORM CALLER OF SAME
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 167
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6612
  6613					;DEBREAK
  6614
  6615	007146'01			.DEBRK::MCENT
  6616	007146'01  336 00 0 00 006720*		SKIPN PSIBIP		;ANY BREAKS IN PROGRESS?
  6617	007147'01  265 02 0 00 011317'		ITERR DBRKX1		;NO, ERROR
  6618	007150'01  135 16 0 00 011321'		SETPCS MSEC1A		;SET PCS TO 1 SO PXCT [BLT] WORKS
  6619	007151'01  661 16 0 00 200000 
  6620	007152'01  7 010 14 0 00 000016 
  6621	007153'01  200 02 0 00 007123*		MOVE 2,FORKX
  6622	007154'01  205 16 0 00 200000 		SETONE FKPS1,(2)	;SET INTERRUPT STARTING BIT
  6623	007155'01  436 16 0 02 007137*
  6624	007156'01  402 00 0 00 007122*		SETZM PIOLDS
  6625	007157'01  200 02 0 00 007146*		MOVE 2,PSIBIP		;BREAKS NOW IN PROGRESS
  6626	007160'01  243 02 0 00 007161'		JFFO 2,.+1		;FIND HIGHEST ONE
  6627	007161'01  200 01 0 00 006702*		MOVE 1,PSLEVT		;COMPUTE ADDRESS OF RETURN PC
  6628	007162'01  271 01 0 03 777777 		ADDI 1,-1(3)
  6629	007163'01  256 04 0 00 011322'		UMOVE 1,@1
  6630						JN PSXSIR,,[
  6631							XCTU [DMOVE Q1,@T1]
  6632							 ERJMP [MOVE T2,FORKX   ; get fork # back
  6633								MOVX T1,FKPSI1  ; no longer uninterruptable
  6634								ANDCAM T1,FKINT(T2) ; so prevent us from hanging
  6635								MOVE T1,LSTERR  ; get the last error
  6636								ITERR ()] 	; and generate an interrupt 
  6637							ANDX Q1,EXFLBT		;GET ONLY THE FLAG BITS
  6638	007164'01  200 16 0 00 006674*			JRST DEBRK2]
  6639	007165'01  321 16 0 00 011331'
  6640	007166'01  553 00 0 00 000001 		HRRZS 1			;IF OLD STYLE, FORCE SECTION 0 ADDRESS
  6641	007167'01  256 04 0 00 011335'		UMOVE Q1,@1		;GET RETURN PC FROM USER MEMORY
  6642	007170'01  550 06 0 00 000005 		HRRZ Q2,Q1		;SAVE THE PC HERE
  6643	007171'01  630 05 0 00 010707'		ANDX Q1,EXFLBT		;GET ONLY THE FLAG BITS
  6644	007172'01  500 06 0 00 007161*		HLL Q2,PSLEVT		;APPLY SECTION THAT WAS LOST WHEN STORED
  6645	007173'01  204 02 0 03 007010*	DEBRK2:	MOVS 2,BITS(3)
  6646	007174'01  612 02 0 00 007157*		TDNE 2,PSIBIP		;WAS THIS MONITOR INTERRUPT?
  6647	007175'01  254 00 0 00 007214'		JRST DEBRK6		;YES, GO UNWIND
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 168
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6648
  6649					;HERE TO RETURN CONTROL TO THE USER PROGRAM.
  6650					;Q1/ FLAGS FROM LEVTAB
  6651					;Q2/ PC FROM LEVTAB
  6652					;SEND USER TO THIS LOCATION PRESERVING CERTAIN FLAGS IF THEY WERE
  6653					;ON AT ENTRY TO DEBRK
  6654
  6655	007176'01  200 02 0 17 000000 	DEBRK3:	MOVE T2,0(P)		;GET FLAGS FROM JSYS ENTRY
  6656	007177'01  200 17 0 00 006011'		MOVE P,PIPDL		;ESTABLISH PI STACK
  6657	007200'01  430 05 0 00 000002 		XOR Q1,T2		;KEEP PRIVILEGED BITS FROM THIS CALL
  6658	007201'01  630 05 0 00 011336'		TXZ Q1,UMODF+UIOF+PC%AFI+37777777B35 ;SAVE RIGHT HALF FLAGS, TOO
  6659	007202'01  430 05 0 00 000002 		XOR Q1,T2
  6660	007203'01  202 05 0 00 007107*		MOVEM Q1,PIFL		;SET THIS AS FLAGS FOR PROCEEDING
  6661	007204'01  202 06 0 00 007110*		MOVEM Q2,PIPC		;SET TO DEBREAK AT THAT ADDRESS
  6662	007205'01  476 00 0 00 007130*		SETOM SLOWF		;NORMALIZE FLAGS FOR RETURN TO USER
  6663	007206'01  476 00 0 00 007131*		SETOM INTDF
  6664	007207'01  200 01 0 00 010150'		MOVE 1,UPP
  6665	007210'01  202 01 0 00 000000#		MOVEM 1,PIAC+P
  6666	007211'01  200 01 0 03 007173*	DEBRK4:	MOVE 1,BITS(3)
  6667	007212'01  412 01 0 00 007174*		ANDCAM 1,PSIBIP		;CLEAR BIP THIS LEVEL
  6668	007213'01  254 00 0 00 007123'		JRST PSISV3		;GO CHECK FOR OTHER INTERRUPTS AND RETURN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 169
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6669
  6670					;HERE BECAUSE INTERRUPT OCCURRED OUT OF MONITOR CONTEXT. PSISM SAVED
  6671					;CONTEXT ON PSI STACK. IF PC IN LEVTAB HAS BEEN CHANGED, DON'T CONTINUE
  6672					;IN MONITOR. IF UMODF IS ON, USER MUST HAVE SET IT, BECAUSE PSISM
  6673					;CLEARED IT BEFORE PUTTING IT IN LEVTAB. PSI STACK CONTAINS FLAGS AND
  6674					;PC AT TOP OF UPDL WHEN INTERRUPT OCCURRED. THESE WERE PUT INTO LEVTAB
  6675					;BY PSISM.
  6676
  6677					;Q1/ FLAGS FROM USER'S LEVTAB
  6678					;Q2/ PC FROM USER'S LEVTAB
  6679
  6680	007214'01  412 02 0 00 007212*	DEBRK6:	ANDCAM 2,PSIBIP		;CLEAR MON BREAK FLAG FOR THIS LEVEL
  6681	007215'01  200 07 0 00 006776*		MOVE FX,PSIPT
  6682	007216'01  262 07 0 00 000004 		POP FX,T4		;PC AT TOP OF UPDL WHEN INTERRUPT
  6683	007217'01  262 07 0 00 000002 		POP FX,T2		;FLAGS AT TOP OF UPDL WHEN INTERRUPTED
  6684	007220'01  262 07 0 00 007215*		POP FX,PSIPT		;TOP OF THIS BLOCK OF PSI STORAGE
  6685	007221'01  663 05 0 00 010000 		TLOE Q1,(UMODF)		;IF IT WAS DIDDLED AT ALL,
  6686	007222'01  254 00 0 00 007226'		JRST DEBRK5
  6687	007223'01  630 02 0 00 010707'		ANDX T2,EXFLBT		;GET ONLY THE FLAG BITS
  6688	007224'01  316 05 0 00 000002 		CAMN Q1,T2		;DO FLAGS MATCH?
  6689	007225'01  312 06 0 00 000004 		CAME Q2,T4		;YES. PC MATCH?
  6690
  6691					;HERE WHEN PC HAS BEEN CHANGED. DON'T PROCEED IN THE MONITOR ROUTINE
  6692					;THAT WAS INTERRUPTED. RELEASE ANY RESOURCES THAT THE PROCESS OWNS, AND
  6693					;GO SEND THE PROCESS TO THE ADDRESS IN LEVTAB.
  6694
  6695					DEBRK5:	JRST [	MOVE T1,FORKX	;GET FORK HANDLE
  6696							HLLZ T2,PSIBIP	;TELL THEM WHAT INTERRUPT LEVEL WE'RE AT
  6697							TDZ T2,BITS(T3)	;POINT TO LEVEL WE'RE GOING TO
  6698							PUSH P,T2	;SAVE FOR CALL TO GOKFRE
  6699							CALL JSBSTF	;GO PROCESS DEALLOCATION STACK
  6700							MOVE T1,FORKX	;GET FORK HANDLE
  6701							POP P,T2	;GET CORRECT LEVEL
  6702							CALL GOKFRE	;FREE GETOK ENTRIES
  6703	007226'01  254 00 0 00 011337'			JRST DEBRK3]	;DON'T RESUME MON ROUTINE
  6704
  6705					;HERE WHEN INTERRUPT OCCURRED FROM MONITOR CONTEXT, AND WE ARE
  6706					;RESUMING THE MONITOR ROUTINE. RESTORE CONTEXT AS SAVED BY PSISM
  6707					;ON SPECIAL PSI STACK
  6708
  6709	007227'01  200 17 0 00 006011'		MOVE P,PIPDL		;ESTABLISH PI PDL
  6710	007230'01  262 07 0 00 006763*		POP FX,ACBAS
  6711	007231'01  262 07 0 00 000004 		POP FX,4		;GET NUMBER OF WORDS FOR AC BLOCKS
  6712						;..
  6713
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 170
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6714					;RESTORE AC STACKS
  6715
  6716						;..
  6717	007232'01  323 04 0 00 007246'		JUMPLE 4,PDBK1		;JUMP IF NO AC STACK TO RESTORE
  6718	007233'01  274 07 0 00 000004 		SUB FX,4
  6719
  6720					;Restore AC blocks that had been saved at JSYS entry
  6721
  6722	007234'01  201 05 0 00 006753*		MOVEI Q1,UACB
  6723	007235'01  505 05 0 07 000001 		HRLI Q1,1(FX)
  6724	007236'01  271 04 0 05 000000 		ADDI 4,0(Q1)
  6725	007237'01  553 00 0 00 000004 		HRRZS T4
  6726	007240'01  251 05 0 04 777777 		BLT Q1,-1(4)		;RESTORE AC BLOCKS
  6727
  6728					;Copy previous context AC's to UACB block
  6729
  6730	007241'01  201 05 0 00 007234*		STPAC. Q1,UACB		;SAVE PREVIOUS CONTEXT AC'S
  6731	007242'01  256 01 0 00 011350'
  6732
  6733					;Load previous context AC block from PI stack
  6734
  6735	007243'01  274 07 0 00 011264'		SUB FX,[20,,20]		;COMPUTE START OF WHERE AC'S ARE
  6736	007244'01  205 02 0 07 000001 		LDPAC. T2,1(FX)		;LOAD PREVIOUS CONTEXT AC'S FROM STACK
  6737	007245'01  256 04 0 00 011266'
  6738
  6739
  6740					;Restore current context AC's from PIAC
  6741
  6742	007246'01  274 07 0 00 011264'	PDBK1:	SUB FX,[XWD 20,20]
  6743	007247'01  201 02 0 00 007112*		MOVEI 2,PIAC
  6744	007250'01  505 02 0 07 000001 		HRLI 2,1(FX)
  6745	007251'01  251 02 0 00 000000#		BLT 2,PIAC+17		;RESTORE MONITOR AC'S
  6746
  6747					;RESTORE UPDL STACK
  6748
  6749	007252'01  274 07 0 00 011263'		SUB FX,[XWD NUPDL,NUPDL]
  6750	007253'01  201 02 0 00 006772*		MOVEI 2,UPDL
  6751	007254'01  505 02 0 07 000001 		HRLI 2,1(FX)
  6752	007255'01  251 02 0 00 000000#		BLT 2,UPDL+NUPDL-1	;RESTORE STACK
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 171
SCHED	MAC	 7-Nov-88 20:50		Software Interrupt Service

  6753
  6754					;RESTORE SPECIAL CELLS
  6755
  6756	007256'01  201 02 0 00 000006 		MOVEI 2,NSAVC-1		;RESTORE VULNERABLE CELLS
  6757	007257'01  262 07 1 02 007270'		POP FX,@SAVCT(2)
  6758	007260'01  365 02 0 00 007257'		SOJGE 2,.-1
  6759	007261'01  262 07 0 00 000002 		POP FX,2		;GET PC AT TIME OF INTERRUPT
  6760	007262'01  202 02 0 00 007204*		MOVEM 2,PIPC		;SAVE PC (PROCESS WILL GO THERE)
  6761	007263'01  262 07 0 00 000002 		POP FX,2		;GET FLAGS AT TIME OF INTERRUPT
  6762	007264'01  202 02 0 00 007203*		MOVEM 2,PIFL		;SAVE FLAGS
  6763	007265'01  402 00 0 00 007205*		SETZM SLOWF
  6764	007266'01  476 00 0 00 007206*		SETOM INTDF		;BE OKINT
  6765	007267'01  254 00 0 00 007211'		JRST DEBRK4		;NOW DEBRK
  6766
  6767					;TABLE OF VULNERABLE CELLS
  6768
  6769	007270'01  000000000000#	SAVCT:	MPP
  6770	007271'01  000000000000#		PIOLDS
  6771	007272'01  000000  000011		P2			;TRAPFL
  6772	007273'01  000000  000012		P3			;KIMUFL
  6773	007274'01  000000  000013		P4			;TRAPPC
  6774	007275'01  000000  000014		P5			;KIMUPC
  6775	007276'01  000000  000015		P6			;KIMUEF
  6776					   IFN KCFLG,<
  6777						KIMOAC
  6778					   >
  6779		   	   000007	NSAVC==.-SAVCT
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 172
SCHED	MAC	 7-Nov-88 20:50		JSYS trapping

  6780						SUBTTL JSYS trapping
  6781
  6782					; Jsys Traps support code (TRAPSI, JTLOCK, JTULCK, etc)..
  6783
  6784
  6785					;TRAP AND PSI ROUTINE EXECUTED WHEN A FORK EXECUTES A TRAPPED JSYS
  6786					;CALLED AS FIRST CODE EXECUTED BY THE TRAPPED JSYS (WITH IT'S CONTEXT
  6787					;BUT TOTALLY INVISIBLE TO IT)
  6788
  6789					;P1/	ADDRESS OF FORK'S JTB + P2
  6790					;P2/	OFFSET FOR THIS JSYS NUMBER
  6791					;P3/	BIT MASK FOR THIS JSYS NUMBER
  6792
  6793					;P4/	MONITOR'S FORKN
  6794					;P5/	TRAP HANDLED FLAG
  6795					;P6/	OFFSET TO MONITOR'S PSB
  6796
  6797	007277'01  350 00 0 00 007266*	TRAPSI::NOINT			;DON'T INTERRUPT THIS CODE
  6798	007300'01  275 10 0 11 000000 		SUBI P1,(P2)		;GET BACK ADDRESS OF JTB WITHOUT OFFSET
  6799	007301'01  334 14 0 00 011105'		SKIPA P5,[0]		;TRAP HANDLED IF NON-ZERO
  6800
  6801	007302'01  200 10 0 13 000000*	TRPSI2:	MOVE P1,FKJTB(P4)	;pointer to monitor's JTB
  6802	007303'01  322 10 0 00 007323'		JUMPE P1,TRPSI6		;if he's not monitored were done
  6803	007304'01  550 13 0 10 000000 		LOAD P4,JTIMP,(P1)	;forkn of monitor's monitor
  6804	007305'01  271 10 0 11 000000 		ADDI P1,(P2)		;add in offset to bit table
  6805	007306'01  616 12 0 10 000020 		TDNN P3,JTBIM(P1)	;HANDLED BY THIS MONTIOR?
  6806	007307'01  254 00 0 00 007302'		JRST TRPSI2		;no, keep looking up the chain of monitors
  6807
  6808	007310'01  474 14 0 00 000000 		SETO P5,		;YES, INDICATE TRAP HANDLED
  6809	007311'01  201 01 0 13 000000 		MOVEI T1,0(P4)
  6810	007312'01  260 17 0 00 000000*		CALL SETLF1		;MAP PSB OF THE MONITOR
  6811	007313'01  200 15 0 00 000001 		MOVE P6,T1		;SAVE POINTER TO MONITOR'S PSB
  6812	007314'01  135 02 0 00 011351'	TRPSI4:	LOAD T2,JTMCN,(P6)
  6813	007315'01  306 02 0 00 000077 		CAIN T2,77		;IS CHANNEL SPECIFIED?
  6814	007316'01  254 00 0 00 007302'		JRST TRPSI2		;NO, DON'T PSI, SEARCH FOR ANOTHER MONITOR
  6815	007317'01  260 17 0 00 007377'		CALL JTLOCK		;YES, SYNCH WITH OTHER TRAPPING FORKS
  6816	007320'01  254 00 0 00 007314'		 JRST TRPSI4		;FORK SUSPENDED AND RESUMED
  6817						 			;WHILE QUEUED, RETRY LOCKING
  6818	007321'01  265 16 0 00 007350'		JSP CX,FRZPSI		;FREEZE SELF AND PSI MONITOR
  6819
  6820
  6821					;RESUMED HERE AFTER TRAP HANDLED IF MONITOR DOES NOT CHANGE PC
  6822					;WHEN CONTROL RETURNS TO TRPSI5 ACS P1-5 MUST BE THE SAME AS TRPSI3
  6823
  6824	007322'01  254 00 0 00 007302'	TRPSI5::JRST TRPSI2		;LOOK FOR MORE MONITORS (OF MONITORS)
  6825
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 173
SCHED	MAC	 7-Nov-88 20:50		JSYS trapping

  6826					;RETURN TO THE NORMAL JSYS CODE
  6827
  6828	007323'01  331 00 0 00 000014 	TRPSI6:	SKIPL P5		;HAS TRAP BEEN HANDLED AT ALL?
  6829						 BUG.(CHK,TRPSIE,SCHED,HARD,<TRAPSI - No monitor for trapped fork>,,<
  6830					
  6831					Cause:	A fork executed a JSYS that was marked as trapped, but there is no
  6832						fork monitoring this JSYS trap.
  6833					
  6834					Action:	Ignore the JSYS trap.
  6835					
  6836	000017'04  000000  000000	>)
  6837	007324'01  256 00 0 00 011352'
  6838
  6839	007325'01  135 01 0 00 011355'		LDB T1,[POINT 9,KIMUU1,26] ; Pick up opcode of trapped guy
  6840	007326'01  302 01 0 00 000104 		CAIE T1,<JSYS>B62	; Was a JSYS?
  6841	007327'01  254 00 0 00 007340'		 JRST TRPSI7		; No, a UUO
  6842	007330'01  550 01 0 00 000000#		LOAD T1,JTJNO
  6843	007331'01  200 16 0 01 000000*		MOVE CX,JSTAB(T1)	;GET NORMAL DISPATCH
  6844					;Note: It may be necessary to work on this for the KC. It's not clear
  6845					;whether FFL has the right context always or not. But JSTAB no longer contains
  6846					;PCU, and FFL got PCU at MENTU, so this HLLZM no longer seems necessary. It
  6847					;also has the side-effect of clearing PCS.
  6848					;	HLLZM CX,FFL		; Restore normal flags
  6849					;	TXZ CX,EXFLBT
  6850	007332'01  202 16 0 00 000000*		MOVEM CX,FPC		; And dispatch
  6851	007333'01  256 04 0 00 011356'		XCTU [DMOVE T1,1]	;RESTORE STANDARD 4 ARGS
  6852	007334'01  256 04 0 00 011357'		XCTU [DMOVE T3,3]
  6853	007335'01  402 00 0 00 007277*		SETZM INTDF		;RESTORE STATE TO ENTRY AT TRAPSI
  6854	007336'01  256 00 0 00 007057*		OKINT			;TURN PSIS BACK ON
  6855	007337'01  256 00 0 00 007055*		XCT MJRSTF		;DO NORMAL DISP FOR THIS JSYS
  6856
  6857	007340'01  476 00 0 00 007265*	TRPSI7:	SETOM SLOWF		; Untangle ourselves
  6858	007341'01  200 17 0 00 000554*		MOVE P,MPP		; in a state like this
  6859	007342'01  262 17 0 00 007106*		POP P,FFL		; Reset flags
  6860	007343'01  262 17 0 00 007332*		POP P,FPC		; And caller
  6861	007344'01  200 17 0 00 010150'		MOVE P,UPP		; Reset the stack...
  6862	007345'01  402 00 0 00 007335*		SETZM INTDF
  6863	007346'01  256 00 0 00 007336*		OKINT
  6864	007347'01  254 00 0 00 007520'		JRST U10501		; Return to handle the UUO
  6865
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 174
SCHED	MAC	 7-Nov-88 20:50		JSYS trapping

  6866
  6867					;FREEZE AND PSI ROUTINE - FORK INITIATES JSYS TRAP PSI OF
  6868					;MONITOR AND THEN FREEZES ITSELF
  6869					;P4/ JOB INDEX OF FORK TO PSI
  6870					;P6/ OFFSET TO FORKS PSB
  6871
  6872					;INVOKED VIA JSP CX,FRZPSI (MAKES USE OF CX)
  6873
  6874	007350'01  204 04 0 00 000552*	FRZPSI:	MOVS T4,KIMUU1		; Pick LH of instruction
  6875	007351'01  540 04 0 00 000000#		HRR T4,KIMUU1+1		; And then RH
  6876	007352'01  202 04 0 15 005553*		MOVEM T4,JTTRW(P6)	; Set last trapped instruction
  6877	007353'01  550 04 0 00 007042*		HRRZ T4,FORKN
  6878	007354'01  542 04 0 15 005554*		STOR T4,JTFRK,(P6)	; Trapped fork index
  6879	007355'01  542 13 0 00 005556*		STOR P4,JTMNI		;SAVE FORK WE TRAPPED TO FOR UTFRK
  6880
  6881	007356'01  332 00 0 00 005746*		ENTSKD			;SAVE ACS ETC.
  6882	007357'01  260 17 0 00 000537'
  6883	007360'01  350 00 0 00 007356*
  6884	007361'01  254 07 0 00 005660*
  6885	007362'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;CLEAR FLAGS IN CASE SECTION 0 CALLED
  6886	007363'01  202 16 0 00 005766*		MOVEM CX,PPC		; Save return for DISMSE
  6887	007364'01  200 16 0 00 007361*		MOVE CX,ENSKR		;GET THE RIGHT FLAGS (ENTSKD STORED THEM)
  6888	007365'01  202 16 0 00 005764*		MOVEM CX,PFL		;FOR RESUME AFTER DISMSE
  6889
  6890	007366'01  550 02 0 00 007355*		LOAD T2,JTMNI
  6891	007367'01  550 02 0 02 007045*		HRRZ T2,SYSFK(T2)	;GET FORKX OF MONITOR FORK
  6892	007370'01  205 01 0 00 000002 		MOVX T1,PSIJT%
  6893	007371'01  260 17 0 00 006033'		CALL PSIGR		;MAKE SCHEDULER SEE IT
  6894	007372'01  205 16 0 00 200040 		SETONE <FKPS1,FKFRJ>,(FX) ;DO "JSYS TRAP" FREEZE OF SELF
  6895	007373'01  436 16 0 07 007155*
  6896									;FX=FORKX SET BY ENSKED
  6897	007374'01  402 00 0 00 007156*		SETZM PIOLDS		;"OLD STATE" = RUNNING
  6898	007375'01  201 01 0 00 006477*		MOVEI T1,FRZWT
  6899	007376'01  254 00 0 00 000372'		JRST DISMSE		;DISMS
  6900
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 175
SCHED	MAC	 7-Nov-88 20:50		JSYS trapping

  6901
  6902					;JSYS TRAP LOCK AND UNLOCK ROUTINES
  6903					;WHEN A FORK TRIES JTLOCK AND SOME OTHER FORK HAS THE
  6904					;LOCK, THE FORK ADDS ITSELF TO A QUEUE (FKJTQ) AND BECOMES BLOCKED.
  6905					;WHEN THE LOCK IS CLEARED (BY A MONITORING FORK) THE QUEUE IS
  6906					;SCANNED FOR THE FIRST FORK (IF ANY) WAITING ON THE LOCK.  THAT
  6907					;FORK IS REMOVED FROM THE QUEUE AND ALLOWED TO RUN.
  6908
  6909					;LOCK ROUTINE
  6910					;ON ENTRY TO JTLOCK:
  6911					;P4/ JOB FORK INDEX (OF FORK TO FIELD TRAP)
  6912					;P6/ PTR TO ITS PSB
  6913					;RET + 1 IF SUSPENDED AND RESUMED WHILE QUEUED
  6914					;RET + 2 WITH LOCK SET
  6915
  6916	007377'01  265 16 0 00 000310'	JTLOCK:	NOSKED
  6917	007400'01  265 16 0 00 004322*		STKVAR <KIMUP0,KIMUP1>	;[7290] SAVE KIMUU1 AND KIMUU1+1
  6918	007401'01  000000  000002
  6919	007402'01  352 00 0 15 005563*		AOSE JTLCK(P6)		;TRY TO SEIZE THE LOCK
  6920	007403'01  254 00 0 00 007406'		JRST JTLOC2		;SOMEONE ELSE HAS IT
  6921	007404'01  265 16 0 00 000315'		OKSKED 			;GOT IT
  6922	007405'01  254 00 0 00 007145*	JTLOC1:	RETSKP
  6923
  6924
  6925					;Here when lock was already locked. Go add this process to the queue
  6926
  6927	007406'01  120 01 0 00 007350*	JTLOC2:	DMOVE T1,KIMUU1		;[7290]
  6928	007407'01  202 01 0 17 777776 		MOVEM T1,KIMUP0		;[7290] SAVE KIMUU1
  6929	007410'01  202 02 0 17 777775 		MOVEM T2,KIMUP1		;[7290] AND KIMUU1+1
  6930	007411'01  265 16 0 00 007417'		JSP CX,JTENQ		;PUT SELF ON JSYS TRAP QUEUE
  6931					;RETURNS HERE WITH LOCK SEIZED
  6932	007412'01  200 01 0 17 777776 		MOVE T1,KIMUP0		;[7290] GET KIMUU1 (COULD HAVE BEEN TRASHED)
  6933	007413'01  200 02 0 17 777775 		MOVE T2,KIMUP1		;[7290] AND KIMUU1+1
  6934	007414'01  124 01 0 00 007406*		DMOVEM T1,KIMUU1	;[7290] AND RESTORE THEM
  6935	007415'01  254 00 0 00 007405'		JRST JTLOC1		;[7290] AND RETURN WITH LOCK SEIZED
  6936						ENDSV.			;[7290] END STORAGE
  6937
  6938					;IF FORK IS RESUMED AT JTRLCK, IT RETURNS + 1 TO TRAPSI ROUTINE
  6939					;FORCING ANOTHER CALL TO JTLOCK AFTER A CHECK TO SEE IF THE TRAP IS
  6940					;STILL TO GO TO THE SAME FORK.
  6941
  6942
  6943	007416'01  263 17 0 00 000000 	JTRLCK:	RET
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 176
SCHED	MAC	 7-Nov-88 20:50		JSYS trapping

  6944
  6945					;JTENQ - ROUTINE TO PLACE FORK ON QUEUE
  6946
  6947					;INVOKED VIA JSP CX,JTENQ (MAKES USE OF CX)
  6948
  6949					;This routine dismisses, with the process pointing to the instruction
  6950					;following the JSP that invoked it.
  6951
  6952	007417'01  504 01 0 13 007367*	JTENQ:	HRL T1,SYSFK(P4)	;1=FORK WAITING ON
  6953	007420'01  332 00 0 00 007360*		ENTSKD			;ENTER SCHEDULER
  6954	007421'01  260 17 0 00 000537'
  6955	007422'01  350 00 0 00 007420*
  6956	007423'01  254 07 0 00 007364*
  6957	007424'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;CLEAR FLAGS IN CASE SECTION 0 CALLED
  6958	007425'01  202 16 0 00 007363*		MOVEM CX,PPC		; Save return for DISMSE
  6959	007426'01  200 16 0 00 007423*		MOVE CX,ENSKR		;GET THE RIGHT FLAGS (ENTSKD STORED THEM)
  6960	007427'01  202 16 0 00 007365*		MOVEM CX,PFL		;FOR RESUME AFTER DISMSE
  6961	007430'01  372 00 0 00 007134*		SOSE NSKED		;MATCHED NOSKED IN JTLOCK
  6962						BUG.(HLT,JTENQE,SCHED,SOFT,<JTENQ with bad NSKED>,,<
  6963					
  6964					Cause:	A process has attempted to lock the JSYS trap lock and found
  6965						it already locked. The process will enter a queue and dismiss until
  6966						the lock becomes available. The BUGHLT occurs because when the process
  6967						decrements its NOSKED counter, the value does not go to 0. This
  6968						means that the process is still NOSKED or it was OKSKED when it
  6969						should have been NOSKED.
  6970	007431'01  256 00 0 00 011360'	>)
  6971
  6972	007432'01  201 02 0 07 006321*		MOVEI T2,FKJTQ(FX)	;FX=FORKX, SET BY ENSKED
  6973	007433'01  542 02 1 00 000067*		HRRM T2,@JTLSTL		;ADD THIS FORK TO END OF QUEUE
  6974	007434'01  250 02 0 00 007433*		EXCH T2,JTLSTL		;SET NEW END OF QUEUE PTR
  6975	007435'01  206 02 0 07 007432*		MOVSM T2,FKJTQ(FX)	;SET BACK PTR TO OLD QUEUE END
  6976	007436'01  541 01 0 00 007440'		HRRI T1,JTQWT
  6977	007437'01  254 00 0 00 000372'		JRST DISMSE		;DISMS
  6978
  6979
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 177
SCHED	MAC	 7-Nov-88 20:50		JSYS trapping

  6980					;JSYS TRAP QUEUE WAIT TEST
  6981
  6982	007440'01  200 16 0 07 007373*	JTQWT:	JE FKSUS,(FX),0(T4)	;DON'T WAKE IF NOT SUSPENDED BEFORE BLOCKING
  6983	007441'01  607 16 0 00 002000 
  6984	007442'01  254 00 0 04 000000 
  6985	007443'01  205 16 0 00 401000 		SETONE <FKPS0,FKIWT>,(FX) ;WAS SUSPENDED. REINITIATE SUSPEND
  6986	007444'01  436 16 0 07 007440*
  6987	007445'01  205 16 0 00 200000 		SETZRO FKPS1,(FX)	;ALLOW PSI'S
  6988	007446'01  412 16 0 07 007444*
  6989	007447'01  261 17 0 00 000003 		PUSH P,3
  6990	007450'01  260 17 0 00 005245'		CALL PSBUMP		;NO, GIVE FORK SOME PRIORITY
  6991	007451'01  262 17 0 00 000003 		POP P,3
  6992	007452'01  254 00 0 04 000001 		JRST 1(4)
  6993
  6994
  6995					;UNLOCK ROUTINE
  6996					;USES BUT DOES NOT SAVE ACS 1,2,3,4
  6997
  6998	007453'01  550 02 0 00 007153*	JTULCK::HRRZ T2,FORKX
  6999	007454'01  265 16 0 00 000310'	       NOSKED
  7000	007455'01  200 01 0 00 000066*		MOVE T1,JTLST		;SCAN QUEUE LOOKING FOR FORK
  7001						 			;WAITING ON EXECUIING FORK
  7002	007456'01  322 01 0 00 007474'	JTULC1:	JUMPE T1,JTULC3		;NONE FOUND
  7003	007457'01  201 04 0 01 000000 		MOVEI T4,0(T1)
  7004	007460'01  275 04 0 00 007435*		SUBI T4,FKJTQ		;4=FORK INDEX OF QUEUED FORK
  7005	007461'01  554 03 0 04 006312*		LOAD T3,FKSTD,(T4)
  7006	007462'01  316 03 0 00 000002 		CAMN T3,T2		;THIS FORK WAITING ON EX FORK?
  7007	007463'01  254 00 0 00 007466'		JRST JTULC2		;YES, REMOVE IT FROM QUEUE
  7008	007464'01  550 01 0 01 007460*		LOAD T1,FKJTN,(T1)	;NO, TRY NEXT FORK
  7009	007465'01  254 00 0 00 007456'		JRST JTULC1
  7010
  7011	007466'01  260 17 0 00 007477'	JTULC2:	CALL JTDEQ		;REMOVE FORK FROM QUEUE
  7012	007467'01  261 17 0 00 000007 		PUSH P,FX		;UNBLOCK FORK
  7013	007470'01  200 07 0 00 000004 		MOVE FX,T4
  7014	007471'01  260 17 0 00 004100'		CALL UNBLK1
  7015	007472'01  262 17 0 00 000007 		POP P,FX
  7016	007473'01  304 00 0 00 000000 		CAIA
  7017	007474'01  476 00 0 00 007402*	JTULC3:	SETOM JTLCK		;NO FORKS ON QUEUE, CLEAR LOCK
  7018	007475'01  265 16 0 00 000315'	       OKSKED
  7019	007476'01  263 17 0 00 000000 		RET
  7020
  7021					;REMOVE FORK WHOSE FKJTQ ENTRY IS PT'D TO BY 1 FROM JSYS TRAP QUEUE
  7022					;USES BUT DOES NOT SAVE ACS 1,2,3
  7023
  7024	007477'01  265 16 0 00 000310'	JTDEQ:	NOSKED
  7025	007500'01  550 03 0 01 000000 		HRRZ T3,(T1)		;3=PTR TO NEXT ITEM ON QUEUE
  7026	007501'01  554 02 0 01 000000 		HLRZ T2,(T1)		;2=PTR TO PREV ITEM
  7027	007502'01  542 03 0 02 000000 		HRRM T3,(T2)
  7028	007503'01  322 03 0 00 007506'		JUMPE T3,JTDEQ1		;REMOVING LAST ITEM?
  7029	007504'01  506 02 0 03 000000 		HRLM T2,(T3)		;NO
  7030	007505'01  304 00 0 00 000000 		CAIA
  7031	007506'01  202 02 0 00 007434*	JTDEQ1:	MOVEM T2,JTLSTL		;MAKE HEADER POINT TO "PREVIOUS"
  7032	007507'01  265 16 0 00 000315'		OKSKED
  7033	007510'01  263 17 0 00 000000 		RET
  7034
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 178
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7035						SUBTTL Context switching for MUUO's
  7036
  7037
  7038					;Here from APRSRV when user or monitor executed an illegal UUO.
  7039
  7040	007511'01  265 16 0 00 007634'	ILUUO::	MCENTR
  7041	007512'01  201 01 0 00 600770 	ILUUO1::MOVEI T1,ILINS1
  7042	007513'01  265 02 0 00 000540'		ITERR			;ILLEGAL UUO
  7043
  7044					;ALL UNDEFINED JSYS'S
  7045
  7046	007514'01			UJSYS0::MCENT
  7047	007514'01  201 01 0 00 600771 	UJSYS::	MOVEI T1,ILINS2
  7048	007515'01  265 02 0 00 000540'		ITERR			;UNDEFINED JSYS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 179
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7049
  7050					;Here when user executes a TOPS-10 UUO (op codes 40-77). Enter compatibility
  7051					;package
  7052
  7053	007516'01  332 10 1 00 005643*	UU1050::SKIPE P1,@JTBLK		; JSYS traps?
  7054						 JRST [ SETZ P2,	; Word 0
  7055							MOVSI P3,(1B0)	; Check for JSYS 0 (UUO trapping)
  7056							TDNN P3,JTBAL(P1)
  7057							 JRST .+1	; Not trapping UUOs
  7058							MOVE T1,FORKN	; Get fork number
  7059							MOVE T1,SYSFK(T1) ; Is this fork execute only?
  7060							TXNE T1,SFEXO	;...
  7061							JRST U10501	;Yes, No trapping in this case
  7062							MOVE CX,[MSEC1B+TRAPSI] ; We are, go JSYS trap route
  7063	007517'01  254 00 0 00 011363'			JRST MENTU1]	; Join JSYS code
  7064	007520'01  331 01 0 00 000000*	U10501::SKIPL T1,PATADR		;Get the possible address of PAT
  7065	007521'01  606 01 0 00 777777 		TRNN T1,777777		;Do we have one now? (If yes, RH non-zero)
  7066	007522'01  254 00 0 00 000000*		 JRST GETPAT		;NO PAT CURRENTLY TRY TO GET ONE
  7067	007523'01  135 16 0 00 011375'		SETPCS T1		;SET PCS TO SECTION OF ENTRY VECTOR
  7068	007524'01  661 16 0 00 200000 
  7069	007525'01  7 010 14 0 00 000016 
  7070	007526'01  607 01 0 00 200000 		TXNN T1,XS%EEV		;EXTENDED FORMAT VECTOR?
  7071	007527'01  254 00 0 00 007540'		IFSKP.
  7072	007530'01  200 01 0 00 005537*		  MOVE T1,PATUPC	;YES, GET ITS ADDRESS
  7073					   IFN KLFLG,<
  7074	007531'01  200 02 0 00 007116*		  MOVE T2,KIMUFL	;GET FLAGS WITH OP CODE, AC, AND PCS
  7075					   >				;END OF IFN KLFLG
  7076					   IFN KCFLG,<
  7077						  MOVE T2,KIMUFL	;GET FLAGS WITH PAB, CAB, AND PCS
  7078						  HRR T2,KIMOAC		;CREATE FLAGS WITH OP CODE AND AC AS ON KL
  7079					   >				;END OF IFN KCFLG
  7080	007532'01  200 03 0 00 007343*		  MOVE T3,FPC		;GET PC WORD
  7081	007533'01  256 04 0 00 011376'		  XCTU [DMOVEM T2,0(T1)] ;PASS THEM TO PA1050
  7082	007534'01  200 01 0 00 005536*		  MOVE T1,PATU40	;PTR TO UUO WORD
  7083	007535'01  200 02 0 00 007121*		  MOVE T2,KIMUEF	;MOVE UUO WORD TO PA1050
  7084	007536'01  256 04 0 00 011377'		  UMOVEM T2,0(T1)
  7085	007537'01  254 00 0 00 007550'		ELSE.
  7086	007540'01  200 01 0 00 007530*		  MOVE T1,PATUPC	;NON-EXTENDED FORMAT, GET PTR TO PC
  7087	007541'01  200 02 0 00 007532*		  MOVE T2,FPC		;CONSTRUCT OLD STYLE FLAGS,,PC
  7088	007542'01  500 02 0 00 007342*		  HLL T2,FFL
  7089	007543'01  256 04 0 00 011377'		  UMOVEM T2,0(T1)	;PASS IT TO PA1050
  7090	007544'01  200 01 0 00 007534*		  MOVE T1,PATU40	;PTR TO UUO WORD
  7091	007545'01  200 02 0 00 007535*		  MOVE T2,KIMUEF	;CONSTRUCT OLD STYLE UUO WORD
  7092					   IFN KLFLG,<
  7093	007546'01  504 02 0 00 007531*		  HRL T2,KIMUFL		;GET OP CODE AND AC
  7094					   >				;END OF IFN KLFLG
  7095					   IFN KCFLG,<
  7096						  HRL T2,KIMOAC		;GET OP CODE AND AC
  7097					   >				;END OF IFN KCFLG
  7098	007547'01  256 04 0 00 011377'		  UMOVEM T2,0(T1)
  7099	007550'01				ENDIF.
  7100	007550'01  200 01 0 00 007520*		MOVE T1,PATADR		;SET PC TO ENTER PA1050
  7101	007551'01  202 01 0 00 007541*		MOVEM T1,FPC
  7102	007552'01  254 00 0 00 007723'		JRST GOUSR
  7103
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 180
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7104					;HERE ON DMS JSYS
  7105
  7106	007553'01  337 01 0 00 000000*	DMSENT::SKIPG T1,DMSADR		;HAVE RMS NOW?
  7107	007554'01  254 00 0 00 000000*		JRST GETDMS		;NO
  7108	007555'01  135 16 0 00 011375'		SETPCS T1		;SET PCS TO SECTION OF ENTRY VECTOR
  7109	007556'01  661 16 0 00 200000 
  7110	007557'01  7 010 14 0 00 000016 
  7111	007560'01  607 01 0 00 200000 		TXNN T1,XS%EEV		;EXTENDED FORMAT VECTOR?
  7112	007561'01  254 00 0 00 007572'		IFSKP.
  7113	007562'01  200 01 0 00 005541*		  MOVE T1,DMSUPC	;PTR TO PC
  7114					   IFN KLFLG,<
  7115	007563'01  200 02 0 00 007546*		  MOVE T2,KIMUFL	;GET FLAGS WITH OP CODE, AC, AND PCS
  7116					   >				;END OF IFN KLFLG
  7117					   IFN KCFLG,<
  7118						  MOVE T2,KIMUFL	;GET FLAGS WITH PAB, CAB, AND PCS
  7119						  HRR T2,KIMOAC		;CREATE FLAGS WITH OP CODE AND AC AS ON KL
  7120					   >				;END OF IFN KCFLG
  7121	007564'01  200 03 0 00 007551*		  MOVE T3,FPC		;GET PC WORD
  7122	007565'01  256 04 0 00 011376'		  XCTU [DMOVEM T2,0(T1)] ;PASS IT TO RMS
  7123	007566'01  200 01 0 00 005540*		  MOVE T1,DMSU40	;PTR TO UUO WORD
  7124	007567'01  200 02 0 00 007545*		  MOVE T2,KIMUEF	;MOVE UUO WORD TO RMS
  7125	007570'01  256 04 0 00 011377'		  UMOVEM T2,0(T1)
  7126	007571'01  254 00 0 00 007602'		ELSE.
  7127	007572'01  200 01 0 00 007562*		  MOVE T1,DMSUPC	;OLD FORMAT VECTOR, GET PTR TO PC
  7128	007573'01  200 02 0 00 007564*		  MOVE T2,FPC		;CONSTRUCT OLD STYLE FLAGS, PC
  7129	007574'01  500 02 0 00 007542*		  HLL T2,FFL
  7130	007575'01  256 04 0 00 011377'		  UMOVEM T2,0(T1)	;PASS IT TO RMS
  7131	007576'01  200 01 0 00 007566*		  MOVE T1,DMSU40	;PTR TO UUO WORD
  7132	007577'01  200 02 0 00 007567*		  MOVE T2,KIMUEF	;CONSTRUCT OLD STYLE UUO WORD
  7133					   IFN KLFLG,<
  7134	007600'01  504 02 0 00 007574*		  HRL T2,FFL		;GET OP CODE AND AC
  7135					   >				;END OF IFN KLFLG
  7136					   IFN KCFLG,<
  7137						  HRL T2,KIMOAC		;GET OP CODE AND AC
  7138					   >				;END OF IFN KCFLG
  7139	007601'01  256 04 0 00 011377'		  UMOVEM T2,0(T1)
  7140	007602'01				ENDIF.
  7141	007602'01  200 01 0 00 007553*		MOVE T1,DMSADR		;SET RETURN PC TO ENTER RMS
  7142	007603'01  202 01 0 00 007573*		MOVEM T1,FPC
  7143	007604'01  254 00 0 00 007723'		JRST GOUSR
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 181
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7144
  7145					;SLOW MONITOR CALL SETUP ROUTINE
  7146					;MENTM - Invoked via JRST from APRSRV with JSYS number in CX
  7147
  7148					;At this point,
  7149					;FFL, FPC  - return flags and PC stored on MUUO.
  7150
  7151	007605'01  135 16 0 00 011400'	MENTM::	LOAD CX,EXPCBT,JSTAB(CX) ;GET ROUTINE ADDRESS WITHOUT FLAGS
  7152	007606'01  476 00 0 00 007340*		SETOM SLOWF
  7153	007607'01  261 17 0 00 007345*		PUSH P,INTDF		;SAVE CONTEXT VARIABLES
  7154	007610'01  261 17 0 00 007341*		PUSH P,MPP
  7155	007611'01  261 17 0 00 007603*		PUSH P,FPC		;SAVE RETURN PC, FLAGS
  7156	007612'01  261 17 0 00 007600*		PUSH P,FFL
  7157	007613'01  202 17 0 00 007610*		MOVEM P,MPP		;SET NEW FRAME POINTER
  7158	007614'01  254 14 0 00 007612*		XSFM FFL
  7159	007615'01  202 16 0 00 007611*		MOVEM CX,FPC		;SETUP START PC FOR NEW JSYS
  7160					   IFN SKEDSW,<
  7161						MOVE CX,-1(P)		;GET OLD PC
  7162						TXNN CX,EXSCBT		;CALLED FROM NON-0 SECTION?
  7163						BUG.(CHK,JSSEC0,SCHED,SOFT,<Nested JSYS call from section 0>,<<CX,PC>>,<
  7164					
  7165					Cause:	At entry to a JSYS called within the monitor, the return PC is
  7166						in section 0.  This is a coding error which should be corrected.
  7167						This is under a debug conditional, so it should never occur in
  7168						the field.
  7169					
  7170					Data:	PC - PC of offending JSYS
  7171					>)
  7172						AOSGE INTDF		;CHECK STATE OF INTDF
  7173						BUG.(CHK,IDFOD1,SCHED,SOFT,<MENTR - INTDF overly decremented>,<<CX,PC>>,<
  7174					
  7175					Cause:	At the time of a nested JSYS call, INTDF was less than -1.  Some
  7176						code in the calling context must have fouled it up.  This is
  7177						under a debug conditional and so should not appear in the field.
  7178					
  7179					Data:	PC - PC at which last JSYS was executed.
  7180					>)
  7181						SOS INTDF
  7182					   >				;END OF IFN SKEDSW
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 182
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7183
  7184					;When running in the monitor, AC block 0 is current, 1 is previous
  7185					;Save the former "previous" AC block (block 1) in the PSB.
  7186
  7187	007616'01  350 17 0 00 007230*		AOS P,ACBAS		;SETUP NEXT AC STACK BLOCK
  7188	007617'01  301 17 0 00 000000#		CAIL P,<EUACB>B39	;USED ALL BLOCKS?
  7189						BUG.(HLT,NOACB,SCHED,SOFT,<MENTR - No more AC blocks>,<<CX,PC>>,<
  7190					
  7191					Cause:	When a JSYS is executed from within the monitor, the
  7192						AC's of the current process are stored in a special area in the
  7193						monitor.  This area consists of several 20-word blocks that are used
  7194						successively as one JSYS invokes another.  The BUGHLT indicates that a
  7195						JSYS has been called but that no 20-word block is left in which to
  7196						store the contents of the AC's.  This usually means that the counter
  7197						that the monitor uses to keep track of these blocks has been
  7198						clobbered.
  7199					
  7200					Data:	PC - PC at which last JSYS was executed
  7201	007620'01  256 00 0 00 011401'	>)
  7202
  7203	007621'01  242 17 0 00 000004 		LSH P,4			;MAKE INTO ADDRESS
  7204
  7205					;Copy the former "current" AC's (block 0) to the new "previous" AC's (block 1)
  7206
  7207					   IFN KLFLG,<
  7208	007622'01  135 16 0 00 011321'		SETPCS MSEC1A		;SET PCS SO PXCT [BLT] WORKS
  7209	007623'01  661 16 0 00 200000 
  7210	007624'01  7 010 14 0 00 000016 
  7211	007625'01  201 16 0 17 000000 		MOVEI CX,0(P)
  7212	007626'01  256 01 0 00 011404'		XCT 1,[BLT CX,17(P)]	;SAVE PREVIOUS CONTEXT AC'S
  7213	007627'01  400 16 0 00 000000 		SETZ CX,
  7214	007630'01  256 04 0 00 011405'		XCT 4,[BLT CX,CX-1]	;LOAD PREVIOUS CONTEXT AC'S 0-15 FROM CURRENT
  7215					   >				;END OF IFN KLFLG
  7216					   IFN KCFLG,<
  7217						STPAC. CX,(P)		;SAVE PREVIOUS CONTEXT AC'S
  7218						LDPAC <CX-1>,0		;LOAD PREVIOUS CONTEXT AC'S 0-15 FROM CURRENT
  7219					   >				;END OF IFN KCFLG
  7220	007631'01  200 17 0 00 007613*		MOVE P,MPP		;RESTORE P
  7221	007632'01  402 00 0 00 007606*		SETZM SLOWF
  7222	007633'01  256 00 0 00 007337*		XCT MJRSTF		;RESUME MONITOR ROUTINE (NORMALLY XJRSTF FFL)
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 183
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7223
  7224					;Entry for MCENTR (JSP CX,MENT0).  FFL and FPC have been setup by
  7225					;the caller, and may only be a user PC.
  7226
  7227	007634'01  476 00 0 00 007632*	MENT0::	SETOM SLOWF
  7228	007635'01  200 01 0 00 007614*		MOVE T1,FFL
  7229	007636'01  603 01 0 00 010000 		TXNE T1,UMODF		;SIMULATING CALL FROM USER MODE?
  7230	007637'01  254 00 0 00 007642'		IFSKP.
  7231					   IFN SKEDSW,<
  7232						  BUG.(HLT,MNTRNU,SCHED,SOFT,<MCENTR Without setup of user old PC>,<<CX,PC>>,<
  7233					
  7234					Cause:	MCENTR has been used without FFL setup to be a user PC.  This is 
  7235						a coding error.
  7236					
  7237					Data:	PC - PC at which MCENTR was executed
  7238					>) >
  7239	007640'01  205 01 0 00 010000 		  MOVX T1,UMODF		;DUMMY UP ONE
  7240	007641'01  202 01 0 00 007635*		  MOVEM T1,FFL
  7241	007642'01				ENDIF.
  7242	007642'01  200 17 0 00 010150'		MOVE P,UPP		;YES
  7243	007643'01  261 17 0 00 007615*		PUSH P,FPC
  7244	007644'01  261 17 0 00 007641*		PUSH P,FFL
  7245	007645'01  261 17 0 00 007643*		PUSH P,FPC
  7246	007646'01  261 17 0 00 007644*		PUSH P,FFL
  7247	007647'01  254 14 0 00 000001 		XSFM T1			;COOK UP PROPER FLAGS
  7248	007650'01  661 01 0 00 004000 		TXO T1,PCU		;PCU MUST BE ON
  7249	007651'01  135 02 0 00 011406'		LOAD T2,VSECNO,FPC	;SECTION NUMBER OF RETURN PC
  7250	007652'01  137 02 0 00 011407'		STOR T2,EXPCS,T1	;PUT IT WHERE HARDWARE SEES IT
  7251	007653'01  202 01 0 00 007646*		MOVEM T1,FFL		;USE THAT AS NEW FLAGS
  7252	007654'01  254 00 0 00 007666'		JRST MENT2		;JOIN NORMAL USER CASE, PC IN CX
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 184
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7253
  7254					;ENTRY TO TOP-LEVEL JSYS (I.E. FROM USER)
  7255					;Here when user executed a JSYS.
  7256					;	CX/ JSYS number
  7257
  7258	007655'01  332 10 1 00 007516*	MENTU::	SKIPE P1,@JTBLK		; Any JSYSes monitored for this fork?
  7259						 JRST [	JUMPE CX,[ MCENTR	; Special case JSYS 0 (UUO trapping)
  7260								JRST UJSYS]
  7261							MOVE T1,FORKN	;Get fork number
  7262							MOVE T1,SYSFK(T1) ;Is this fork execute only?
  7263							TXNE T1,SFEXO	;...
  7264							JRST .+1	;Yes, no trapping in this case
  7265							MOVE CX,JSTAB(CX)	;GET ROUTINE ADDRESS
  7266							LOAD P2,JTJNO	; Yes, get JSYS number
  7267							IDIVI P2,^D36	; Get word offset into bit table
  7268							MOVE P3,BITS(P3) ; And bit mask
  7269							ADDI P1,0(P2)	; Form address within bit table
  7270							TDNE P3,JTBAL(P1) ; Trapped?
  7271							MOVE CX,[MSEC1,,TRAPSI] ;YES. HANDLE THIS SPECIALLY
  7272	007656'01  254 00 0 00 011413'			JRST MENTU1]
  7273	007657'01  200 16 0 16 007331*		MOVE CX,JSTAB(CX)	;GET ROUTINE ADDRESS
  7274
  7275					;Save on UPDL stack the flags and PC at the time of the MUUO
  7276					;Set up FFL and FPC to contain information for XJRSTF.
  7277					;	CX/ PC to go to
  7278
  7279	007660'01  200 17 0 00 010150'	MENTU1:	MOVE P,UPP		;SET UP STACK
  7280	007661'01  261 17 0 00 007120*		PUSH P,KIMUPC
  7281	007662'01  261 17 0 00 007563*		PUSH P,KIMUFL		;RETURN FOR PSI
  7282	007663'01  261 17 0 00 007661*		PUSH P,KIMUPC
  7283	007664'01  261 17 0 00 007662*		PUSH P,KIMUFL
  7284	007665'01			JSLKB1::			;TAG FOR JSLOOK (SNOOP PGM)
  7285	007665'01  254 14 0 00 007653*		XSFM FFL		;STORE PCS INTO FFL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 185
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7286
  7287					;Common code for all JSYS entry from user
  7288					;Top of UPDL is set up. FFL and FPC are ready for XJRSTF.
  7289
  7290	007666'01  202 16 0 00 007645*	MENT2:	MOVEM CX,FPC		;SAVE NEW PC
  7291	007667'01  202 17 0 00 007631*		MOVEM P,MPP		;SET STACK FENCE
  7292	007670'01  256 04 0 00 011356'		XCTU [DMOVE T1,T1]	;GET STANDARD 4 ARGS
  7293	007671'01  256 04 0 00 011357'		XCTU [DMOVE T3,T3]
  7294	007672'01  201 16 0 00 000000#		MOVEI CX,<UACB>B39-1	;INIT AC STACK
  7295	007673'01  202 16 0 00 007616*		MOVEM CX,ACBAS		;CURRENT AC'S MAY BE STORED HERE
  7296					   IFN SKEDSW,<
  7297						SKIPN NSKED		;IS THIS PROCESS NOSKED?
  7298						SKIPE CRSKED		;OR CSKED?
  7299						IFNSK.
  7300						  SKIPN PNSKDC		;YES, SHOULD IT BE?
  7301						  BUG.(HLT,MCLNSK,SCHED,SOFT,<Process is NOSKED or CSKED at JSYS ENTRY>,,<
  7302					
  7303					Cause:	At entry to a monitor call from a user mode process was found to
  7304						be NOSKED or CSKED.  This should not happen unless flag PNSKDC is set
  7305						indicating that a DIAG% has been done.
  7306					>)
  7307						ENDIF.
  7308					 >			;END SKEDSW
  7309	007674'01  336 00 0 00 000213*		SKIPN PNSKDC		;DIAG% NOSKED MEANS DON'T RESET INTDF
  7310	007675'01  476 00 0 00 007607*		SETOM INTDF		;INIT INTDF
  7311	007676'01  402 00 0 00 007634*		SETZM SLOWF		;INIT SLOWF
  7312	007677'01  256 00 0 00 007633*		XCT MJRSTF		;RESUME MONITOR ROUTINE (NORMALLY XJRSTF FFL)
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 186
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7313
  7314
  7315					;New JSYS's go to ITRAP on error, MRETN on success
  7316
  7317					;Error returns from skipping JSYS's:
  7318
  7319					;MRETNE - invoked via RETERR. Stores error code from T1 in LSTERR and
  7320					;	into user's AC 1 if no ERJMPS/ERCALS present
  7321					;EMRET0 - invoked via EMRETN. Stores error code into LSTERR
  7322					;EMRET1 - invoked via JRST. Assumes LSTERR already stored.
  7323
  7324	007700'01  260 17 0 00 010102'	MRETNE::CALL TSTERJ		;ERCALS/ERJMPS PRESENT?
  7325	007701'01  256 04 0 00 011430'		 UMOVEM T1,1		;NO, RETURN ERR CODE IN AC1
  7326	007702'01  202 01 0 00 000540*	EMRET0::MOVEM T1,LSTERR		;SAVE ERROR CODE IN STANDARD PLACE
  7327	007703'01  200 17 0 00 007667*	EMRET1::MOVE P,MPP		;RESTORE STACK PTR
  7328	007704'01  120 01 0 17 777777 		DMOVE T1,-1(P)		;GET RETURN PC
  7329	007705'01  250 01 0 00 000002 		EXCH T1,T2		;IN PROPER ORDER
  7330	007706'01  260 17 0 00 010020'		CALL ITRSIM		;ERJMP/ERCAL PRESENT?
  7331	007707'01  254 00 0 00 007714'		 JRST MRETN		;NO, NORMAL RETURN
  7332	007710'01  202 03 0 17 777777 		MOVEM T3,-1(P)		;YES, SETUP RETURN
  7333	007711'01  254 00 0 00 007714'		JRST MRETN
  7334
  7335					;SKMRTN IS STANDARD SKIP RETURN FROM JSYS
  7336					;Invoked via SMRETN
  7337
  7338	007712'01  200 17 0 00 007703*	SKMRTN::MOVE P,MPP		;SET UP THE STACK POINTER
  7339	007713'01  350 00 0 17 777777 		AOS -1(P)		;THEN INCREMENT THE RETURN ADDRESS
  7340						;..
  7341
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 187
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7342					;Standard return from JSYS. MPP is stack pointer at time of entry.
  7343					;Make FFL and FPC point to caller's return address
  7344
  7345						;..
  7346	007714'01  476 00 0 00 007676*	MRETN::	SETOM SLOWF		;RESET FLAG
  7347					   IFN SKEDSW,<
  7348						AOSGE INTDF		;CHECK STATE OF INTDF
  7349						BUG.(CHK,IDFOD2,SCHED,SOFT,<MRETN - INTDF overly decremented>,,<
  7350					
  7351					Cause:	At MRETN, INTDF was found to be less than -1.  This indicates
  7352						that this JSYS code did an unmatched OKINT and may have
  7353						allowed interrupts when it didn't intend to.  This is
  7354						a coding error.
  7355					>)
  7356					>
  7357	007715'01  200 17 0 00 007712*		MOVE P,MPP		;GO BACK TO LAST STACK FENCE
  7358	007716'01  262 17 0 00 000016 		POP P,CX		;RETURN FLAGS
  7359	007717'01  607 16 0 00 010000 		TLNN CX,(UMODF)		;RETURN TO USER?
  7360	007720'01  254 00 0 00 007725'		JRST MRETN1		;NO
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 188
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7361
  7362					;JSYS was called from user context. Set up FFL and FPC from the stack
  7363
  7364	007721'01  202 16 0 00 007665*		MOVEM CX,FFL		;SET UP FLAGS
  7365	007722'01			JSLKB2::			;TAG FOR JSLOOK (SNOOP PGM)
  7366	007722'01  262 17 0 00 007666*		POP P,FPC		;RESTORE PC
  7367
  7368					   IFN SKEDSW,<
  7369						SKIPN CRSKED
  7370						SKIPE NSKED		;FAILED TO MATCH NOSKED, CSKED?
  7371						IFNSK.
  7372						  SKIPN PNSKDC		;DIAG% NOSKED?
  7373						  BUG.(HLT,RTNNSK,SCHED,SOFT,<Process is NOSKED or CSKED at MRETN>,,<
  7374					
  7375					Cause:	The process is NOSKED or CSKED at return from a monitor call.  
  7376						Probably this JSYS went NOSKED or CSKED and forget to do the 
  7377						matching OKSKED or ECSKED.  This is a coding error.
  7378					>)
  7379						ENDIF.
  7380						SKIPGE FKLOCK		;FORK LOCK FREE?
  7381						IFSKP.
  7382						  HRRZ CX,FORKN		;GET US
  7383						  CAME CX,FLKOWN	;ARE WE THE OWNER?
  7384						ANSKP.
  7385						  BUG.(CHK,INCFLK,SCHED,SOFT,<Fork lock set at return to user>,,<
  7386					
  7387					Cause:	Coding error has neglected to unlock the fork lock.
  7388					
  7389					Action:	The monitor unlocks the fork lock before returning
  7390						to the user. However,  this BUGCHK may be indicative
  7391						of other failures to properly release resources.
  7392					
  7393					>)		;YES. COMPLAIN THEN
  7394						  SETOM FKLOCK		;FREE IT
  7395						  SETZM FLKCNT		;AND FREE THIS TOO
  7396						ENDIF.
  7397					    >			;END IFN SKEDSW
  7398
  7399					;ALL TRANSFERS TO USER MODE COME HERE.  THE SCHEDULER RECOGNIZES
  7400					;THE PC AT GOUSR+1 AS A SINGULARITY (USER AC BLOCK BUT MONITOR PC)
  7401					;AND CORRECTS FOR IT.
  7402
  7403	007723'01			GOUSR::
  7404					   IFN KLFLG,<
  7405	007723'01  7 010 14 0 00 000260*	DATAO PAG,SETUSR	;SETUP USER AC BLOCK AS CURRENT
  7406					   >			;END OF IFN KLFLG
  7407	007724'01  256 00 0 00 007677*		XCT MJRSTF		;RETURN TO USER (NORMALLY XJRSTF FFL)
  7408
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 189
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7409					;Here if returning to monitor context. Check for returning from IMCALL.
  7410
  7411	007725'01			MRETN1:
  7412	007725'01  254 15 0 00 011431'		XJRST [MSEC1,,.+1]	;FORCE CURRENT PC INTO SECTION ONE
  7413	007726'01  262 17 0 00 007722*		POP P,FPC		;RESTORE PC
  7414	007727'01  202 16 0 00 007721*		MOVEM CX,FFL		;STORE FLAGS
  7415	007730'01  623 16 0 00 000010 		TXZE CX,IMCFLG		;INTERNAL CALL FLAG?
  7416	007731'01  254 00 0 00 010007'		JRST IMCLL1		;YES, DIFFERENT RETURN SEQUENCE
  7417
  7418					;Copy "previous" AC's to "current".
  7419
  7420					   IFN KLFLG,<
  7421	007732'01  135 16 0 00 011321'		SETPCS MSEC1A		;FUDGE PCS SO PXCT [BLT] WORKS
  7422	007733'01  661 16 0 00 200000 
  7423	007734'01  7 010 14 0 00 000016 
  7424	007735'01  400 16 0 00 000000 		SETZ CX,		;MOVE PREV AC TO CURRENT
  7425	007736'01  256 01 0 00 011405'		XCT 1,[BLT CX,CX-1]	;RESTORE CURRENT AC'S 0-15 FROM PREVIOUS
  7426					   >				;END OF IFN KLFLG
  7427
  7428					   IFN KCFLG,<
  7429						STPAC <CX-1>,0		;RESTORE CURRENT AC'S 0-15 FROM PREVIOUS
  7430					   >				;END OF IFN KCFLG
  7431
  7432					;Restore previous AC's from ACBAS block, stored at JSYS entry.
  7433
  7434	007737'01  550 16 0 00 007673*		HRRZ CX,ACBAS		;POINT TO CURRENT LOCATION ON STACK
  7435	007740'01  242 16 0 00 000004 		LSH CX,4
  7436	007741'01  205 16 0 16 000000 		LDPAC. CX,0(CX)		;LOAD PREVIOUS CONTEXT AC'S FROM STACK
  7437	007742'01  256 04 0 00 011167'
  7438	007743'01  370 16 0 00 007737*		SOS CX,ACBAS		;DECREMENT ACBAS PTR
  7439	007744'01  305 16 0 00 000000#		CAIGE CX,<UACB>B39-1
  7440						BUG.(HLT,OPOPAC,SCHED,HARD,<MRETN - Tried to over-pop AC stack>,,<
  7441					
  7442					Cause:	When a JSYS is executed from within the monitor, the
  7443						AC's of the current process are stored in a special area in the
  7444						monitor.  This area consists of several 20-word blocks that are used
  7445						successively as one JSYS calls another.
  7446					
  7447						As each nested JSYS returns, the monitor's pointer to this area of
  7448						memory is decremented.  The BUGHLT indicates that the pointer has
  7449						been decremented too far.  This indicates either a clobbered pointer,
  7450						or an attempt to return from a JSYS without having entered one.
  7451					
  7452	007745'01  256 00 0 00 011432'	>)
  7453
  7454
  7455					;Restore variables stored on UPDL stack at JSYS entry.
  7456
  7457	007746'01  262 17 0 00 007715*		POP P,MPP		;RESTORE VARIABLES
  7458	007747'01  262 17 0 00 007675*		POP P,INTDF
  7459	007750'01  402 00 0 00 007714*		SETZM SLOWF
  7460	007751'01  256 00 0 00 007724*		XCT MJRSTF		;RETURN TO CALLER (NORMALLY XJRSTF FFL)
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 190
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7461
  7462					;INTERNAL MONITOR CALL LOGIC
  7463					;	JSP CX,IMCLL0
  7464					;	 ADDRESS
  7465					;THIS EFFECTS A CALL TO 'ADDRESS' (PRESUMABLY A JSYS ENTRY POINT)
  7466					;JUST AS THOUGH A JSYS HAD BEEN DONE BUT WITHOUT CHANGING THE
  7467					;PREVIOUS CONTEXT.  THUS PREVIOUS CONTEXT REFERENCES IN THE CALLEE
  7468					;WILL NOT REFERENCE THE CURRENT CONTEXT OF THE CALLER BUT RATHER
  7469					;THE PREVIOUS CONTEXT OF THE CALLER.  USED WHERE ARGUMENTS
  7470					;(E.G. BLOCK POINTERS, STRINGS) MUST BE PASSED TO LOWER LEVEL
  7471					;ROUTINES.  NOTE THAT ALL ACS ARE AUTOMATICALLY SAVED AND RESTORED,
  7472					;THE THE AC CONTEXT IS NOT CHANGED, SO ARGUMENTS MUST GENERALLY
  7473					;BE SETUP IN THE PREVIOUS CONTEXT ACS.
  7474
  7475	007752'01  476 00 0 00 007750*	IMCLL0::SETOM SLOWF		;INHIBIT PSI
  7476	007753'01  254 14 0 00 007727*		XSFM FFL		;SAVE FLAGS
  7477	007754'01  621 16 0 00 777740 		TXZ CX,EXFLBT		;MASK OFF FLAGS FROM JSP (IF CALLED FROM SEC 0)
  7478	007755'01  202 16 0 00 007726*		MOVEM CX,FPC		;SAVE RETURN
  7479	007756'01  270 17 0 00 011434'		ADD P,[CX,,CX]		;ALLOCATE STACK SPACE FOR ACS
  7480	007757'01  201 16 0 17 777763 		MOVEI CX,-CX+1(P)	;MOVE ACS TO STACK
  7481	007760'01  251 16 0 17 000000 		BLT CX,0(P)
  7482	007761'01  261 17 0 00 007747*		PUSH P,INTDF		;ESTABLISH USUAL STACK CONTEXT
  7483	007762'01  261 17 0 00 007746*		PUSH P,MPP
  7484	007763'01  350 00 0 00 007755*		AOS FPC			;BUMP RETURN PAST CALL ADDRESS WORD
  7485	007764'01  261 17 0 00 007763*		PUSH P,FPC		;SAVE RETURN PC
  7486	007765'01  200 16 0 00 007753*		MOVE CX,FFL		;PICK UP FLAGS
  7487	007766'01  661 16 0 00 000010 		TXO CX,IMCFLG		;FLAG INTERNAL CALL
  7488	007767'01  261 17 0 00 000016 		PUSH P,CX		;SAVE RETURN FLAGS
  7489	007770'01  200 16 0 00 007764*		MOVE CX,FPC		;RESTORE PC
  7490	007771'01  200 16 0 16 777777 		MOVE CX,-1(CX)		;GET CALL ADDRESS
  7491	007772'01  641 16 0 00 104000 		TXC CX,<JSYS>		;SEE IF A JSYS
  7492	007773'01  643 16 0 00 104000 		TXCE CX,<JSYS>		;IS IT?
  7493	007774'01  254 00 0 00 010001'		IFSKP.
  7494	007775'01  603 16 0 00 673777 		  TLNE CX,<-<JSYS+1>>B53 ;MAYBE. STILL?
  7495	007776'01  254 00 0 00 010001'		ANSKP.
  7496	007777'01  553 00 0 00 000016 		  HRRZS CX		;YES. GET INDEX
  7497	010000'01  200 16 0 16 007657*		  MOVE CX,JSTAB(CX)	;GET DISPATCH ADDRESS
  7498	010001'01				ENDIF.
  7499	010001'01  202 16 0 00 007770*		MOVEM CX,FPC		;SET UP TRANSFER TO PROPER SECTION,,OFFSET
  7500	010002'01  202 17 0 00 007762*		MOVEM P,MPP		;SAVE STACK FENCE
  7501	010003'01  256 04 0 00 011356'		XCTU [DMOVE T1,T1]	;GET STANDARD 4 ARGS
  7502	010004'01  256 04 0 00 011357'		XCTU [DMOVE T3,T3]
  7503	010005'01  402 00 0 00 007752*		SETZM SLOWF		;ENABLE PSI
  7504	010006'01  256 00 0 00 007751*		XCT MJRSTF		;JUMP TO CALL ADDRESS
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 191
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7505
  7506					;HERE WHEN INTERNAL CALL FLAG DETECTED IN RETURN FLAGS WORD
  7507
  7508	010007'01  262 17 0 00 010002*	IMCLL1:	POP P,MPP		;RESTORE CONTEXT VARIABLES
  7509	010010'01  262 17 0 00 007761*		POP P,INTDF
  7510	010011'01  205 16 0 17 777763 		MOVSI CX,-CX+1(P)	;RESTORE ACS
  7511	010012'01  251 16 0 00 000015 		BLT CX,CX-1
  7512	010013'01  274 17 0 00 011434'		SUB P,[CX,,CX]		;DEALLOCATE STACK SPACE
  7513	010014'01  256 04 0 00 011356'		XCTU [DMOVE T1,T1]	;SETUP RETURN VALUES
  7514	010015'01  256 04 0 00 011357'		XCTU [DMOVE T3,T3]
  7515	010016'01  402 00 0 00 010005*		SETZM SLOWF		;ENABLE PSI
  7516	010017'01  256 00 0 00 010006*		XCT MJRSTF		;RETURN
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 192
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7517
  7518					;CHECK FOR PRESENCE OF SPECIAL INSTRUCTIONS FOLLOWING JSYS WHICH
  7519					;FAILED.
  7520
  7521					;COMMON ROUTINE TO CHECK FOR ERJMP/ERCAL AND DO
  7522					;CORRECT SIMULATION.
  7523					; T1,T2/ FLAGS AND PC
  7524					;
  7525					; RETURNS +1 IF NONE FOUND OR PDL OV ON ERCAL
  7526					; RETURNS +2 WITH RETURN ADDRS IN C(T3)
  7527					;NOTE: ALL REFERENCES TO PREVIOUS CONTEXT SHOULD BE PROTECTED WITH
  7528					;ERJMPS IN CASE USER HAS BAD PROTECTIONS, NONX SECTIONS, ETC.
  7529
  7530	010020'01  607 01 0 00 010000 	ITRSIM::TXNN T1,UMODF		;CALL FROM MONITOR?
  7531	010021'01  334 03 0 02 000000 		SKIPA T3,0(T2)		;YES, FETCH FROM CURRENT CONTEXT
  7532	010022'01  256 04 0 00 011435'		UMOVE T3,0(T2)		;NO, FETCH FROM PREVIOUS CONTEXT
  7533	010023'01  320 16 0 00 006164*		 ERJMP R		;RETURN IF REF FAILS
  7534	010024'01  135 04 0 00 011436'		LDB T4,[POINT 13,T3,12]	;GET OPCODE AND AC
  7535	010025'01  302 04 0 00 006414 		CAIE T4,<ERJMPS>B58
  7536	010026'01  306 04 0 00 006416 		CAIN T4,<ERJMP>B58	;AN ERJMP?
  7537	010027'01  254 00 0 00 010060'		JRST ITRSX		;YES
  7538	010030'01  302 04 0 00 006412 		CAIE T4,<ERJMPR>B58	;AN ERJMPR?
  7539	010031'01  254 00 0 00 010035'		IFSKP.
  7540	010032'01  200 04 0 00 007702*		  MOVE T4,LSTERR	;YES, MAKE SURE ERRCOD RETURNED IN AC1
  7541	010033'01  256 04 0 00 011437'		  UMOVEM T4,1
  7542	010034'01  254 00 0 00 010060'		  JRST ITRSX
  7543	010035'01				ENDIF.
  7544	010035'01  302 04 0 00 006417 		CAIE T4,<ERCAL>B58	;AN ERCAL?
  7545	010036'01  306 04 0 00 006415 		CAIN T4,<ERCALS>B58
  7546	010037'01  254 00 0 00 010044'		IFSKP.
  7547	010040'01  302 04 0 00 006413 		  CAIE T4,<ERCALR>B58	;NO, AN ERCALR?
  7548	010041'01  263 17 0 00 000000 		  RET			;NOTA, RETURN
  7549	010042'01  200 04 0 00 010032*		  MOVE T4,LSTERR	;RETURN ERRCOD IN AC1 ALWAYS
  7550	010043'01  256 04 0 00 011437'		  UMOVEM T4,1
  7551	010044'01				ENDIF.
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 193
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7552
  7553					;Found an ERCAL. Fix up user's stack to simulate a call.
  7554
  7555	010044'01  541 02 0 02 000001 		HRRI T2,1(T2)		;YES, GET INCREMENTED PC
  7556	010045'01  256 04 0 00 011440'		UMOVE T4,P		;LOOK AT STACK PTR
  7557	010046'01  603 02 0 00 000037 		TXNE T2,VSECNO		;PC IN SECTION 0?
  7558						JUMPGE T4,[MOVEI T4,1	;NO, DIFFERENT RULES
  7559							XCTU [ADDB T4,P] ;BUMP PTR, NO OV CHECK
  7560	010047'01  325 04 0 00 011442'			JRST ITRSY]	;GO FINISH UP JUMP
  7561	010050'01  200 04 0 00 011445'		MOVE T4,[1,,1]
  7562	010051'01  256 04 0 00 011441'		XCTU [ADDB T4,P]	;BUMP PTR
  7563	010052'01  607 04 0 00 377777 		TLNN T4,377777		;PDL OVERFLOW?
  7564						CALL [SAVET		;YES
  7565						      MOVE T1,BITS+.ICPOV ;CHANNEL 9 INTERRUPT
  7566						      CALL IICSLF
  7567	010053'01  260 17 0 00 011446'		      RET]
  7568	010054'01  607 02 0 00 000037 		TXNN T2,VSECNO		;IF NOT EXT ADR,
  7569	010055'01  500 02 0 00 000001 		HLL T2,T1		;INCLUDE FLAGS WITH PC
  7570	010056'01  256 04 0 00 011452'	ITRSY:	UMOVEM T2,0(T4)		;STORE PC FROM JSYS
  7571						 ERJMP [SAVET
  7572							MOVE T1,BITS+.ICIWR ;ILLEGAL MEMORY WRITE
  7573							CALL IICSLF	;GIVE INTERRUPT
  7574	010057'01  320 16 0 00 011453'			RET]		;AND RETURN
  7575
  7576					;Get 30-bit address to go to, and return it to caller.
  7577
  7578	010060'01  621 03 0 00 777740 	ITRSX:	TLZ T3,777740		;GET RID OF INSTRUCTION PART
  7579	010061'01  661 03 0 00 415140 		TXO T3,<XMOVEI T3,0>	;FORM INST FETCH
  7580	010062'01  607 01 0 00 000010 		TXNN T1,IMCFLG		;MONITOR AND INTERNAL CALL?
  7581	010063'01  254 00 0 00 010077'		IFSKP.
  7582	010064'01  607 03 0 00 000017 		  TXNN T3,<Z 0(17)>	;INDEXING?
  7583	010065'01  254 00 0 00 010070'		  IFSKP.
  7584	010066'01  256 00 0 00 000003 		    XCT T3		;YES, DO THE XMOVEI
  7585	010067'01  254 00 0 00 010076'		  ELSE.
  7586	010070'01  607 03 0 00 000020 		    TXNN T3,<Z @0>	;INDIRECTION?
  7587	010071'01  254 00 0 00 010075'		    IFSKP.
  7588	010072'01  500 03 0 00 000002 		      HLL T3,T2		;YES, SIMULATE ONE LEVEL...
  7589	010073'01  200 03 0 03 000000 		      MOVE T3,0(T3)	;PICK UP INDIRECT WORD FROM LOCAL SECTION
  7590	010074'01  254 00 0 00 010076'		    ELSE.
  7591	010075'01  500 03 0 00 000002 		      HLL T3,T2		;NO, PLUG IN SECTION FROM RETURN PC
  7592	010076'01				    ENDIF.
  7593	010076'01				  ENDIF.
  7594	010076'01  254 00 0 00 007405*		  RETSKP		;DONE
  7595	010077'01				ENDIF.
  7596	010077'01  256 14 0 00 000003 		XCTUU T3		;GET PREV CONTEXT ADDRESS
  7597	010100'01  320 16 0 00 010023*		 ERJMP R		;GIVE UP IF E CALC FAILS
  7598	010101'01  254 00 0 00 010076*		RETSKP			;GIVE GOOD RETURN
  7599
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 194
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7600
  7601					;TSTERJ - Test for putting error code into specific AC.
  7602					;	CALL TSTERJ
  7603					; RETURN +1: Error code should be stored.
  7604					;	+2: ERJMPR/ERCALR/ERJMPS/ERCALS present, don't store.
  7605					;	ALL ACS PRESERVED
  7606
  7607	010102'01  265 16 0 00 006006*	TSTERJ::SAVET
  7608	010103'01  200 04 0 00 010007*		MOVE T4,MPP		;GET LAST STACK FENCE
  7609	010104'01  120 01 0 04 777777 		DMOVE T1,-1(T4)		;GET PC DOUBLEWORD
  7610	010105'01  250 01 0 00 000002 		EXCH T1,T2		;IN PROPER ORDER
  7611	010106'01  603 01 0 00 000010 		TXNE T1,IMCFLG		;INTERNAL CALL?
  7612	010107'01  334 01 0 02 000000 		SKIPA T1,0(T2)		;YES, FETCH FROM CURRENT CONTEXT
  7613	010110'01  256 04 0 00 011457'		UMOVE T1,0(T2)		;NO, FETCH FROM PREVIOUS CONTEXT
  7614	010111'01  135 01 0 00 011460'		LDB T1,[POINT 13,T1,12]	;GET OP AND AC FIELDS
  7615	010112'01  302 01 0 00 006412 		CAIE T1,<ERJMPR>B58
  7616	010113'01  306 01 0 00 006413 		CAIN T1,<ERCALR>B58	;THE R FLAVOR?
  7617	010114'01  254 00 0 00 010101*		RETSKP			;YES, CODE STORED BY ITRSIM ONLY.
  7618	010115'01  302 01 0 00 006414 		CAIE T1,<ERJMPS>B58	;IS IT AN ERJMPS?
  7619	010116'01  306 01 0 00 006415 		CAIN T1,<ERCALS>B58	; OR AN ERCALS?
  7620	010117'01  254 00 0 00 010114*		RETSKP			;YES, NO CODE IN AC
  7621	010120'01  263 17 0 00 000000 		RET			;NO
  7622
  7623					;SET PREVIOUS CONTEXT VARIABLES
  7624					;CALLED WHEN CHANGING CONTEXT IN SOME UNUSUAL WAY, E.G. POPPING UPDL
  7625					; T1/ FLAGS
  7626					; T2/ PC
  7627					;	CALL SETPCV
  7628					;  RETURN +1 ALWAYS, ARGS PRESERVED
  7629
  7630	010121'01  254 14 0 00 000003 	SETPCV::XSFM T3			;GET CURRENT FLAGS
  7631	010122'01  621 03 0 00 004000 		TXZ T3,PCU		;CLEAR VARIABLES
  7632	010123'01  603 01 0 00 010000 		TXNE T1,UMODF		;PREVIOUS CONTEXT WAS USER?
  7633	010124'01  661 03 0 00 004000 		TXO T3,PCU		;YES
  7634	010125'01  135 04 0 00 011461'		LOAD T4,VSECNO,T2	;GET PREVIOUS PC SECTION
  7635	010126'01  137 04 0 00 011462'		STOR T4,EXPCS,T3
  7636	010127'01  262 17 0 00 000004 		POP P,T4		;GET LOCAL RETURN
  7637	010130'01  621 04 0 00 777740 		ANDX T4,EXPCBT		;BUT ONLY THE GOOD BITS
  7638	010131'01  254 05 0 00 000003 		XJRSTF T3		;RETURN AND SET PREV CONTEXT VARIABLES
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 195
SCHED	MAC	 7-Nov-88 20:50		Context switching for MUUO's

  7639
  7640					;ROUTINE TO CHECK IF THERE IS AN ERJMP OR AN ERCAL AFTER A JSYS
  7641					;ACCEPTS IN T1/ RETURN FLAGS
  7642					;		T2/ RETURN PC
  7643					;	CALL CHKERT
  7644					;RETURNS +1:	NO ERJMP OR ERCAL
  7645					;	 +2:	THERE IS AN ERJMP OR AN ERCAL
  7646					;Finds S flavor too.
  7647
  7648	010132'01  603 01 0 00 000010 	CHKERT::TXNE T1,IMCFLG		;INTERNAL CALL?
  7649	010133'01  334 01 0 02 000000 		SKIPA T1,0(T2)		;YES, FETCH FROM CURRENT CONTEXT
  7650	010134'01  256 04 0 00 011457'		UMOVE T1,0(T2)		;NO, FETCH FROM PREVIOUS CONTEXT
  7651	010135'01  135 01 0 00 011460'		LDB T1,[POINT 13,T1,12]	;GET OP AND AC FIELDS
  7652	010136'01  302 01 0 00 006412 		CAIE T1,<ERJMPR>B58	;R FLAVOR?
  7653	010137'01  306 01 0 00 006413 		CAIN T1,<ERCALR>B58
  7654	010140'01  254 00 0 00 010117*		RETSKP			;YES
  7655	010141'01  302 01 0 00 006414 		CAIE T1,<ERJMPS>B58	;S FLAVOR?
  7656	010142'01  306 01 0 00 006415 		CAIN T1,<ERCALS>B58
  7657	010143'01  254 00 0 00 010140*		RETSKP			;YES
  7658	010144'01  302 01 0 00 006416 		CAIE T1,<ERJMP>B58	;IS IT AN ERJMP?
  7659	010145'01  306 01 0 00 006417 		CAIN T1,<ERCAL>B58	; OR AN ERCAL?
  7660	010146'01  254 00 0 00 010143*		RETSKP			;YES
  7661	010147'01  263 17 0 00 000000 		RET			;NO
  7662
  7663	010150'01  000000#  000000#	UPP::	IOWD NUPDL,UPDL		;MONITOR BASE STACK POINTER
  7664	010151'01  000000#  000000#	UPP1:	XWD -NUPDL+3,UPDL-1+3	;STK PTR AT ENTRY TO TOP LEVEL JSYS
  7665
  7666
  7667
  7668					;CKMMOD - CHECK FOR MONITOR MODE
  7669
  7670	010152'01  260 17 0 00 010153'		CALL CKMMOD
  7671
  7672					;RETURNS +1: CALLER CAME FROM USER CONTEXT
  7673					;	 +2: CALLER CAME FROM MONITOR CONTEXT
  7674
  7675					;CLOBBERS NO AC'S
  7676
  7677					;THIS ROUTINE IS CALLED BY A JSYS (TTMSG, FOR EXAMPLE), WHEN IT
  7678					;REQUIRES THE CALLER TO BE PRIVILEGED EXCEPT WHEN THE CALLER IS IN
  7679					;MONITOR CONTEXT.  THIS ALLOWS A NON-PRIVILEGED JSYS LIKE DTACH
  7680					;TO DO A PRIVILEGED FUNCTION LIKE TTMSG
  7681
  7682	010153'01  265 16 0 00 004666*	CKMMOD::ACVAR <W1>		;GET A WORK AC
  7683	010154'01  200 05 0 00 010103*		MOVE W1,MPP		;GET STACK POINTER ON ENTRY TO THE JSYS
  7684	010155'01  200 05 0 05 000000 		MOVE W1,0(W1)		;GET THE FLAGS WORD FROM THE STACK
  7685	010156'01  603 05 0 00 010000 		TLNE W1,(UMODF)		;IS IT USER MODE?
  7686	010157'01  263 17 0 00 000000 		RET			;YES. TAKE NONSKIP RETURN
  7687	010160'01  254 00 0 00 010146*		RETSKP			;NO. TAKE SKIP RETURN
  7688
  7689						ENDAV.			;END ACVAR
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 196
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7690						SUBTTL SKED JSYS
  7691
  7692					;JSYS TO DO SCHEDULER CONTROLS
  7693
  7694					;JSYS TO READ/SET SCHEDULER PARAMETERS.
  7695
  7696						SWAPCD			;START UP IS SWAPPABLE
  7697	000000'06			.SKED::	MCENT			;GET INTO MONITOR
  7698	000000'06  333 00 0 00 000001 		SKIPLE T1		;VALIDATE FUNCTION
  7699	000001'06  303 01 0 00 000014 		CAILE T1,MAXFUN		;VALID FUNCTION
  7700	000002'06  265 02 0 00 000317'		ITERR (ARGX02)		;INVALID
  7701	000003'06  331 00 0 01 000011'		SKIPL FNCTBL-1(T1)	;PRIVILEGED FUNCTION?
  7702	000004'06  254 00 0 00 000010'		JRST SKED1		;NO
  7703	000005'06  201 04 0 00 600000 		MOVX T4,SC%WHL!SC%OPR	;MUST BE PRIVILEGED
  7704	000006'06  616 04 0 00 000000*		TDNN T4,CAPENB		;IS IT?
  7705	000007'06  265 02 0 00 000321'		ITERR (CAPX1)		;NO. BOMB THEN
  7706	000010'06  550 01 0 01 000011'	SKED1:	HRRZ T1,FNCTBL-1(T1)	;GET DISPATCH
  7707	000011'06  254 00 0 01 000000 		JRST 0(T1)		;DO FUNCTION
  7708
  7709	000012'06  000000  000026'	FNCTBL:	SKDRNB			;READ KNOB
  7710	000013'06  400000  000034'		IFIW!SKDSNB		;SET KNOB
  7711	000014'06  000000  000047'		SKDRCS			;READ CLASS SHARES
  7712	000015'06  000000000000#		IFIW!SKDSCS		;SET CLASS SHARE
  7713	000016'06  000000000000#		IFIW!SKDSCL		;START CLASS SCHEDULING
  7714	000017'06  000000000000#		SKDSJC			;SET JOB CLASS
  7715	000020'06  000000  000102'		SKDRTJ			;READ THIS JOB'S UTILIZATION AND SHARE
  7716	000021'06  000000  000146'		SKDRCB			;READ CLASS SETTING FOR BATCH JOBS
  7717	000022'06  400000  000155'		IFIW!SKDSCB		;SET BATCH CLASS
  7718	000023'06  400000  000220'		IFIW!SKDRDQ		;RUN BATCH JOBS ON DREGS QUEUE
  7719	000024'06  400000  000325'		IFIW![ITERR (ARGX02)] ;UNUSED SLOT
  7720	000025'06  000000  000300'		SKDRCP			;READ CLASS PARAMETERS
  7721		   	   000014	MAXFUN==.-FNCTBL
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 197
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7722
  7723					;ACTION ROUTINES FOR EACH FUNCTION
  7724
  7725					;READ MICRO-CONTROL KNOB
  7726
  7727	000026'06  256 04 0 00 000326'	SKDRNB:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7728	000027'06  307 03 0 00 000001 		CAIG T3,1		;ROOM TO STORE VALUE?
  7729	000030'06  265 02 0 00 000327'		ITERR (ARGX04)		;NO. ERROR THEN
  7730	000031'06  135 01 0 00 000331'		LOAD T1,CLSKV		;GET KNOB VALUE
  7731	000032'06  256 04 0 00 000332'		UMOVEM T1,.SAKNB(T2)		;RETURN TO USER
  7732	000033'06  254 00 0 00 000000#		MRETNG			;AND DONE
  7733
  7734					;SET MICRO-CONTROL VALUE
  7735
  7736	000034'06  256 04 0 00 000333'	SKDSNB:	UMOVE T3,.SACNT(T2)		;GET COUNT
  7737	000035'06  307 03 0 00 000001 		CAIG T3,1		;HAVE VALUE TO SET?
  7738	000036'06  265 02 0 00 000334'		ITERR (ARGX04)		;NO.
  7739	000037'06  256 04 0 00 000336'		UMOVE T2,.SAKNB(T2)		;YES. GET IT
  7740	000040'06  333 00 0 00 000002 		SKIPLE T2
  7741	000041'06  303 02 0 00 000024 		CAILE T2,NSKFLV		;VALID SETTING?
  7742	000042'06  265 02 0 00 000337'		ITERR (ARGX30)		;INVALID KNOB
  7743	000043'06  137 02 0 00 000331'		STOR T2,CLSKV		;STORE KNOB VALUE
  7744	000044'06  200 02 0 02 000000#		MOVE T2,SKFLGV-1(T2)	;GET NEW FLAGS
  7745	000045'06  202 02 0 00 000000*		MOVEM T2,SCHFLG		;NEW FLAGS
  7746	000046'06  254 00 0 00 000000#		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 198
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7747
  7748					;READ CLASS SHARE
  7749
  7750	000047'06  256 04 0 00 000326'	SKDRCS:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7751	000050'06  307 03 0 00 000002 		CAIG T3,2		;ROOM FOR DATA?
  7752	000051'06  265 02 0 00 000341'		ITERR (ARGX04)		;NO
  7753	000052'06  275 03 0 00 000002 		SUBI T3,2		;REMOVE HEADER
  7754	000053'06  213 00 0 00 000003 		MOVNS T3
  7755	000054'06  517 00 0 00 000003 		HRLZS T3		;GET VALUE TO LH
  7756	000055'06  541 03 0 02 000002 		HRRI T3,2(T2)		;START OF DATA
  7757	000056'06  256 04 0 00 000343'		UMOVE P1,1(T2)		;GET CLASS I.D.
  7758	000057'06  331 00 0 00 000010 		SKIPL P1		;GOOD CLASS?
  7759	000060'06  301 10 0 00 000000*		CAIL P1,MAXCLS		;STILL?
  7760	000061'06  265 02 0 00 000344'		ITERR (ARGX25)		;NO
  7761	000062'06  200 04 1 00 000346'		MOVE T4,@[EP. CLSSHR(P1)]	;GET CLASS' SHARE
  7762	000063'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;RETURN TO CALLER
  7763	000064'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7764	000065'06  200 04 1 00 000350'		MOVE T4,@[EP. CLSUTL(P1)]	;YES. GET UTILIZATION
  7765	000066'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;RETURN TO CALLER
  7766	000067'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7767	000070'06  221 10 0 00 000003 		IMULI P1,3		;LOAD AVERAGES *3
  7768	000071'06  200 04 1 00 000351'		MOVE T4,@[EP. CLSRJA(P1)] ;GET FIRST AVERAGE
  7769	000072'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;STORE IT
  7770	000073'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7771	000074'06  200 04 1 00 000352'		MOVE T4,@[EP. CLSRJA+1(P1)] ;GET SECOND AVERAGE
  7772	000075'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;STORE IT
  7773	000076'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;LAST ONE TOO?
  7774	000077'06  200 04 1 00 000353'		MOVE T4,@[EP. CLSRJA+2(P1)] ;GET THIRD AVERAGE
  7775	000100'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;STORE THIRD AVERAGE
  7776	000101'06  254 00 0 00 000140'		JRST SKDON0		;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 199
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7777
  7778					;READ THIS JOB'S UTILIZATION AND SHARE
  7779
  7780	000102'06  256 04 0 00 000326'	SKDRTJ:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7781	000103'06  307 03 0 00 000002 		CAIG T3,2		;ROOM FOR ANY DATA?
  7782	000104'06  265 02 0 00 000354'		ITERR (ARGX04)		;NO
  7783	000105'06  275 03 0 00 000002 		SUBI T3,2		;YES. GET NUMBER OF WORDS WANTED
  7784	000106'06  213 00 0 00 000003 		MOVNS T3		;MAKE IT NEG
  7785	000107'06  517 00 0 00 000003 		HRLZS T3		;GET IT IN THE LH
  7786	000110'06  541 03 0 02 000002 		HRRI T3,.SAJCL(T2)	;FORM AOBJP POINTER
  7787	000111'06  256 04 0 00 000356'		UMOVE T1,1(T2)		;GET JOB NUMBER
  7788	000112'06  312 01 0 00 000357'		CAME T1,[-1]		;THIS JOB?
  7789	000113'06  254 00 0 00 000116'		IFSKP.			;IF SKIP, T1 IS -1, SO GET OUR OWN JOB INDEX
  7790	000114'06  200 01 0 00 000000*		 MOVE T1,JOBNO		;FROM THE LOCAL JOB NUMBER
  7791	000115'06  254 00 0 00 000120'		ELSE.			;IF NO SKIP, T1 IS A GLOBAL JOB NUMBER, SO
  7792	000116'06  260 17 0 00 000000*		 CALL GL2LCL		;ASK CFS TO CONVERT IT TO A LOCAL
  7793	000117'06  265 02 0 00 000360'		  ITERR(ARGX08)		;AND COMPLAIN IF THE JOB NUMBER WAS ILLEGAL
  7794	000120'06				ENDIF.			;NOW CONTINUE WITH THE LOCAL JOB INDEX IN T1
  7795	000120'06  335 00 0 01 000000*		SKIPGE JOBRT(T1)	;LOGGED IN?
  7796	000121'06  265 02 0 00 000362'		ITERR (ARGX15)		;NO
  7797	000122'06  550 10 1 00 000364'		HRRZ P1,@[EP. JOBCLS(T1)]	;GET CLASS OF JOB
  7798	000123'06  256 04 0 00 000365'		UMOVEM P1,0(T3)		;RETURN CLASS NUMBER
  7799	000124'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7800	000125'06  200 04 1 00 000366'		MOVE T4,@[EP. CLSSHI(P1)]	;YES. GET JOB'S SHARE
  7801	000126'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;AND RETURN TO USER
  7802	000127'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7803	000130'06  200 04 1 00 000367'		MOVE T4,@[EP. JOBUTL(T1)]	;YES. GET UTILIZATION
  7804	000131'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;AND RETURN IT TO THE USER
  7805	000132'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7806	000133'06  200 04 1 00 000370'		MOVE T4,@[EP. CLSSHR(P1)]	;YES. GET CLASS SHARE
  7807	000134'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;AND RETURN TO USER
  7808	000135'06  252 03 0 00 000141'		AOBJP T3,SKDONE		;WANT MORE?
  7809	000136'06  200 04 1 00 000371'		MOVE T4,@[EP. CLSUTL(P1)]	;YES. GET CLASS UTILIZATION
  7810	000137'06  256 04 0 00 000347'		UMOVEM T4,0(T3)		;AND RETURN TO USER
  7811	000140'06  270 03 0 00 000000#	SKDON0:	ADD T3,BHC+1		;ACCOUNT FOR LAST ONE
  7812	000141'06  577 00 0 00 000003 	SKDONE:	HLRES T3		;GET REMAINING COUNT
  7813	000142'06  256 04 0 00 000372'		XCTU [HRRZ T4,0(T2)]	;GET ORIGINAL COUNT
  7814	000143'06  270 03 0 00 000004 		ADD T3,T4		;COMPUTE WORDS PROCESSED
  7815	000144'06  256 04 0 00 000373'		XCTU [HRLM T3,0(T2)]	;AND RETURN THIS AS WELL
  7816	000145'06  254 00 0 00 000000#		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 200
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7817
  7818					;SET CLASS SHARE FOR CLASS N
  7819
  7820						RESCD			;MUST BE RESIDENT TO AVOID PAGE FAULTS
  7821	010161'01  256 04 0 00 011463'	SKDSCS:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7822	010162'01  307 03 0 00 000002 		CAIG T3,.SACLS+1	;ENOUGH ARGS GIVEN?
  7823	010163'01  265 02 0 00 011464'		ITERR (ARGX04)
  7824	010164'01  476 00 0 00 000011 		SETOM P2		;ASSUME CLSSWA SETTING IN ON
  7825	010165'01  303 03 0 00 000003 		CAILE T3,.SAWA		;SPECIFIED SWITCH SETTING?
  7826	010166'01  256 04 0 00 011466'		UMOVE P2,.SAWA(T2)	;YES. GET IT
  7827	010167'01  332 00 0 00 000011 		SKIPE P2		;ON?
  7828	010170'01  476 00 0 00 000011 		SETOM P2		;YES. SWITCH IT THEN
  7829	010171'01  256 04 0 00 011467'		XCTU [DMOVE T1,.SACLS(T2)]	;GET ARGS
  7830	010172'01  331 00 0 00 000001 		SKIPL T1
  7831	010173'01  303 01 0 00 000000#		CAILE T1,MAXCLS-1	;VALID CLASS?
  7832	010174'01  265 02 0 00 011470'		ITERR (ARGX25)
  7833	010175'01  265 16 0 00 000310'		NOSKED			;OWN MACHINE FOR A WHILE
  7834	010176'01  261 17 1 00 011472'		PUSH P,@[EP. CLSSHR(T1)]	;SAVE OLD CLASS VALUE
  7835	010177'01  202 02 1 00 011473'		MOVEM T2,@[EP. CLSSHR(T1)]	;SET NEW CLASS
  7836	010200'01  402 00 0 00 000010 		SETZM P1		;GET ACCUMULATOR
  7837	010201'01  201 03 0 00 000000#		MOVEI T3,MAXCLS-1
  7838	010202'01  140 10 1 00 011474'	SKDSC1:	FAD P1,@[EP. CLSSHR(T3)]	;GET TOTAL SHARES ALLOCATED
  7839	010203'01  365 03 0 00 010202'		SOJGE T3,SKDSC1
  7840	010204'01  262 17 1 00 011475'		POP P,@[EP. CLSSHR(T1)]	;PUT BACK OLD VALUE
  7841	010205'01  322 02 0 00 010211'		JUMPE T2,SKDS11		;ALLOW 0 ALWAYS
  7842	010206'01  311 02 0 00 011476'		CAML T2,[SHRMIN]	;AT LEAST THE MINIMUM?
  7843	010207'01  313 10 0 00 010576'		CAMLE P1,[1.0]		;VALID NUMBER?
  7844	010210'01  254 00 0 00 011477'		ITERR (ARGX29,<OKSKED>)	;NO
  7845	010211'01  202 11 1 00 011502'	SKDS11:	MOVEM P2,@[EP. CLSSWA(T1)]		;SET CLSSWA VECTOR VALUE
  7846	010212'01  250 01 0 00 000002 		EXCH T1,T2		;ORDER ARGS
  7847	010213'01  260 17 0 00 004775'		CALL CRTSHR		;MAKE SHARE
  7848	010214'01  265 16 0 00 000315'		OKSKED			;RESTORE MACHINE
  7849	010215'01  254 00 0 00 007714'		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 201
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7850
  7851					;SET CLASS FOR JOB
  7852
  7853	010216'01  200 16 0 00 005044*	SKDSJC:	TMNN CLSAC		;DOING CLASS BY ACCOUNT?
  7854	010217'01  606 16 0 00 200000 
  7855	010220'01  336 00 0 00 005624*		SKIPN CLASSF		;NO. ACCOUNTING OFF?
  7856	010221'01  265 02 0 00 011503'		ITERR (SKDX1)		;YES. CAN'T DO THIS THEN
  7857	010222'01  256 04 0 00 011463'		XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7858	010223'01  305 03 0 00 000003 		CAIGE T3,3		;ENOUGH ROOM?
  7859	010224'01  265 02 0 00 011464'		ITERR (ARGX04)		;NO
  7860	010225'01  256 04 0 00 011467'		XCTU [DMOVE T1,.SAJOB(T2)]	;GET DATA
  7861	010226'01  312 01 0 00 011505'		CAME T1,[-1]		;THIS JOB?
  7862	010227'01  254 00 0 00 010233'		IFSKP.			;SKIP MEANS OUR OWN JOB
  7863	010230'01  200 04 0 00 005020*		 MOVE T4,GBLJNO		;Save Global job number for GETOK%
  7864	010231'01  200 01 0 00 006247*		 MOVE T1,JOBNO		;GET OUR LOCAL JOB INDEX
  7865	010232'01  254 00 0 00 010236'		ELSE.			;NO SKIP, MEANS A GLOBAL JOB NUMBER IS THERE
  7866	010233'01  200 04 0 00 000001 		 MOVE T4,T1		;Save global job number for GETOK%
  7867	010234'01  260 17 0 00 001014*		 CALL GL2LCL		;SO CONVERT IT TO A LOCAL INDEX
  7868	010235'01  265 02 0 00 011506'		  ITERR(ARGX08)		;AND COMPLAIN IF THAT GLOBAL WAS NO GOOD.
  7869	010236'01				ENDIF.			;
  7870	010236'01  316 01 0 00 010231*		CAMN T1,JOBNO		;DID WE END UP WITH OURSELF?
  7871	010237'01  254 00 0 00 010243'		IFSKP.			;SKIP MEANS IT'S SOMEONE ELSE'S JOB NUMBER
  7872	010240'01  201 03 0 00 600000 		 MOVX T3,SC%WHL!SC%OPR	;SO CHECK FOR THESE PRIV'S
  7873	010241'01  616 03 0 00 007012*		 TDNN T3,CAPENB		;FOR WHEEL/OPR
  7874	010242'01  265 02 0 00 011510'		  ITERR(CAPX1)		;NOT GOOD ENOUGH
  7875	010243'01				ENDIF.			;JUST FINE.
  7876	010243'01  335 00 0 01 006071*		SKIPGE JOBRT(T1)	;LOGGED IN?
  7877	010244'01  265 02 0 00 011512'		 ITERR (ARGX15)		;NO
  7878	010245'01  331 00 0 00 000002 		SKIPL T2		;TRYING TO SET A VALID CLASS?
  7879	010246'01  301 02 0 00 005034*		CAIL T2,MAXCLS		;HMMMMM?
  7880	010247'01  265 02 0 00 011470'		 ITERR (ARGX25)		;ITRAP TO USER, THE LOSER
  7881					;	MOVX T3,SC%WHL		;SEE IF THIS JOB IS WHEELED
  7882					;	TDNE T3,CAPENB		;IS IT?
  7883					;	JRST SKDSJ1		;YES. SKIP GETOK THEN
  7884	010250'01  335 16 0 00 000000#		GTOKM (.GOCLS,<T4,T2>)	;VERIFY REQUEST. ITRAP IF DENIED
  7885	010251'01  334 00 0 00 000000 
  7886	010252'01  607 16 0 00 200000 
  7887	010253'01  260 17 0 00 011520'
  7888	010254'01  334 00 0 00 000000 
  7889	010255'01  265 02 0 00 000540'
  7890	010256'01  250 01 0 00 000002 	SKDSJ1:	EXCH T1,T2		;ARRANGE ARGS PROPERLY
  7891	010257'01  265 16 0 00 000310'		NOSKED
  7892	010260'01  260 17 0 00 004754'		CALL CHGCLS		;DO CHANGE
  7893	010261'01  265 16 0 00 000315'		OKSKED
  7894	010262'01  254 00 0 00 007714'		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 202
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7895
  7896					;START UP THE CLASS SCHEDULER
  7897
  7898	010263'01  256 04 0 00 011463'	SKDSCL:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7899	010264'01  307 03 0 00 000001 		CAIG T3,1		;ENOUGH WORDS?
  7900	010265'01  265 02 0 00 011464'		ITERR (ARGX04)		;NO
  7901	010266'01  265 16 0 00 000310'		NOSKED
  7902	010267'01  256 04 0 00 011541'		UMOVE P1,.SACTL(T2)		;GET CONTROL WORD
  7903	010270'01  603 10 0 00 100000 		TXNE P1,SK%STP		;STOP?
  7904						JRST [	SETZM CLASSF	;YES
  7905							CALL QBIAS	;SET UP QUANTS PROPERLY
  7906	010271'01  254 00 0 00 011542'			JRST SKDSC0]	;DONE
  7907	010272'01  332 00 0 00 010220*		SKIPE CLASSF		;NO. IS IT NOW ON?
  7908	010273'01  254 00 0 00 011545'		ITERR (ARGX31,<OKSKED>)	;YES. CAN'T DO IT THEN
  7909	010274'01  260 17 0 00 005111'		CALL QCLASS		;SET UP CLASS QUANTS
  7910	010275'01  260 17 0 00 004664'		CALL STRCLS		;START UP CLASS SCHEDULER
  7911	010276'01  201 01 0 00 000000 		MOVEI T1,0
  7912	010277'01  603 10 0 00 400000 		TXNE P1,SK%ACT		;WANT CLASS BY ACCOUNTS?
  7913	010300'01  201 01 0 00 000001 		MOVEI T1,1		;YES.
  7914	010301'01  137 01 0 00 011550'		STOR T1,CLSAC		;STORE VALUE
  7915	010302'01  201 01 0 00 000001 		MOVEI T1,1
  7916	010303'01  603 10 0 00 200000 		TXNE P1,SK%WDF		;WITHHOLD WINDFALL?
  7917	010304'01  202 01 0 00 010272*		MOVEM T1,CLASSF		;YES. STATE THIS THEN
  7918	010305'01  265 16 0 00 000315'	SKDSC0:	OKSKED			;RESTORE MACHINE
  7919	010306'01  254 00 0 00 007714'		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 203
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7920
  7921					;FUNCTIONS TO SET/READ DEFAULT INFORMATION
  7922
  7923					;READ CLASS SETTING FOR BATCH JOBS
  7924
  7925						SWAPCD			;BACK TO SWAPPABLE CODE
  7926	000146'06  256 04 0 00 000326'	SKDRCB:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  7927	000147'06  307 03 0 00 000001 		CAIG T3,1		;ROOM TO STORE VALUE?
  7928	000150'06  265 02 0 00 000374'		ITERR (ARGX04)		;NO. CAN'T DO IT THEN
  7929	000151'06  135 01 0 00 000376'		LOAD T1,CLSBT		;GET BATCH CLASS
  7930	000152'06  275 01 0 00 000001 		SUBI T1,1		;ONE LESS
  7931	000153'06  256 04 0 00 000332'		UMOVEM T1,.SABCL(T2)		;RETURN GOOD DATA
  7932	000154'06  254 00 0 00 000000#		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 204
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7933
  7934					;SET BATCH CLASS
  7935
  7936	000155'06  265 16 0 00 000000*	SKDSCB:	STKVAR <CLASS,JOBCHG>	;[7443][7473] Save class and job
  7937	000156'06  000000  000002
  7938	000157'06  256 04 0 00 000326'		XCTU [HRRZ T3,.SACNT(T2)] ;GET COUNT
  7939	000160'06  307 03 0 00 000001 		CAIG T3,1		;HAVE AN ARG?
  7940	000161'06  265 02 0 00 000377'		ITERR (ARGX04)		;NO
  7941	000162'06  256 04 0 00 000356'		UMOVE T1,.SABCL(T2)	;GET SETTING
  7942	000163'06  351 00 0 00 000001 		AOSL T1			;VALID?
  7943	000164'06  303 01 0 00 000000#		CAILE T1,MAXCLS+1	;STILL?
  7944	000165'06  265 02 0 00 000401'		ITERR (ARGX25)		;NO
  7945	000166'06  137 01 0 00 000376'		STOR T1,CLSBT		;SAVE IT
  7946	000167'06  370 00 0 00 000001 		SOS T1			;[7443] Decrement setting
  7947	000170'06  202 01 0 17 777776 		MOVEM T1,CLASS		;[7443] Save class
  7948	000171'06  205 04 0 00 000000#		MOVSI T4,-NTTPTY	;[7443] Make AOBJN pointer
  7949	000172'06  201 02 0 04 000000 	SKDSB1:	MOVEI T2,(T4)		;[7443] Get next PTY number
  7950	000173'06  260 17 0 00 000265'		CALL PTYJOB		;[7443] (T2/T3) Get job on that PTY
  7951	000174'06  254 00 0 00 000216'		 JRST SKDSB3		;[7471] No job
  7952	000175'06  202 03 0 17 777775 		MOVEM T3,JOBCHG		;[7471] Stash job number here
  7953	000176'06  200 02 0 00 000003 		MOVE T2,T3		;[7443] Get job number
  7954	000177'06  200 01 0 17 777776 		MOVE T1,CLASS		;[7443] Get class
  7955	000200'06  265 16 0 00 000000#		NOSKED			;[7443] Prevent scheduling
  7956	000201'06  331 00 0 00 000001 		SKIPL T1		;[7471] Set batch class to none?
  7957	000202'06  254 00 0 00 000213'		IFSKP.			;[7471] Yes
  7958	000203'06  200 01 0 17 777775 		  MOVE T1,JOBCHG	;[7471] Get job number
  7959	000204'06  260 17 0 00 000000*		  CALL SETJSB		;[7471] (T1/T1) Map in JSB
  7960	000205'06  254 00 0 00 000215'		   JRST SKDSB2		;[7471] Job isn't there
  7961	000206'06  200 01 0 01 000000*		  MOVE T1,CSHCLS(T1)	;[7471] Get cached class for this batch job
  7962	000207'06  200 02 0 17 777775 		  MOVE T2,JOBCHG	;[7471] Get job number
  7963	000210'06  260 17 0 00 000000#		  CALL CHGCLS		;[7471] (T1,T2/) Now change its class
  7964	000211'06  260 17 0 00 000000*		  CALL CLRJSB		;[7471] (/) Clear the mapping of the batch job's JSB
  7965	000212'06  254 00 0 00 000215'		ELSE.			;[7471]
  7966	000213'06  332 00 0 02 000000*		  SKIPE JOBDIR(T2)	;[7471] Job still logged in?
  7967	000214'06  260 17 0 00 000000#		  CALL CHGCLS		;[7471] (T1,T2/) Yes, change its class
  7968	000215'06				ENDIF.			;[7471]
  7969	000215'06  265 16 0 00 000000#	SKDSB2:	OKSKED			;[7471] Scheduling ok now
  7970	000216'06  253 04 0 00 000172'	SKDSB3:	AOBJN T4,SKDSB1		;[7443] Do next PTY
  7971	000217'06  254 00 0 00 000000#		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 205
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  7972
  7973					;RUN ALL BATCH JOBS ON DREGS QUEUE
  7974
  7975	000220'06  265 16 0 00 000155*	SKDRDQ:	STKVAR <OPRIOR,NPRIOR,JOBN> ;[7443]
  7976	000221'06  000000  000003
  7977	000222'06  256 04 0 00 000326'		XCTU [HRRZ T3,.SACNT(T2)] ;GET COUNT
  7978	000223'06  332 00 0 00 000002 		SKIPE T2		;HAVE A COUNT?
  7979	000224'06  307 03 0 00 000001 		CAIG T3,1		;BIG ENOUGH?
  7980	000225'06  664 01 0 00 000001 		TROA T1,1		;NO. SET IT THEN
  7981	000226'06  256 04 0 00 000356'		UMOVE T1,.SADRG(T2)		;YES. GET IT
  7982	000227'06  332 00 0 00 000001 		SKIPE T1		;SET OR CLEAR?
  7983	000230'06  201 01 0 00 000001 		MOVEI T1,1		;SET
  7984	000231'06  137 01 0 00 000403'		STOR T1,CLSBD		;DO IT
  7985	000232'06  400 04 0 00 000000 		SETZ T4,		;CLEAR DREGS STATE FIRST
  7986	000233'06  332 00 0 00 000001 		SKIPE T1		;ARE WE SETTING OR CLEARING THE STATE
  7987	000234'06  201 04 0 00 000607 		MOVX T4,DREGS		;SETTING, GET PRIORITY WORD
  7988	000235'06  202 04 0 17 777775 		MOVEM T4,NPRIOR		;AND SAVE NEW PRIORITY
  7989	000236'06  205 04 0 00 000000#		MOVSI T4,-NTTPTY	;GET AOBJN POINTER OVER PTYSTS TABLE
  7990	000237'06  201 02 0 04 000000 	SKDDQ1:	MOVEI T2,0(T4)		;GET PTY NUMBER
  7991	000240'06  260 17 0 00 000265'		CALL PTYJOB		;[7443] (T2/T3) Get controlling job number
  7992	000241'06  254 00 0 00 000263'		 JRST SKDDQ2		;TERMINAL NOT ACTIVE, SHOULD NOT HAPPEN
  7993	000242'06  202 03 0 17 777774 		MOVEM T3,JOBN		;SAVE JOB NUMBER
  7994	000243'06  200 01 0 17 777774 		MOVE T1,JOBN		;GET JOB NUMBER INTO AC1
  7995	000244'06  260 17 0 00 000000*		CALL MAPJSB		;MAP IN THE JOBS JSB
  7996	000245'06  254 00 0 00 000263'		 JRST SKDDQ2		;NO JOB? FORGET IT
  7997	000246'06  200 02 0 01 000000*		MOVE T2,JOBSKD(T1)	;GET OLD PRIORITY WORD.
  7998	000247'06  202 02 0 17 777776 		MOVEM T2,OPRIOR		;SAVE OLD PRIORITY WORD
  7999	000250'06  260 17 0 00 000211*		CALL CLRJSB		;NOW CLEAR THE MAPPING OF THE JSB
  8000	000251'06  332 02 0 17 777776 		SKIPE T2,OPRIOR		;WAS A PRIORITY SET?
  8001	000252'06  306 02 0 00 000607 		CAIN T2,DREGS		;EITHER 0 OR DREGS?
  8002	000253'06  334 00 0 00 000000 		SKIPA			;YES, OKAY TO CHANGE
  8003	000254'06  254 00 0 00 000263'		 JRST SKDDQ2		;NO, CHANGED PRIORITY, SKIP IT
  8004	000255'06  200 01 0 17 777774 		MOVE T1,JOBN		;GET BACK JOB NUMBER
  8005	000256'06  260 17 0 00 000000*		CALL LCL2GL		;Convert local job index to global job number
  8006	000257'06  254 00 0 00 000263'		 JRST SKDDQ2		; No such job, this shouldn't happen.
  8007	000260'06  200 02 0 17 777775 		MOVE T2,NPRIOR		;AND GET NEW PRIORITY WORD
  8008	000261'06  104 00 0 00 000245 		SJPRI			;SET IT
  8009	000262'06  320 16 0 00 000263'		 ERJMP SKDDQ2		;SHOULD NOT GENERATE AN ERROR
  8010	000263'06  253 04 0 00 000237'	SKDDQ2:	AOBJN T4,SKDDQ1		;LOOP OVER ALL PTYS
  8011	000264'06  254 00 0 00 000000#		MRETNG			;AND DONE
  8012
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 206
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  8013
  8014					;PTYJOB - Routine to return the job number associated with a
  8015					;specified PTY for batch jobs.
  8016					;
  8017					;Call with:
  8018					;	T2/ PTY number
  8019					;	CALL PTYJOB
  8020					;
  8021					;Returns:
  8022					;	+1 - Not a batch job or no job on this PTY
  8023					;	+2 - Success with:
  8024					;		T3/ Job number
  8025
  8026	000265'06  265 16 0 00 000220*	PTYJOB:	STKVAR <TTYN>	;[7443] Place to hold TTY number
  8027	000266'06  000000  000001
  8028	000267'06  260 17 0 00 000000*		CALL PTYTTY	;[7443] (T2/T2) Convert PTY to TTY
  8029	000270'06  202 02 0 17 777776 		MOVEM T2,TTYN	;[7443] Save TTY number for later
  8030	000271'06  200 01 0 00 000002 		MOVE T1,T2	;[7443] Put TTY in correct AC
  8031	000272'06  260 17 0 00 000000*		CALL CHKBCH	;[7443] (T1/T2) Are we a batch job?
  8032	000273'06  263 17 0 00 000000 		 RET		;[7443] No
  8033	000274'06  200 02 0 17 777776 		MOVE T2,TTYN	;[7443] Get TTY back
  8034	000275'06  260 17 0 00 000000*		CALL GTCJOB	;[7443] (T2/T3) Get controlling job number
  8035	000276'06  263 17 0 00 000000 		 RET		;[7443] There isn't one
  8036	000277'06  254 00 0 00 000000*		RETSKP		;[7443] Return the job
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 207
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  8037
  8038					;READ CLASS PARAMETERS
  8039
  8040	000300'06  256 04 0 00 000326'	SKDRCP:	XCTU [HRRZ T3,.SACNT(T2)]	;GET COUNT
  8041	000301'06  307 03 0 00 000001 		CAIG T3,1		;ROOM FOR DATA?
  8042	000302'06  265 02 0 00 000404'		ITERR (ARGX04)		;NO
  8043	000303'06  336 00 0 00 000000*		SKIPN CLASSF		;CLASS SCHEDULER ON?
  8044						JRST [	MOVX T1,SK%STP	;NO. SAY STOPPED
  8045	000304'06  254 00 0 00 000406'			JRST SKDRC0]	;AND FINISH UP
  8046	000305'06  402 00 0 00 000001 		SETZM T1		;INIT VALUE
  8047	000306'06  200 16 0 00 000000*		TMNE CLSAC	;DOING ACCOUNTS?
  8048	000307'06  602 16 0 00 200000 
  8049	000310'06  661 01 0 00 400000 		TXO T1,SK%ACT		;YES
  8050	000311'06  331 00 0 00 000303*		SKIPL CLASSF		;WINDFALL WITHHELD?
  8051	000312'06  661 01 0 00 200000 		TXO T1,SK%WDF		;YES.
  8052	000313'06  135 03 0 00 000403'	SKDRC0:	LOAD T3,CLSBD		;SEE IF BATCH ON DREGS
  8053	000314'06  137 03 0 00 000410'		STOR T3,SK%DRG,T1	;0 IF SO, 1 IF NOT
  8054	000315'06  256 04 0 00 000332'		UMOVEM T1,.SACTL(T2)		;RETURN DATA
  8055	000316'06  254 00 0 00 000000#		MRETNG			;AND DONE
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page 208
SCHED	MAC	 7-Nov-88 20:50		SKED JSYS

  8056
  8057						TNXEND
  8058						END
FTDOM	UNASSIGNED, DEFINED AS IF EXTERNAL
PUPSW	UNASSIGNED, DEFINED AS IF EXTERNAL

?4 ERRORS DETECTED

PROGRAM BREAK IS 000000
PSECT 1 BREAK IS 011553 FOR  RSCOD 
PSECT 2 BREAK IS 000367 FOR  BGSTR 
PSECT 3 BREAK IS 000110 FOR  BGPTR 
PSECT 4 BREAK IS 000020 FOR  RSDAT 
PSECT 5 BREAK IS 000051 FOR  RSVAR 
PSECT 6 BREAK IS 000412 FOR  NRCOD 
CPU TIME USED 02:54.084

201P CORE USED
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-1
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE

ADRBK%	000001	000000	sin	FHV3		000003	sin	FKSWX	777777	777777	spd	P		000017	int	
APRCHN		000003	sin	FHV4		000004	sin	FKTIM	777777	777777	spd	P1		000010	int	
ARGX02		601713	int	FILNO	400000	000000	spd	FKUPT	777777	000000	spd	P2		000011	int	
ARGX04		601715	int	FK2DT	777777	777777	spd	FKWS%	400000	000000	spd	P3		000012	int	
ARGX08		601721	int	FKABK	000001	000000	spd	FKWSL	400000	000000	spd	P4		000013	int	
ARGX15		601734	int	FKAGE	000777	000000	spd	FKWSS		777777	spd	P5		000014	int	
ARGX25		602246	int	FKBET	377777	000000	spd	FKWTL		777777	spd	P6		000015	int	
ARGX29		602414	int	FKBETH		200000	sin	FRKTTY		777777	spd	PC%AFI	001000	000000	sin	
ARGX30		602415	int	FKBLK	200000	000000	spd	FTKLIP		000001	sin	PCU	004000	000000	sin	
ARGX31		602416	int	FKBLP		777777	spd	FTNSPS		000000	sin	PGLPCS	200000	000000	sin	
ATACX1		600320	int	FKBSHF	002000	000000	spd	GOKER2		602221	int	PGSIZ		001000	sin	
BOOTFL		000206	sin	FKCSIZ		777777	spd	HB%1OK	200000	000000	sin	PI		000004	sin	
BSCRSK	010000	000000	spd	FKEFR	000300	000000	spd	HB%2OK	100000	000000	sin	PIBMP	200000	000000	spd	
BSNSK	020000	000000	spd	FKFR1	000200	000000	spd	HB%HBM	040000	000000	sin	PICPIR		020000	sin	
BSNST	000200	000000	spd	FKFRA	000020	000000	spd	HB%MUN	020000	000000	sin	PIOFF	700600	000400	int	
BSOVRD	000400	000000	spd	FKFRJ	000040	000000	spd	HB%PUB	400000	000000	sin	PION	700600	000200	int	
BSSPQ	001000	000000	spd	FKGL%	000004	000000	spd	HB%WLK	010000	000000	sin	PISPIR		004000	sin	
BSWTB	040000	000000	spd	FKGOLN	777777	000000	spd	IFIW	400000	000000	sin	PLKV	000100	000000	sin	
BUGMXR		000004	sin	FKHST		777777	spd	ILINS1		600770	int	PRESCD		000001	sin	
BUTCMD		000163	sin	FKIB%	100000	000000	spd	ILINS2		600771	int	PSASN		000010	sin	
BUTDRT		000153	sin	FKIBH	004000	000000	spd	IMCFLG	000010	000000	sin	PSDEL		000001	sin	
BUTEPT		000203	sin	FKIBS	100000	000000	spd	JBTFK		777777	spd	PSICO%	000010	000000	sin	
BUTMUN		000152	sin	FKIBX	777777	777777	spd	JBTTY	777777	000000	spd	PSIDP%		200000	sin	
BUTPGS		000202	sin	FKICO	000010	000000	spd	JOBRTP	000037	777777	spd	PSIIF%	020000	000000	sin	
BUTPHY		000204	sin	FKIDP		200000	spd	JP%MNQ		007700	sin	PSIJT%	000002	000000	sin	
BUTRXB		000151	sin	FKIJT	000002	000000	spd	JP%MXQ		000077	sin	PSILO%	000400	000000	sin	
BUTVIR		000205	sin	FKILO	000400	000000	spd	JP%RTG	000177	000000	sin	PSIPRI		400000	sin	
CALL	260740	000000	int	FKINX	777777	777777	spd	JP%SYS		400000	sin	PSISC%		100000	sin	
CALLRE	254000	000000	sin	FKISC		100000	spd	JSAMX	777777	000000	spd	PSIT1%	010000	000000	sin	
CAPX1		600615	int	FKIWT	001000	000000	spd	JSFRST		777777	sin	PSIT2%	004000	000000	sin	
CKPSIZ		000100	sin	FKJBN	777777	000000	spd	JSYS	104000	000000	int	PSITL%	000004	000000	sin	
CLEQIN		000000	sin	FKJO%	777777	000000	spd	JTBAL		000001	sin	PSIWT%	001000	000000	sin	
CLSCTL		000000	ext	FKJSB		777777	spd	JTBIM		000020	sin	PSRDN		000002	sin	
CRJBX6		600025	int	FKJTN		777777	spd	JTBMN		000000	sin	PSRIP		000006	sin	
CSTOFK	077770	000000	spd	FKMNQ	007700	000000	spd	JTFRK		777777	spd	PSRPQ		000000	sin	
CX		000016	int	FKNB%	777777	777777	spd	JTIMP		777777	spd	PSWAPC		000002	sin	
DB%NND	000400	000000	sin	FKNWCE	777777	000000	spd	JTJNO		777777	spd	PSWIP		000004	sin	
DBRKX1		601275	int	FKOGL	000004	000000	spd	JTMCN	000077	000000	spd	PSXSIR	400000	000000	spd	
DCMAX	777777	000000	spd	FKPS0	400000	000000	spd	JTMNI		777777	spd	PXRESC		000003	sin	
DEBUG		000000	sin	FKPS1	200000	000000	spd	JWAKEF	400000	000000	sin	PXSWAP		000004	sin	
DEVLKK	400000	000001	sin	FKPS2	777777	000000	spd	KCFLG		000000	sin	Q1		000005	int	
DTBYTM		400000	sin	FKPSB		777777	spd	KLFLG		000001	sin	Q2		000006	int	
ERCAL	320740	000000	int	FKPSI0	400000	000000	sin	LOGIOB	400000	000000	sin	R		000000	ext	
ERCALR	320540	000000	int	FKPSI1	200000	000000	sin	LOTSW		000000	sin	RET	263740	000000	int	
ERCALS	320640	000000	int	FKPTD	777777	000000	spd	MAXLC		000047	sin	RLJFD		000034	sin	
ERJMP	320700	000000	int	FKPTR		777777	spd	MAXLW		000010	sin	RSCOD		000000	ext	
ERJMPR	320500	000000	int	FKPTX	777777	777777	spd	NEWFK%	100000	000000	sin	RSKP		000000	ext	
ERJMPS	320600	000000	int	FKQ2X	777777	777777	spd	NEWJB%	040000	000000	sin	SC%OPR		200000	sin	
EXFLBT	777740	000000	sin	FKQN	000077	000000	spd	NICSW		000001	sin	SC%WHL		400000	sin	
EXPCBT	000037	777777	sin	FKQTM	777777	777777	spd	NOP	600000	000000	sin	SCDCHN		000007	sin	
EXPCS		000037	sin	FKST2	777777	777777	spd	NOSTR		777777	spd	SF%CRD	000200	000000	sin	
EXTJSB		000000	sin	FKSTD	777777	000000	spd	NPILEV		000003	sin	SF%DOK	200000	000000	sin	
F		000000	int	FKSTR		777777	spd	NRCOD		000000	ext	SF%FAC	400000	000000	sin	
FHV1		000001	sin	FKSTX	777777	777777	spd	NUMVAL		000005	sin	SF%LCL	001000	000000	sin	
FHV2		000002	sin	FKSUS	002000	000000	spd	OURTTL	634350	454400	spd	SF%MS1		040000	sin	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-2
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE

SF%RMT	020000	000000	sin	.A16		000016	spd	
SIADR	007777	777777	spd	.ASSET		000000	ext	
SILEV	770000	000000	spd	.ENTER		000000	ext	
SJPRI	104000	000245	int	.FP		000015	spd	
SK%ACT	400000	000000	sin	.FPAC		000005	spd	
SK%CL1		010000	sin	.GOCL0		000015	sin	
SK%CYT		400000	sin	.GOCLS		000014	sin	
SK%DRG	040000	000000	sin	.ICDAE		000013	sin	
SK%HQR		020000	sin	.ICILI		000017	sin	
SK%HT1		100000	sin	.ICIWR		000021	sin	
SK%HT2		040000	sin	.ICPOV		000011	sin	
SK%IOC		200000	sin	.JBHSO		000075	sin	
SK%RQ1		001000	sin	.NPAC		000010	spd	
SK%RSQ		002000	sin	.SABCL		000001	sin	
SK%STP	100000	000000	sin	.SAC		000016	sin	
SK%TOP		000100	sin	.SACLS		000001	sin	
SK%TTP		000400	sin	.SACNT		000000	sin	
SK%WCF		000200	sin	.SACTL		000001	sin	
SK%WDF	200000	000000	sin	.SADRG		000001	sin	
SKDX1		602247	int	.SAJCL		000002	sin	
SKEDSW		000000	sin	.SAJOB		000001	sin	
SPTDSW		000000	sin	.SAKNB		000001	sin	
SPTX		777777	spd	.SASET		000000	ext	
STANSW		000001	sin	.SAV1		000000	ext	
SUMXSW		000000	sin	.SAV2		000000	ext	
SUSFK%	002000	000000	sin	.SAV3		000000	ext	
SWPERR	200000	000000	sin	.SAWA		000003	sin	
SWPHSW		000000	sin	.XSTKS		000000	ext	
T1		000001	int	.XTRST		000000	ext	
T2		000002	int	
T3		000003	int	
T4		000004	int	
TIMCHN	770000	000000	spd	
TIMCNT	777740	000000	spd	
TIMFRK		777777	spd	
TIMTIM	777777	777777	spd	
TRMCD		000777	spd	
TRMCOD		000777	spd	
UIOF	004000	000000	sin	
UMODF	010000	000000	sin	
VMADR	000037	777777	sin	
VSECNO	000037	000000	sin	
XBLTUU	256240	000000	int	
XCTU	256200	000000	int	
XCTUU	256600	000000	int	
XJEN	254300	000000	int	
XJRST	254640	000000	int	
XJRSTF	254240	000000	int	
XMOVEI	415000	000000	int	
XPCW	254340	000000	int	
XS%EEV	200000	000000	sin	
XSFM	254600	000000	int	
$SCHED		000000	sen	
..MSK		000000	spd	
..TSA1		000000*	spd	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-3
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSCOD 

ACBAS		007743'	ext	BLOCK1		000625'	int	CKPHYT		011137'	ext	CRJANS		001670'	ext	
ADJCLS		005000'		BLOCKE		000622'	int	CLASSF		011542'	ext	CRSKD0		000334'	int	
ADJSWP		002604'	ext	BLOCKM		000650'	int	CLDREQ		000153'	ext	CRSKED		007133'	ext	
ADJWSS		003254'	int	BLOCKS		000640'		CLDRJ		001420'		CRTSHR		004775'		
AJB666		003016'		BLOCKT		000764'	int	CLDRJ0		001423'		CSHCLS		000000	ext	
AJB667		003017'		BLOCKW		000651'	int	CLDRJ1		001436'		CSKBAS		005100'		
AJB668		003027'		BQUANT		005075'		CLGLC	777777	000000	spd	CSKBUG		010334'	int	
AJBAL1		002672'		BSBCK		002013'		CLK2		001201'		CST1X		000000	ext	
AJBAL2		002746'		BSBCK1		002025'		CLK21		001224'		CST3X		000000	ext	
AJBAL4		002670'		BSBCK2		002035'		CLK2CL		001226'	ext	CTRLTT		006155'	ext	
AJBAL5		002755'		BSKED		003513'	ext	CLK2TM		001225'	ext	CTTAB		006165'	ext	
AJBAL6		003003'		BSLST		003243'	ext	CLKCH1		004157'		CTYLNO		001604'	ext	
AJBAL7		002733'		BSPAD		000024	spd	CLKCHK		004153'		DAPHND		006424'	ext	
AJBALS		002601'		BSPADO		000012	spd	CLKKIL		006246'	ext	DBUGSW		001557'	ext	
AJBALX		003050'		BSQNT		003647'	ext	CLKLST		010724'	ext	DCHKSW		001560'	ext	
AJBL10		002673'		BSQNT0		003503'	ext	CLNZSC		005300'	ext	DCNCNT		005645'	ext	
AJBL11		003013'		BSTSUM		001303'	ext	CLRIB1		003244'		DCOPNM		005644'	ext	
AJBL12		002737'		BSWT		002210'	ext	CLRIBS		003220'		DDMPNR		010424'	int	
AJBL69		003007'		BUGHLT		011432'	ext	CLRINT		006160'	ext	DDPDUE		001256'	ext	
AJBL77		002725'		BUGMON		001563'	ext	CLRJSB		000000	ext	DDPMAX		000017	sin	
AJBL9		002745'		BUGPRI		001567'	ext	CLSAC		200000	spd	DDPPER		001264'	ext	
AJBLCY		000007'		CAPENB		010241'	ext	CLSAV0		001413'		DDPTIM		001265'	ext	
AJBS2		002644'		CASHOF		001514'	ext	CLSAV1		001416'		DDTIME		001534'	ext	
AJBUQ0		003035'		CFONLT		001076'	ext	CLSAVG		001412'		DDTPRS		001555'	ext	
AJBUQS		003031'		CFSDMP		000154'	ext	CLSBD	400000	000000	spd	DEBRK2		007173'		
AJBYPF	400000	000000	spd	CFSSKC		001075'	ext	CLSBT	000377	400000	spd	DEBRK3		007176'		
AJHQOF	100000	000000	spd	CH6TAB		007052'	ext	CLSCNT		000000	ext	DEBRK4		007211'		
AJNNLF	200000	000000	spd	CHGCLS		004754'		CLSCTL		011550'	ext	DEBRK5		007226'		
ALARMT		010760'	ext	CHGCN0		004740'		CLSDF	377400	000000	spd	DEBRK6		007214'		
APPBS1		003234'		CHGCNT		004734'		CLSDST		000000	ext	DESPT		005421'	ext	
APPBSL		003232'		CHGCNX		004751'		CLSIRT		000000	ext	DISACC		002176'		
APSK1		004300'		CHGHLF		002252'		CLSKV		176000	spd	DISE		000714'	int	
APSKED		004256'	int	CHGHLS		002250'		CLSRJA		000000	ext	DISET		000717'	int	
ASFSB		001736'	ext	CHKADR		001507'	ext	CLSSHI		000000	ext	DISG		000700'	int	
ASSFK		001672'	int	CHKBCH		005012'	ext	CLSSHR		000000	ext	DISGE		000661'	int	
ATJBMX		005646'	ext	CHKBMP		007137'		CLSSUM		000000	ext	DISGET		000667'	int	
BALSHC		003053'	ext	CHKDUE		001243'	ext	CLSSWA		000000	ext	DISGT		000703'	int	
BASOVV		003744'	ext	CHKERT		010132'	int	CLSUTL		000000	ext	DISL		000672'	int	
BGCCHK		011352'	ext	CHKMAX		000017	sin	CORFC1		004472'		DISLE		000706'	int	
BGNDTM		001231'	ext	CHKPER		001252'	ext	CORFC2		004455'		DISLET		000711'	int	
BGPTR		000000	ext	CHKPTY		001663'	ext	CORFC3		004502'		DISLT		000675'	int	
BGSTR		000000	ext	CHKRNR		010416'	int	CORFC4		004536'		DISMSE		000372'		
BHC		000000	ext	CHKSN0		000243'		CORFC5		004551'		DISMSH		000376'		
BITCLR		004432'	int	CHKSN1		000250'		CORFC6		004546'		DISMSJ		003545'		
BITS		011423'	ext	CHKSNP		000227'		CORFC7		004537'		DISMT		002265'		
BITSET		004440'	int	CHKTF1		003072'		CORFC8		004535'		DISMT2		002317'		
BITWA1		004422'		CHKTFK		003070'		CORFCO		004451'		DISMT5		002237'		
BITWAI		004415'	int	CHKTIM		001253'	ext	CORFCT		004446'		DISN		000722'	int	
BKGND1		002037'		CHKTL		004230'		COUNT		004704'		DISNT		000725'	int	
BKGND2		002062'		CHKTOT		004056'	int	COUNT0		004706'		DIST		004657'		
BKGND3		002043'		CHKWT		004052'	int	COUNT1		004713'		DISXE		000663'		
BKGNDT		002057'		CHNSON		005666'	int	COUNT2		004714'		DMSADR		007602'	ext	
BLK2		000654'		CKAHED		003553'		COUNT4		004712'		DMSENT		007553'	int	
BLKT1		000770'		CKINT0		000325'	int	COUNT5		004720'		DMSU40		007576'	ext	
BLOCK0		000610'	int	CKMMOD		010153'	int	COUNT6		004732'		DMSUPC		007572'	ext	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-4
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSCOD 

DOGCC		002560'		FKSET1		005612'		GLFNF		011005'	int	ITNOJC		010356'	int	
DORJ1		001440'		FKSET2		005652'		GLREM		004354'		ITR2		000601'		
DORJ2		001441'		FKSET3		005605'		GLREM0		004402'		ITRAP		000541'	int	
DORJAV		001364'		FKSETK		005472'	ext	GLREM1		004362'		ITRAP1		000540'	int	
DREGS		000607	spd	FKSETP		005566'	ext	GLREM2		004411'		ITRSIM		010020'	int	
DRMFRE		001611'	ext	FKSPPT		003327'	int	GOC1		004331'		ITRSX		010060'		
DRMIN1		001612'	ext	FKSTA2		005742'	ext	GOC2		004341'		ITRSY		010056'		
DRMWT		002217'	ext	FKSTAT		011136'	ext	GOCNC0		004315'		JB0C.0		001254'		
DSKRT		002231'	ext	FKSWP		006046'	ext	GOCONC		004302'		JB0C.1		001266'		
DSKWT		002234'	ext	FKT0		003742'	ext	GOKFRE		011346'	ext	JB0CHK		001236'	int	
DWNSHR		005411'	ext	FKT1		003654'	ext	GOLST		004736'	ext	JB0FLG		001527'	ext	
DWRTST		002224'	ext	FKTAB		005547'	ext	GOUSR		007723'	int	JB0TIM		001237'	ext	
DWRWT		002226'	ext	FKTIME		005222'	ext	GTCJOB		006065'	ext	JOBBIT		006403'	ext	
ECSKD0		000341'	int	FKTLST		003724'	ext	GTOKPR		000000	ext	JOBCK0		010656'	ext	
EDMS0		000362'	int	FKTMI		007032'	int	GTTOPF		006103'	ext	JOBCK1		010660'	ext	
EDMSH		000351'	int	FKTOFF		003723'	ext	HALTF1		000302'	int	JOBCLS		000000	ext	
EMRET0		007702'	int	FKWSP		010547'	ext	HALTT		000307'	int	JOBCOF		006345'	ext	
EMRET1		007703'	int	FKWSP1		010625'	int	HALTX		000302'		JOBDIR		005333'	ext	
ENSKED		000510'	int	FLOGO		006370'	ext	HIBERT		001006'	int	JOBDST		000000	ext	
ENSKR		007426'	ext	FLOWQ		005076'		HIGHQ		000000	spd	JOBIRT		000000	ext	
EUACB		000000	ext	FNPMAX		005546'	ext	HLTFK1		005373'	int	JOBM0		000000	ext	
EXEC0		005650'	ext	FORCTC		007007'	ext	HLTFK2		005377'		JOBMAP		000000	ext	
EXPFF		001456'		FORCTM		007031'	int	HLTJB		005256'	int	JOBNAM		003671'	ext	
FACTSW		003451'	ext	FORKN		011414'	ext	HLTJB1		005274'		JOBNO		010236'	ext	
FFL		007765'	ext	FORKX		011344'	ext	HLTJB3		005356'		JOBPNM		005326'	ext	
FHMBIP	000040	000000	spd	FPC		011406'	ext	HPSCHK		010635'	int	JOBPT		010701'	ext	
FHMBS	000200	000000	spd	FREFK		005426'	ext	HPSWRN		003463'	ext	JOBRT		010677'	ext	
FHMCSK	000100	000000	spd	FREJOB		005340'	ext	HQFSUM		001373'	ext	JOBRTL		011213'	ext	
FHMNSK	004000	000000	spd	FRIBP0		002704'		HQLAV		002620'	ext	JOBSKD		006256'	ext	
FHMPQ	000400	000000	spd	FRIBP1		002314'	int	HQLEV1		000001'	int	JOBSR1		001653'		
FHMRUN	002000	000000	spd	FRIBP2		000404'	sin	HQLEV2		000002'	int	JOBSR2		001614'		
FHUNIT		400000	spd	FRIBP3		002115'	int	HQLEV3		000003'	int	JOBSRC		001667'		
FIXWS1		003402'		FRKNDL		011155'	int	HQLEV4		000004'	int	JOBSRT		001603'	int	
FIXWSP		003400'		FRKNOP		005474'	ext	ICTTY		005632'		JOBUTL		000000	ext	
FKBSPW		010717'	ext	FRTOFF		003714'	int	IICSL1		006020'		JRET		004412'	int	
FKCNO		005442'	ext	FRTON		003717'	int	IICSLF		006013'	int	JSATCT		005647'	ext	
FKDAP		006406'		FRZLST		010720'	ext	ILIST		000132'	int	JSBPG		000000	ext	
FKGC		005427'	ext	FRZPSI		007350'		ILIST1		000140'		JSBPGA		000000	ext	
FKINT		011326'	ext	FRZWT		011274'	ext	ILOKSK		010341'	int	JSBSTF		011343'	ext	
FKINTB		006537'	ext	FTDOM		000000	udf	ILUUO		007511'	int	JSKP		004413'	int	
FKJOB		005637'	ext	FX		000007		ILUUO1		007512'	int	JSLKB1		007665'	int	
FKJTB		007302'	ext	GBLJNO		010230'	ext	IMCLL0		007752'	int	JSLKB2		007722'	int	
FKJTQ		007464'	ext	GCCOR		002562'	ext	IMCLL1		010007'		JSLST		000000	ext	
FKNBW		003370'	ext	GCCTIM		002565'	ext	INFERP		006226'	int	JSPRET		004412'	int	
FKNR		010545'	ext	GETCHA		007047'	int	INIQ		005240'		JSTAB		011420'	ext	
FKPGS		005444'	ext	GETDMS		007554'	ext	INSKED		007422'	ext	JTBLK		007655'	ext	
FKPGST		005115'	ext	GETFRT		003726'	int	INTDF		010010'	ext	JTDEQ		007477'		
FKPSIE		006204'	ext	GETHRT		003740'	int	INTDF0		007070'		JTDEQ1		007506'		
FKPT		010565'	ext	GETOKM		011533'	ext	INTDF1		007071'		JTENQ		007417'		
FKPTRS		006226'	ext	GETPAT		007522'	ext	INTDFF		007346'	ext	JTENQE		011360'	int	
FKQ1		005217'	ext	GETSFX		007024'		INTQ0		000001	spd	JTLCK		007474'	ext	
FKQ2		011315'	ext	GETSHR		005460'	ext	INTQ1		000003	spd	JTLOC1		007405'		
FKRT		003746'	ext	GFHST		002376'		IOIP		002532'	ext	JTLOC2		007406'		
FKSE01		005615'		GFHST1		002420'		IRJAV		005200'	ext	JTLOCK		007377'		
FKSET		005464'		GL2LCL		010234'	ext	ITFFL		006714'	ext	JTLST		007455'	ext	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-5
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSCOD 

JTLSTL		007506'	ext	MJRSTF		010017'	ext	NLINES		006150'	ext	PIAC		007247'	ext	
JTMNW		011351'	ext	MONBK		006712'	ext	NLQFK		004405'	ext	PIDWAT		004003'	ext	
JTQWT		007440'		MONCHN		007033'	ext	NOACB		011401'	int	PIFL		007264'	ext	
JTRLCK		007416'		MONCOR		003400'	ext	NOCHKR		010420'	int	PIITRP		010352'	int	
JTTFK		007354'	ext	MONENV		000000	ext	NODDMP		010426'	int	PIMSK		006417'	ext	
JTTRW		007352'	ext	MONNEJ		010370'	int	NOSK11		000310'	int	PIOLD2		005741'	ext	
JTULC1		007456'		MPEINT		001741'		NOSKD0		000310'	int	PIOLDS		007374'	ext	
JTULC2		007466'		MPP		010154'	ext	NOSKTR		010363'	int	PIOVFW		007002'		
JTULC3		007474'		MRETN		007714'	int	NPIPDL		000000	ext	PIPC		007262'	ext	
JTULCK		007453'	int	MRETN1		007725'		NPMAX		005545'	ext	PIPDB		000000	ext	
KEPALV		001070'	ext	MRETNE		007700'	int	NPSIPG		005567'	ext	PIPDL		006011'		
KIMUEF		007577'	ext	MSEC1		000517'	ext	NQUEUE		000007	sin	PIRABK		006461'		
KIMUFL		007664'	ext	MSEC1A		000015'		NRCOD		000000	ext	PIRBK1		006501'		
KIMUPC		010364'	ext	MSEC1B		000000	ext	NREMJ		002743'	ext	PIRCOF		006334'		
KIMUU1		011355'	ext	MSETP1		005353'		NREMR		002552'	ext	PIRJT1		006455'		
KISLOD		000255'	ext	MSETPT		005353'	ext	NRJAVS		001433'	ext	PIRJTP		006442'		
KISSAV		005762'	ext	MTIME		010667'	ext	NRPLQ		003333'	ext	PIRLG1		006346'		
KITRP1		000523'	int	MXBIAS	210620	000000	spd	NRPMIN		003356'	ext	PIRLGO		006365'		
LCKDVL		005260'	ext	MXSKPS		000003	spd	NSAVC		000007	spd	PIRQ		005667'		
LCL2GL		000000	ext	N2CLKS		000000	ext	NSHAKL		000005	spd	PIRQR		005726'		
LDJB1		003361'		NAJBAL		002577'	ext	NSKBAS		005077'		PIRSF1		006310'		
LDJB3		003337'	int	NBPROC		003605'	ext	NSKDIS		010336'	int	PIRSF2		006321'		
LDJB5		003351'		NBSL		003252'	ext	NSKDP		000000	ext	PIRSFK		006263'		
LFORKX		001145'	ext	NBSWP		003366'	ext	NSKED		011304'	ext	PIRSK1		006273'		
LGTAD		005626'	ext	NBWT		003365'	ext	NSKFLV		000024	sin	PISC7		000141'	int	
LOADWS		003333'		NCSWCH		002000'	ext	NSWTT		000004	spd	PISC7A		000172'		
LOWQ		000006	sin	NEBAL		003357'	ext	NTMS		005435'	ext	PISC7R		000230'	ext	
LOWQT		023420	spd	NEGJRT		010672'	int	NTTPTY		000000	ext	PISKED		010410'	int	
LQFSUM		001400'	ext	NETWK1		004140'	int	NUFKS		000000	ext	PITEST		007126'	int	
LQLAV		001403'	ext	NETWKF		004137'	int	NULJBF		001034'	ext	PNSKDC		011305'	ext	
LSTERR		011327'	ext	NEWST		005114'		NUPDL		011263'	ext	POSPGF		003302'	ext	
LSTIPC		010366'	ext	NEWST1		005213'		NWSLOD		003364'	ext	PPC		007425'	ext	
LSTPFK		003310'	ext	NEWST2		005140'		NWSMEM		003337'	ext	PPHI		000000	ext	
LV8CHK		001141'	ext	NEWST3		005215'		NWSSUM		001306'	ext	PPLOW		005316'	ext	
MAPCLF		011150'	int	NEWST5		005150'		OKSK11		000315'	int	PRELD		002146'	ext	
MAPJSB		000000	ext	NEWST6		005166'		OKSKBG		010323'	int	PRELDF		003372'	ext	
MAXBP		002772'	ext	NEWST7		005173'		OKSKD0		000315'	int	PRELWT		003277'	ext	
MAXCLS		010246'	ext	NEWST8		005216'		OKSKE1		000320'		PRIMRY		004214'	ext	
MAXHNR		002661'	ext	NEWSTX		005223'		OLDIDL		004565'	ext	PRISET		006253'		
MAXNR		003175'	ext	NEWU00		004621'		OLDSLD		004562'	ext	PSBITS		007164'	ext	
MAXQ		000005	sin	NEWU01		004630'		ONGOL		004322'		PSBUMP		005245'		
MAXVAL		000310	spd	NEWU02		004644'		ONGOL0		004345'		PSCHNT		006661'	ext	
MENT0		007634'	int	NEWUT0		004575'		ONGOL1		004337'		PSIBIP		011340'	ext	
MENT2		007666'		NEWUT1		004602'		OPOPAC		011432'	int	PSIBW		011240'	ext	
MENTM		007605'	int	NEWUTJ		004620'		PAC		011173'	ext	PSICHA		007051'	ext	
MENTU		007655'	int	NEWUTL		004557'		PAG		000010	spd	PSICHM		006614'	ext	
MENTU1		007660'		NEWWSS		005230'		PAGDIF		002603'	ext	PSID1		007003'		
MFRKWD		400000	sin	NFKS		006106'	ext	PARALP		006225'	int	PSID3		006705'		
MINNR		000004	sin	NFKSPP		000004	sin	PATADR		007550'	ext	PSIDF1		005727'		
MINQNT	000000000000#	pol	NGOJOB		004371'	ext	PATU40		007544'	ext	PSIDF2		005741'		
MINSHR		000005	spd	NHIPG		003405'	ext	PATUPC		007540'	ext	PSIDFR		007054'		
MINWSS		000000'	int	NHOLDF		003275'	ext	PDBK1		007246'		PSIGR		006033'	int	
MJBUSE		005345'	ext	NHQFK		004404'	ext	PFL		007427'	ext	PSII		006504'		
MJRST0		007066'		NJOBS		000075'	ext	PI7AC1		000150'	ext	PSIMB		006710'		
MJRST1		007067'		NLFKS		000000	ext	PI7P		001235'	int	PSIN1		007005'		
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-6
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSCOD 

PSIN2		007007'		RECONC		004034'	int	SCDW		000212'		SETUSR		007723'	ext	
PSIN3		007006'		REEBUG		000537'		SCDW1		000220'		SFEXO	200000	000000	spd	
PSIN5		006606'		RELLOK		005364'	ext	SCH0		001067'		SHLTW		000030	sin	
PSIN6		006605'		REMBS6		003314'		SCHC1		001445'		SHRMIN	171507	534122	spd	
PSINSK		011310'	int	REMBS7		003320'		SCHED0		001063'	int	SHRPTR		005640'	ext	
PSIPGA		005570'	ext	REMBSJ		003142'		SCHED4		001110'		SKCB2		001776'		
PSIPT		007220'	ext	REMBSL		003243'		SCHED5		001114'		SKCB5		001764'		
PSIR4		006037'	int	REMFPB		001144'	ext	SCHEDA		004232'		SKDBQT		000010'		
PSIR61		006057'		REMWS		003265'		SCHEDB		004233'		SKDCL1		010343'	int	
PSIRQ		006026'	int	REMWSN		003312'		SCHEDJ		004247'		SKDFIL		001046'	ext	
PSIRQ0		006012'	int	REORDR		004652'		SCHEDP		000441'	int	SKDFKS		010534'	int	
PSIRQB		006027'	int	RETZ		001053'	ext	SCHEDR		000475'	int	SKDFL		000612'	ext	
PSIS10		006646'		RJATIM		001365'	ext	SCHFLG		004502'	ext	SKDIDL		004563'	ext	
PSIS2		006627'		RJAV		001407'	ext	SCHP1		000450'		SKDJ2		002000'		
PSIS3		006637'		RJAVS1		001370'	ext	SCHP2		000470'		SKDJ3		002110'		
PSIS4		006625'		RJAVS2		001375'	ext	SCHP3		000456'		SKDJ3X		002174'		
PSIS5		006667'		RJAVS3		001402'	ext	SCHPF0		001515'	ext	SKDJFC		002073'		
PSIS9		006662'		RJTSUM		001366'	ext	SCHPRF		001511'		SKDJOB		001745'		
PSISM		006717'		RJTTIM		001274'	ext	SCHUPC		001130'		SKDLCY		000006'	int	
PSISM1		006762'		RPQSUM		001314'	ext	SCKATM		001177'	ext	SKDLOG		005044'	int	
PSISTK		011271'	int	RSCOD		000000	ext	SCLD.0		001337'		SKDLST		003632'	ext	
PSISV0		007076'		RSCODZ		000401'	ext	SCLD.1		001347'		SKDLV8		001134'		
PSISV1		007072'		RSDAT		000000	ext	SCLD.2		001355'		SKDOVH		001343'	ext	
PSISV2		007111'		RSKCH1		000225'		SCLDAV		001267'		SKDPC		000613'	ext	
PSISV3		007123'		RSKCHK		000224'	ext	SCSBCQ		005532'	ext	SKDPDL		000000	ext	
PSISYS		006616'	ext	RSKED		005534'	ext	SCSBDQ		005521'	ext	SKDS11		010211'		
PSIT		007042'		RSKEDN		000223'		SCSBEQ		005524'	ext	SKDSC0		010305'		
PSIT1		006117'		RSKEDT		000224'		SCSBMQ		005516'	ext	SKDSC1		010202'		
PSIT11		006142'		RSKP		011517'	ext	SCSBXQ		005527'	ext	SKDSCL		010263'		
PSIT12		006154'		RSVAR		000000	ext	SCSPS0		005512'	ext	SKDSCS		010161'		
PSIT13		006157'		RTG1		003567'		SCSPS1		005513'	ext	SKDSCY		000005'	int	
PSIT1A		006162'	int	RTG2		003541'		SCSPSI		006436'	ext	SKDSHK		002066'		
PSIT1B		006163'		RTG3		003605'		SCSSPC		006426'		SKDSJ1		010256'		
PSIT1C		006213'		RUNT2		003745'	ext	SCSTCQ		005531'	ext	SKDSJC		010216'		
PSIT1D		006204'		RWSOKF		002473'	ext	SCSTDQ		005520'	ext	SKDSWP		001340'	ext	
PSIT1E		006206'		SAVCT		007270'		SCSTEQ		005523'	ext	SKDTHS		002566'	ext	
PSIT1G		006215'		SAVQ		004354'	ext	SCSTMQ		005515'	ext	SKDTM0		001337'	ext	
PSIT2		006227'		SAVR12		003515'		SCSTXQ		005526'	ext	SKDTM1		001342'	ext	
PSITQ		006032'		SAVR66		003624'		SCTLW		010452'	ext	SKDTM2		001345'	ext	
PSITR1		005724'	int	SAVRT		003417'		SCWAIT		001534'		SKDTRP		010345'	int	
PSKED		004275'	ext	SAVRT5		003612'		SETBKT		000754'	int	SKEDF1		001111'	ext	
PSLEVT		007172'	ext	SAVRT6		003622'		SETCL0		005026'		SKEDF3		004274'	ext	
PTYFIN		001665'	ext	SAVRT7		003573'		SETCLS		005010'	int	SKEDFC		002106'	ext	
PTYTTY		000000	ext	SAVRT8		003516'		SETIB1		003214'		SKFLDF		000030'		
PUPSW		000000	udf	SAVRT9		003537'		SETIB2		003177'		SKFLGV		000016'	int	
PWRDWN		001461'	ext	SAVT		011453'	ext	SETIBS		003161'		SKJFC1		002074'		
PWRFLE		001513'	ext	SCDIN		000042'	int	SETJSB		000000	ext	SKMRTN		007712'	int	
QBIAS		005110'		SCDIN0		000121'		SETLF1		007312'	ext	SKPCT	300000	000000	spd	
QCLASS		005111'		SCDNL1		001034'		SETMON		007076'	ext	SLOWF		010016'	ext	
QUANTB		005057'		SCDNL2		001026'		SETPAG		000270'	ext	SMLSTM		000012	spd	
QUANTC		005066'		SCDNUL		001025'		SETPCV		010121'	int	SNBLKS		000000	ext	
R		010100'	ext	SCDR		000252'		SETPPG		002003'	ext	SNPBPP		000240'	ext	
RCVCH7		001213'	ext	SCDRN1		001531'	ext	SETPRF		005254'	int	SNPBPS		000000	ext	
RDSIVL		001052'		SCDRQ7		001572'	int	SETPRP		003041'		SNPCNT		000170'	ext	
RECON1		004041'		SCDUUO		010307'	int	SETPSK		005402'	ext	SNPDPS		000000	ext	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-7
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSCOD 

SNPLST		005510'	ext	TCOTST		005133'	ext	UCLOCK		003626'	int	WTCONC		003753'	int	
SNPPGS		005507'	ext	TDIS1		000750'		UDWDON		002230'	ext	WTFPGS		005440'	int	
SNPSV1		000250'	ext	TDIS2		000746'		UJSYS		007514'	int	WTLST		004226'	ext	
SNRSUM		001311'	ext	TFTEST		006400'		UJSYS0		007514'	int	WTSPT		005445'	int	
SOSNEB		002260'		TIM2		001222'	ext	UMUUOW		000553'	ext	WTSPT2		005446'		
SPC1		001607'	ext	TLEINT		006236'		UNBF1		004076'		WTSPTT		005460'	int	
SPMLCK		003100'	ext	TODCLK		010756'	ext	UNBF2		004070'		WTTIM		004225'	ext	
SPT		003315'	ext	TRAPC		005544'	ext	UNBFNF		010753'	int	XCDSEC		000000	ext	
SPTC		001606'	ext	TRAPFL		007115'	ext	UNBLK1		004100'	int	XCKLP		001564'	ext	
SRQBAD		010457'	int	TRAPPC		007117'	ext	UNBLK2		004106'		XCKNI		001565'	ext	
SRTTIM		005627'	ext	TRAPSI		007277'	int	UNBLK3		004116'		XGCCHK		002011'	ext	
SSIZE		000000	ext	TRMINT		000023	spd	UNBLKF		004061'	int	XX	777777	777777	spd	
SSKED		002020'	ext	TRMLST		010722'	ext	UNMIDX		005277'	ext	$AJBBS	000015	000003	spd	
STADYN		001545'	ext	TRMTS1		005731'	ext	UNPIR		005745'		$AJBLF	000015	000002	spd	
STCJOB		011204'	ext	TRMTST		003774'	ext	UNPIRN		005744'		$AJLOD	000015	000001	spd	
STEPFH		002357'		TRPSI2		007302'		UNPIRX		011174'	int	$BSCRS	000000000000#	pol	
STEPH1		002360'		TRPSI4		007314'		UPDL		007253'	ext	$BSNSK	000000000000#	pol	
STEPH2		002374'		TRPSI5		007322'	int	UPDTCK		002040'	ext	$BSNST	000000000000#	pol	
STEPTC		000010	spd	TRPSI6		007323'		UPP		010150'	int	$BSOVR	000000000000#	pol	
STIMES		000000	ext	TRPSI7		007340'		UPP1		010151'		$BSSPQ	000000000000#	pol	
STRCLS		004664'		TRPSIE		011352'	int	UPSHR		005603'	ext	$BSWTB	000000000000#	pol	
STTOPF		006113'	ext	TRYLD0		003130'		USRCTX		000000	ext	$CLSAC		000000*	spd	
SUMBNR		003263'	ext	TRYLD2		003141'		USRTIM		005436'	ext	$CLSBD		000000*	spd	
SUMNR		003351'	ext	TRYLDF		003107'		UTLEXP		000011'		$CLSBT		000000*	spd	
SUMNR1		010601'	int	TSKED		004231'	ext	UTLINI		000003	spd	$CLSDF		000000*	spd	
SUMNR2		010557'	int	TSTBAL		002571'		UTLINT		004646'	ext	$CLSKV		000000*	spd	
SUPCHN		006606'	ext	TSTBL1		002577'		UTLOCK		000167'	ext	$CLSNU	000015	000001	spd	
SUPERP		006224'	int	TSTERJ		010102'	int	UTLTIM		004647'	ext	$CSTOF	000000000000#	pol	
SUPU1		004212'		TSTFRP		003102'	ext	UTLTMI		001750	spd	$DCMAX		000000*	spd	
SUPUB0		004217'	int	TSTGCC		002327'	ext	UTREP		000234'	ext	$EAENT		006030'	ext	
SUPUNB		004173'		TTABRT		001660'	ext	UTREPE		000235'	ext	$FK2DT	000000000000#	pol	
SUPUX		004213'		TTCH7		001550'	ext	UU1050		007516'	int	$FKABK		000000*	spd	
SUSFKT		006304'	ext	TTDAS1		011153'	int	WAKSUP		004121'		$FKAGE	000000000000#	pol	
SUSWT		006333'	int	TTEMES		001661'	ext	WFORKA		005734'	ext	$FKBET	000000000000#	pol	
SWCRSH		001523'		TTILST		010712'	ext	WSMCHK		002326'		$FKBLK	000000000000#	pol	
SWHLT		001504'		TTOAV		003763'	ext	WSMCK1		002355'		$FKBLP	000000000000#	pol	
SWHLT2		001562'		TTOBET		005134'	ext	WSMG0		002437'		$FKBSH	000000000000#	pol	
SWHLT4		001507'		TTOLST		010714'	ext	WSMG1		002460'		$FKCSI	000000000000#	pol	
SWHLT5		001555'		TTPSER		006112'		WSMG2		002446'		$FKEFR		000000*	spd	
SWPIN0		003362'	ext	TTPSNJ		011205'	int	WSMG3		002557'		$FKFR1		000000*	spd	
SWPINT		003343'	ext	TTPSR1		006077'		WSMG4		002527'		$FKFRA		000000*	spd	
SWPRT		002221'	ext	TTPSR2		006103'		WSMG5		002524'		$FKFRJ		000000*	spd	
SWRS11		001516'		TTPSRQ		006064'	int	WSMG6		002511'		$FKGOL	000000000000#	pol	
SWRUN2		001531'		TTPSRX		006066'		WSMG7		002546'		$FKHST	000000000000#	pol	
SWTST		001461'		TTSOBE		001552'	ext	WSMG8		002475'		$FKIBH	000000000000#	pol	
SWTST1		001477'		TTSPSI		006154'	ext	WSMGR		002426'		$FKIBS	000000000000#	pol	
SWTT		001500'		TTYBKS		004247'	ext	WSMGS1		002432'		$FKIBX		000000*	spd	
SYMSEC		000000	ext	TTYDAS		005262'	ext	WSMPER		000764	spd	$FKICO		000000*	spd	
SYSFK		011415'	ext	TWAKER		001017'		WSMTIM		003137'	ext	$FKIDP		000000*	spd	
SYSIFG		000042'	ext	U10501		007520'	int	WSSWPO		003307'	ext	$FKIJT		000000*	spd	
TADIDT		000107'	ext	UACB		007241'	ext	WT2LST		010727'	ext	$FKILO		000000*	spd	
TAMQB2		011143'		UBBAD		004117'		WTCHK		004224'	int	$FKINX		000000*	spd	
TAMWTC		002122'		UCLOC1		003674'		WTCON1		004006'		$FKISC		000000*	spd	
TBASE		005101'		UCLOC2		003671'		WTCON2		003755'		$FKIWT		000000*	spd	
TCITST		005136'	ext	UCLOC3		003633'		WTCON3		003772'		$FKJBN	000000000000#	pol	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-8
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSCOD 

$FKJO%		000000*	spd	$TIMFR		000002	spd	..0452		003312'	spd	..1226		010233'	spd	
$FKJSB	000000000000#	pol	$TIMTI		000001	spd	..0462		003441'	spd	..1227		010236'	spd	
$FKJTN		000000*	spd	$TRMCD		000000*	spd	..0470		003451'	spd	..1234		010243'	spd	
$FKMNQ	000000000000#	pol	$TRMCO		000000	spd	..0471		003476'	spd	..GOKN		000003	spd	
$FKNB%		000000*	spd	$W1		000005	spd	..0476		003462'	spd	..I		000000	spd	
$FKNWC	000000000000#	pol	$W2		000006	spd	..0504		003476'	spd	..MX1		600000	spd	
$FKOGL	000000000000#	pol	$W3		000007	spd	..0514		003537'	spd	..NAC		000001	spd	
$FKPS0		000000*	spd	$WSMSN	000015	000006	spd	..0522		003640'	spd	..NRGS		000000	spd	
$FKPS1		000000*	spd	$WSMSU	000015	000005	spd	..0536		004023'	spd	..NV		000002	spd	
$FKPS2	000000000000#	pol	..0010		000054'	spd	..0537		004033'	spd	..SC		000001	spd	
$FKPSB	000000000000#	pol	..0011		000057'	spd	..0544		004033'	spd	..TRR		000010	spd	
$FKPTD		000000*	spd	..0017		000151'	spd	..0564		004427'	spd	..TSA1		000000*	spd	
$FKPTR		000000*	spd	..0025		000204'	spd	..0565		004430'	spd	..TX1	200000	000000	spd	
$FKPTX		000000*	spd	..0036		000431'	spd	..0572		004470'	spd	..X		000001	spd	
$FKQ2X		000000*	spd	..0046		000534'	spd	..0600		004515'	spd	.ASSET		005010'	ext	
$FKQN	000000000000#	pol	..0066		000552'	spd	..0601		004517'	spd	.DEBRK		007146'	int	
$FKQTM	000000000000#	pol	..0076		000566'	spd	..0602		004522'	spd	.DISMS		000730'	int	
$FKST2		000000*	spd	..0106		000577'	spd	..0614		004534'	spd	.HALTF		000302'	int	
$FKSTD		000000*	spd	..0116		001042'	spd	..0622		004534'	spd	.SASET		004754'	ext	
$FKSTR		000000*	spd	..0117		001051'	spd	..0655		004671'	spd	.SAV1		010153'	ext	
$FKSTX		000000*	spd	..0124		001050'	spd	..0656		004676'	spd	.SAV11		005230'	ext	
$FKSUS		000000*	spd	..0125		001051'	spd	..0667		004677'	spd	.SAV12		004440'	ext	
$FKSWX		000000*	spd	..0134		001077'	spd	..0670		004702'	spd	.SAV2		003232'	ext	
$FKTIM		000000*	spd	..0142		001173'	spd	..0713		005024'	spd	.SAV3		004557'	ext	
$FKUPT	000000000000#	pol	..0150		001207'	spd	..0726		005126'	spd	.SAV34		004472'	ext	
$FKWSL	000000000000#	pol	..0204		001763'	spd	..0734		005212'	spd	.SAV44		005445'	ext	
$FKWSS	000000000000#	pol	..0214		002022'	spd	..0744		005350'	spd	.THIBR		000775'	int	
$FKWTL	000000000000#	pol	..0222		002055'	spd	..0753		005345'	spd	.TWAKE		001013'	int	
$FRKTT		000000*	spd	..0224		002103'	spd	..0754		005350'	spd	.XSTKS		007400'	ext	
$JBTFK		000000*	spd	..0236		002132'	spd	..0765		005413'	spd	.XTRST		002601'	ext	
$JBTTY		000000*	spd	..0244		002143'	spd	..0766		005414'	spd	
$JOBNO	000015	000002	spd	..0252		002173'	spd	..0775		005457'	spd	
$JOBRT		000000*	spd	..0260		002207'	spd	..1004		005571'	spd	
$JSAMX		000000*	spd	..0266		002217'	spd	..1005		005574'	spd	
$JTFRK		000000*	spd	..0267		002224'	spd	..1011		006054'	spd	
$JTIMP		000000	spd	..0274		002230'	spd	..1025		006357'	spd	
$JTJNO	000000000000#	pol	..0302		002236'	spd	..1033		006416'	spd	
$JTMCN		000000*	spd	..0304		002273'	spd	..1041		006436'	spd	
$JTMNI		000000*	spd	..0312		002305'	spd	..1047		006517'	spd	
$KIMUP	000017	777775	spd	..0314		002372'	spd	..1055		006556'	spd	
$MAXWS	000015	000002	spd	..0326		002473'	spd	..1063		006575'	spd	
$MINWS	000015	000004	spd	..0336		002541'	spd	..1073		007107'	spd	
$NCLAS	000015	000001	spd	..0344		002546'	spd	..1107		007540'	spd	
$PIBMP	000000000000#	pol	..0352		002632'	spd	..1110		007550'	spd	
$PRIPS	000015	000004	spd	..0353		002633'	spd	..1115		007572'	spd	
$PSXSI		000000*	spd	..0360		002722'	spd	..1116		007602'	spd	
$RTREM	000015	000005	spd	..0366		002762'	spd	..1125		007642'	spd	
$SFX	000017	777776	spd	..0374		002766'	spd	..1135		010001'	spd	
$SILEV		000000	spd	..0402		003062'	spd	..1143		010035'	spd	
$SP1	000017	777775	spd	..0412		003104'	spd	..1151		010044'	spd	
$SP2	000017	777774	spd	..0420		003123'	spd	..1157		010077'	spd	
$SPTX		000000	spd	..0426		003130'	spd	..1165		010070'	spd	
$SUPFX	000017	777776	spd	..0432		003302'	spd	..1166		010076'	spd	
$TIMCH		000002	spd	..0444		003277'	spd	..1173		010075'	spd	
$TIMCN		000000*	spd	..0445		003302'	spd	..1174		010076'	spd	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-9
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   BGPTR 

MSEC1		000000	ext	
SYMSEC		000000	ext	
XCDSEC		000000	ext	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-10
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   RSVAR 

AJBFLG		000025'	int	
AJBHQP		000022'	int	
AJBLQP		000023'	int	
AJBNHQ		000020'	int	
AJBNLQ		000021'	int	
BKIDLF		000002'	int	
GOLPWC		000004'	int	
IDLFUG		000003'	int	
LQWBAS		000044'	int	
MXQGBO		000012'	int	
MXQNBO		000011'	int	
NXTAJB		000024'	int	
PSKD1		000000'	int	
QSUM		000035'	int	
QUANTT		000026'	int	
SKDBRM		000007'	int	
SKDBSK		000010'	int	
SKDFST		000001'	int	
SKDSHN		000013'	int	
SKDSHQ		000006'	int	
SKDSHS		000005'	int	
SCHED	MACRO %53A(1152) 16:03  8-Nov-88 Page S-11
SCHED	MAC	 7-Nov-88 20:50		SYMBOL TABLE FOR PSECT   NRCOD 

BHC		000000	ext	$JOBN	000017	777774	spd	
CAPENB		000006'	ext	$NPRIO	000017	777775	spd	
CHKBCH		000272'	ext	$OPRIO	000017	777776	spd	
CLASSF		000311'	ext	$TTYN	000017	777776	spd	
CLRJSB		000250'	ext	..1206		000116'	spd	
CLSCTL		000403'	ext	..1207		000120'	spd	
CLSRJA		000000	ext	..1242		000213'	spd	
CLSSHI		000000	ext	..1243		000215'	spd	
CLSSHR		000000	ext	..ACT		000000	spd	
CLSUTL		000000	ext	..CSC		000004	spd	
CSHCLS		000206'	ext	..CSN		000003	spd	
CURPSX		000002	spd	..IFT		000000	spd	
FNCTBL		000012'		..JX1		200000	spd	
GL2LCL		000116'	ext	..MX1	100000	000000	spd	
GTCJOB		000275'	ext	..MX2		000001	spd	
JOBCLS		000000	ext	..NS		000001	spd	
JOBDIR		000213'	ext	..PST		000003	spd	
JOBNO		000114'	ext	..STKN		000001	spd	
JOBRT		000120'	ext	..STKQ		000002	spd	
JOBSKD		000246'	ext	..STKR		000010	spd	
JOBUTL		000000	ext	..TSA1		000000*	spd	
LCL2GL		000256'	ext	..TX1	200000	000000	spd	
LSCHED		000317'		..TX2		000001	spd	
MAPJSB		000244'	ext	.SKED		000000'	int	
MAXCLS		000060'	ext	.XSTKS		000265'	ext	
MAXFUN		000014	spd	
NTTPTY		000000	ext	
PTYJOB		000265'		
PTYTTY		000267'	ext	
RSKP		000277'	ext	
SCHFLG		000045'	ext	
SETJSB		000204'	ext	
SKDDQ1		000237'		
SKDDQ2		000263'		
SKDON0		000140'		
SKDONE		000141'		
SKDRC0		000313'		
SKDRCB		000146'		
SKDRCP		000300'		
SKDRCS		000047'		
SKDRDQ		000220'		
SKDRNB		000026'		
SKDRTJ		000102'		
SKDSB1		000172'		
SKDSB2		000215'		
SKDSB3		000216'		
SKDSCB		000155'		
SKDSNB		000034'		
SKED1		000010'		
$CLASS	000017	777776	spd	
$CLSAC		000000*	spd	
$CLSBD		000000*	spd	
$CLSBT		000000*	spd	
$CLSKV		000000*	spd	
$JOBCH	000017	777775	spd	
ACBAS	  5335	  6359	  6388	  6710	  7187	  7295	  7434	  7438
ADJCLS	  4726	  4784	  4786	  4796	  4801#	  5186	  5452
ADJSWP	   614#	  3090
ADJWSS	  3414	  3498#	  5077
ADRBK%	  5538	  6057	  6116
AJB666	  3256	  3281#
AJB667	  3262	  3282#
AJB668	  3285	  3288	  3290#
AJBAL1	  3176#	  3188	  3213	  3228	  3246	  3276	  3281
AJBAL2	  3227#	  3241
AJBAL4	  3139	  3174#
AJBAL5	  3185	  3237#
AJBAL6	  3248	  3265#
AJBAL7	  3203	  3210#	  3264	  3268	  3272
AJBALS	  2586	  3082	  3086#
AJBALX	  3177	  3318#
AJBBSC	  3086
AJBFLG	  3068#	  3098	  3341	  3372
AJBHQP	  3064#	  3095	  3300
AJBL10	  3177#	  3222	  3233
AJBL11	  3254	  3274#	  3282
AJBL12	  3209	  3217#
AJBL69	  3269#	  3291
AJBL77	  3191	  3194	  3204#
AJBL9	  3199	  3202	  3226#
AJBLCY	   663#	  3339
AJBLFK	  3086
AJBLQP	  3065#	  3096
AJBNHQ	  3061#	  3093	  3301
AJBNLQ	  3062#	  3094
AJBS2	  3138#	  3159	  3164	  3169
AJBUQ0	  3212	  3299#
AJBUQS	  3167	  3295#
AJBYPF	  3054#	  3174	  3219	  3258	  3267	  3274	  3311
AJHQOF	  3056#	  3108	  3110	  3112	  3201
AJLODN	  3086
AJNNLF	  3055#	  3104	  3106	  3112	  3255	  3379
ALARMT	  1889	  3996	  4169	  4179	  4180
APPBS1	  3472#	  3474
APPBSL	  3439	  3470#
APSK1	  4260	  4263	  4265	  4275	  4281#
APSKED	  4249	  4258#
ARGX02	  7700	  7719
ARGX04	  7729	  7738	  7752	  7782	  7823	  7859	  7900	  7928	  7940	  8042
ARGX08	  7793	  7868
ARGX15	  7796	  7877
ARGX25	  7760	  7832	  7880	  7944
ARGX29	  7844
ARGX30	  7742
ARGX31	  7908
ASFSB	  2383	  2448	  2450	  2452
ASSFK	  2379	  2416#
ATACX1	  1747
ATJBMX	  5469
BALSHC	  2957	  3119	  3321
BASOVV	  1798	  3861	  3942	  3956
BGCCHK	  1522	  1989	  2025	  2323	  2971	  3334	  3627	  3703	  3882	  4117	  5199	  5287	  5604	  5732
	  6597	  6837
BGNDTM	  1885	  1948
BHC	  7811
BITCLR	  4407	  4415#
BITS	  4418	  4428	  5634	  5657	  5746	  5837	  6041	  6209	  6232	  6297	  6325	  6436	  6645	  6666
	  6697	  7268	  7565	  7572
BITSET	  4405	  4425#
BITWA1	  4400	  4402#
BITWAI	  4397#
BKGND1	  2480	  2481	  2485	  2490	  2553#
BKGND2	  2559	  2569	  2575#
BKGND3	  2557#	  2568
BKGNDT	  2566	  2571#
BKIDLF	  1791	  2553	  2577	  2592#
BLK2	  1583#	  1587
BLKT1	  1702#	  1706
BLOCK0	  1542#
BLOCK1	  1556#
BLOCKE	  1553#
BLOCKM	  1579#	  1669	  3991
BLOCKS	  1550	  1560	  1568#
BLOCKT	  1677	  1698#	  1733	  3994
BLOCKW	  1574	  1580#	  1663	  1668	  2786	  3992
BQUANT	  4900#
BSBCK	  1927	  2519#
BSBCK1	  2540#	  2549
BSBCK2	  2545	  2548#
BSCRSK	  2891	  3189	  3283	  3284	  3373	  3374	  3647	  3649	  3651	  3659	  3775	  4453	  4515
BSKED	  3117	  3730
BSLST	  3122	  3471	  3483
BSNSK	  2889	  3189	  3645	  3649	  3651	  3775	  4447	  4482	  4483
BSNST	  2704	  3661	  3666	  3667	  4984
BSOVRD	  2704	  3661	  3678	  3705	  4449	  4511	  4984
BSPAD	  3070#	  3120	  3162	  3206	  3392
BSPADO	  3071#	  3251
BSQNT	  1569	  1866	  2511	  3716	  3863
BSQNT0	  2512	  3717
BSSPQ	  3643	  3649	  3651	  3659	  3775	  4455	  4515
BSTSUM	  2047
BSWT	  2708
BSWTB	  1284	  2482	  2495	  2544	  2672	  2697	  3511	  3512	  3570
BUGHLT	   850	  1119	  1155	  1210	  1319	  1367	  1421	  1437	  1452	  1493	  1809	  1978	  2014	  2529
	  4377	  5214	  6419	  6970	  7201	  7452
BUGMON	  2243	  2291
BUGMXR	   850	  1119	  1155	  1210	  1319	  1367	  1421	  1437	  1452	  1493	  1521	  1809	  1978	  1988
	  2014	  2024	  2322	  2529	  2970	  3333	  3626	  3702	  3881	  4116	  4377	  5198	  5214	  5286
	  5603	  5731	  6419	  6596	  6836	  6970	  7201	  7452
BUGPRI	  2244	  2297
CAPENB	  6438	  7704	  7873
CAPX1	  7705	  7874
CASHOF	  2237
CFONLT	  1825
CFSDMP	   934
CFSSKC	   931	  1822	  1824
CH6TAB	  6491
CHGCLS	  4771#	  4839	  7892	  7963	  7967
CHGCN0	  4753#	  4763
CHGCNT	  4749#	  4788
CHGCNX	  4756	  4762#
CHGHLF	  2745	  2756#
CHGHLS	  2718	  2751#
CHKADR	  2229
CHKBCH	  4815	  8031
CHKBMP	  5094	  6506	  6604#
CHKDUE	  1963
CHKERT	  7648#
CHKMAX	   636#	  1964
CHKPER	  1993
CHKPTY	  2405
CHKRNR	  1978#	  1978	  1980
CHKSN0	  1020	  1024#
CHKSN1	  1015	  1023	  1030#
CHKSNP	   947	  1012#
CHKTF1	  3349#	  3354	  3358	  3362
CHKTFK	  3347#	  4250
CHKTIM	   895	  1923	  1961	  1994
CHKTL	  1892	  4226#
CHKTOT	  4059#
CHKWT	  4051#	  5795
CHNSON	  1530	  5491#	  5636	  6132	  6158	  6174	  6185	  6235
CKAHED	  3197	  3239	  3387	  3774#
CKINT0	  1130#	  1534	  4216	  5644
CKMMOD	  7670	  7682#
CKPHYT	  5000
CLASS	  7936
CLASSF	   623#	   623	  2063	  2084	  2117	  3099	  3195	  3237	  3257	  3307	  3385	  3441	  3741	  4440
	  4554	  4583	  4682	  4685	  4781	  4847	  5084	  5185	  5451	  7855	  7904	  7907	  7917	  8043
	  8050
CLDREQ	   933
CLDRJ	  2118	  2137#
CLDRJ0	  2140#	  2152
CLDRJ1	  2152#
CLGLC	   626#	  2129	  4297	  4361	  4740	  4757	  4759
CLK2	  1898	  1919#	  2585
CLK21	  1943#	  1946
CLK2CL	   613#	  1945
CLK2TM	   613#	  1943	  1944
CLKCH1	  4171#	  4182	  4186
CLKCHK	  1890	  4167#
CLKKIL	  5856
CLKLST	  3995	  4170
CLNZSC	  5131
CLRIB1	  3484#	  3488
CLRIBS	  2612	  3218	  3226	  3408	  3457#
CLRINT	  5780
CLRJSB	  7964	  7999
CLSAC	   756#	  4829	  4830	  4845	  4846	  7853	  7854	  7914	  8047	  8048
CLSAV0	  2129#	  2132
CLSAV1	  2132#
CLSAVG	  2064	  2128#
CLSBD	   753#	  4817	  4818	  7984	  8052
CLSBT	   755#	  4826	  7929	  7945
CLSCNT	   622#	  2129	  2376	  4298	  4362	  4698	  4722	  4725	  4741	  4758	  4760	  4778	  4779	  4801
	  5175
CLSCTL	   624#	   624	   853	  2374	  4817	  4826	  4829	  4845	  7730	  7743	  7853	  7914	  7929	  7945
	  7984	  8047	  8052
CLSDF	   754#	  2374
CLSDST	   622#	  4607	  4662
CLSIRT	   624#	  3892	  4586	  4588	  4696
CLSKV	   757#	   853	  7730	  7743
CLSNUM	  4813
CLSRJA	   622#	   622	  2150	  4704	  7768	  7771	  7774
CLSSHI	   624#	   624	  4630	  4632	  4633	  4807	  7800
CLSSHR	   622#	   622	  2141	  4598	  4601	  4794	  4805	  7761	  7806	  7834	  7835	  7838	  7840
CLSSUM	   622#	  2131	  2140	  2145	  2147	  4697
CLSSWA	   624#	   856	  4600	  7845
CLSUTL	   622#	   622	  2142	  2143	  4591	  4597	  7764	  7809
CORFC1	  4441	  4481#
CORFC2	  4444	  4446#
CORFC3	  4490#
CORFC4	  4484	  4529#
CORFC5	  4488	  4553#
CORFC6	  4547#
CORFC7	  4486	  4537#
CORFC8	  4528#	  4556
CORFCO	  4442#	  4496
CORFCT	  3260	  3309	  4310	  4317	  4439#
COUNT	  4708	  4717#
COUNT0	  4719#	  4723
COUNT1	  4724#
COUNT2	  4725#	  4727
COUNT4	  4720	  4723#
COUNT5	  4732#	  4743
COUNT6	  4738	  4742#
CRJANS	  2411
CRJBX6	  2410
CRSKD0	  1141#
CRSKED	  1067	  1144	  1149	  1157	  1190	  1478	  3646	  5348	  6590
CRTSHR	  4794#	  7847
CSHCLS	  7961
CSKBAS	  4456	  4916#
CSKBUG	  1155#	  1155	  1157
CST1X	  3539
CST3X	  3607
CSTOFK	  3607
CTRLTT	  4814	  5113	  5128	  5224	  5461	  5769	  5777
CTTAB	  5457	  5748	  5789
CTYLNO	  2274	  2341
CURPSX	   588#	   850	  1119	  1121	  1155	  1157	  1210	  1212	  1319	  1321	  1367	  1369	  1421	  1423
	  1437	  1439	  1452	  1454	  1493	  1495	  1522	  1524	  1809	  1811	  1978	  1980	  1989	  1991
	  2014	  2016	  2025	  2027	  2323	  2325	  2529	  2531	  2971	  2973	  3334	  3336	  3627	  3629
	  3703	  3705	  3882	  4117	  4119	  4377	  4379	  5199	  5201	  5214	  5216	  5287	  5289	  5604
	  5606	  5732	  5734	  6419	  6421	  6597	  6599	  6837	  6839	  6970	  6972	  7201	  7203	  7452
	  7454	  7696#	  7820#	  7925#
CX	  1086	  1099	  1102	  1108	  1119	  1124	  1142	  1145	  1148	  1160	  1172	  1173	  1174	  1175
	  1184	  1185	  1186	  1187	  1253	  1255	  1305	  1307	  1542	  1543	  1545	  1553	  1554	  1555
	  1561	  1562	  1563	  1564	  1565	  1594	  1665	  1673	  1721	  2312	  2313	  2327	  2340	  3347
	  3637	  3883	  3937	  3946	  3951	  3961	  4069	  4071	  4081	  4153	  4167	  4292	  4293	  4294
	  4340	  4356	  4357	  4358	  4409	  4499	  4501	  4502	  4505	  4735	  4736	  4737	  4773	  4832
	  4840	  4849	  4851	  4852	  5225	  5315	  5478	  5479	  5577	  5579	  5614	  5615	  5618	  5659
	  5667	  5686	  5757	  5762	  5902	  5906	  5918	  6604	  6605	  6606	  6618	  6619	  6620	  6818
	  6843	  6850	  6885	  6886	  6887	  6888	  6916	  6921	  6930	  6957	  6958	  6959	  6960	  6999
	  7018	  7024	  7032	  7040	  7062	  7067	  7068	  7069	  7108	  7109	  7110	  7151	  7159	  7201
	  7208	  7209	  7210	  7211	  7212	  7213	  7214	  7259	  7265	  7271	  7273	  7290	  7294	  7295
	  7358	  7359	  7364	  7414	  7415	  7421	  7422	  7423	  7424	  7425	  7434	  7435	  7436	  7437
	  7438	  7439	  7477	  7478	  7479	  7480	  7481	  7486	  7487	  7488	  7489	  7490	  7491	  7492
	  7494	  7496	  7497	  7499	  7510	  7511	  7512	  7564	  7571	  7607	  7833	  7844	  7848	  7884
	  7886	  7887	  7891	  7893	  7901	  7908	  7918	  7955	  7969
DAPHND	  6003
DB%NND	  1988	  2024
DBRKX1	  6617
DBUGSW	  2286
DCHKSW	  2287
DCMAX	  5468
DCNCNT	  5468
DCOPNM	  5467
DDMPNR	  2014#	  2014	  2016
DDPDUE	  1999
DDPMAX	   635#	  2000
DDPPER	  2028
DDPTIM	   896	  1924	  1997	  2029
DDTIME	  2254	  2264
DDTPRS	  2228	  2284
DEBRK2	  6639	  6645#
DEBRK3	  6655#	  6703
DEBRK4	  6666#	  6765
DEBRK5	  6686	  6695#
DEBRK6	  6647	  6680#
DEBUG	   820	  1840	  1872
DESPT	  5246	  5263	  5265	  5267
DEVLKK	  5119	  5122	  5216	  5219
DISACC	  2641	  2697#	  2790	  3514
DISE	  1634#
DISET	  1635	  1638#
DISG	  1614#
DISGE	  1591#
DISGET	  1592	  1598#
DISGT	  1615	  1618#
DISL	  1604#
DISLE	  1624#
DISLET	  1625	  1628#
DISLT	  1605	  1608#
DISMSE	  1188#	  1566	  5488	  5566	  5899	  6070	  6449	  6899	  6977
DISMSH	  1176	  1192#
DISMSJ	  1867	  1894	  1919	  2226	  2234	  2258	  2268	  3760#
DISMT	  1243	  2777#	  3516
DISMT2	  2791	  2808#	  3518
DISMT5	  2724	  2731	  2737#
DISN	  1644#
DISNT	  1645	  1648#
DIST	  3783	  4489	  4548	  4553	  4660#
DISXE	  1593#	  1606	  1616	  1626	  1636	  1646
DMSADR	  7106	  7141
DMSENT	  7106#
DMSU40	  5383	  7123	  7131
DMSUPC	  5384	  7113	  7127
DOGCC	  2824	  2829	  3010	  3018	  3035#
DORJ1	  2106	  2111	  2116	  2159#
DORJ2	  2151	  2160#
DORJAV	  2067	  2100#
DREGS	   759#	  4822	  7987	  8001
DRMFRE	  2348
DRMIN1	  2349
DRMWT	  2715
DSKRT	  2727
DSKWT	  2730
DWNSHR	  5244
DWRTST	  2721
DWRWT	  2723
ECSKD0	  1147#	  1554
EDMS0	  1180#	  1594	  4409	  5225	  5315
EDMSH	  1086	  1168#	  1665	  1673	  1721
EMRET0	  7326#
EMRET1	  7327#
ENSKED	  1329#
ENSKR	  1171	  1174	  1183	  1186	  1259	  1311	  1337	  1339	  1347	  1549	  1559	  1564	  5168	  5233
	  5483	  6884	  6887	  6956	  6959
EUACB	  7188
EXEC0	  5471
EXFLBT	  1172	  1184	  1253	  1305	  1543	  1562	  6289	  6392	  6639	  6643	  6687	  6885	  6957	  7477
EXPCBT	  7151	  7637
EXPCS	  6088	  7250	  7635
EXPFF	  2166	  2177#
EXTJSB	  2385	  3557	  5149	  5248	  5425
F	   836	   837	  1820	  1880	  1910	  1912	  1935	  1937	  2416	  2737	  3098	  3100	  3104	  3106
	  3108	  3110	  3112	  3174	  3201	  3219	  3255	  3258	  3266	  3267	  3274	  3311	  3341	  3429
	  4087	  4088	  4991	  4997	  5004	  5040	  5083
FACTSW	   835	   893	  3664
FFL	  6515	  6549	  6555	  6859	  7088	  7129	  7134	  7156	  7158	  7228	  7240	  7244	  7246	  7251
	  7285	  7364	  7414	  7476	  7486
FHMBIP	  2881#	  2888
FHMBS	  2879#	  2906
FHMCSK	  2880#	  2892
FHMNSK	  2876#	  2890
FHMPQ	  2878#	  2895
FHMRUN	  2877#	  2904
FHUNIT	  2849#	  2862
FHV1	  1085	  1678	  3983
FHV2	  1669	  1720
FHV3	  1229
FHV4	  1668
FIXWS1	  3607#	  3611
FIXWSP	  3578	  3605#
FK2DT	  4417	  4427
FKABK	  6064	  6072
FKAGE	  2445
FKBET	  2757	  2760	  3143	  3157	  3269	  3451	  3457	  3459
FKBETH	  3156
FKBLK	  2896	  3023	  3024	  4007	  4033	  4034	  4051	  4052	  4072	  4073	  4089	  4090	  4132	  4133
	  4154	  4155	  4196	  4197	  4245	  5096	  5097	  5673	  5674
FKBLP	  3477
FKBSHF	  3141	  3165	  3186	  3187	  3427
FKBSPW	  1230	  2898	  2907	  2920	  3140	  3475	  3477	  3486	  3984
FKCNO	  2439	  2453	  3555	  5264	  5298
FKCSIZ	  2443	  2935	  3410	  3576	  3613	  3629	  5072	  5275
FKDAP	  5988#	  6119
FKEFR	  5818	  5819
FKFR1	  6062
FKFRA	  6062
FKFRJ	  5815	  5816	  6894
FKGC	  3028	  5273
FKGL%	  2479
FKGOLN	  1230	  2898	  2907	  2920	  3984
FKHST	  2849	  2855	  2865	  2900
FKIB%	  3504
FKIBH	  2857	  2860	  3425
FKIBS	  2610	  2611	  2857	  2905	  2943	  2984	  2985	  3183	  3184	  3352	  3353	  3405	  3406	  3425
	  3457
FKIBX	  2436	  5660	  6129
FKICO	  5931	  5937
FKIDP	  5993	  6001
FKIJT	  6038	  6047
FKILO	  5966
FKINT	  1132	  1834	  1848	  1853	  2391	  2431	  2794	  2796	  2799	  2800	  4016	  4018	  4021	  4022
	  5594	  5606	  5607	  5663	  5670	  5676	  5677	  5709	  5759	  5815	  5818	  5882	  5888	  5889
	  5891	  5892	  5907	  5908	  5931	  5937	  5938	  5966	  5993	  5994	  6001	  6002	  6016	  6017
	  6023	  6024	  6038	  6039	  6047	  6048	  6058	  6062	  6063	  6064	  6065	  6072	  6073	  6504
	  6505	  6573	  6604	  6622	  6623	  6639	  6894	  6895	  6982	  6985	  6986	  6987	  6988
FKINTB	  2436	  5660	  6129
FKINX	  1853	  2391	  2431	  5663	  5882	  6058	  6573	  6604
FKISC	  6016	  6023
FKIWT	  2799	  4021	  5676	  6985
FKJBN	  1729	  2382	  2441	  3144	  3415	  3449	  4291	  4355	  4660	  4734	  4754	  5415
FKJO%	  3910
FKJOB	  1729	  2382	  2384	  2440	  2441	  3144	  3415	  3449	  3554	  3910	  4291	  4355	  4660	  4734
	  4754	  5135	  5138	  5160	  5238	  5241	  5415	  5423	  5462
FKJSB	  2384	  2440	  3554	  5135	  5138	  5160	  5238	  5241	  5423	  5462
FKJTB	  5400	  6801
FKJTN	  7008
FKJTQ	  5911	  6972	  6975	  7004	  7008
FKMNQ	  3726	  5063	  5871
FKNB%	  1278	  2643	  2678	  2701	  2809	  3594
FKNBW	  1278	  2643	  2678	  2701	  2809	  3594
FKNR	  2445	  2447	  2933	  2996	  3160	  3204	  3210	  3249	  3299	  3391	  3409	  3417	  3443	  3452
	  3462	  3498	  3500	  3541	  3575	  3612	  3632	  5075
FKNWCE	  2442	  2682	  2686	  2765	  3583
FKOGL	  4333	  4341	  4342	  4367
FKPGS	  2437	  2438	  2449	  2451	  3552	  3553	  5143	  5262	  5266	  5274	  5296	  5300
FKPGST	  1242	  1244	  1263	  1280	  2634	  2635	  2655	  2674	  2707	  2785	  2812	  3515	  3572	  3574
	  3967	  4979
FKPS0	  1132	  1133	  1834	  1835	  2794	  2795	  4016	  6985
FKPS1	  1848	  1849	  2796	  2797	  4018	  4019	  5594	  5595	  5606	  5670	  5671	  5891	  6504	  6622
	  6894	  6987
FKPS2	  2439	  2453	  3555	  5264	  5298
FKPSB	  2437	  2449	  3552	  5143	  5266	  5296
FKPSI0	  2430	  5662	  5881	  6057
FKPSI1	  1852	  6606	  6639
FKPSIE	  5750	  5805
FKPT	   869	  2419	  2435	  2491	  2492	  2541	  2542	  2757	  2760	  2853	  2919	  2921	  3143	  3157
	  3178	  3269	  3270	  3351	  3451	  3457	  3459	  3460	  4004	  4006	  4039	  4095	  4173	  4231
	  4316	  4330	  4332	  4348	  4352	  4647	  4648	  4733	  4742	  4753	  4762	  5269	  5722
FKPTD	  1242	  2635	  2785	  3572
FKPTR	  1244	  1280	  2634	  2655	  2707	  3515	  3574
FKPTRS	  5826	  5827	  5828
FKPTX	  1263	  2674	  2812	  3967	  4979
FKQ1	  2427	  2510	  2740	  2744	  3718	  3753	  5020	  5059
FKQ2	  2420	  2425	  2432	  2433	  2660	  2886	  2893	  3179	  3192	  3286	  3295	  3376	  3381	  3657
	  3714	  3726	  3732	  3751	  3774	  3780	  3835	  4003	  4036	  4092	  4199	  4271	  4273	  4299
	  4363	  4439	  4451	  4495	  4499	  4501	  4513	  4982	  5013	  5060	  5063	  5609	  5612	  5613
	  5871	  6607	  6609	  6610
FKQ2X	  2420
FKQN	  2425	  2893	  3179	  3295	  3381	  3714	  3732	  3751	  3774	  3835	  4271	  4273	  4299	  4363
	  4439	  4495	  4499	  4501	  4982	  5013	  5060
FKQTM	  2427	  2510	  2740	  2744	  3718	  3753	  5020	  5059
FKRT	  3888	  3945	  3958
FKSE01	  5444#
FKSET	  5330#	  5528
FKSET1	  5422	  5441#
FKSET2	  5429	  5477#
FKSET3	  5430#	  5472
FKSETK	  5336
FKSETP	  5406
FKSPPT	  3537	  3552#	  3561	  3587
FKST2	  4399	  5522	  5565
FKSTA2	  4399	  4417	  4427	  5522	  5565
FKSTAT	  1212	  1218	  2422	  2423	  2777	  2778	  3968	  4009	  4010	  4075	  4076	  4135	  4157	  4174
	  4175	  4195	  4202	  4205	  4232	  4233	  4416	  4426	  4994	  4999	  5518	  5799	  5903	  7005
FKSTD	  2423	  2778	  4010	  4076	  4175	  4195	  4205	  4233	  4416	  4426	  4999	  7005
FKSTR	  1218	  2422	  2777	  3968	  4009	  4075	  4135	  4157	  4174	  4202	  4232	  4994	  5799	  5903
FKSTX	  1212	  5518
FKSUS	  5888	  5907	  6982	  6983
FKSWP	  1297	  2434	  2478	  2493	  2543	  2610	  2613	  2672	  2673	  2697	  2698	  2704	  2705	  2855
	  2857	  2860	  2861	  2865	  2884	  2900	  2931	  2984	  3023	  3141	  3142	  3165	  3166	  3183
	  3186	  3189	  3227	  3283	  3352	  3373	  3397	  3405	  3425	  3426	  3427	  3428	  3457	  3458
	  3501	  3511	  3544	  3545	  3570	  3571	  3648	  3652	  3656	  3662	  3669	  3705	  3706	  3775
	  4007	  4008	  4033	  4051	  4072	  4089	  4132	  4154	  4196	  4245	  4246	  4333	  4334	  4341
	  4367	  4368	  4446	  4482	  4510	  4984	  4985	  5096	  5673
FKSWX	  1297	  2434	  2478	  2493	  2543	  2884	  2931	  3501	  3648	  3652	  3656	  3662	  3669	  4446
	  4510
FKT0	  3847	  3856	  3857	  3859	  3930	  3940	  3954
FKT1	  2513	  3712	  3713	  3868
FKTAB	  5390	  5391	  5393
FKTIM	  2429	  3755	  4443	  4538	  4980	  5062
FKTIME	  2429	  3755	  4443	  4538	  4980	  5062
FKTLST	  3853	  3929	  3932
FKTMI	  4210	  6066	  6440	  6463#
FKTOFF	  3850	  3852	  3854	  3920	  3928	  3931
FKUPT	  2438	  2451	  3553	  5262	  5300
FKWS%	  3502
FKWSL	  2481	  2494	  2613	  2614	  2932	  3227	  3228	  3397	  3544	  3570
FKWSP	  2442	  2443	  2682	  2686	  2765	  2935	  3410	  3576	  3583	  3613	  3629	  5072	  5275
FKWSP1	  3627#	  3627	  3629
FKWSS	  2447	  2933	  2996	  3160	  3204	  3210	  3249	  3299	  3391	  3409	  3417	  3443	  3452	  3462
	  3498	  3500	  3541	  3575	  3612	  3632	  5075
FKWTL	  4003	  4036	  4092	  4199
FLOGO	  5968
FLOWQ	   902	  4905#
FNCTBL	  7701	  7706	  7709#	  7721
FNPMAX	  5389
FORCTC	  6435
FORCTM	  1220	  5803	  6142	  6448	  6459#
FORKN	  4127	  5747	  6138	  6453	  6463	  6476	  6877	  7058	  7261
FORKX	   884	  1131	  1236	  1300	  1333	  1349	  1423	  1827	  1831	  1864	  1875	  1877	  1883	  1899
	  2506	  2519	  3597	  3760	  3909	  4214	  4261	  4272	  4398	  5134	  5268	  5404	  5445	  5512
	  5593	  5641	  5664	  5755	  5867	  5880	  5887	  5901	  5930	  5936	  5965	  5992	  6000	  6012
	  6037	  6046	  6056	  6127	  6466	  6572	  6621	  6639	  6695	  6700	  6998
FPC	  6850	  6860	  7080	  7087	  7101	  7121	  7128	  7142	  7155	  7159	  7243	  7245	  7249	  7290
	  7366	  7413	  7478	  7484	  7485	  7489	  7499
FREFK	   872	  2358	  2417	  2418	  5270	  5272
FREJOB	   876	  2354	  2362	  2363	  5173	  5174
FRIBP0	  3186#
FRIBP1	  2782	  2801#
FRIBP2	  1216#
FRIBP3	  2641#
FRKNDL	  5287#	  5287	  5289
FRKNOP	  5338
FRKTTY	  5457	  5748	  5789
FRTOFF	  3919#
FRTON	  3927#
FRZLST	  3985
FRZPSI	  6818	  6874#
FRZWT	  3982	  5800	  6069	  6441	  6898
FTKLIP	   594	  2292	  5353
FTNSPS	   850	  1121	  1157	  1212	  1321	  1369	  1423	  1439	  1454	  1495	  1524	  1811	  1980	  1991
	  2016	  2027	  2325	  2531	  2973	  3336	  3629	  3705	  3882	  4119	  4379	  5201	  5216	  5289
	  5606	  5734	  6421	  6599	  6839	  6972	  7203	  7454
FX	   980	  1040	  1130	  1131	  1132	  1212	  1218	  1230	  1236	  1242	  1244	  1263	  1278	  1280
	  1297	  1299	  1300	  1332	  1333	  1729	  1827	  1831	  1833	  1834	  1848	  1853	  1864	  1875
	  1876	  1877	  1882	  1883	  1899	  1901	  1903	  2380	  2382	  2384	  2391	  2417	  2418	  2419
	  2420	  2422	  2423	  2425	  2427	  2429	  2431	  2432	  2433	  2434	  2435	  2436	  2437	  2438
	  2439	  2440	  2441	  2442	  2443	  2445	  2447	  2449	  2451	  2453	  2476	  2478	  2489	  2490
	  2491	  2492	  2493	  2500	  2506	  2507	  2509	  2510	  2539	  2540	  2541	  2542	  2543	  2548
	  2576	  2609	  2610	  2613	  2634	  2635	  2643	  2655	  2660	  2672	  2673	  2674	  2678	  2682
	  2686	  2697	  2698	  2701	  2704	  2705	  2707	  2740	  2744	  2757	  2760	  2765	  2777	  2778
	  2785	  2794	  2796	  2799	  2800	  2809	  2812	  2852	  2853	  2855	  2857	  2860	  2861	  2865
	  2866	  2884	  2886	  2893	  2898	  2900	  2907	  2917	  2918	  2919	  2920	  2921	  2924	  2931
	  2933	  2935	  2941	  2949	  2950	  2982	  2984	  2991	  2996	  3021	  3023	  3140	  3141	  3142
	  3143	  3144	  3157	  3160	  3165	  3166	  3178	  3179	  3183	  3186	  3189	  3192	  3204	  3210
	  3227	  3249	  3269	  3270	  3283	  3286	  3295	  3299	  3351	  3352	  3373	  3376	  3381	  3391
	  3397	  3405	  3409	  3410	  3415	  3417	  3425	  3426	  3427	  3428	  3443	  3449	  3451	  3452
	  3457	  3458	  3459	  3460	  3462	  3475	  3477	  3486	  3498	  3500	  3501	  3511	  3515	  3541
	  3544	  3545	  3552	  3553	  3554	  3555	  3570	  3571	  3572	  3574	  3575	  3576	  3583	  3594
	  3608	  3612	  3613	  3627	  3629	  3632	  3648	  3652	  3656	  3657	  3662	  3669	  3703	  3705
	  3706	  3714	  3718	  3726	  3732	  3751	  3753	  3755	  3760	  3761	  3774	  3775	  3780	  3835
	  3967	  3968	  3984	  4003	  4004	  4006	  4007	  4008	  4009	  4010	  4016	  4018	  4021	  4022
	  4033	  4036	  4040	  4051	  4068	  4070	  4072	  4075	  4076	  4089	  4092	  4096	  4125	  4131
	  4132	  4135	  4151	  4152	  4154	  4157	  4173	  4174	  4175	  4194	  4195	  4196	  4199	  4202
	  4205	  4208	  4231	  4232	  4233	  4245	  4246	  4264	  4266	  4271	  4272	  4273	  4291	  4299
	  4309	  4316	  4329	  4330	  4332	  4333	  4334	  4341	  4344	  4348	  4349	  4352	  4355	  4363
	  4367	  4368	  4416	  4417	  4426	  4427	  4439	  4443	  4446	  4451	  4482	  4495	  4499	  4501
	  4510	  4513	  4538	  4647	  4648	  4660	  4717	  4733	  4734	  4742	  4749	  4751	  4753	  4754
	  4762	  4763	  4979	  4980	  4982	  4984	  4985	  4994	  4999	  5013	  5020	  5059	  5060	  5062
	  5063	  5072	  5075	  5096	  5134	  5135	  5138	  5143	  5160	  5238	  5241	  5262	  5264	  5266
	  5269	  5274	  5275	  5296	  5298	  5300	  5404	  5415	  5423	  5462	  5511	  5517	  5521	  5527
	  5529	  5531	  5533	  5535	  5538	  5565	  5588	  5593	  5594	  5606	  5607	  5609	  5612	  5613
	  5668	  5669	  5670	  5673	  5676	  5677	  5683	  5684	  5745	  5758	  5793	  5794	  5796	  5798
	  5834	  5866	  5867	  5871	  5872	  5879	  5880	  5882	  5891	  5892	  5901	  5903	  5907	  5908
	  5911	  5930	  5931	  5936	  5937	  5938	  5965	  5966	  5992	  5993	  5994	  6000	  6001	  6002
	  6012	  6016	  6017	  6023	  6024	  6037	  6038	  6039	  6043	  6046	  6047	  6048	  6055	  6056
	  6058	  6062	  6063	  6064	  6065	  6072	  6073	  6108	  6110	  6112	  6114	  6116	  6118	  6120
	  6327	  6328	  6329	  6330	  6335	  6341	  6342	  6343	  6344	  6349	  6350	  6351	  6352	  6365
	  6366	  6367	  6368	  6378	  6381	  6382	  6383	  6387	  6388	  6396	  6397	  6398	  6399	  6504
	  6505	  6573	  6604	  6607	  6609	  6610	  6681	  6682	  6683	  6684	  6710	  6711	  6718	  6723
	  6735	  6736	  6742	  6744	  6749	  6751	  6757	  6759	  6761	  6894	  6895	  6972	  6975	  6982
	  6985	  6986	  6987	  6988	  7012	  7013	  7015
GBLJNO	  4821	  7863
GCCOR	  2622	  3037
GCCTIM	  3040
GETCHA	  5835	  6488#
GETDMS	  7107
GETFRT	  3937#
GETHRT	  3951#
GETOKM	  4852	  7887
GETPAT	  7066
GETSFX	  1083	  6443	  6453#
GETSHR	  5239	  5321
GFHST	  2884#	  2937	  2945
GFHST1	  2897	  2904#
GL2LCL	  1744	  7792	  7867
GLFNF	  4377#	  4377	  4379
GLREM	  1234	  2649	  2811	  3653	  3707	  3731	  4340#	  5099	  5236	  5619
GLREM0	  4359	  4363#
GLREM1	  4346#	  4351
GLREM2	  4343	  4347	  4371#
GOC1	  4314#	  4321
GOC2	  4319	  4325#
GOCNC0	  4295	  4299#
GOCONC	  2653	  3654	  3708	  3756	  4248	  4288#	  5100	  5620
GOKER2	  4852	  7887
GOKFRE	  6702
GOLPWC	  2596#	  2647
GOLST	  2489	  2539	  2917	  3175	  3348	  4313	  4345	  4644	  4645	  4731	  4751
GOUSR	   972	   973	  7102	  7143	  7403#
GTCJOB	  5695	  8034
GTOKPR	  4849	  7884
GTTOPF	  5713
HALTF1	  1082#
HALTT	  1084	  1089#	  1219	  3978	  5487	  5802	  6141
HALTX	  1083#
HIBERT	  1719	  1729#
HIGHQ	  2894	  4894#
HLTFK1	  5230#
HLTFK2	  5187	  5234#
HLTJB	  5113#	  5226
HLTJB1	  5114	  5127#
HLTJB3	  5118	  5206#
HPSCHK	  3703#	  3703	  3705
HPSWRN	   614#	  3672	  3676
HQFSUM	  2059	  2107
HQLAV	  2110	  3102
HQLEV1	   649#	  3103
HQLEV2	   650#	  3105
HQLEV3	   656#	  3107
HQLEV4	   657#	  3109
ICTTY	  5457#	  5458
IDLFUG	  2087	  2094	  2593#
IFIW	  5400	  7710	  7712	  7713	  7717	  7718	  7719
IICSL1	  5637	  5640#
IICSLF	  5635#	  7566	  7573
ILINS1	  7041
ILINS2	  7047
ILIST	   871	   875	   911#
ILIST1	   913	   917#
ILOKSK	  1319#	  1319	  1321
ILUUO	  7040#
ILUUO1	  7041#
IMCFLG	  7415	  7487	  7580	  7611	  7648
IMCLL0	  7475#
IMCLL1	  7416	  7508#
INFERP	  5786	  5828#
INIQ	  2424	  5056	  5082#
INSKED	   888	   940	   979	  1038	  1098	  1107	  1141	  1147	  1168	  1170	  1180	  1182	  1256	  1258
	  1308	  1310	  1344	  1346	  1407	  1546	  1548	  1556	  1558	  3595	  3842	  3858	  4262	  5165
	  5167	  5230	  5232	  5480	  5482	  5576	  6881	  6883	  6953	  6955
INTDF	  1100	  1143	  1321	  1458	  5386	  5405	  5640	  6524	  6535	  6552	  6588	  6663	  6764	  6797
	  6853	  6862	  7153	  7310	  7458	  7482	  7509
INTDF0	  5339	  6084	  6524#
INTDF1	  6501	  6525#
INTDFF	  1123	  1159	  1535	  5126	  5223	  5340	  5414	  5643	  6085	  6502	  6854	  6863
INTQ0	  3817	  4487	  4883#	  4911	  5082	  5085
INTQ1	   900	   905	  3778	  4502	  4505	  4886#	  5016	  5024	  5030	  5031
IOIP	  2270	  2667	  2681	  2827	  2831	  2978	  3007
IRJAV	  2120	  5006	  5041
ITFFL	  6311
ITNOJC	  1452#	  1452	  1454
ITR2	  1502	  1530#
ITRAP	  1403#
ITRAP1	  1402#	  6617	  6639	  7042	  7048	  7700	  7705	  7719	  7729	  7738	  7742	  7752	  7760	  7782
	  7793	  7796	  7823	  7832	  7844	  7856	  7859	  7868	  7874	  7877	  7880	  7889	  7900	  7908
	  7928	  7940	  7944	  8042
ITRSIM	  1466	  1501	  6170	  7330	  7530#
ITRSX	  7537	  7542	  7578#
ITRSY	  7560	  7570#
JB0C.0	  1962	  1996#
JB0C.1	  1998	  2031#
JB0CHK	  1957#
JB0FLG	  1991	  2255
JB0TIM	  1959
JBTFK	  2380	  3884	  3911
JBTTY	  2381	  5443
JOBBIT	  3640	  3719	  3736	  5868	  5982
JOBCHG	  7936
JOBCK0	  1225	  3798	  3800	  3808	  3832
JOBCK1	  3802	  3806
JOBCLS	   624#	   624	  1223	  2375	  3891	  4293	  4296	  4357	  4360	  4629	  4661	  4721	  4736	  4739
	  4750	  4777	  4780	  4837	  5171	  5449	  7797
JOBCOF	  5940
JOBDIR	  1748	  5169	  7966
JOBDST	   624#	  4636	  4663
JOBIRT	   622#	  2371	  3890	  4617	  4619
JOBM0	  5133	  5465
JOBMAP	  5140
JOBN	  7975
JOBNAM	  1724	  1731	  1751	  3416	  3896
JOBNO	  1222	  1722	  3680	  3797	  3870	  3914	  4772	  4836	  5127	  5163	  5176	  5416	  5442	  5459
	  5848	  5857	  7790	  7864	  7870
JOBNOM	  4771
JOBPNM	  5164
JOBPT	   873	  2364	  2380	  2381	  3884	  3911	  5129	  5172	  5443	  5460	  5704	  5707
JOBRT	   878	   879	   880	  1746	  2366	  3145	  3450	  3801	  3805	  3871	  3882	  3887	  3903	  4615
	  4719	  4775	  5170	  5181	  5701	  7795	  7876
JOBRTL	  2367	  2368	  2369	  2370	  3893	  3900	  3905	  5849	  5858	  5859
JOBRTP	  2367	  3893	  3894	  3900	  3905	  5849	  5858
JOBSKD	  3641	  3720	  3737	  4819	  5869	  7997
JOBSR1	  2347	  2352	  2357	  2361	  2397#
JOBSR2	  2342	  2353#
JOBSRC	  2398	  2410#
JOBSRT	  2315	  2340#
JOBUTL	   624#	   624	  4622	  4628	  7803
JP%MNQ	  3743
JP%MXQ	  3721	  3746
JP%RTG	  3740	  3796
JP%SYS	  3642	  4906
JRET	  3979	  4382#
JSAMX	  5470
JSATCT	  5470
JSBPG	  5133	  5141	  5465
JSBPGA	  5140
JSBSTF	  6699
JSKP	  2421	  4384#
JSLKB1	  7284#
JSLKB2	  7365#
JSLST	  5141
JSPRET	  2636	  2779	  3528	  4011	  4077	  4176	  4234	  4383#
JSTAB	  6843	  7151	  7265	  7273	  7497
JTBAL	  7056	  7270
JTBIM	  6805
JTBLK	  5401	  5466	  7053	  7258
JTBMN	  6803
JTDEQ	  5912	  7011	  7024#
JTDEQ1	  7028	  7031#
JTENQ	  6930	  6952#
JTENQE	  6970#	  6970	  6972
JTFRK	  5395	  6878
JTIMP	  6803
JTJNO	  6842	  7266
JTLCK	  5402	  6919	  7017
JTLOC1	  6922#	  6935
JTLOC2	  6920	  6927#
JTLOCK	  6815	  6916#
JTLST	   867	  7000
JTLSTL	   868	  6973	  6974	  7031
JTMCN	  5399	  6040	  6812
JTMNI	  5397	  6879	  6890
JTMNW	  5397	  5399	  6040	  6812	  6879	  6890
JTQWT	  5904	  6976	  6982#
JTRLCK	  5915	  6943#
JTTFK	  5395	  6878
JTTRW	  5394	  6876
JTULC1	  7002#	  7009
JTULC2	  7007	  7011#
JTULC3	  7002	  7017#
JTULCK	  6998#
JWAKEF	  1723	  1730	  1750
KCFLG	  6776	  7076	  7095	  7117	  7136	  7216	  7428
KEPALV	   992	  1819
KIMUEF	  1343	  1348	  5510	  5585	  6570	  7083	  7091	  7124	  7132
KIMUFL	  1353	  5507	  5582	  6567	  7074	  7093	  7115	  7281	  7283
KIMUP0	  6917
KIMUP1	  6917
KIMUPC	  1421	  1452	  1493	  5509	  5584	  6569	  7280	  7282
KIMUU1	  1455	  6839	  6842	  6874	  6875	  6927	  6934	  7266
KISLOD	  1040
KISSAV	   980	  1332	  5588
KITRP1	  1343#
KLFLG	   954	   968	  1046	  1058	  6262	  6532	  6545	  7073	  7092	  7114	  7133	  7207	  7404	  7420
LCKDVL	  5115
LCL2GL	  8005
LDJB1	  3587#	  3589
LDJB3	  3569#
LDJB5	  3579#	  3633
LFORKX	  1876	  1882
LGTAD	  5453
LOADWS	  3000	  3565#
LOGIOB	  5981
LOWQ	   759	   907	  4897#	  4898	  4905	  4911	  5014
LOWQT	  3794#	  3812	  3823	  3828	  3830	  3833
LQFSUM	  2062	  2112
LQLAV	  2115
LQWBAS	   905	  4502	  4911#
LSCHED	  8058#
LSTERR	  1402	  1421	  1437	  1452	  1493	  6639	  7326	  7540	  7549
LSTIPC	  1403	  1421	  1437	  1452	  1493
LSTPFK	  1901	  1903	  2507	  2509	  2623	  3038	  3532
LV8CHK	   613#	  1878
MAPCLF	  5199#	  5199	  5201
MAPJSB	  7995
MAXBP	  3207	  3252
MAXCLS	   624#	   624	   857	  2128	  2138	  4585	  4699	  4705	  4724	  4834	  7759	  7831	  7837	  7879
	  7943
MAXFUN	  7699	  7721#
MAXHNR	  3116	  3163
MAXNR	  2828	  2998	  3005	  3008	  3012	  3075	  3114	  3208	  3253	  3394	  3437
MAXQ	  3180	  3296	  3382	  3724	  3733	  3735	  3824	  3826	  3834	  4300	  4364	  4898#	  5036
MAXVAL	   683#	   699
MAXWS	  2914
MAXWSF	  2914
MENT0	  7040	  7227#	  7259
MENT2	  7252	  7290#
MENTM	  7151#
MENTU	  7258#
MENTU1	  7063	  7272	  7279#
MFRKWD	  4906#
MINNR	   633#
MINQNT	   665#
MINSHR	   682#	   683	   698
MINWS	  2914
MINWSF	  2914
MINWSS	   641#	  5073	  5074
MJBUSE	   623#	  2372	  2373	  4614	  5177	  5180
MJRST0	  5341	  6082	  6515#
MJRST1	  6499	  6516#
MJRSTF	   851	  5342	  6083	  6500	  6855	  7222	  7312	  7407	  7460	  7504	  7516
MONBK	  6309
MONCHN	  6135	  6156	  6464
MONCOR	  3605
MONENV	   863	   981	  1815	  1857	  5343	  5431	  5560	  5913	  5944	  5971	  6102	  6307	  6574
MONNEJ	  1522#	  1522	  1524
MPEINT	  2459#
MPP	  1457	  6769	  6858	  7154	  7157	  7220	  7291	  7327	  7338	  7357	  7457	  7483	  7500	  7508
	  7608	  7683
MRETN	  1087	  1469	  1504	  1525	  1536	  1656	  1666	  1674	  7331	  7333	  7346#	  7732	  7746	  7816
	  7849	  7894	  7919	  7932	  7971	  8011	  8055
MRETN1	  7360	  7411#
MRETNE	  1745	  1747	  7324#
MSEC1	   705	   850	   865	   982	  1121	  1157	  1212	  1321	  1336	  1369	  1423	  1439	  1454	  1495
	  1524	  1811	  1816	  1858	  1980	  1991	  2016	  2027	  2325	  2531	  2973	  3336	  3629	  3705
	  3882	  4119	  4379	  5201	  5216	  5289	  5606	  5730	  5734	  6421	  6575	  6599	  6839	  6972
	  7203	  7271	  7412	  7454
MSEC1A	   705#	  6618	  7208	  7421
MSEC1B	  7062
MSETP1	  5142	  5148	  5191#
MSETPT	  5191
MTIME	  1793	  3844	  3919	  3927	  3939	  3953
MXBIAS	   699#	  4605
MXQGBO	  2602#	  5049
MXQNBO	  2601#	  5038
MXSKPS	   675#
N2CLKS	   613#	  1942
NAJBAL	  3081
NBPROC	  1773	  2045	  3454	  3465	  3814
NBSL	  3431	  3478	  3491
NBSWP	  1283	  1769	  2676	  2716	  3592
NBWT	  1279	  2042	  2675	  2699	  3591
NCLASS	  4771
NCSWCH	  2505
NEBAL	  2768	  3585
NEGJRT	  3882#	  3882
NETWK1	  4151#
NETWKF	  4150#
NEWFK%	  2430	  5527
NEWJB%	  2390	  5421
NEWST	  4247	  4978#
NEWST1	  5002	  5019	  5055#
NEWST2	  2652	  4993	  5001	  5004#
NEWST3	  5025	  5032	  5051	  5057#	  5067
NEWST5	  5005	  5012#
NEWST6	  5026#	  5028
NEWST7	  5023	  5036#
NEWST8	  5037	  5058#
NEWSTX	  4983	  5015	  5053	  5063#
NEWU00	  4615#	  4637
NEWU01	  4618	  4622#
NEWU02	  4616	  4637#
NEWUT0	  4586#	  4608
NEWUT1	  4587	  4591#
NEWUTJ	  4584	  4614#
NEWUTL	  2070	  4572#
NEWWSS	  4988	  5055	  5071#
NFKS	   870	  2608	  2852	  2916	  2924	  4264	  5716
NFKSPP	  3536	  3561#	  3566	  3582	  3586
NGOJOB	  2041	  2556	  2563	  2572	  4290	  4354
NHIPG	  3610
NHOLDF	   613#	  1245	  1775	  2789	  2801	  3519
NHQFK	  2057	  4301	  4365
NJOBS	   874	   880	  4718
NLFKS	  5393
NLINES	  5771
NLQFK	  2060	  4302	  4366
NOACB	  7201#	  7201	  7203
NOCHKR	  1989#	  1989	  1991
NODDMP	  2025#	  2025	  2027
NOSK11	  1098#	  2313	  4071	  4153	  5667
NOSKD0	  1097#	  3937	  3951	  4832	  5757	  5902	  6916	  6999	  7024	  7833	  7891	  7901	  7955
NOSKTR	  1493#	  1493	  1495
NPILEV	  6219
NPIPDL	  5622
NPMAX	  5388
NPRIOR	  7975
NPSIPG	  5332	  5407
NQUEUE	  4877#	  4878	  4892	  4897	  4910	  4918	  4919	  4940
NREMJ	  3221
NREMR	  3025
NRJAVS	  2149	  2171	  4705
NRPLQ	  2054	  2666	  2680	  2826	  2830	  2834	  2977	  2979	  3565
NRPMIN	  2688	  2767	  2835	  2980	  3584
NSAVC	  6334	  6756	  6779#
NSHAKL	  2555	  2588#	  2603
NSKBAS	  4448	  4915#
NSKDIS	  1210#	  1210	  1212
NSKDP	  1953
NSKED	   943	  1066	  1101	  1109	  1121	  1194	  1298	  1312	  1479	  1850	  3644	  5347	  6583	  6591
	  6961
NSKFLV	   749#	  7741
NSWTT	  2212	  2224#
NTMS	   664	   665	  1568	  2074	  2077	  2080	  2086	  2093	  2651	  2739	  3865	  3944	  3959	  4579
	  4868	  4869	  4870	  4871	  4873	  4874	  4875	  4882	  4884	  4885	  4887	  4888	  4889	  4890
	  4900	  4990	  4992	  5044	  5290
NTTPTY	  7948	  7989
NUFKS	  5456
NULJBF	  1759	  1767
NUPDL	  6342	  6749	  6752	  7663	  7664
NWSLOD	  3590
NWSMEM	  2048	  3015	  3546	  3569
NWSSUM	  2050
NXTAJB	  3067#	  3079	  3340
OKSK11	  1106#	  2327	  4081	  5686
OKSKBG	  1119#	  1119	  1121
OKSKD0	  1107#	  3946	  3961	  4840	  5762	  5906	  5918	  6921	  7018	  7032	  7844	  7848	  7893	  7908
	  7918	  7969
OKSKE1	  1110#
OLDIDL	  2090	  2092	  2095	  4577	  4578
OLDSLD	   623#	  4574	  4575
ONGOL	  4289	  4307#	  4649
ONGOL0	  4315	  4327	  4329#
ONGOL1	  4320#	  4328
OPOPAC	  7452#	  7452	  7454
OPRIOR	  7975
OURTTL	   587#
P	  1130	  1188	  1192	  1226	  1260	  1262	  1334	  1457	  1462	  1468	  1503	  1522	  1553	  1555
	  1591	  1595	  1604	  1614	  1624	  1634	  1644	  1817	  1989	  2025	  2278	  2280	  2283	  2323
	  2401	  2404	  2560	  2562	  2648	  2650	  2668	  2679	  2691	  2971	  3230	  3232	  3334	  3568
	  3627	  3703	  3843	  3845	  3882	  3907	  3913	  4032	  4068	  4087	  4117	  4125	  4151	  4192
	  4194	  4206	  4208	  4266	  4288	  4307	  4309	  4311	  4312	  4318	  4325	  4326	  4329	  4384
	  4494	  4498	  4717	  4749	  4852	  5119	  5120	  5124	  5125	  5199	  5216	  5217	  5221	  5222
	  5287	  5331	  5444	  5448	  5502	  5503	  5504	  5505	  5577	  5578	  5579	  5580	  5604	  5611
	  5614	  5668	  5680	  5682	  5684	  5694	  5696	  5708	  5732	  5793	  5796	  5798	  5807	  5809
	  5811	  5851	  5855	  5866	  5872	  5895	  5898	  6390	  6446	  6562	  6563	  6564	  6565	  6597
	  6655	  6656	  6665	  6698	  6701	  6709	  6837	  6858	  6859	  6860	  6861	  6917	  6928	  6929
	  6932	  6933	  6989	  6991	  7012	  7015	  7153	  7154	  7155	  7156	  7157	  7187	  7188	  7203
	  7211	  7212	  7220	  7242	  7243	  7244	  7245	  7246	  7279	  7280	  7281	  7282	  7283	  7291
	  7327	  7328	  7332	  7338	  7339	  7357	  7358	  7366	  7413	  7457	  7458	  7479	  7480	  7481
	  7482	  7483	  7485	  7488	  7500	  7508	  7509	  7510	  7512	  7556	  7559	  7562	  7636	  7834
	  7840	  7887	  7936	  7947	  7952	  7954	  7958	  7962	  7975	  7988	  7993	  7994	  7998	  8000
	  8004	  8007	  8026	  8029	  8033
P1	  2555	  2561	  2568	  2574	  2608	  2609	  2617	  6328	  6396	  6798	  6801	  6802	  6803	  6804
	  6805	  7053	  7056	  7258	  7269	  7270	  7757	  7758	  7759	  7761	  7764	  7767	  7768	  7771
	  7774	  7797	  7798	  7800	  7806	  7809	  7836	  7838	  7843	  7902	  7903	  7912	  7916
P2	  2556	  2560	  2562	  2563	  2572	  3179	  3180	  3181	  3182	  3202	  3256	  3295	  3296	  3297
	  3298	  3300	  3301	  3568	  3586	  3587	  3589	  5506	  5581	  6566	  6771	  6798	  6804	  7054
	  7266	  7267	  7269	  7824	  7826	  7827	  7828	  7845
P3	  5507	  5582	  5949	  5973	  6567	  6772	  6805	  7055	  7056	  7268	  7270
P4	  1942	  1943	  1944	  1945	  1946	  5508	  5583	  6568	  6773	  6801	  6803	  6809	  6879	  6952
P5	  1936	  1938	  1939	  1940	  1941	  1943	  5509	  5584	  5948	  5974	  6569	  6774	  6799	  6808
	  6828
P6	  5510	  5585	  6570	  6775	  6811	  6812	  6876	  6878	  6919
PAC	   957	   958	   959	  1056	  1329	  1330	  1331	  1338	  5586	  5587
PAG	   955	  1059	  6533	  6546	  6620	  7069	  7110	  7210	  7405	  7423
PAGDIF	   614#	  3089
PARALP	  5812	  5827#
PATADR	  7064	  7100
PATU40	  5381	  7082	  7090
PATUPC	  5382	  7072	  7086
PC%AFI	  6658
PCU	  5955	  6087	  7248	  7631	  7633
PDBK1	  6717	  6742#
PFL	   976	  1047	  1069	  1074	  1175	  1187	  1265	  1354	  1565	  1855	  1859	  5486	  5561	  5590
	  6888	  6960
PGLPCS	  6619	  7068	  7109	  7209	  7422
PGSIZ	  5332	  5411
PI	   922	  1006	  1135	  1424	  1802	  1843	  4278	  5666	  5685
PI7AC1	   925	   929
PI7P	  1188	  1334	  1817	  1953#	  5578	  6446
PIAC	  5331	  5502	  5503	  5504	  5586	  5952	  5954	  6348	  6390	  6562	  6563	  6564	  6665	  6743
	  6745
PIBMP	  2432	  2660	  2661	  2886	  2887	  3192	  3193	  3286	  3287	  3376	  3377	  3657	  3658	  3780
	  3781	  4451	  4452	  4513	  4514	  5609	  5610	  5612	  6607	  6609
PICPIR	   922
PIDWAT	  3998
PIFL	  1856	  5432	  5589	  5883	  5914	  5928	  5945	  5956	  5963	  5972	  5988	  6011	  6034	  6059
	  6152	  6163	  6173	  6254	  6263	  6308	  6394	  6525	  6536	  6548	  6554	  6557	  6660	  6762
PIITRP	  1437#	  1437	  1439
PIMSK	  1854	  5417	  5511	  5934	  5998
PIOLD2	  5523	  5564
PIOLDS	  5433	  5519	  5553	  5557	  5616	  5894	  5916	  5942	  5969	  6068	  6136	  6276	  6312	  6571
	  6624	  6770	  6897
PIOVFW	  6343	  6351	  6366	  6382	  6412#
PIPC	  5344	  5346	  5430	  5591	  5917	  5935	  5943	  5970	  5999	  6172	  6255	  6310	  6558	  6661
	  6760
PIPDB	  5622
PIPDL	  5505	  5622#	  6565	  6656	  6709
PIRABK	  6055#	  6117
PIRBK1	  6061	  6072#
PIRCOF	  5928#	  6113
PIRJT1	  6036	  6046#
PIRJTP	  6034#	  6115
PIRLG1	  5942#	  6004
PIRLGO	  5963#	  6111
PIRQ	  1858	  5502#
PIRQR	  5434	  5552#	  5950	  5957	  5975	  6025	  6143	  6146	  6176	  6191	  6236	  6299	  6313
PIRSF1	  5885	  5901#
PIRSF2	  5905	  5911#
PIRSFK	  5879#	  6109
PIRSK1	  5887#	  5920	  6442
PISC7	   922#
PISC7A	   953#	  1031
PISC7R	   927	   942	   960	   997	  1013	  1016
PISKED	  1809#	  1809	  1811
PISPIR	  1006	  1135	  1843	  4278
PITEST	  5884	  5979	  5989	  6013	  6035	  6060	  6153	  6582#
PLKV	  3535
PNSKDC	   990	  6584	  7309
POSPGF	  3027	  3526
PPC	  1173	  1185	  1563	  5484	  5559	  5592	  6886	  6958
PPHI	  5147
PPLOW	  5145	  5147
PRELD	  2669
PRELDF	  2662	  2752	  3581	  3596
PRELWT	  2656	  2709	  3521
PRESCD	   588	  7820
PRIMRY	  4209
PRIPST	  3086
PRISET	  5536	  5866#
PSBITS	  6216	  6246	  6288	  6638
PSBUMP	  5094#	  5681	  6990
PSCHNT	  6210	  6240	  6248
PSIBIP	  6233	  6239	  6326	  6616	  6625	  6646	  6667	  6680	  6696
PSIBW	  1531	  5839	  6042	  6130	  6134	  6145	  6155	  6175	  6181	  6184	  6200	  6234	  6298	  6430
	  6437
PSICHA	  6490
PSICHM	  5635	  5838	  6131	  6188
PSICO%	  5538	  6112
PSID1	  6231	  6425#
PSID3	  6289	  6297#
PSIDF1	  5553#	  6508
PSIDF2	  5556	  5564#
PSIDFR	  5909	  5932	  5967	  5995	  6018	  6049	  6074	  6154	  6499#
PSIDP%	  5538	  6118	  6605
PSIGR	  3886	  3912	  5108	  5662#	  5711	  5761	  6893
PSII	  5539	  5840	  6044	  6082#	  6575
PSIIF%	  5538	  5661
PSIJT%	  5538	  6114	  6892
PSILO%	  3885	  5538	  6110	  6605
PSIMB	  6157	  6307#
PSIN1	  6193	  6213	  6243	  6280	  6289	  6293	  6296	  6430#
PSIN2	  6426	  6435#
PSIN3	  6183	  6187	  6189	  6238	  6431#
PSIN5	  6159	  6182#
PSIN6	  6171	  6181#
PSINSK	  6597#	  6597	  6599
PSIPGA	  5332	  5408
PSIPRI	  5107	  5535	  6605
PSIPT	  5333	  6327	  6399	  6681	  6684
PSIR4	  5666#
PSIR61	  5672	  5683#
PSIRQ	  1351	  2461	  4215	  5657#	  5854	  6467	  6480
PSIRQ0	  1533	  5634#
PSIRQB	  5642	  5658#
PSIS10	  6204	  6231#
PSIS2	  6203	  6209#
PSIS3	  6217	  6219#
PSIS4	  6203#	  6222	  6225
PSIS5	  6276#	  6402
PSIS9	  6247	  6254#
PSISC%	  5538	  6120
PSISM	  6257	  6325#
PSISM1	  6361	  6387#
PSISTK	  6419#	  6419	  6421
PSISV0	  6516	  6544#
PSISV1	  5345	  6531#
PSISV2	  6537	  6562#
PSISV3	  6572#	  6668
PSISYS	  5351	  6186	  6190
PSIT	  6471	  6476#
PSIT1	  5530	  5745#
PSIT1%	  5529	  5710	  6605
PSIT11	  5753	  5765#
PSIT12	  5766	  5770	  5776#
PSIT13	  5774	  5779#
PSIT1A	  5752	  5786#	  5808
PSIT1B	  5787#	  5813
PSIT1C	  5804	  5812#	  5817	  5820
PSIT1D	  5797	  5805#	  5821
PSIT1E	  5791	  5807#
PSIT1G	  5801	  5815#
PSIT2	  5532	  5756	  5834#
PSIT2%	  5531	  5760	  6605
PSITL%	  3908	  5533
PSITQ	  5661#
PSITR1	  5538#	  5763	  5768	  5773	  5778	  5781	  5850	  5860	  5873
PSIWT%	  5517	  5521	  5933	  5997
PSKD1	  1760	  2474	  2557	  2565	  2590#	  4060	  4281
PSKED	  1762	  1893	  2473	  2558	  4277
PSLEVT	  6192	  6277	  6291	  6294	  6627	  6644
PSWAPC	  7696	  7925
PSXSIR	  6216	  6217	  6246	  6247	  6288	  6289	  6638	  6639
PTYFIN	  2407
PTYJOB	  7950	  7991	  8026#
PTYTTY	  8028
PWRDWN	   834	  2204
PWRFLE	  2236
PXRESC	   850	  1119	  1121	  1155	  1157	  1210	  1212	  1319	  1321	  1367	  1369	  1421	  1423	  1437
	  1439	  1452	  1454	  1493	  1495	  1522	  1524	  1809	  1811	  1978	  1980	  1989	  1991	  2014
	  2016	  2025	  2027	  2323	  2325	  2529	  2531	  2971	  2973	  3334	  3336	  3627	  3629	  3703
	  3705	  3882	  4117	  4119	  4377	  4379	  5199	  5201	  5214	  5216	  5287	  5289	  5604	  5606
	  5732	  5734	  6419	  6421	  6597	  6599	  6837	  6839	  6970	  6972	  7201	  7203	  7452	  7454
PXSWAP	   850	  1119	  1121	  1155	  1157	  1210	  1212	  1319	  1321	  1367	  1369	  1421	  1423	  1437
	  1439	  1452	  1454	  1493	  1495	  1522	  1524	  1809	  1811	  1978	  1980	  1989	  1991	  2014
	  2016	  2025	  2027	  2323	  2325	  2529	  2531	  2971	  2973	  3334	  3336	  3627	  3629	  3703
	  3705	  3882	  4117	  4119	  4377	  4379	  5199	  5201	  5214	  5216	  5287	  5289	  5604	  5606
	  5732	  5734	  6419	  6421	  6597	  6599	  6837	  6839	  6970	  6972	  7201	  7203	  7452	  7454
Q1	  2137	  2138	  2140	  2141	  2142	  2143	  2145	  2147	  2148	  2152	  2353	  2377	  2381	  2389
	  2492	  2500	  2542	  2548	  3118	  3164	  3169	  3203	  3207	  3213	  3248	  3252	  3470	  3471
	  3472	  3473	  3476	  4171	  4181	  4184	  4228	  4229	  4238	  4344	  4349	  4355	  4357	  4360
	  4362	  4363	  4364	  5749	  5751	  5753	  5754	  5806	  6224	  6241	  6297	  6425	  6639	  6641
	  6642	  6643	  6657	  6658	  6659	  6660	  6685	  6688	  6722	  6723	  6724	  6726	  6730	  6731
Q2	  2353	  2378	  2380	  2381	  2382	  3122	  3138	  3139	  3140	  3175	  3176	  3177	  3178	  3217
	  3229	  3348	  3349	  3350	  3351	  3470	  3472	  3473	  3475	  3476	  4032	  4037	  4038	  4039
	  4041	  4043	  4087	  4093	  4094	  4095	  4097	  4099	  4171	  4172	  4173	  4181	  4183	  4224
	  4226	  4228	  4229	  4230	  4231	  4237	  4288	  4346	  4347	  4348	  4350	  4352	  4353	  5512
	  5518	  5522	  5745	  5746	  5750	  5776	  5779	  5805	  6334	  6335	  6336	  6340	  6341	  6344
	  6444	  6447	  6642	  6644	  6661	  6689
QBIAS	   909	  4935#	  7905
QCLASS	  4939#	  7909
QSUM	  3715	  4910#
QUANTB	  4868#	  4877	  4935
QUANTC	  4882#	  4883	  4886	  4892	  4939
QUANTT	  2426	  3752	  3836	  4878#	  4935	  4939	  4940	  5017	  5022	  5026	  5027	  5057
R	  1133	  2540	  2758	  2795	  2798	  3350	  3407	  3485	  3761	  3777	  3782	  3784	  3867	  4053
	  4128	  4134	  4172	  4230	  4646	  4732	  4831	  4854	  5098	  5788	  7533	  7597
RCVCH7	  1934
RDSIVL	  1768	  1791#	  1873	  1884	  1929	  1947	  3035	  3039	  5289
RECON1	  4037#	  4042
RECONC	  4032#
REEBUG	  1169	  1181	  1257	  1309	  1345	  1359#	  1547	  1557	  5166	  5231	  5481	  6882	  6954
RELLOK	  5123	  5220
REMBS6	  3537#	  3540
REMBS7	  3533	  3541#
REMBSJ	  1233	  2810	  3405#	  5234
REMBSL	  3158	  3271	  3461	  3483#
REMFPB	  1881
REMWS	  2615	  3026	  3231	  3511#
REMWSN	  3535#	  5235
REORDR	  4646#	  4650
RETZ	  1792
RJATIM	  2066	  2101
RJAV	  2105	  2119
RJAVS1	  2103	  2104
RJAVS2	  2108	  2109
RJAVS3	  2113	  2114
RJTSUM	  2044	  2102
RJTTIM	  2036	  2040
RPQSUM	  2056
RSCODZ	  1195
RSKCH1	   865	  1006#
RSKCHK	   864	   866	   923	   926	   928	  1002
RSKED	   978	   989	   996	  1071	  1073	  1122	  1158	  5379
RSKEDN	   977	  1001#	  5378
RSKEDT	   995	  1002#	  1072
RSKP	  2659	  2693	  2803	  3399	  3598	  3601	  3785	  4054	  4419	  4430	  4852	  5324	  5984	  6585
	  6599	  6611	  6922	  7594	  7598	  7617	  7620	  7654	  7657	  7660	  7687	  7887	  8036
RTG1	  3742	  3796#
RTG2	  3753#	  3837
RTG3	  3803	  3814#
RTREM	  3086
RUNT2	  3864	  3866	  3943	  3957
RWSOKF	  2821	  2844	  2975
SAVCT	  6335	  6757	  6769#	  6779
SAVQ	  2340	  3347	  4167	  4340
SAVR12	  3732#
SAVR66	  3836#
SAVRT	  1217	  1261	  3637#	  3762
SAVRT5	  3813	  3823#
SAVRT6	  3829	  3834#
SAVRT7	  3804#
SAVRT8	  3733#	  3804	  3825
SAVRT9	  3751#	  3818	  3827
SAVT	  2312	  3883	  4773	  5618	  7564	  7571	  7607
SC%OPR	  7703	  7872
SC%WHL	  7703	  7872
SCDCHN	   922	  1006	  1135	  1843	  4278
SCDIN	   833#
SCDIN0	   901#	   908
SCDNL1	  1761	  1764	  1767#
SCDNL2	  1760#	  1765
SCDNUL	  1759#	  1833
SCDR	   939	  1036#
SCDRN1	   883	  1920	  2257
SCDRQ7	  2312#
SCDUUO	   850#	   850
SCDW	   944	   989#	  1028
SCDW1	   991	   995#
SCH0	  1782	  1818#
SCHC1	  2164#	  2172
SCHED0	   982	  1237	  1286	  1355	  1802#	  2230	  2246	  2299	  5292	  5554	  5562
SCHED4	  1840#	  1851	  1860
SCHED5	  1835	  1848#
SCHEDA	  4225	  4228#	  4236
SCHEDB	  4229#	  4240
SCHEDJ	  4101	  4185	  4239	  4244#
SCHEDP	  1253#
SCHEDR	  1305#
SCHFLG	   837	  1820	  1880	  1910	  1935	  2416	  4088	  4258	  4490	  7745
SCHP1	  1260#	  1322	  1551
SCHP2	  1285	  1297#	  3764
SCHP3	  1246	  1277#
SCHPF0	   613#	  2238
SCHPRF	  2205	  2234#
SCHUPC	  1830	  1864#
SCKATM	   936	   994	  1024	  1026	  1053	  1055	  1829	  1914
SCLD.0	  2075#	  2089	  2096
SCLD.1	  2073	  2084#
SCLD.2	  2085	  2090#
SCLDAV	  1928	  2035#
SCSBCQ	   617#	  5375
SCSBDQ	   617#	  5363
SCSBEQ	   617#	  5367
SCSBMQ	   617#	  5359
SCSBXQ	   617#	  5371
SCSPS0	   618#	  5354
SCSPS1	   618#	  5355
SCSPSI	   618#	  6020
SCSSPC	  6011#	  6121
SCSTCQ	   617#	  5373	  5374
SCSTDQ	   617#	  5361	  5362
SCSTEQ	   617#	  5365	  5366
SCSTMQ	   617#	  5357	  5358
SCSTXQ	   617#	  5369	  5370
SCTLW	   881	  2208	  2210	  2253	  2266
SCWAIT	  2223	  2264#
SETBKT	  1676	  1686#	  1718
SETCL0	  4816	  4828#
SETCLS	  4813#
SETIB1	  3433	  3438	  3452#
SETIB2	  3430	  3434	  3439#
SETIBS	  3263	  3265	  3290	  3396	  3425#
SETJSB	  7959
SETLF1	  6810
SETMON	   955	  1050	  6533	  6546
SETPAG	  1051	  1059
SETPCV	  6169	  7630#
SETPPG	  1902	  2508
SETPRF	  5107#
SETPRP	  3220	  3275	  3307#
SETPSK	  2227	  2235	  2269	  5237
SETUSR	  1049	  7405
SF%CRD	   889
SF%DOK	  4851	  7886
SF%FAC	   889
SF%LCL	  3665
SF%MS1	   889
SF%RMT	  3665
SFEXO	   761#	  7060	  7263
SFX	  4307
SHLTW	   630#	   882	  2206	  2251
SHRMIN	   698#	  7842
SHRPTR	  5463
SIADR	  6247
SILEV	  6217
SK%ACT	  7912	  8049
SK%CL1	  4490	  4491
SK%CYT	  1912	  1937
SK%DRG	  8053
SK%HQR	  3100
SK%HT1	  3429
SK%HT2	  3266
SK%IOC	  2737
SK%RQ1	  5083
SK%RSQ	  4258	  4259
SK%STP	  7903	  8044
SK%TOP	  4997
SK%TTP	  4991
SK%WCF	  5004	  5040
SK%WDF	  7916	  8051
SKCB2	  2494	  2500#
SKCB5	  2490#	  2501
SKDBQT	   664#	  3815
SKDBRM	  2599#	  2788
SKDBSK	  2600#	  2802
SKDCL1	  1367#	  1367	  1369
SKDDQ1	  7990#	  8010
SKDDQ2	  7992	  7996	  8003	  8006	  8009	  8010#
SKDFIL	  1777
SKDFKS	  2529#	  2529	  2531
SKDFL	  1254	  1264	  1306	  1544
SKDFST	  2475	  2531	  2591#	  2783
SKDIDL	  1779	  2071	  2088	  2091	  4576
SKDJ2	  2483	  2486	  2496	  2499	  2505#
SKDJ3	  2484	  2497	  2546	  2634#	  3599
SKDJ3X	  2663	  2692#
SKDJFC	  2535	  2608#
SKDJOB	  1832	  2473#	  2625
SKDLCY	   662#	  1936
SKDLOG	  4845#
SKDLST	  1794	  1795	  1887	  1950	  3042	  3849
SKDLV8	  1865	  1872#	  2584
SKDON0	  7776	  7811#
SKDONE	  7763	  7766	  7770	  7773	  7799	  7802	  7805	  7808	  7812#
SKDOVH	  2079
SKDPC	  1255	  1307	  1545
SKDPDL	  1953
SKDRC0	  8045	  8052#
SKDRCB	  7716	  7926#
SKDRCP	  7720	  8040#
SKDRCS	  7711	  7750#
SKDRDQ	  7718	  7975#
SKDRNB	  7709	  7727#
SKDRTJ	  7715	  7780#
SKDS11	  7841	  7845#
SKDSB1	  7949#	  7970
SKDSB2	  7960	  7969#
SKDSB3	  7951	  7970#
SKDSC0	  7906	  7918#
SKDSC1	  7838#	  7839
SKDSCB	  7717	  7936#
SKDSCL	  7713	  7898#
SKDSCS	  7712	  7821#
SKDSCY	   661#	   993	  1911
SKDSHK	  2561	  2583#	  2588
SKDSHN	  2574	  2603#
SKDSHQ	  2573	  2598#
SKDSHS	  2575	  2597#
SKDSJ1	  7890#
SKDSJC	  7714	  7853#
SKDSNB	  7710	  7736#
SKDSWP	  1771	  2076
SKDTHS	  1874	  1886	  1930	  1949	  3036	  3041
SKDTM0	  2075
SKDTM1	  2078
SKDTM2	  2081
SKDTRP	  1421#	  1421	  1423
SKDX1	  7856
SKED1	  7702	  7706#
SKEDF1	   938	  1037	  1842
SKEDF3	   932	   937	   941	  1070	  1134	  1763	  1821	  4276
SKEDFC	   935	  2532	  2624
SKEDSW	  1267	  1372	  6091	  7160	  7231	  7296	  7347	  7368
SKFLDF	   739#	   836	   852
SKFLGV	   729#	   749	   852	  7744
SKJFC1	  2609#	  2617
SKMRTN	  1725	  1752	  7338#
SKPCT	   674#
SLOWF	  1441	  5385	  6401	  6587	  6662	  6763	  6857	  7152	  7221	  7227	  7311	  7346	  7459	  7475
	  7503	  7515
SMLSTM	   666#
SNBLKS	  3419
SNPBPP	  1021	  1022
SNPBPS	  1022
SNPCNT	   946
SNPDPS	  1022
SNPLST	  5350
SNPPGS	  5349
SNPSV1	  1012	  1027	  1030
SNRSUM	  2053
SOSNEB	  2692	  2765#	  3523
SP1	  4307
SP2	  4307
SPC1	  2344
SPMLCK	  3243	  3355
SPT	  3538
SPTC	  2343
SPTX	  5464
SRQBAD	  2323#	  2323	  2325
SRTTIM	  5454
SSIZE	  3418
SSKED	   886	  1039	  1299	  2476	  2534
STADYN	  2276
STANSW	  5700	  5718	  5721
STCJOB	  5730
STEPFH	  2842	  2852#
STEPH1	  2853#	  2866
STEPH2	  2854	  2866#
STEPTC	  2850#	  2856	  2864
STIMES	  3897
STRCLS	  4682#	  7910
STTOPF	  5447	  5727
SUMBNR	  3076	  3320	  3325	  3336	  3393	  3435	  3453	  3464	  3505
SUMNR	  2051	  2825	  2956	  2961	  2973	  2997	  3004	  3011	  3503	  3543	  3579
SUMNR1	  3334#	  3334	  3336
SUMNR2	  2971#	  2971	  2973
SUPCHN	  5638	  6133	  6182
SUPERP	  4129	  5826#	  6454	  6477
SUPFX	  4192
SUPU1	  4204	  4207#
SUPUB0	  4213#
SUPUNB	  1221	  4192#
SUPUX	  4198	  4201	  4208#
SUSFK%	  5538	  5881	  6108	  6605
SUSFKT	  5896
SUSWT	  3981	  5886	  5919	  5922#
SWCRSH	  2207	  2251#
SWHLT	  2215	  2220	  2226#
SWHLT2	  2285	  2289#
SWHLT4	  2229#	  2288
SWHLT5	  2277	  2284#
SWPIN0	  3588
SWPINT	  1281	  2658	  2711	  3522	  3529	  3573
SWPRT	  1282	  2712	  2717
SWRS11	  2217	  2242#
SWRUN2	  2257#
SWTST	  1895	  2204#
SWTST1	  2218#	  2221	  2222	  2259	  2267
SWTT	  2213	  2220#	  2224
SYMSEC	   850	  1121	  1157	  1212	  1321	  1369	  1423	  1439	  1454	  1495	  1524	  1811	  1980	  1991
	  2016	  2027	  2325	  2531	  2973	  3336	  3629	  3705	  3882	  4119	  4379	  5201	  5216	  5289
	  5606	  5734	  6421	  6599	  6839	  6972	  7203	  7454
SYSFK	  4131	  5754	  5792	  6456	  6479	  6891	  6952	  7059	  7262
SYSIFG	   833
T1	   838	   851	   852	   853	   854	   856	   857	   858	   860	   861	   863	   864	   865	   866
	   867	   868	   869	   887	   894	   901	   902	   903	   904	   905	   912	   925	   926	   927
	   929	   960	   969	   976	  1012	  1013	  1014	  1016	  1017	  1018	  1021	  1022	  1024	  1025
	  1026	  1027	  1030	  1053	  1054	  1055	  1193	  1212	  1242	  1280	  1281	  1282	  1284	  1297
	  1336	  1337	  1338	  1350	  1462	  1463	  1464	  1499	  1522	  1569	  1662	  1663	  1664	  1668
	  1669	  1670	  1671	  1743	  1746	  1747	  1748	  1751	  1771	  1777	  1797	  1798	  1852	  1855
	  1856	  1857	  1859	  1874	  1885	  1886	  1887	  1888	  1889	  1896	  1897	  1911	  1913	  1922
	  1923	  1924	  1930	  1948	  1949	  1950	  1958	  1959	  1960	  1961	  1963	  1964	  1980	  1989
	  1992	  1993	  1994	  1997	  1999	  2000	  2016	  2025	  2027	  2028	  2029	  2039	  2040	  2041
	  2042	  2043	  2044	  2045	  2046	  2047	  2048	  2049	  2050	  2051	  2052	  2053	  2054	  2055
	  2056	  2057	  2058	  2059	  2060	  2061	  2062	  2068	  2069	  2071	  2072	  2074	  2075	  2076
	  2077	  2078	  2079	  2080	  2081	  2086	  2087	  2090	  2091	  2092	  2093	  2094	  2100	  2101
	  2102	  2103	  2104	  2107	  2108	  2109	  2112	  2113	  2114	  2119	  2120	  2129	  2130	  2131
	  2140	  2144	  2145	  2159	  2160	  2165	  2169	  2208	  2214	  2216	  2314	  2325	  2341	  2377
	  2389	  2390	  2397	  2399	  2400	  2410	  2411	  2425	  2426	  2444	  2445	  2446	  2447	  2453
	  2478	  2479	  2481	  2482	  2493	  2494	  2495	  2543	  2544	  2635	  2644	  2645	  2648	  2650
	  2651	  2655	  2656	  2666	  2667	  2668	  2674	  2679	  2680	  2681	  2683	  2684	  2685	  2687
	  2688	  2691	  2702	  2715	  2723	  2730	  2739	  2741	  2742	  2751	  2756	  2759	  2765	  2778
	  2785	  2825	  2826	  2827	  2828	  2830	  2831	  2832	  2833	  2835	  2837	  2838	  2840	  2841
	  2885	  2888	  2890	  2892	  2895	  2901	  2904	  2906	  2908	  2927	  2928	  2929	  2931	  2932
	  2938	  2940	  2943	  2946	  2948	  2977	  2978	  2980	  2987	  2992	  2994	  2996	  2997	  2998
	  3015	  3016	  3036	  3040	  3041	  3042	  3075	  3076	  3078	  3079	  3102	  3103	  3105	  3107
	  3109	  3114	  3115	  3116	  3143	  3145	  3156	  3160	  3161	  3162	  3163	  3168	  3206	  3210
	  3211	  3249	  3250	  3251	  3253	  3261	  3281	  3282	  3289	  3299	  3300	  3310	  3313	  3338
	  3339	  3340	  3342	  3381	  3382	  3391	  3392	  3393	  3394	  3409	  3412	  3413	  3431	  3432
	  3434	  3435	  3436	  3437	  3443	  3444	  3445	  3446	  3447	  3448	  3450	  3451	  3452	  3453
	  3462	  3463	  3464	  3483	  3484	  3487	  3490	  3499	  3500	  3501	  3502	  3504	  3515	  3516
	  3521	  3522	  3538	  3539	  3552	  3553	  3554	  3555	  3565	  3566	  3580	  3582	  3583	  3584
	  3593	  3594	  3607	  3608	  3612	  3627	  3630	  3631	  3632	  3639	  3643	  3645	  3647	  3648
	  3649	  3651	  3652	  3656	  3659	  3661	  3662	  3666	  3667	  3669	  3678	  3712	  3715	  3716
	  3717	  3718	  3724	  3774	  3778	  3784	  3849	  3852	  3853	  3854	  3856	  3857	  3860	  3861
	  3868	  3885	  3889	  3890	  3892	  3920	  3928	  3929	  3930	  3931	  3932	  3940	  3941	  3942
	  3943	  3944	  3945	  3954	  3955	  3956	  3957	  3960	  3972	  3973	  3975	  3978	  3979	  3981
	  4010	  4076	  4126	  4127	  4128	  4129	  4130	  4131	  4152	  4157	  4158	  4159	  4175	  4213
	  4222	  4223	  4233	  4266	  4271	  4274	  4311	  4318	  4325	  4330	  4331	  4400	  4402	  4405
	  4407	  4415	  4416	  4418	  4425	  4426	  4428	  4442	  4443	  4444	  4445	  4448	  4456	  4485
	  4494	  4497	  4498	  4504	  4506	  4518	  4519	  4528	  4529	  4547	  4555	  4557	  4576	  4577
	  4578	  4579	  4580	  4591	  4592	  4593	  4594	  4596	  4597	  4598	  4599	  4602	  4604	  4605
	  4607	  4622	  4623	  4624	  4625	  4627	  4628	  4631	  4638	  4639	  4640	  4661	  4662	  4694
	  4696	  4697	  4698	  4699	  4700	  4702	  4704	  4705	  4706	  4724	  4725	  4727	  4731	  4732
	  4733	  4742	  4758	  4779	  4780	  4785	  4794	  4795	  4801	  4805	  4807	  4814	  4821	  4826
	  4827	  4828	  4833	  4834	  4835	  4838	  4852	  4935	  4939	  4940	  4978	  4979	  4980	  4981
	  4982	  4986	  5011	  5012	  5013	  5014	  5016	  5017	  5022	  5024	  5026	  5027	  5030	  5031
	  5036	  5050	  5060	  5064	  5066	  5071	  5072	  5073	  5074	  5076	  5082	  5085	  5107	  5119
	  5122	  5125	  5171	  5175	  5206	  5216	  5219	  5222	  5224	  5264	  5269	  5270	  5271	  5272
	  5290	  5291	  5298	  5332	  5337	  5338	  5343	  5344	  5358	  5359	  5362	  5363	  5366	  5367
	  5370	  5371	  5374	  5375	  5396	  5397	  5398	  5399	  5400	  5401	  5407	  5412	  5431	  5432
	  5442	  5443	  5444	  5445	  5448	  5450	  5454	  5455	  5457	  5459	  5460	  5462	  5464	  5467
	  5468	  5469	  5470	  5471	  5560	  5561	  5574	  5575	  5580	  5661	  5662	  5710	  5726	  5748
	  5758	  5759	  5779	  5789	  5807	  5809	  5812	  5834	  5848	  5849	  5852	  5857	  5858	  5859
	  5868	  5869	  5870	  5871	  5895	  5896	  5898	  5903	  5904	  5911	  5913	  5914	  5915	  5917
	  5928	  5933	  5934	  5940	  5943	  5948	  5953	  5955	  5956	  5963	  5968	  5970	  5988	  5997
	  5998	  6003	  6011	  6034	  6040	  6041	  6042	  6055	  6057	  6058	  6059	  6069	  6086	  6087
	  6088	  6102	  6103	  6158	  6163	  6164	  6166	  6167	  6173	  6181	  6203	  6209	  6263	  6289
	  6290	  6307	  6308	  6311	  6392	  6393	  6394	  6400	  6465	  6550	  6554	  6617	  6639	  6695
	  6700	  6809	  6811	  6839	  6840	  6842	  6843	  6851	  6892	  6898	  6927	  6928	  6932	  6934
	  6952	  6976	  7000	  7002	  7003	  7008	  7025	  7026	  7041	  7047	  7058	  7059	  7060	  7064
	  7065	  7067	  7070	  7072	  7081	  7082	  7084	  7086	  7089	  7090	  7098	  7100	  7101	  7106
	  7108	  7111	  7113	  7122	  7123	  7125	  7127	  7130	  7131	  7139	  7141	  7142	  7228	  7229
	  7239	  7240	  7247	  7248	  7250	  7251	  7261	  7262	  7263	  7292	  7325	  7326	  7328	  7329
	  7501	  7513	  7530	  7565	  7569	  7572	  7580	  7609	  7610	  7611	  7612	  7613	  7614	  7615
	  7616	  7618	  7619	  7632	  7648	  7649	  7650	  7651	  7652	  7653	  7655	  7656	  7658	  7659
	  7698	  7699	  7700	  7701	  7705	  7706	  7707	  7719	  7729	  7730	  7731	  7738	  7742	  7752
	  7760	  7782	  7787	  7788	  7790	  7793	  7795	  7796	  7797	  7803	  7823	  7829	  7830	  7831
	  7832	  7834	  7835	  7840	  7844	  7845	  7846	  7856	  7859	  7860	  7861	  7864	  7866	  7868
	  7870	  7874	  7876	  7877	  7880	  7887	  7890	  7900	  7908	  7911	  7913	  7914	  7915	  7917
	  7928	  7929	  7930	  7931	  7940	  7941	  7942	  7943	  7944	  7945	  7946	  7947	  7954	  7956
	  7958	  7961	  7980	  7981	  7982	  7983	  7984	  7986	  7994	  7997	  8004	  8030	  8042	  8044
	  8046	  8049	  8051	  8053	  8054
T2	   900	   901	   905	   906	   907	   971	   973	  1085	  1191	  1193	  1195	  1227	  1231	  1232
	  1403	  1463	  1522	  1664	  1670	  1671	  1672	  1678	  1720	  1748	  1749	  1750	  1751	  1773
	  1775	  2035	  2036	  2037	  2043	  2046	  2049	  2052	  2055	  2058	  2061	  2105	  2110	  2115
	  2130	  2141	  2142	  2143	  2144	  2148	  2149	  2150	  2163	  2164	  2170	  2278	  2280	  2283
	  2314	  2315	  2326	  2366	  2367	  2368	  2369	  2370	  2371	  2372	  2373	  2375	  2378	  2399
	  2634	  2637	  2682	  2683	  2684	  2685	  2686	  2709	  2717	  2721	  2777	  2780	  2893	  2894
	  2898	  2933	  2934	  2935	  2936	  3004	  3005	  3007	  3008	  3011	  3012	  3144	  3145	  3372
	  3379	  3410	  3411	  3412	  3413	  3440	  3442	  3447	  3448	  3449	  3450	  3484	  3485	  3486
	  3487	  3489	  3490	  3498	  3499	  3503	  3505	  3539	  3541	  3580	  3606	  3609	  3627	  3629
	  3630	  3631	  3640	  3641	  3642	  3664	  3665	  3670	  3671	  3672	  3675	  3676	  3680	  3703
	  3714	  3715	  3723	  3724	  3727	  3732	  3734	  3735	  3744	  3745	  3748	  3749	  3817	  3863
	  3871	  3882	  3884	  3887	  3890	  3891	  3910	  3911	  3958	  3959	  3960	  3976	  3983	  3984
	  4009	  4012	  4075	  4078	  4126	  4136	  4150	  4158	  4174	  4177	  4202	  4205	  4214	  4232
	  4235	  4266	  4273	  4274	  4312	  4326	  4399	  4402	  4415	  4417	  4418	  4425	  4427	  4428
	  4439	  4445	  4446	  4447	  4449	  4453	  4455	  4458	  4485	  4487	  4495	  4497	  4502	  4537
	  4538	  4539	  4540	  4542	  4629	  4630	  4632	  4633	  4660	  4661	  4663	  4721	  4722	  4734
	  4736	  4739	  4741	  4750	  4755	  4772	  4775	  4777	  4780	  4787	  4794	  4795	  4801	  4802
	  4803	  4804	  4806	  4822	  4836	  4837	  4852	  4995	  4996	  4998	  4999	  5007	  5008	  5009
	  5010	  5011	  5012	  5017	  5021	  5046	  5057	  5058	  5059	  5061	  5062	  5075	  5076	  5120
	  5121	  5124	  5138	  5139	  5144	  5163	  5164	  5169	  5170	  5171	  5172	  5173	  5174	  5176
	  5177	  5180	  5181	  5217	  5218	  5221	  5408	  5410	  5411	  5441	  5443	  5446	  5449	  5450
	  5456	  5457	  5458	  5460	  5461	  5463	  5464	  5465	  5516	  5518	  5519	  5520	  5522	  5523
	  5564	  5565	  5705	  5709	  5715	  5716	  5722	  5759	  5772	  5777	  5789	  5790	  5794	  5799
	  5810	  5811	  5815	  5818	  5849	  5850	  5851	  5852	  5853	  5888	  5889	  5944	  5945	  5946
	  5949	  5952	  5953	  5954	  5971	  5972	  5981	  5982	  6103	  6167	  6209	  6289	  6294	  6309
	  6310	  6367	  6368	  6372	  6373	  6466	  6617	  6639	  6655	  6657	  6659	  6683	  6687	  6688
	  6696	  6697	  6698	  6701	  6736	  6737	  6812	  6813	  6890	  6891	  6929	  6933	  6972	  6973
	  6974	  6975	  6998	  7006	  7026	  7027	  7029	  7031	  7042	  7048	  7074	  7081	  7083	  7084
	  7087	  7088	  7089	  7091	  7093	  7098	  7115	  7122	  7124	  7125	  7128	  7129	  7130	  7132
	  7134	  7139	  7249	  7250	  7329	  7531	  7532	  7555	  7557	  7568	  7569	  7570	  7588	  7591
	  7610	  7612	  7613	  7634	  7649	  7650	  7700	  7705	  7719	  7727	  7729	  7731	  7736	  7738
	  7739	  7740	  7741	  7742	  7743	  7744	  7745	  7750	  7752	  7756	  7757	  7760	  7780	  7782
	  7786	  7787	  7793	  7796	  7813	  7815	  7821	  7823	  7826	  7829	  7832	  7835	  7841	  7842
	  7844	  7846	  7856	  7857	  7859	  7860	  7868	  7874	  7877	  7878	  7879	  7880	  7887	  7889
	  7890	  7898	  7900	  7902	  7908	  7926	  7928	  7931	  7938	  7940	  7941	  7944	  7949	  7953
	  7962	  7966	  7977	  7978	  7981	  7990	  7997	  7998	  8000	  8001	  8007	  8029	  8030	  8033
	  8040	  8042	  8054
T3	   971	   972	  1222	  1223	  1224	  1227	  1228	  1229	  1230	  1468	  1503	  2128	  2129	  2131
	  2132	  2162	  2163	  2166	  2171	  2172	  2345	  2350	  2355	  2359	  2374	  2375	  2376	  2400
	  2510	  2511	  2512	  2741	  2742	  2757	  2758	  2759	  2760	  2855	  2856	  2862	  2864	  2865
	  2956	  2959	  2961	  2971	  3320	  3323	  3325	  3334	  3613	  3627	  3719	  3720	  3721	  3722
	  3723	  3726	  3727	  3740	  3742	  3743	  3744	  3745	  3746	  3747	  3748	  3749	  3796	  3804
	  3810	  3814	  3815	  3816	  3891	  3892	  4150	  4159	  4291	  4293	  4296	  4298	  4299	  4300
	  4313	  4314	  4320	  4331	  4403	  4481	  4510	  4511	  4515	  4586	  4589	  4590	  4592	  4596
	  4600	  4601	  4602	  4603	  4617	  4620	  4621	  4623	  4627	  4630	  4631	  4632	  4634	  4636
	  4754	  4755	  4777	  4778	  4783	  4805	  4806	  4807	  4837	  4838	  4852	  5020	  5021	  5022
	  5026	  5027	  5039	  5041	  5042	  5043	  5044	  5046	  5058	  5063	  5064	  5066	  5694	  5696
	  5698	  5701	  5704	  5708	  5709	  5715	  5799	  5800	  5802	  5803	  5919	  6172	  6174	  6175
	  6697	  6852	  7005	  7006	  7025	  7027	  7028	  7029	  7080	  7121	  7293	  7332	  7502	  7514
	  7531	  7532	  7534	  7578	  7579	  7582	  7584	  7586	  7588	  7589	  7591	  7596	  7630	  7631
	  7633	  7635	  7638	  7727	  7728	  7736	  7737	  7750	  7751	  7753	  7754	  7755	  7756	  7762
	  7763	  7765	  7766	  7769	  7770	  7772	  7773	  7775	  7780	  7781	  7783	  7784	  7785	  7786
	  7798	  7799	  7801	  7802	  7804	  7805	  7807	  7808	  7810	  7811	  7812	  7814	  7815	  7821
	  7822	  7825	  7837	  7838	  7839	  7857	  7858	  7872	  7873	  7887	  7898	  7899	  7926	  7927
	  7938	  7939	  7952	  7953	  7977	  7979	  7993	  8040	  8041	  8052	  8053
T4	  2164	  2165	  2166	  2167	  2169	  2170	  2636	  2779	  2884	  2889	  2891	  2896	  2905	  2916
	  2920	  2922	  2954	  2957	  2959	  2971	  2973	  3120	  3121	  3161	  3168	  3230	  3232	  3250
	  3318	  3321	  3323	  3334	  3336	  3528	  3536	  3537	  3540	  3605	  3607	  3610	  3611	  3736
	  3737	  3740	  3743	  3746	  3796	  3843	  3844	  3845	  3919	  3927	  3939	  3953	  4011	  4077
	  4176	  4234	  4314	  4315	  4316	  4320	  4332	  4397	  4398	  4399	  4481	  4540	  4541	  4542
	  4718	  4719	  4721	  4723	  4750	  4760	  4852	  5308	  5704	  5705	  5748	  5765	  5767	  5769
	  5771	  5772	  5790	  5855	  6212	  6217	  6218	  6242	  6247	  6248	  6289	  6290	  6291	  6292
	  6395	  6398	  6682	  6689	  6725	  6874	  6875	  6876	  6877	  6878	  6984	  7003	  7004	  7005
	  7013	  7534	  7535	  7536	  7538	  7540	  7541	  7544	  7545	  7547	  7549	  7550	  7556	  7558
	  7559	  7561	  7562	  7563	  7570	  7608	  7609	  7634	  7635	  7636	  7637	  7703	  7704	  7761
	  7762	  7764	  7765	  7768	  7769	  7771	  7772	  7774	  7775	  7800	  7801	  7803	  7804	  7806
	  7807	  7809	  7810	  7813	  7814	  7863	  7866	  7887	  7948	  7949	  7970	  7985	  7987	  7988
	  7989	  7990	  8010
TADIDT	   885
TAMQB2	  5028#	  5029
TAMWTC	  2646#
TBASE	  4445	  4918#
TCITST	  3969	  4998
TCOTST	  3972	  4995
TDIS1	  1658	  1676#
TDIS2	  1673#	  1679
TFTEST	  5929	  5964	  5979#
TIM2	  1897	  1940	  1941
TIMCHN	  5852
TIMCNT	  2369
TIMFRK	  5853
TIMTIM	  3901	  3906
TLEINT	  5534	  5848#
TODCLK	  1239	  1277	  1570	  1580	  1659	  1688	  1699	  1888	  1896	  1939	  1960	  1992	  2027	  2035
	  2039	  2065	  2068	  2428	  2642	  2677	  2700	  2837	  3078	  3338	  3593	  3670	  3675	  3754
	  3799	  3807	  3966	  4178	  4442	  4537	  4638	  4978	  5061
TRAPC	  5387
TRAPFL	  5506	  5581	  6566
TRAPPC	  5508	  5583	  6568
TRAPSI	  6797#	  7062	  7271
TRMCD	  5709	  5759
TRMCOD	  5745	  5758	  5834
TRMINT	   634#	  4213	  6470
TRMLST	  3989	  4200
TRMTS1	  3987	  4203	  5555
TRMTST	  3988
TRPSI2	  6801#	  6806	  6814	  6824
TRPSI4	  6812#	  6816
TRPSI5	  6824#
TRPSI6	  6802	  6828#
TRPSI7	  6841	  6857#
TRPSIE	  6837#	  6837	  6839
TRYLD0	  3375	  3378	  3391#
TRYLD2	  3389	  3395	  3401#
TRYLDF	  3360	  3372#
TSKED	  1891	  4059	  4227
TSTBAL	  2537	  3075#
TSTBL1	  3077	  3081#
TSTERJ	  7324	  7607#
TSTFRP	   614#	  3245	  3357
TSTGCC	  2822
TTABRT	  2402
TTCH7	  1879	  2279
TTDAS1	  5214#	  5214	  5216
TTEMES	  2275	  2403
TTILST	  3970
TTOAV	  3975
TTOBET	  3973	  4996
TTOLST	  3976	  4226
TTPSER	  5702	  5726#
TTPSNJ	  5732#	  5732	  5734
TTPSR1	  5708#	  5723
TTPSR2	  5706	  5713#
TTPSRQ	  5694#
TTPSRX	  5696#	  5699	  5714	  5717	  5734
TTSOBE	  2281
TTSPSI	  5776
TTYBKS	  4244
TTYDAS	  5117
TTYN	  8026
TWAKER	  1747#	  1749
U10501	  6864	  7061	  7064#
UACB	  5334	  6360	  6372	  6377	  6722	  6730	  6731	  7294	  7439
UBBAD	  4038	  4091	  4094	  4104#
UCLOC1	  3895	  3900#
UCLOC2	  3896#	  3902	  3904	  3915
UCLOC3	  3846	  3850#
UCLOCK	  1828	  3638	  3842#	  4774
UDWDON	  2726
UIOF	  6658
UJSYS	  7047#	  7260
UJSYS0	  7046#
UMODF	   969	  1014	  1048	  1464	  1499	  5946	  6164	  6256	  6550	  6582	  6658	  6685	  7229	  7239
	  7359	  7530	  7632	  7685
UMUUOW	  1456
UNBF1	  4074	  4079	  4081#	  4156	  4160
UNBF2	  4075#	  4161
UNBFNF	  4117#	  4117	  4119
UNBLK1	  4014	  4023	  4080	  4087#	  4138	  4207	  5678	  7014
UNBLK2	  4093#	  4098
UNBLK3	  4035	  4046	  4102#	  4119
UNBLKF	  4068#
UNMIDX	  5130
UNPIR	  5552	  5575#
UNPIRN	  5574#	  5890	  6067	  6445	  6503
UNPIRX	  5604#	  5604	  5606
UPDL	  6166	  6340	  6391	  6395	  6750	  6752	  7663	  7664
UPDTCK	  1335	  1818	  1841	  2554
UPP	  5330	  6389	  6664	  6861	  7242	  7279	  7663#
UPP1	  7664#
UPSHR	  5424
USRCTX	  5485	  5973	  6393	  6400
USRTIM	  3889	  4573	  5291
UTLEXP	   669#	  4593	  4624
UTLINI	   668#	   860	  3442	  4593	  4624
UTLINT	   623#	   861	  4639
UTLOCK	   945
UTLTIM	   623#	   862	  2069	  4640
UTLTMI	   667#	   860	  3442
UTREP	  1017
UTREPE	  1018
UU1050	  7053#
VMADR	  6618	  7067	  7108	  7208	  7421
VSECNO	  7249	  7557	  7568	  7634
W1	  2808	  2808#	  2809	  2812	  2815	  4572	  4572#	  4585	  4586	  4588	  4591	  4597	  4598	  4600
	  4601	  4607	  4608	  4614	  4615	  4617	  4619	  4622	  4628	  4629	  4636	  4637	  4644	  4646
	  4647	  4648	  4652	  4684	  4684#	  4711	  7682	  7682#	  7683	  7684	  7685	  7689
W2	  4572	  4572#	  4573	  4574	  4575	  4580	  4581	  4590	  4621	  4652
W3	  4572	  4572#	  4652
WAKSUP	  4125#	  5897
WFORKA	  5558
WSMCHK	  2538	  2587	  2821#
WSMCK1	  2839	  2844#
WSMG0	  2918	  2924#	  3002	  3029
WSMG1	  2939	  2942	  2944	  2947	  2950#
WSMG2	  2931#	  2950
WSMG3	  2990	  2999	  3001	  3022	  3031#
WSMG4	  2981	  3004#
WSMG5	  2995	  3000#
WSMG6	  2976	  2983	  2986	  2989#	  3009	  3013	  3019
WSMG7	  2988	  3021#
WSMG8	  2977#
WSMGR	  2836	  2843	  2914#
WSMGS1	  2918#	  2922
WSMPER	  2819#	  2840
WSMSNR	  2914
WSMSUP	  2914
WSMTIM	  2838	  2841	  3398
WSSWPO	  3531
WT2LST	  3999
WTCHK	  2583	  4222#
WTCON1	  3971	  3977	  3986	  3990	  3997	  4000	  4003#
WTCON2	  2813	  3968#	  4045
WTCON3	  3980	  3983#
WTCONC	  1235	  2392	  3966#
WTFPGS	  5162	  5296#
WTLST	  4001	  4224
WTSPT	  5136	  5161	  5297	  5299	  5308#
WTSPT2	  5309#	  5317
WTSPTT	  5310	  5314	  5321#
WTTIM	  4223
XCKLP	  2293
XCKNI	  2295
XGCCHK	  2514
XS%EEV	  7070	  7111
XX	  4918#	  4922	  4923	  4923#	  4924	  4924#	  4925	  4925#	  4926	  4926#	  4927	  4927#	  4928	  4928#
	  4929	  4929#
$AJBBS	  3086#
$AJBLF	  3086#
$AJLOD	  3086#
$BSCRS	  3189#	  3283#	  3373#	  3775#
$BSNSK	  3189#	  3775#	  4482#
$BSNST	  2704#	  4984#
$BSOVR	  2704#	  3705#	  4984#
$BSSPQ	  3775#
$BSWTB	  2672#	  2697#	  3511#	  3570#
$CLASS	  7936#
$CLSAC	  4829#	  4845#	  7853#	  7914#	  8047#
$CLSBD	  4817#	  7984#	  8052#
$CLSBT	  4826#	  7929#	  7945#
$CLSDF	  2374#
$CLSKV	   853#	  7730#	  7743#
$CLSNU	  4813#
$CSTOF	  3607#
$DCMAX	  5468#
$EAENT	  3637	  4069	  5659
$FK2DT	  4417#	  4427#
$FKABK	  6064#	  6072#
$FKAGE	  2445#
$FKBET	  2757#	  2760#	  3143#	  3157#	  3269#	  3451#	  3457#	  3459#
$FKBLK	  3023#	  4007#	  4033#	  4051#	  4072#	  4089#	  4132#	  4154#	  4196#	  4245#	  5096#	  5673#
$FKBLP	  3477#
$FKBSH	  3141#	  3165#	  3186#	  3427#
$FKCSI	  2443#	  2935#	  3410#	  3576#	  3613#	  3629#	  5072#	  5275#
$FKEFR	  5818#
$FKFR1	  6062#
$FKFRA	  6062#
$FKFRJ	  5815#	  6894#
$FKGOL	  1230#	  2898#	  2907#	  2920#	  3984#
$FKHST	  2855#	  2865#	  2900#
$FKIBH	  2857#	  2860#	  3425#
$FKIBS	  2610#	  2857#	  2984#	  3183#	  3352#	  3405#	  3425#	  3457#
$FKIBX	  2436#	  5660#	  6129#
$FKICO	  5931#	  5937#
$FKIDP	  5993#	  6001#
$FKIJT	  6038#	  6047#
$FKILO	  5966#
$FKINX	  1853#	  2391#	  2431#	  5663#	  5882#	  6058#	  6573#	  6604#
$FKISC	  6016#	  6023#
$FKIWT	  2799#	  4021#	  5676#	  6985#
$FKJBN	  1729#	  2382#	  2441#	  3144#	  3415#	  3449#	  4291#	  4355#	  4660#	  4734#	  4754#	  5415#
$FKJO%	  3910#
$FKJSB	  2384#	  2440#	  3554#	  5135#	  5138#	  5160#	  5238#	  5241#	  5423#	  5462#
$FKJTN	  7008#
$FKMNQ	  3726#	  5063#	  5871#
$FKNB%	  1278#	  2643#	  2678#	  2701#	  2809#	  3594#
$FKNWC	  2442#	  2682#	  2686#	  2765#	  3583#
$FKOGL	  4333#	  4341#	  4367#
$FKPS0	  1132#	  1834#	  2794#	  4016#	  6985#
$FKPS1	  1848#	  2796#	  4018#	  5594#	  5606#	  5670#	  5891#	  6504#	  6622#	  6894#	  6987#
$FKPS2	  2439#	  2453#	  3555#	  5264#	  5298#
$FKPSB	  2437#	  2449#	  3552#	  5143#	  5266#	  5296#
$FKPTD	  1242#	  2635#	  2785#	  3572#
$FKPTR	  1244#	  1280#	  2634#	  2655#	  2707#	  3515#	  3574#
$FKPTX	  1263#	  2674#	  2812#	  3967#	  4979#
$FKQ2X	  2420#
$FKQN	  2425#	  2893#	  3179#	  3295#	  3381#	  3714#	  3732#	  3751#	  3774#	  3835#	  4271#	  4273#	  4299#	  4363#
	  4439#	  4495#	  4499#	  4501#	  4982#	  5013#	  5060#
$FKQTM	  2427#	  2510#	  2740#	  2744#	  3718#	  3753#	  5020#	  5059#
$FKST2	  4399#	  5522#	  5565#
$FKSTD	  2423#	  2778#	  4010#	  4076#	  4175#	  4195#	  4205#	  4233#	  4416#	  4426#	  4999#	  7005#
$FKSTR	  1218#	  2422#	  2777#	  3968#	  4009#	  4075#	  4135#	  4157#	  4174#	  4202#	  4232#	  4994#	  5799#	  5903#
$FKSTX	  1212#	  5518#
$FKSUS	  5888#	  5907#	  6982#
$FKSWX	  1297#	  2434#	  2478#	  2493#	  2543#	  2884#	  2931#	  3501#	  3648#	  3652#	  3656#	  3662#	  3669#	  4446#
	  4510#
$FKTIM	  2429#	  3755#	  4443#	  4538#	  4980#	  5062#
$FKUPT	  2438#	  2451#	  3553#	  5262#	  5300#
$FKWSL	  2613#	  3227#	  3397#	  3544#	  3570#
$FKWSS	  2447#	  2933#	  2996#	  3160#	  3204#	  3210#	  3249#	  3299#	  3391#	  3409#	  3417#	  3443#	  3452#	  3462#
	  3498#	  3500#	  3541#	  3575#	  3612#	  3632#	  5075#
$FKWTL	  4003#	  4036#	  4092#	  4199#
$FRKTT	  5457#	  5748#	  5789#
$JBTFK	  2380#	  3884#	  3911#
$JBTTY	  2381#	  5443#
$JOBCH	  7936#
$JOBN	  7975#
$JOBNO	  4771#
$JOBRT	  2367#	  3893#	  3900#	  3905#	  5849#	  5858#
$JSAMX	  5470#
$JTFRK	  5395#	  6878#
$JTIMP	  6803#
$JTJNO	  6842#	  7266#
$JTMCN	  5399#	  6040#	  6812#
$JTMNI	  5397#	  6879#	  6890#
$KIMUP	  6917#
$MAXWS	  2914#
$MINWS	  2914#
$NCLAS	  4771#
$NPRIO	  7975#
$OPRIO	  7975#
$PIBMP	  2432#	  2660#	  2886#	  3192#	  3286#	  3376#	  3657#	  3780#	  4451#	  4513#	  5609#	  5612#	  6607#	  6609#
$PRIPS	  3086#
$PSXSI	  6216#	  6246#	  6288#	  6638#
$RTREM	  3086#
$SCHED	   587	   587#
$SFX	  4307#
$SILEV	  6217#
$SP1	  4307#
$SP2	  4307#
$SPTX	  5464#
$SUPFX	  4192#
$TIMCH	  5852#
$TIMCN	  2369#
$TIMFR	  5853#
$TIMTI	  3901#	  3906#
$TRMCD	  5709#	  5759#
$TRMCO	  5745#	  5758#	  5834#
$TTYN	  8026#
$W1	  2808#	  4572#	  4684#	  7682#
$W2	  4572#
$W3	  4572#
$WSMSN	  2914#
$WSMSU	  2914#
%BSCRS	  3189	  3283	  3373	  3775
%BSNSK	  3189	  3775	  4482
%BSNST	  2704	  4984
%BSOVR	  2704	  3705	  4984
%BSSPQ	  3775
%BSWTB	  2672	  2697	  3511	  3570
%CLGLC	  2129	  4297	  4361	  4740	  4757	  4759
%CLSAC	  4829	  4845	  7853	  7914	  8047
%CLSBD	  4817	  7984	  8052
%CLSBT	  4826	  7929	  7945
%CLSDF	  2374
%CLSKV	   853	  7730	  7743
%CSTOF	  3607
%DCMAX	  5468
%EXPCB	  7151	  7152
%EXPCS	  7250	  7251	  7635	  7636
%FK2DT	  4417	  4427
%FKABK	  6064	  6072
%FKAGE	  2445
%FKBET	  2757	  2760	  3143	  3157	  3269	  3451	  3457	  3459
%FKBLK	  3023	  4007	  4033	  4051	  4072	  4089	  4132	  4154	  4196	  4245	  5096	  5673
%FKBLP	  3477
%FKBSH	  3141	  3165	  3186	  3427
%FKCSI	  2443	  2935	  3410	  3576	  3613	  3629	  5072	  5275
%FKEFR	  5818
%FKFR1	  6062
%FKFRA	  6062
%FKFRJ	  5815	  6894
%FKGOL	  1230	  2898	  2907	  2920	  3984
%FKHST	  2855	  2865	  2900
%FKIBH	  2857	  2860	  3425
%FKIBS	  2610	  2857	  2984	  3183	  3352	  3405	  3425	  3457
%FKIBX	  2436	  5660	  6129
%FKICO	  5931	  5937
%FKIDP	  5993	  6001
%FKIJT	  6038	  6047
%FKILO	  5966
%FKINX	  1853	  2391	  2431	  5663	  5882	  6058	  6573	  6604
%FKISC	  6016	  6023
%FKIWT	  2799	  4021	  5676	  6985
%FKJBN	  1729	  2382	  2441	  3144	  3415	  3449	  4291	  4355	  4660	  4734	  4754	  5415
%FKJO%	  3910
%FKJSB	  2384	  2440	  3554	  5135	  5138	  5160	  5238	  5241	  5423	  5462
%FKJTN	  7008
%FKMNQ	  3726	  5063	  5871
%FKNB%	  1278	  2643	  2678	  2701	  2809	  3594
%FKNWC	  2442	  2682	  2686	  2765	  3583
%FKOGL	  4333	  4341	  4367
%FKPS0	  1132	  1834	  2794	  4016	  6985
%FKPS1	  1848	  2796	  4018	  5594	  5606	  5670	  5891	  6504	  6622	  6894	  6987
%FKPS2	  2439	  2453	  3555	  5264	  5298
%FKPSB	  2437	  2449	  3552	  5143	  5266	  5296
%FKPTD	  1242	  2635	  2785	  3572
%FKPTR	  1244	  1280	  2634	  2655	  2707	  3515	  3574
%FKPTX	  1263	  2674	  2812	  3967	  4979
%FKQ2X	  2420
%FKQN	  2425	  2893	  3179	  3295	  3381	  3714	  3732	  3751	  3774	  3835	  4271	  4273	  4299	  4363
	  4439	  4495	  4499	  4501	  4982	  5013	  5060
%FKQTM	  2427	  2510	  2740	  2744	  3718	  3753	  5020	  5059
%FKST2	  4399	  5522	  5565
%FKSTD	  2423	  2778	  4010	  4076	  4175	  4195	  4205	  4233	  4416	  4426	  4999	  7005
%FKSTR	  1218	  2422	  2777	  3968	  4009	  4075	  4135	  4157	  4174	  4202	  4232	  4994	  5799	  5903
%FKSTX	  1212	  5518
%FKSUS	  5888	  5907	  6982
%FKSWX	  1297	  2434	  2478	  2493	  2543	  2884	  2931	  3501	  3648	  3652	  3656	  3662	  3669	  4446
	  4510
%FKTIM	  2429	  3755	  4443	  4538	  4980	  5062
%FKUPT	  2438	  2451	  3553	  5262	  5300
%FKWSL	  2613	  3227	  3397	  3544	  3570
%FKWSS	  2447	  2933	  2996	  3160	  3204	  3210	  3249	  3299	  3391	  3409	  3417	  3443	  3452	  3462
	  3498	  3500	  3541	  3575	  3612	  3632	  5075
%FKWTL	  4003	  4036	  4092	  4199
%FRKTT	  5457	  5748	  5789
%JBTFK	  2380	  3884	  3911
%JBTTY	  2381	  5443
%JOBRT	  2367	  3893	  3900	  3905	  5849	  5858
%JP%MN	  3743	  3744
%JP%MX	  3721	  3722	  3746	  3747
%JP%RT	  3740	  3741	  3796	  3797
%JSAMX	  5470
%JTFRK	  5395	  6878
%JTIMP	  6803
%JTJNO	  6842	  7266
%JTMCN	  5399	  6040	  6812
%JTMNI	  5397	  6879	  6890
%PIBMP	  2432	  2660	  2886	  3192	  3286	  3376	  3657	  3780	  4451	  4513	  5609	  5612	  6607	  6609
%PSXSI	  6216	  6246	  6288	  6638
%SILEV	  6217
%SK%CL	  4490	  4492
%SK%DR	  8053	  8054
%SK%RS	  4258	  4261
%SPTX	  5464
%TIMCH	  5852
%TIMCN	  2369
%TIMFR	  5853
%TIMTI	  3901	  3906
%TRMCD	  5709	  5759
%TRMCO	  5745	  5758	  5834
%VMADR	  6618	  6619	  7067	  7068	  7108	  7109	  7208	  7209	  7421	  7422
%VSECN	  7249	  7250	  7634	  7635
..0002	   850#	   850
..0010	   855#	   858
..0011	   859#
..0017	   924	   930#
..0025	   970	   974#
..0030	  1121#	  1121
..0032	  1157#	  1157
..0034	  1212#	  1212
..0036	  1232	  1238#
..0045	  1321#	  1321
..0046	  1350	  1352#
..0055	  1369#	  1369
..0057	  1423#	  1423
..0061	  1439#	  1439
..0066	  1442	  1454#
..0071	  1454#	  1454
..0076	  1465	  1467	  1470#
..0101	  1495#	  1495
..0106	  1500	  1505#
..0110	  1521#	  1522
..0111	  1524#	  1524
..0116	  1770	  1773#
..0117	  1772	  1781#
..0124	  1774	  1776	  1779#
..0125	  1778	  1780#
..0127	  1811#	  1811
..0134	  1823	  1826#
..0142	  1900	  1904#
..0150	  1921	  1925#
..0153	  1980#	  1980
..0154	  1988#	  1989
..0155	  1991#	  1991
..0157	  2016#	  2016
..0160	  2024#	  2025
..0161	  2027#	  2027
..0173	  2322#	  2323
..0174	  2325#	  2325
..0204	  2477	  2487#
..0207	  2531#	  2531
..0214	  2533	  2536#
..0222	  2564	  2567#
..0224	  2614	  2616#
..0236	  2646	  2654#
..0244	  2657	  2664#
..0252	  2671	  2690#
..0260	  2703	  2706#
..0266	  2710	  2713	  2715#
..0267	  2714	  2720#
..0274	  2722	  2725#
..0302	  2729	  2732#
..0304	  2781	  2783#
..0312	  2787	  2793#
..0314	  2859	  2863#
..0326	  2960	  2974#
..0330	  2970#	  2971
..0331	  2973#	  2973
..0336	  3006	  3014#
..0344	  3017	  3020#
..0352	  3101	  3112#
..0353	  3111	  3113#
..0360	  3196	  3198	  3200#
..0366	  3238	  3240	  3242#
..0374	  3244	  3247#
..0402	  3324	  3337#
..0404	  3333#	  3334
..0405	  3336#	  3336
..0412	  3356	  3359#
..0420	  3380	  3384#
..0426	  3386	  3388	  3390#
..0432	  3513	  3525#
..0444	  3517	  3521#
..0445	  3520	  3524#
..0452	  3527	  3530	  3534#
..0454	  3626#	  3627
..0455	  3629#	  3629
..0462	  3650	  3655#
..0470	  3660	  3664#
..0471	  3663	  3710#
..0476	  3668	  3673#
..0504	  3677	  3679	  3709#
..0506	  3702#	  3703
..0507	  3705#	  3705
..0514	  3739	  3747	  3750#
..0522	  3851	  3855#
..0524	  3881#	  3882
..0525	  3882#	  3882
..0536	  4013	  4016#
..0537	  4015	  4025#
..0544	  4017	  4020	  4024#
..0546	  4116#	  4117
..0547	  4119#	  4119
..0557	  4379#	  4379
..0564	  4404	  4407#
..0565	  4406	  4408#
..0572	  4450	  4457#
..0600	  4493	  4501#
..0601	  4500	  4503#
..0602	  4504	  4509#
..0614	  4512	  4523#
..0622	  4517	  4522#
..0655	  4695#	  4700
..0656	  4701#
..0667	  4703#	  4706
..0670	  4707#
..0713	  4818	  4820	  4825#
..0726	  4987	  4989#
..0734	  5048	  5052#
..0744	  5178	  5184#
..0753	  5179#	  5182
..0754	  5183#
..0755	  5198#	  5199
..0756	  5201#	  5201
..0760	  5216#	  5216
..0765	  5243	  5246#
..0766	  5245	  5247#
..0767	  5286#	  5287
..0770	  5289#	  5289
..0775	  5312	  5318#
..1004	  5409#	  5412
..1005	  5413#
..1007	  5603#	  5604
..1010	  5606#	  5606
..1011	  5675	  5679#
..1017	  5731#	  5732
..1020	  5734#	  5734
..1025	  5947	  5951#
..1033	  5991	  5996#
..1041	  6015	  6019#
..1047	  6090	  6104#
..1055	  6137	  6139	  6144#
..1063	  6165	  6168#
..1066	  6421#	  6421
..1073	  6551	  6553	  6556#
..1075	  6596#	  6597
..1076	  6599#	  6599
..1077	  6836#	  6837
..1100	  6839#	  6839
..1102	  6972#	  6972
..1107	  7071	  7086#
..1110	  7085	  7099#
..1115	  7112	  7127#
..1116	  7126	  7140#
..1120	  7203#	  7203
..1125	  7230	  7241#
..1130	  7454#	  7454
..1135	  7493	  7495	  7498#
..1143	  7539	  7543#
..1151	  7546	  7551#
..1157	  7581	  7595#
..1165	  7583	  7586#
..1166	  7585	  7593#
..1173	  7587	  7591#
..1174	  7590	  7592#
..1206	  7789	  7792#
..1207	  7791	  7794#
..1226	  7862	  7866#
..1227	  7865	  7869#
..1234	  7871	  7875#
..1242	  7957	  7966#
..1243	  7965	  7968#
..DONE	  1130#	  1130	  1131	  2137#	  2137	  2138#	  2138	  2353#	  2353	  2354#	  2354	  3470#	  3470	  3471#
	  3471	  3568#	  3568	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087	  4088	  4125#
	  4125	  4126	  4151#	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4397#	  4397	  4398#
	  4398	  4415#	  4415	  4416#	  4416	  4425#	  4425	  4426#	  4426	  4481#	  4481	  4482#	  4482	  4547#
	  4547	  4548#	  4548	  4717#	  4717	  4718	  4749#	  4749	  4750	  5071#	  5071	  5072#	  5072	  5308#
	  5308	  5309#	  5309
..GOKN	  4852#	  4852	  7887#	  7887
..I	   856#	   856	  1223#	  1223	  2129#	  2129	  2131#	  2131	  2140#	  2140	  2141#	  2141	  2142#	  2142
	  2143#	  2143	  2145#	  2145	  2147#	  2147	  2163#	  2163	  2371#	  2371	  2375#	  2375	  2376#	  2376
	  3418#	  3418	  3419#	  3419	  3890#	  3890	  3891#	  3891	  3892#	  3892	  3897#	  3897	  4293#	  4293
	  4296#	  4296	  4298#	  4298	  4357#	  4357	  4360#	  4360	  4362#	  4362	  4586#	  4586	  4588#	  4588
	  4591#	  4591	  4597#	  4597	  4598#	  4598	  4600#	  4600	  4601#	  4601	  4607#	  4607	  4617#	  4617
	  4619#	  4619	  4622#	  4622	  4628#	  4628	  4629#	  4629	  4630#	  4630	  4632#	  4632	  4633#	  4633
	  4636#	  4636	  4661#	  4661	  4662#	  4662	  4663#	  4663	  4696#	  4696	  4697#	  4697	  4698#	  4698
	  4704#	  4704	  4721#	  4721	  4722#	  4722	  4725#	  4725	  4736#	  4736	  4739#	  4739	  4741#	  4741
	  4750#	  4750	  4758#	  4758	  4760#	  4760	  4777#	  4777	  4778#	  4778	  4779#	  4779	  4780#	  4780
	  4794#	  4794	  4801#	  4801	  4805#	  4805	  4807#	  4807	  4837#	  4837	  5171#	  5171	  5175#	  5175
	  5449#	  5449	  7761#	  7761	  7764#	  7764	  7768#	  7768	  7771#	  7771	  7774#	  7774	  7797#	  7797
	  7800#	  7800	  7803#	  7803	  7806#	  7806	  7809#	  7809	  7834#	  7834	  7835#	  7835	  7838#	  7838
	  7840#	  7840	  7845#	  7845
..MASK	  1130#	  1130	  1131	  2137#	  2137	  2138	  2353#	  2353	  2354	  3470#	  3470	  3471	  3568#	  3568
	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087	  4088	  4125#	  4125	  4126	  4151#
	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4397#	  4397	  4398	  4415#	  4415	  4416
	  4425#	  4425	  4426	  4481#	  4481	  4482	  4547#	  4547	  4548	  4717#	  4717	  4718	  4749#	  4749
	  4750	  5071#	  5071	  5072	  5308#	  5308	  5309
..NAC	  2137#	  2137	  2138	  2353#	  2353	  2354	  2808#	  2808	  3470#	  3470	  3471	  3568#	  3568	  3569
	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087	  4088	  4125#	  4125	  4126	  4151#	  4151
	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4397#	  4397	  4398	  4415#	  4415	  4416	  4425#
	  4425	  4426	  4481#	  4481	  4482	  4547#	  4547	  4548	  4572#	  4572	  4684#	  4684	  4717#	  4717
	  4718	  4749#	  4749	  4750	  5071#	  5071	  5072	  5308#	  5308	  5309	  7682#	  7682
..NRGS	   850#	   850	  1119#	  1119	  1155#	  1155	  1210#	  1210	  1319#	  1319	  1367#	  1367	  1421#	  1421
	  1437#	  1437	  1452#	  1452	  1493#	  1493	  1521#	  1521	  1809#	  1809	  1978#	  1978	  1988#	  1988
	  2014#	  2014	  2024#	  2024	  2322#	  2322	  2529#	  2529	  2970#	  2970	  3333#	  3333	  3626#	  3626
	  3702#	  3702	  3881#	  3881	  4116#	  4116	  4377#	  4377	  5198#	  5198	  5214#	  5214	  5286#	  5286
	  5603#	  5603	  5731#	  5731	  6419#	  6419	  6596#	  6596	  6836#	  6836	  6970#	  6970	  7201#	  7201
	  7452#	  7452
..NUM	  1130#	  1130	  1131	  3568#	  3568	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087
	  4088	  4125#	  4125	  4126	  4151#	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4717#
	  4717	  4718	  4749#	  4749	  4750
..SACC	  1130#	  1130	  1131	  2137#	  2137	  2138	  2353#	  2353	  2354	  3470#	  3470	  3471	  3568#	  3568
	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087	  4088	  4125#	  4125	  4126	  4151#
	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4397#	  4397	  4398	  4415#	  4415	  4416
	  4425#	  4425	  4426	  4481#	  4481	  4482	  4547#	  4547	  4548	  4717#	  4717	  4718	  4749#	  4749
	  4750	  5071#	  5071	  5072	  5308#	  5308	  5309
..SC	   856#	   856	  1223#	  1223	  2129#	  2129	  2131#	  2131	  2140#	  2140	  2141#	  2141	  2142#	  2142
	  2143#	  2143	  2145#	  2145	  2147#	  2147	  2163#	  2163	  2371#	  2371	  2375#	  2375	  2376#	  2376
	  3418#	  3418	  3419#	  3419	  3890#	  3890	  3891#	  3891	  3892#	  3892	  3897#	  3897	  4293#	  4293
	  4296#	  4296	  4298#	  4298	  4357#	  4357	  4360#	  4360	  4362#	  4362	  4586#	  4586	  4588#	  4588
	  4591#	  4591	  4597#	  4597	  4598#	  4598	  4600#	  4600	  4601#	  4601	  4607#	  4607	  4617#	  4617
	  4619#	  4619	  4622#	  4622	  4628#	  4628	  4629#	  4629	  4630#	  4630	  4632#	  4632	  4633#	  4633
	  4636#	  4636	  4661#	  4661	  4662#	  4662	  4663#	  4663	  4696#	  4696	  4697#	  4697	  4698#	  4698
	  4704#	  4704	  4721#	  4721	  4722#	  4722	  4725#	  4725	  4736#	  4736	  4739#	  4739	  4741#	  4741
	  4750#	  4750	  4758#	  4758	  4760#	  4760	  4777#	  4777	  4778#	  4778	  4779#	  4779	  4780#	  4780
	  4794#	  4794	  4801#	  4801	  4805#	  4805	  4807#	  4807	  4837#	  4837	  5171#	  5171	  5175#	  5175
	  5449#	  5449	  7761#	  7761	  7764#	  7764	  7768#	  7768	  7771#	  7771	  7774#	  7774	  7797#	  7797
	  7800#	  7800	  7803#	  7803	  7806#	  7806	  7809#	  7809	  7834#	  7834	  7835#	  7835	  7838#	  7838
	  7840#	  7840	  7845#	  7845
..SMSK	  1130#	  1130	  1131	  2137#	  2137	  2138	  2353#	  2353	  2354	  3470#	  3470	  3471	  3568#	  3568
	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087	  4088	  4125#	  4125	  4126	  4151#
	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4397#	  4397	  4398	  4415#	  4415	  4416
	  4425#	  4425	  4426	  4481#	  4481	  4482	  4547#	  4547	  4548	  4717#	  4717	  4718	  4749#	  4749
	  4750	  5071#	  5071	  5072	  5308#	  5308	  5309
..SYAC	  1130#	  1130	  1131	  2137#	  2137	  2138	  2353#	  2353	  2354	  3470#	  3470	  3471	  3568#	  3568
	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087	  4088	  4125#	  4125	  4126	  4151#
	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4397#	  4397	  4398	  4415#	  4415	  4416
	  4425#	  4425	  4426	  4481#	  4481	  4482	  4547#	  4547	  4548	  4717#	  4717	  4718	  4749#	  4749
	  4750	  5071#	  5071	  5072	  5308#	  5308	  5309
..TMSK	  1130#	  1130	  1131	  3568#	  3568	  3569	  4032#	  4032	  4033	  4068#	  4068	  4069	  4087#	  4087
	  4088	  4125#	  4125	  4126	  4151#	  4151	  4152	  4266#	  4266	  4267	  4288#	  4288	  4289	  4717#
	  4717	  4718	  4749#	  4749	  4750
..TSA1	  1132#	  1834#	  1848#	  2367#	  2369#	  2432#	  2610#	  2613#	  2660#	  2672#	  2697#	  2704#	  2794#	  2796#
	  2799#	  2857#	  2860#	  2886#	  2984#	  3023#	  3141#	  3157#	  3165#	  3183#	  3186#	  3189#	  3192#	  3227#
	  3269#	  3283#	  3286#	  3352#	  3373#	  3376#	  3397#	  3405#	  3425#	  3427#	  3457#	  3459#	  3511#	  3544#
	  3570#	  3657#	  3705#	  3775#	  3780#	  3893#	  4007#	  4016#	  4018#	  4021#	  4033#	  4051#	  4072#	  4089#
	  4132#	  4154#	  4196#	  4245#	  4258#	  4333#	  4341#	  4367#	  4451#	  4482#	  4490#	  4513#	  4817#	  4829#
	  4845#	  4984#	  5096#	  5594#	  5606#	  5609#	  5612#	  5670#	  5673#	  5676#	  5815#	  5818#	  5858#	  5888#
	  5891#	  5907#	  5931#	  5937#	  5966#	  5993#	  6001#	  6016#	  6023#	  6038#	  6047#	  6062#	  6064#	  6072#
	  6216#	  6246#	  6288#	  6504#	  6607#	  6609#	  6622#	  6638#	  6894#	  6982#	  6985#	  6987#	  7853#	  8047#
..X	   856#	   856	  1223#	  1223	  2129#	  2129	  2131#	  2131	  2140#	  2140	  2141#	  2141	  2142#	  2142
	  2143#	  2143	  2145#	  2145	  2147#	  2147	  2163#	  2163	  2371#	  2371	  2375#	  2375	  2376#	  2376
	  3418#	  3418	  3419#	  3419	  3890#	  3890	  3891#	  3891	  3892#	  3892	  3897#	  3897	  4293#	  4293
	  4296#	  4296	  4298#	  4298	  4357#	  4357	  4360#	  4360	  4362#	  4362	  4586#	  4586	  4588#	  4588
	  4591#	  4591	  4597#	  4597	  4598#	  4598	  4600#	  4600	  4601#	  4601	  4607#	  4607	  4617#	  4617
	  4619#	  4619	  4622#	  4622	  4628#	  4628	  4629#	  4629	  4630#	  4630	  4632#	  4632	  4633#	  4633
	  4636#	  4636	  4661#	  4661	  4662#	  4662	  4663#	  4663	  4696#	  4696	  4697#	  4697	  4698#	  4698
	  4704#	  4704	  4721#	  4721	  4722#	  4722	  4725#	  4725	  4736#	  4736	  4739#	  4739	  4741#	  4741
	  4750#	  4750	  4758#	  4758	  4760#	  4760	  4777#	  4777	  4778#	  4778	  4779#	  4779	  4780#	  4780
	  4794#	  4794	  4801#	  4801	  4805#	  4805	  4807#	  4807	  4837#	  4837	  5171#	  5171	  5175#	  5175
	  5449#	  5449	  7761#	  7761	  7764#	  7764	  7768#	  7768	  7771#	  7771	  7774#	  7774	  7797#	  7797
	  7800#	  7800	  7803#	  7803	  7806#	  7806	  7809#	  7809	  7834#	  7834	  7835#	  7835	  7838#	  7838
	  7840#	  7840	  7845#	  7845
.A16	  2808	  2914	  3086	  4192	  4307	  4572	  4684	  4771	  4813	  6917	  7682	  7936	  7975	  8026
.ASSET	  4813
.DEBRK	  6615#
.DISMS	  1655#
.GOCL0	  4849	  4852
.GOCLS	  7884	  7887
.HALTF	  1081#
.ICDAE	  2459
.ICILI	  1532
.ICIWR	  7572
.ICPOV	  7565
.NPAC	  2808	  4572	  4684	  7682
.SABCL	  7931	  7941
.SACLS	  7822	  7829
.SACNT	  7727	  7736	  7750	  7780	  7821	  7857	  7898	  7926	  7938	  7977	  8040
.SACTL	  7902	  8054
.SADRG	  7981
.SAJCL	  7786
.SAJOB	  7860
.SAKNB	  7731	  7739
.SASET	  4771
.SAV11	  4547	  5071
.SAV12	  4415	  4425
.SAV34	  4481
.SAV44	  4397	  5308
.SAWA	  7825	  7826
.SKED	  7697#
.THIBR	  1716#
.TWAKE	  1742#
.XSTKS	  4192	  4307	  6917	  7936	  7975	  8026
.XTRST	  2914	  3086
ACVAR	  2808	  4572	  4684	  7682
AJBBSC	  3086#	  3086	  3121	  3318
AJBLFK	  3086#	  3086	  3097
AJLODN	  3086#	  3086	  3092	  3342
ANDN.	  3747
ANDX	  3651	  6247	  6289	  6392	  6639	  6643	  6687	  7637
ANDXE.	  3678
ANSKP.	  1467	  1776	  2713	  3198	  3240	  3388	  3530	  4020	  4820	  6139	  6553	  7495
ASUBR	  4813
BUG.	   838	  1110	  1150	  1196	  1313	  1359	  1408	  1425	  1443	  1480	  1509	  1803	  1965	  1981
	  2001	  2017	  2316	  2520	  2962	  3326	  3614	  3689	  3872	  4104	  4371	  5192	  5207	  5277
	  5596	  5731	  6412	  6592	  6829	  6962	  7189	  7440
CALL	   871	   875	  1083	  1169	  1181	  1217	  1221	  1233	  1234	  1235	  1257	  1261	  1285	  1309
	  1335	  1345	  1351	  1466	  1501	  1533	  1534	  1547	  1550	  1557	  1560	  1676	  1718	  1744
	  1768	  1818	  1825	  1828	  1830	  1832	  1841	  1867	  1873	  1878	  1879	  1881	  1884	  1890
	  1892	  1894	  1895	  1898	  1902	  1919	  1927	  1928	  1929	  1934	  1947	  2064	  2067	  2070
	  2106	  2111	  2116	  2118	  2151	  2226	  2227	  2234	  2235	  2237	  2258	  2268	  2269	  2275
	  2276	  2279	  2281	  2293	  2295	  2326	  2379	  2383	  2402	  2403	  2405	  2407	  2424	  2448
	  2450	  2452	  2461	  2484	  2497	  2508	  2514	  2537	  2538	  2546	  2554	  2583	  2584	  2585
	  2586	  2587	  2612	  2615	  2622	  2637	  2641	  2649	  2652	  2653	  2669	  2692	  2718	  2780
	  2786	  2790	  2791	  2810	  2811	  2813	  2822	  2824	  2829	  2836	  2842	  2843	  2937	  2945
	  3000	  3010	  3018	  3026	  3028	  3035	  3037	  3039	  3090	  3158	  3167	  3197	  3212	  3218
	  3220	  3226	  3231	  3239	  3245	  3260	  3263	  3265	  3271	  3275	  3290	  3309	  3357	  3360
	  3387	  3396	  3408	  3413	  3439	  3461	  3514	  3518	  3523	  3529	  3531	  3588	  3599	  3638
	  3653	  3654	  3707	  3708	  3731	  3762	  3764	  3783	  3872	  3912	  4012	  4014	  4023	  4045
	  4078	  4080	  4101	  4177	  4185	  4207	  4210	  4215	  4216	  4225	  4235	  4239	  4247	  4248
	  4249	  4289	  4310	  4317	  4489	  4496	  4548	  4553	  4649	  4708	  4726	  4773	  4784	  4786
	  4815	  4839	  4852	  4988	  5000	  5055	  5056	  5077	  5094	  5099	  5115	  5117	  5123	  5130
	  5131	  5136	  5142	  5148	  5161	  5162	  5166	  5186	  5191	  5220	  5231	  5234	  5235	  5236
	  5237	  5239	  5244	  5246	  5263	  5265	  5267	  5273	  5289	  5297	  5299	  5310	  5321	  5336
	  5406	  5424	  5447	  5452	  5453	  5481	  5552	  5619	  5642	  5644	  5678	  5681	  5695	  5713
	  5727	  5730	  5752	  5761	  5780	  5795	  5808	  5835	  5854	  5856	  5884	  5890	  5897	  5912
	  5929	  5964	  5979	  5989	  6013	  6020	  6035	  6060	  6066	  6067	  6153	  6169	  6170	  6440
	  6443	  6445	  6471	  6503	  6506	  6699	  6702	  6810	  6815	  6882	  6893	  6954	  6990	  7011
	  7014	  7324	  7330	  7564	  7566	  7573	  7670	  7792	  7847	  7867	  7887	  7892	  7905	  7909
	  7910	  7950	  7959	  7963	  7964	  7967	  7991	  7995	  7999	  8005	  8028	  8031	  8034
CALLRE	   909	  2392	  2724	  2731	  2745	  3082	  3414	  3756	  3886	  4138	  4250	  4774	  4788	  4796
	  5100	  5108	  5620	  5711	  6467	  6480
CALLX	  5730
CHKINT	  1534	  4216	  5644
CLASS	  7936#	  7936	  7947	  7954
CLSB	   922
CLSNUM	  4813#	  4813	  4828
CONCK$	   850	  1119	  1155	  1210	  1319	  1367	  1421	  1437	  1452	  1493	  1521	  1809	  1978	  1988
	  2014	  2024	  2322	  2529	  2970	  3333	  3626	  3702	  3881	  4116	  4377	  5198	  5214	  5286
	  5603	  5731	  6419	  6596	  6836	  6970	  7201	  7452
COPYRT	   588
CPYRT	   587
DECR	  4361	  4757
DEFAC	   598
DEFSTR	   674	   753	   754	   755	   756	   757
DO.	   855	  4695	  4703	  5179	  5409
DOLOC0	   850	  1119	  1155	  1210	  1319	  1367	  1421	  1437	  1452	  1493	  1522	  1809	  1978	  1989
	  2014	  2025	  2323	  2529	  2971	  3334	  3627	  3703	  3882	  4117	  4377	  5199	  5214	  5287
	  5604	  5732	  6419	  6597	  6837	  6970	  7201	  7452
DOLOC1	  1119	  1421	  1437	  1452	  1493	  1522	  1989	  2025	  2971	  3334	  3627	  3703	  3882	  7201
DOLOC2	  1119	  1421	  1437	  1452	  1493	  1522	  1989	  2025	  2971	  3334	  3627	  3703	  3882	  7201
EA.ENT	  3637	  4069	  5659
ECSKED	  1554
EDEFST	   626
ELSE.	   924	   924#	   930#	   970	   970#	   974#	  1233	  1233#	  1238#	  1351	  1351#	  1352#	  1442	  1442#
	  1454#	  1465	  1465#	  1470#	  1500	  1500#	  1505#	  1770	  1770#	  1772	  1773#	  1774	  1774#	  1778
	  1779#	  1780#	  1781#	  1823	  1823#	  1826#	  1900	  1900#	  1904#	  1921	  1921#	  1925#	  2477	  2477#
	  2487#	  2533	  2533#	  2536#	  2564	  2564#	  2567#	  2615	  2615#	  2616#	  2646	  2646#	  2654#	  2657
	  2657#	  2664#	  2670	  2670#	  2690#	  2703	  2703#	  2706#	  2710	  2710#	  2714	  2715#	  2720#	  2722
	  2722#	  2725#	  2728	  2728#	  2732#	  2787	  2787#	  2793#	  2860	  2860#	  2863#	  2960	  2960#	  2974#
	  3006	  3006#	  3014#	  3017	  3017#	  3020#	  3101	  3101#	  3111	  3112#	  3113#	  3196	  3196#	  3200#
	  3238	  3238#	  3242#	  3244	  3244#	  3247#	  3324	  3324#	  3337#	  3356	  3356#	  3359#	  3380	  3380#
	  3384#	  3386	  3386#	  3390#	  3514	  3514#	  3517	  3517#	  3520	  3521#	  3524#	  3525#	  3527	  3527#
	  3534#	  3650	  3650#	  3655#	  3660	  3660#	  3663	  3664#	  3668	  3668#	  3673#	  3677	  3677#	  3709#
	  3710#	  3738	  3738#	  3750#	  3851	  3851#	  3855#	  4013	  4013#	  4015	  4016#	  4017	  4017#	  4024#
	  4025#	  4404	  4404#	  4406	  4407#	  4408#	  4450	  4450#	  4457#	  4492	  4492#	  4500	  4501#	  4503#
	  4505	  4505#	  4509#	  4512	  4512#	  4516	  4516#	  4522#	  4523#	  4819	  4819#	  4825#	  4987	  4987#
	  4989#	  5047	  5047#	  5052#	  5178	  5178#	  5184#	  5243	  5243#	  5245	  5246#	  5247#	  5311	  5311#
	  5318#	  5676	  5676#	  5679#	  5947	  5947#	  5951#	  5990	  5990#	  5996#	  6014	  6014#	  6019#	  6089
	  6089#	  6104#	  6137	  6137#	  6144#	  6165	  6165#	  6168#	  6551	  6551#	  6556#	  7071	  7071#	  7085
	  7086#	  7099#	  7112	  7112#	  7126	  7127#	  7140#	  7230	  7230#	  7241#	  7493	  7493#	  7498#	  7539
	  7539#	  7543#	  7546	  7546#	  7551#	  7581	  7581#	  7583	  7583#	  7585	  7586#	  7587	  7587#	  7590
	  7591#	  7592#	  7593#	  7595#	  7789	  7789#	  7791	  7792#	  7794#	  7862	  7862#	  7865	  7866#	  7869#
	  7871	  7871#	  7875#	  7957	  7957#	  7965	  7966#	  7968#
ENDAS.	  4814#
ENDAV.	  2809#	  2815	  4573#	  4652	  4685#	  4711	  7683#	  7689
ENDDO.	   859	  4701	  4707	  5413
ENDIF.	   924	   924#	   930	   930#	   970	   970#	   974	   974#	  1233	  1233#	  1238	  1238#	  1351	  1351#
	  1352	  1352#	  1442	  1442#	  1454	  1454#	  1465	  1465#	  1470	  1470#	  1500	  1500#	  1505	  1505#
	  1770	  1770#	  1774	  1774#	  1780	  1780#	  1781	  1781#	  1823	  1823#	  1826	  1826#	  1900	  1900#
	  1904	  1904#	  1921	  1921#	  1925	  1925#	  2477	  2477#	  2487	  2487#	  2533	  2533#	  2536	  2536#
	  2564	  2564#	  2567	  2567#	  2615	  2615#	  2616	  2616#	  2646	  2646#	  2654	  2654#	  2657	  2657#
	  2664	  2664#	  2670	  2670#	  2690	  2690#	  2703	  2703#	  2706	  2706#	  2710	  2710#	  2720	  2720#
	  2722	  2722#	  2725	  2725#	  2728	  2728#	  2732	  2732#	  2787	  2787#	  2793	  2793#	  2860	  2860#
	  2863	  2863#	  2960	  2960#	  2974	  2974#	  3006	  3006#	  3014	  3014#	  3017	  3017#	  3020	  3020#
	  3101	  3101#	  3113	  3113#	  3196	  3196#	  3200	  3200#	  3238	  3238#	  3242	  3242#	  3244	  3244#
	  3247	  3247#	  3324	  3324#	  3337	  3337#	  3356	  3356#	  3359	  3359#	  3380	  3380#	  3384	  3384#
	  3386	  3386#	  3390	  3390#	  3514	  3514#	  3517	  3517#	  3524	  3524#	  3525	  3525#	  3527	  3527#
	  3534	  3534#	  3650	  3650#	  3655	  3655#	  3660	  3660#	  3668	  3668#	  3673	  3673#	  3677	  3677#
	  3709	  3709#	  3710	  3710#	  3738	  3738#	  3750	  3750#	  3851	  3851#	  3855	  3855#	  4013	  4013#
	  4017	  4017#	  4024	  4024#	  4025	  4025#	  4404	  4404#	  4408	  4408#	  4450	  4450#	  4457	  4457#
	  4492	  4492#	  4503	  4503#	  4505	  4505#	  4509	  4509#	  4512	  4512#	  4516	  4516#	  4522	  4522#
	  4523	  4523#	  4819	  4819#	  4825	  4825#	  4987	  4987#	  4989	  4989#	  5047	  5047#	  5052	  5052#
	  5178	  5178#	  5184	  5184#	  5243	  5243#	  5247	  5247#	  5311	  5311#	  5318	  5318#	  5676	  5676#
	  5679	  5679#	  5947	  5947#	  5951	  5951#	  5990	  5990#	  5996	  5996#	  6014	  6014#	  6019	  6019#
	  6089	  6089#	  6104	  6104#	  6137	  6137#	  6144	  6144#	  6165	  6165#	  6168	  6168#	  6551	  6551#
	  6556	  6556#	  7071	  7071#	  7099	  7099#	  7112	  7112#	  7140	  7140#	  7230	  7230#	  7241	  7241#
	  7493	  7493#	  7498	  7498#	  7539	  7539#	  7543	  7543#	  7546	  7546#	  7551	  7551#	  7581	  7581#
	  7583	  7583#	  7587	  7587#	  7592	  7592#	  7593	  7593#	  7595	  7595#	  7789	  7789#	  7794	  7794#
	  7862	  7862#	  7869	  7869#	  7871	  7871#	  7875	  7875#	  7957	  7957#	  7968	  7968#
ENDLP.	   855	   855#	   859#	  4695	  4695#	  4701#	  4703	  4703#	  4707#	  5179	  5179#	  5183#	  5409	  5409#
	  5413#
ENDSA.	  4772#
ENDSV.	  4194#	  4309#	  6919#	  6936	  7938#	  7977#	  8028#
ENDTV.	  2916#	  3088#
ENTSKD	   605#	  1168	  1180	  1256	  1308	  1344	  1546	  1556	  5165	  5230	  5480	  6881	  6953
EP.	   856	  1223	  2129	  2131	  2140	  2141	  2142	  2143	  2145	  2147	  2163	  2371	  2375	  2376
	  3418	  3419	  3890	  3891	  3892	  3897	  4293	  4296	  4298	  4357	  4360	  4362	  4586	  4588
	  4591	  4597	  4598	  4600	  4601	  4607	  4617	  4619	  4622	  4628	  4629	  4630	  4632	  4633
	  4636	  4661	  4662	  4663	  4696	  4697	  4698	  4704	  4721	  4722	  4725	  4736	  4739	  4741
	  4750	  4758	  4760	  4777	  4778	  4779	  4780	  4794	  4801	  4805	  4807	  4837	  5171	  5175
	  5449	  7761	  7764	  7768	  7771	  7774	  7797	  7800	  7803	  7806	  7809	  7834	  7835	  7838
	  7840	  7845
ERCAL	  7544	  7659
ERCALR	  7547	  7616	  7653
ERCALS	  7545	  7619	  7656
ERJMP	  4824	  6213	  6243	  6280	  6289	  6296	  6639	  7533	  7536	  7571	  7597	  7658	  8009
ERJMPR	  7538	  7615	  7652
ERJMPS	  7535	  7618	  7655
EXIND.	   856	  1223	  2129	  2131	  2140	  2141	  2142	  2143	  2145	  2147	  2163	  2371	  2375	  2376
	  3418	  3419	  3890	  3891	  3892	  3897	  4293	  4296	  4298	  4357	  4360	  4362	  4586	  4588
	  4591	  4597	  4598	  4600	  4601	  4607	  4617	  4619	  4622	  4628	  4629	  4630	  4632	  4633
	  4636	  4661	  4662	  4663	  4696	  4697	  4698	  4704	  4721	  4722	  4725	  4736	  4739	  4741
	  4750	  4758	  4760	  4777	  4778	  4779	  4780	  4794	  4801	  4805	  4807	  4837	  5171	  5175
	  5449	  7761	  7764	  7768	  7771	  7774	  7797	  7800	  7803	  7806	  7809	  7834	  7835	  7838
	  7840	  7845
EXIT.	   855	   855#	   859#	  4695	  4695#	  4701#	  4703	  4703#	  4707#	  5179	  5179#	  5183#	  5409	  5409#
	  5413#
EXTN	   613	   614	   622	   623	   624
FLTMAX	   692#	   699
FLTMIN	   687#	   698
GETFLQ	  4902#	  4905
GGLOBS	   588	   590
GTOKM	  4849	  7884
HDISMS	  1086	  1665	  1673	  1721
IFE.	  1232
IFGE.	  4504
IFN.	  1350
IFNSK.	  2670	  2728	  3738	  4492	  4516	  5047	  5311	  5990	  6014	  6089
IFQN.	  2613	  2857	  3511	  4817	  5673
IFSKP.	   924	   970	  1442	  1465	  1500	  1770	  1774	  1823	  1900	  1921	  2477	  2533	  2564	  2646
	  2657	  2703	  2710	  2722	  2781	  2787	  2960	  3006	  3017	  3101	  3196	  3238	  3244	  3324
	  3356	  3380	  3386	  3517	  3527	  3650	  3660	  3668	  3677	  3851	  4013	  4017	  4404	  4450
	  4512	  4987	  5178	  5243	  5947	  6137	  6165	  6551	  7071	  7112	  7230	  7493	  7539	  7546
	  7581	  7583	  7587	  7789	  7862	  7871	  7957
INCR	  4297	  4740	  4759
ISB	  1006	  1135	  1843	  4278
ITERR	  6617	  6639	  7042	  7048	  7700	  7705	  7719	  7729	  7738	  7742	  7752	  7760	  7782	  7793
	  7796	  7823	  7832	  7844	  7856	  7859	  7868	  7874	  7877	  7880	  7889	  7900	  7908	  7928
	  7940	  7944	  8042
JE	  1132	  2613	  2794	  2857	  3183	  3227	  3405	  3511	  4033	  4051	  4072	  4089	  4132	  4154
	  4196	  4258	  4341	  4817	  4829	  5608	  5673	  5815	  6982
JN	  1834	  2796	  2984	  3186	  3189	  3192	  3283	  3286	  3352	  3373	  3376	  3775	  3780	  3893
	  4482	  5096	  5670	  5818	  6214	  6244	  6281	  6630
JOBCHG	  7936#	  7936	  7952	  7958	  7962
JOBN	  7975#	  7975	  7993	  7994	  8004
JOBNOM	  4771#	  4771	  4787
JSYS	  6840	  7491	  7492	  7494
JXE	  1133	  2479	  2481	  2494	  2495	  2544	  2614	  2795	  2858	  3184	  3228	  3406	  3429	  3512
	  4034	  4052	  4073	  4090	  4133	  4155	  4197	  4259	  4342	  4818	  4830	  5610	  5674	  5816
	  6983
JXN	  1835	  2797	  2985	  3187	  3190	  3193	  3284	  3287	  3353	  3374	  3377	  3678	  3776	  3781
	  3894	  4483	  5097	  5671	  5819	  6217	  6247	  6289	  6639
KIMUP0	  6917#	  6917	  6928	  6932	  6936#
KIMUP1	  6917#	  6917	  6929	  6933	  6936#
LDPAC.	  6372	  6736	  7436
LOAD	  1218	  1280	  1729	  2129	  2374	  2478	  2493	  2510	  2543	  2634	  2635	  2655	  2682	  2707
	  2740	  2757	  2765	  2777	  2778	  2785	  2809	  2855	  2884	  2893	  2898	  2931	  2933	  2935
	  2996	  3143	  3144	  3160	  3179	  3204	  3210	  3249	  3295	  3299	  3381	  3391	  3409	  3410
	  3415	  3417	  3443	  3449	  3452	  3462	  3498	  3501	  3515	  3541	  3552	  3553	  3554	  3555
	  3575	  3576	  3607	  3612	  3613	  3656	  3714	  3721	  3726	  3732	  3740	  3743	  3746	  3774
	  3796	  3884	  3900	  3901	  3905	  3910	  3911	  3968	  4009	  4010	  4036	  4075	  4076	  4092
	  4157	  4174	  4175	  4195	  4199	  4202	  4205	  4232	  4233	  4271	  4273	  4291	  4299	  4355
	  4363	  4416	  4417	  4426	  4427	  4439	  4446	  4495	  4499	  4501	  4510	  4660	  4734	  4754
	  4826	  4982	  4994	  4999	  5013	  5020	  5063	  5072	  5075	  5135	  5138	  5143	  5160	  5238
	  5241	  5262	  5264	  5266	  5275	  5296	  5298	  5300	  5415	  5423	  5462	  5518	  5522	  5745
	  5748	  5758	  5789	  5799	  5834	  5849	  5852	  5853	  5903	  6040	  6217	  6573	  6604	  6618
	  6803	  6812	  6842	  6890	  7005	  7008	  7067	  7108	  7151	  7208	  7249	  7266	  7421	  7634
	  7730	  7929	  8052
LOOP.	   855	   855#	   859#	  4695	  4695#	  4701#	  4703	  4703#	  4707#	  5179	  5179#	  5182	  5183#	  5409
	  5409#	  5413#
MAKRM.	   856	  1223	  2129	  2131	  2140	  2141	  2142	  2143	  2145	  2147	  2163	  2371	  2375	  2376
	  3418	  3419	  3890	  3891	  3892	  3897	  4293	  4296	  4298	  4357	  4360	  4362	  4586	  4588
	  4591	  4597	  4598	  4600	  4601	  4607	  4617	  4619	  4622	  4628	  4629	  4630	  4632	  4633
	  4636	  4661	  4662	  4663	  4696	  4697	  4698	  4704	  4721	  4722	  4725	  4736	  4739	  4741
	  4750	  4758	  4760	  4777	  4778	  4779	  4780	  4794	  4801	  4805	  4807	  4837	  5171	  5175
	  5449	  7761	  7764	  7768	  7771	  7774	  7797	  7800	  7803	  7806	  7809	  7834	  7835	  7838
	  7840	  7845
MAXWS	  2914#	  2914	  2929	  2946	  2948	  2989	  2992
MAXWSF	  2914#	  2914	  2949	  2991
MCENT	  1081	  1655	  1716	  1742	  6615	  7046	  7697
MCENTR	  7040	  7259
MDISMS	  1594	  4409	  5225	  5315
MINWS	  2914#	  2914	  2928	  2938	  2940	  2994
MINWSF	  2914#	  2914	  2930	  2941	  2982	  2993	  3021
MOVX	   863	   889	   894	  1284	  1852	  1922	  2367	  2369	  2430	  2432	  2672	  2697	  2704	  2799
	  2860	  2927	  3141	  3157	  3165	  3269	  3425	  3427	  3457	  3459	  3544	  3570	  3705	  3885
	  3908	  4007	  4021	  4245	  4297	  4333	  4361	  4367	  4485	  4519	  4529	  4740	  4757	  4759
	  4822	  4984	  5107	  5337	  5343	  5431	  5485	  5560	  5606	  5612	  5661	  5676	  5710	  5760
	  5858	  5888	  5891	  5907	  5913	  5931	  5933	  5937	  5944	  5955	  5966	  5971	  5973	  5981
	  5993	  5997	  6001	  6016	  6023	  6038	  6047	  6062	  6064	  6072	  6102	  6307	  6504	  6607
	  6609	  6622	  6639	  6892	  6894	  6985	  6987	  7239	  7703	  7872	  7987	  8044
MRETNG	  7732	  7746	  7816	  7849	  7894	  7919	  7932	  7971	  8011	  8055
NCLASS	  4771#	  4771	  4783	  4785
NOINT	  1143	  5405	  5640	  6797
NOP	  5337	  6507
NOSKD1	  2313	  4071	  4153	  5667
NOSKED	  3937	  3951	  4832	  5757	  5902	  6916	  6999	  7024	  7833	  7891	  7901	  7955
NPRIOR	  7975#	  7975	  7988	  8007
OD.	   855	   855#	   859	   859#	  4695	  4695#	  4701	  4701#	  4703	  4703#	  4707	  4707#	  5179	  5179#
	  5183	  5183#	  5409	  5409#	  5413	  5413#
OKINT	  1159	  1535	  5126	  5223	  5414	  5643	  6854	  6863
OKSKD1	  2327	  4081	  5686
OKSKED	  3946	  3961	  4840	  5762	  5906	  5918	  6921	  7018	  7032	  7844	  7848	  7893	  7908	  7918
	  7969
OPRIOR	  7975#	  7975	  7998	  8000
OPSTR	  2643	  2701	  2900	  2907	  3648	  4135	  4443	  4538	  4979
OPSTRM	  1297	  1853	  2391	  3652	  3718	  4980	  5660	  5663	  5882	  6058	  6129
PIOFF	  2242	  2290	  2955	  3319
PION	  2245	  2298	  2958	  3322
PRIPST	  3086#	  3086	  3091	  3261	  3313
PRSTAC	  1130	  3568	  4032	  4068	  4087	  4125	  4151	  4266	  4288	  4717	  4749
PSAVAC	  1130	  3568	  4032	  4068	  4087	  4125	  4151	  4266	  4288	  4717	  4749
RESCD	  7820
RET	   917	  1136	  1301	  1575	  1596	  1693	  1799	  1915	  1951	  2031	  2038	  2082	  2121	  2133
	  2153	  2173	  2209	  2218	  2328	  2408	  2412	  2454	  2462	  2515	  2578	  2638	  2689	  2719
	  2733	  2738	  2761	  2769	  2784	  2792	  2814	  2845	  2867	  2902	  2909	  3031	  3043	  3080
	  3302	  3308	  3312	  3314	  3343	  3361	  3383	  3401	  3420	  3455	  3466	  3479	  3492	  3506
	  3547	  3567	  3725	  3728	  3765	  3779	  3848	  3898	  3921	  3933	  3947	  3962	  4026	  4061
	  4082	  4102	  4137	  4211	  4217	  4279	  4282	  4303	  4335	  4369	  4383	  4385	  4401	  4410
	  4420	  4429	  4459	  4524	  4543	  4549	  4558	  4664	  4683	  4709	  4752	  4761	  4764	  4776
	  4782	  4808	  4841	  4848	  4852	  4855	  4941	  5065	  5078	  5086	  5095	  5201	  5319	  5323
	  5611	  5617	  5639	  5645	  5665	  5687	  5697	  5980	  5983	  6457	  6472	  6492	  6586	  6589
	  6608	  6943	  7019	  7033	  7548	  7567	  7574	  7621	  7661	  7686	  7887	  8032	  8035
RETERR	  1745	  1747
RETSKP	  2659	  2693	  2803	  3399	  3598	  3601	  3785	  4054	  4419	  4430	  4852	  5324	  5984	  6585
	  6611	  6922	  7594	  7598	  7617	  7620	  7654	  7657	  7660	  7687	  7887	  8036
RS	  2590	  2591	  2592	  2593	  2596	  2597	  2598	  2599	  2600	  2601	  2602	  2603	  3061	  3062
	  3064	  3065	  3067	  3068	  4878	  4910	  4911
RTREM	  3086#	  3086
SASUBR	  4771
SAVEAC	  1130	  2137	  2353	  3470	  3568	  4032	  4068	  4087	  4125	  4151	  4266	  4288	  4397	  4415
	  4425	  4481	  4547	  4717	  4749	  5071	  5308
SAVEQ	  2340	  3347	  4167	  4340
SAVET	  2312	  3883	  4773	  5618	  7564	  7571	  7607
SETONE	  2432	  2672	  2799	  3165	  3425	  3570	  3705	  4007	  4021	  4333	  5676	  5891	  5907	  5931
	  5966	  5993	  6016	  6047	  6062	  6072	  6504	  6609	  6622	  6894	  6985
SETPCS	  6618	  7067	  7108	  7208	  7421
SETZRO	  2367	  2369	  2420	  2423	  2434	  2436	  2437	  2438	  2439	  2440	  2441	  2442	  2443	  2697
	  2704	  2860	  3141	  3157	  3269	  3427	  3457	  3477	  3544	  3572	  3906	  4245	  4367	  4984
	  5395	  5606	  5612	  5858	  5888	  5937	  6001	  6023	  6038	  6064	  6607	  6987
SFX	  4307#	  4307	  4309	  4329
SJPRI	  4823	  8008
SMRETN	  1725	  1752
SP1	  4307#	  4307	  4311	  4318	  4325
SP2	  4307#	  4307	  4312	  4326
SPCSAV	  1130	  2137	  2138	  2353	  2354	  3470	  3471	  3568	  4032	  4068	  4087	  4125	  4151	  4266
	  4288	  4397	  4398	  4415	  4416	  4425	  4426	  4481	  4482	  4547	  4548	  4717	  4749	  5071
	  5072	  5308	  5309
STKVAR	  4192	  4307	  6917	  7936	  7975	  8026
STOR	   853	  1212	  1230	  1242	  1244	  1263	  1278	  2380	  2381	  2382	  2384	  2422	  2425	  2427
	  2429	  2431	  2445	  2447	  2449	  2451	  2453	  2674	  2678	  2686	  2744	  2760	  2812	  2865
	  2920	  3451	  3500	  3574	  3583	  3594	  3629	  3632	  3662	  3669	  3751	  3753	  3755	  3835
	  3967	  3984	  4003	  4399	  5059	  5060	  5062	  5397	  5399	  5443	  5457	  5464	  5468	  5470
	  5565	  5709	  5759	  5871	  6878	  6879	  7250	  7635	  7743	  7914	  7945	  7984	  8053
STPAC.	  6367	  6730
SUPFX	  4192#	  4192	  4194	  4206	  4208
SWAPCD	  7696	  7925
TMNE	  2610	  2886	  4018	  8047
TMNN	  1848	  2660	  3023	  3397	  3657	  4016	  4451	  4490	  4513	  4845	  5594	  7853
TNXEND	   590#	  8057
TOP.	   855	   855#	   858	   859#	  4695	  4695#	  4700	  4701#	  4703	  4703#	  4706	  4707#	  5179	  5179#
	  5183#	  5409	  5409#	  5412	  5413#
TRVAR	  2914	  3086
TTITLE	   586
TTYN	  8026#	  8026	  8029	  8033
TXC	  7491
TXCE	  7492
TXNE	   969	  1048	  1464	  2214	  2216	  2397	  2611	  2737	  2797	  2887	  2889	  2891	  2905	  2932
	  2985	  3156	  3187	  3190	  3193	  3201	  3255	  3266	  3284	  3287	  3353	  3374	  3377	  3502
	  3504	  3642	  3659	  3678	  3776	  3781	  3894	  4019	  4447	  4449	  4453	  4455	  4483	  4511
	  4515	  4991	  5004	  5097	  5421	  5517	  5538	  5671	  5819	  6087	  6108	  6110	  6112	  6114
	  6116	  6118	  6120	  6164	  6550	  6605	  6606	  7060	  7229	  7263	  7557	  7611	  7632	  7648
	  7903	  7912	  7916	  8048
TXNN	  1499	  1849	  1912	  1937	  2479	  2482	  2495	  2544	  2661	  2858	  2896	  2943	  3024	  3100
	  3184	  3258	  3267	  3379	  3406	  3429	  3512	  3649	  3658	  3665	  4034	  4052	  4073	  4090
	  4133	  4155	  4197	  4259	  4342	  4452	  4491	  4514	  4830	  4846	  4851	  4997	  5040	  5083
	  5595	  5610	  5674	  5816	  5946	  6088	  6983	  7070	  7111	  7530	  7568	  7580	  7582	  7586
	  7854	  7886
TXO	  2390	  3106	  3110	  3643	  3645	  3647	  5662	  6393	  6619	  7068	  7109	  7209	  7248	  7422
	  7487	  7579	  7633	  8049	  8051
TXOE	  3667
TXON	  3219	  3274
TXZ	  1172	  1184	  1253	  1305	  1543	  1562	  3104	  3108	  3112	  3174	  3311	  3651	  3666	  5881
	  6057	  6247	  6289	  6392	  6400	  6639	  6643	  6658	  6687	  6885	  6957	  7477	  7631	  7637
TXZE	  3661	  5521	  5527	  5529	  5531	  5533	  5535	  7415
TXZN	  5206
UMOVE	  6212	  6242	  6279	  6629	  6641	  7532	  7556	  7613	  7650	  7736	  7739	  7757	  7787	  7826
	  7902	  7941	  7981
UMOVEM	  6289	  6295	  7084	  7089	  7098	  7125	  7130	  7139	  7325	  7541	  7550	  7570	  7731	  7762
	  7765	  7769	  7772	  7775	  7798	  7801	  7804	  7807	  7810	  7931	  8054
UNLOKK	  5119	  5216
USRSAV	  1130	  2137	  2353	  3470	  3568	  4032	  4068	  4087	  4125	  4151	  4266	  4288	  4397	  4415
	  4425	  4481	  4547	  4717	  4749	  5071	  5308
WSMSNR	  2914#	  2914	  2926	  2934	  2954
WSMSUP	  2914#	  2914	  2925	  2936
XBLTUU	  5479
XCTU	  5477	  6212	  6242	  6279	  6289	  6295	  6629	  6639	  6641	  6851	  6852	  7081	  7084	  7089
	  7098	  7122	  7125	  7130	  7139	  7292	  7293	  7325	  7501	  7502	  7513	  7514	  7532	  7541
	  7550	  7556	  7559	  7562	  7570	  7613	  7650	  7727	  7731	  7736	  7739	  7750	  7757	  7762
	  7765	  7769	  7772	  7775	  7780	  7787	  7798	  7801	  7804	  7807	  7810	  7813	  7815	  7821
	  7826	  7829	  7857	  7860	  7898	  7902	  7926	  7931	  7938	  7941	  7977	  7981	  8040	  8054
XCTUU	  7596
XJEN	   942	   981	   997	  1069	  1074
XJRST	  7412
XJRSTF	  1339	  1815	  6103	  6515	  6536	  6555	  6574	  7638
XMOVEI	  2636	  2779	  3528	  4011	  4077	  4176	  4234	  5345	  5358	  5362	  5366	  5370	  5374	  5429
	  5471	  5558	  5810	  5915	  5940	  5968	  6003	  7579
XPCW	  1002	  1171	  1183	  1259	  1311	  1347	  1549	  1559	  5168	  5233	  5483	  6525	  6884	  6956
XSFM	  1254	  1306	  1544	  6086	  7158	  7247	  7285	  7476	  7630
$CRSF1	   767#	  1840
$CRSF2	   800#	  1872
%....U	   588	   589
%....V	   588	   589
%BSCRS	  3189	  3283	  3373	  3775
%BSNSK	  3189	  3775	  4482
%BSNST	  2704	  4984
%BSOVR	  2704	  3705	  4984
%BSSPQ	  3775
%BSWTB	  2672	  2697	  3511	  3570
%CLGLC	   626#	  2129	  4297	  4361	  4740	  4757	  4759
%CLSAC	   756#	  4829	  4845	  7853	  7914	  8047
%CLSBD	   753#	  4817	  7984	  8052
%CLSBT	   755#	  4826	  7929	  7945
%CLSDF	   754#	  2374
%CLSKV	   757#	   853	  7730	  7743
%CSTOF	  3607
%DCMAX	  5468
%FK2DT	  4417	  4427
%FKABK	  6064	  6072
%FKAGE	  2445
%FKBET	  2757	  2760	  3143	  3157	  3269	  3451	  3457	  3459
%FKBLK	  3023	  4007	  4033	  4051	  4072	  4089	  4132	  4154	  4196	  4245	  5096	  5673
%FKBLP	  3477
%FKBSH	  3141	  3165	  3186	  3427
%FKCSI	  2443	  2935	  3410	  3576	  3613	  3629	  5072	  5275
%FKEFR	  5818
%FKFR1	  6062
%FKFRA	  6062
%FKFRJ	  5815	  6894
%FKGOL	  1230	  2898	  2907	  2920	  3984
%FKHST	  2855	  2865	  2900
%FKIBH	  2857	  2860	  3425
%FKIBS	  2610	  2857	  2984	  3183	  3352	  3405	  3425	  3457
%FKIBX	  2436	  5660	  6129
%FKICO	  5931	  5937
%FKIDP	  5993	  6001
%FKIJT	  6038	  6047
%FKILO	  5966
%FKINX	  1853	  2391	  2431	  5663	  5882	  6058	  6573	  6604
%FKISC	  6016	  6023
%FKIWT	  2799	  4021	  5676	  6985
%FKJBN	  1729	  2382	  2441	  3144	  3415	  3449	  4291	  4355	  4660	  4734	  4754	  5415
%FKJO%	  3910
%FKJSB	  2384	  2440	  3554	  5135	  5138	  5160	  5238	  5241	  5423	  5462
%FKJTN	  7008
%FKMNQ	  3726	  5063	  5871
%FKNB%	  1278	  2643	  2678	  2701	  2809	  3594
%FKNWC	  2442	  2682	  2686	  2765	  3583
%FKOGL	  4333	  4341	  4367
%FKPS0	  1132	  1834	  2794	  4016	  6985
%FKPS1	  1848	  2796	  4018	  5594	  5606	  5670	  5891	  6504	  6622	  6894	  6987
%FKPS2	  2439	  2453	  3555	  5264	  5298
%FKPSB	  2437	  2449	  3552	  5143	  5266	  5296
%FKPTD	  1242	  2635	  2785	  3572
%FKPTR	  1244	  1280	  2634	  2655	  2707	  3515	  3574
%FKPTX	  1263	  2674	  2812	  3967	  4979
%FKQ2X	  2420
%FKQN	  2425	  2893	  3179	  3295	  3381	  3714	  3732	  3751	  3774	  3835	  4271	  4273	  4299	  4363
	  4439	  4495	  4499	  4501	  4982	  5013	  5060
%FKQTM	  2427	  2510	  2740	  2744	  3718	  3753	  5020	  5059
%FKST2	  4399	  5522	  5565
%FKSTD	  2423	  2778	  4010	  4076	  4175	  4195	  4205	  4233	  4416	  4426	  4999	  7005
%FKSTR	  1218	  2422	  2777	  3968	  4009	  4075	  4135	  4157	  4174	  4202	  4232	  4994	  5799	  5903
%FKSTX	  1212	  5518
%FKSUS	  5888	  5907	  6982
%FKSWX	  1297	  2434	  2478	  2493	  2543	  2884	  2931	  3501	  3648	  3652	  3656	  3662	  3669	  4446
	  4510
%FKTIM	  2429	  3755	  4443	  4538	  4980	  5062
%FKUPT	  2438	  2451	  3553	  5262	  5300
%FKWSL	  2613	  3227	  3397	  3544	  3570
%FKWSS	  2447	  2933	  2996	  3160	  3204	  3210	  3249	  3299	  3391	  3409	  3417	  3443	  3452	  3462
	  3498	  3500	  3541	  3575	  3612	  3632	  5075
%FKWTL	  4003	  4036	  4092	  4199
%FRKTT	  5457	  5748	  5789
%JBTFK	  2380	  3884	  3911
%JBTTY	  2381	  5443
%JOBRT	  2367	  3893	  3900	  3905	  5849	  5858
%JSAMX	  5470
%JTFRK	  5395	  6878
%JTIMP	  6803
%JTJNO	  6842	  7266
%JTMCN	  5399	  6040	  6812
%JTMNI	  5397	  6879	  6890
%PIBMP	  2432	  2660	  2886	  3192	  3286	  3376	  3657	  3780	  4451	  4513	  5609	  5612	  6607	  6609
%PSXSI	  6216	  6246	  6288	  6638
%SILEV	  6217
%SKPCT	   674#
%SPTX	  5464
%TIMCH	  5852
%TIMCN	  2369
%TIMFR	  5853
%TIMTI	  3901	  3906
%TRMCD	  5709	  5759
%TRMCO	  5745	  5758	  5834
..0003	   855#	   859
..0004	   855#	   859
..0005	   855#	   859
..0006	   855#	   859
..0007	   855#	   859
..0012	   856#	   856
..0013	   924#	   930
..0014	   924#	   930
..0015	   924#	   930
..0016	   924#	   930
..0021	   970#	   974
..0022	   970#	   974
..0023	   970#	   974
..0024	   970#	   974
..0035	  1223#	  1223
..0037	  1233#	  1238
..0040	  1233#	  1238
..0041	  1233#	  1238
..0042	  1233#	  1238
..0047	  1351#	  1352
..0050	  1351#	  1352
..0051	  1351#	  1352
..0052	  1351#	  1352
..0062	  1442#	  1454
..0063	  1442#	  1454
..0064	  1442#	  1454
..0065	  1442#	  1454
..0072	  1465#	  1470
..0073	  1465#	  1470
..0074	  1465#	  1470
..0075	  1465#	  1470
..0102	  1500#	  1505
..0103	  1500#	  1505
..0104	  1500#	  1505
..0105	  1500#	  1505
..0112	  1770#	  1781
..0113	  1770#	  1781
..0114	  1770#	  1781
..0115	  1770#	  1781
..0120	  1774#	  1780
..0121	  1774#	  1780
..0122	  1774#	  1780
..0123	  1774#	  1780
..0130	  1823#	  1826
..0131	  1823#	  1826
..0132	  1823#	  1826
..0133	  1823#	  1826
..0136	  1900#	  1904
..0137	  1900#	  1904
..0140	  1900#	  1904
..0141	  1900#	  1904
..0144	  1921#	  1925
..0145	  1921#	  1925
..0146	  1921#	  1925
..0147	  1921#	  1925
..0162	  2129#	  2129
..0163	  2131#	  2131
..0164	  2140#	  2140
..0165	  2141#	  2141
..0166	  2142#	  2142
..0167	  2143#	  2143
..0170	  2145#	  2145
..0171	  2147#	  2147
..0172	  2163#	  2163
..0175	  2371#	  2371
..0176	  2375#	  2375
..0177	  2376#	  2376
..0200	  2477#	  2487
..0201	  2477#	  2487
..0202	  2477#	  2487
..0203	  2477#	  2487
..0210	  2533#	  2536
..0211	  2533#	  2536
..0212	  2533#	  2536
..0213	  2533#	  2536
..0216	  2564#	  2567
..0217	  2564#	  2567
..0220	  2564#	  2567
..0221	  2564#	  2567
..0225	  2615#	  2616
..0226	  2615#	  2616
..0227	  2615#	  2616
..0230	  2615#	  2616
..0232	  2646#	  2654
..0233	  2646#	  2654
..0234	  2646#	  2654
..0235	  2646#	  2654
..0240	  2657#	  2664
..0241	  2657#	  2664
..0242	  2657#	  2664
..0243	  2657#	  2664
..0246	  2670#	  2690
..0247	  2670#	  2690
..0250	  2670#	  2690
..0251	  2670#	  2690
..0254	  2703#	  2706
..0255	  2703#	  2706
..0256	  2703#	  2706
..0257	  2703#	  2706
..0262	  2710#	  2720
..0263	  2710#	  2720
..0264	  2710#	  2720
..0265	  2710#	  2720
..0270	  2722#	  2725
..0271	  2722#	  2725
..0272	  2722#	  2725
..0273	  2722#	  2725
..0276	  2728#	  2732
..0277	  2728#	  2732
..0300	  2728#	  2732
..0301	  2728#	  2732
..0306	  2787#	  2793
..0307	  2787#	  2793
..0310	  2787#	  2793
..0311	  2787#	  2793
..0315	  2860#	  2863
..0316	  2860#	  2863
..0317	  2860#	  2863
..0320	  2860#	  2863
..0322	  2960#	  2974
..0323	  2960#	  2974
..0324	  2960#	  2974
..0325	  2960#	  2974
..0332	  3006#	  3014
..0333	  3006#	  3014
..0334	  3006#	  3014
..0335	  3006#	  3014
..0340	  3017#	  3020
..0341	  3017#	  3020
..0342	  3017#	  3020
..0343	  3017#	  3020
..0346	  3101#	  3113
..0347	  3101#	  3113
..0350	  3101#	  3113
..0351	  3101#	  3113
..0354	  3196#	  3200
..0355	  3196#	  3200
..0356	  3196#	  3200
..0357	  3196#	  3200
..0362	  3238#	  3242
..0363	  3238#	  3242
..0364	  3238#	  3242
..0365	  3238#	  3242
..0370	  3244#	  3247
..0371	  3244#	  3247
..0372	  3244#	  3247
..0373	  3244#	  3247
..0376	  3324#	  3337
..0377	  3324#	  3337
..0400	  3324#	  3337
..0401	  3324#	  3337
..0406	  3356#	  3359
..0407	  3356#	  3359
..0410	  3356#	  3359
..0411	  3356#	  3359
..0414	  3380#	  3384
..0415	  3380#	  3384
..0416	  3380#	  3384
..0417	  3380#	  3384
..0422	  3386#	  3390
..0423	  3386#	  3390
..0424	  3386#	  3390
..0425	  3386#	  3390
..0430	  3418#	  3418
..0431	  3419#	  3419
..0433	  3514#	  3525
..0434	  3514#	  3525
..0435	  3514#	  3525
..0436	  3514#	  3525
..0440	  3517#	  3524
..0441	  3517#	  3524
..0442	  3517#	  3524
..0443	  3517#	  3524
..0446	  3527#	  3534
..0447	  3527#	  3534
..0450	  3527#	  3534
..0451	  3527#	  3534
..0456	  3650#	  3655
..0457	  3650#	  3655
..0460	  3650#	  3655
..0461	  3650#	  3655
..0464	  3660#	  3710
..0465	  3660#	  3710
..0466	  3660#	  3710
..0467	  3660#	  3710
..0472	  3668#	  3673
..0473	  3668#	  3673
..0474	  3668#	  3673
..0475	  3668#	  3673
..0500	  3677#	  3709
..0501	  3677#	  3709
..0502	  3677#	  3709
..0503	  3677#	  3709
..0510	  3738#	  3750
..0511	  3738#	  3750
..0512	  3738#	  3750
..0513	  3738#	  3750
..0516	  3851#	  3855
..0517	  3851#	  3855
..0520	  3851#	  3855
..0521	  3851#	  3855
..0526	  3890#	  3890
..0527	  3891#	  3891
..0530	  3892#	  3892
..0531	  3897#	  3897
..0532	  4013#	  4025
..0533	  4013#	  4025
..0534	  4013#	  4025
..0535	  4013#	  4025
..0540	  4017#	  4024
..0541	  4017#	  4024
..0542	  4017#	  4024
..0543	  4017#	  4024
..0550	  4293#	  4293
..0551	  4296#	  4296
..0552	  4298#	  4298
..0553	  4357#	  4357
..0554	  4360#	  4360
..0555	  4362#	  4362
..0560	  4404#	  4408
..0561	  4404#	  4408
..0562	  4404#	  4408
..0563	  4404#	  4408
..0566	  4450#	  4457
..0567	  4450#	  4457
..0570	  4450#	  4457
..0571	  4450#	  4457
..0574	  4492#	  4503
..0575	  4492#	  4503
..0576	  4492#	  4503
..0577	  4492#	  4503
..0603	  4505#	  4509
..0604	  4505#	  4509
..0605	  4505#	  4509
..0606	  4505#	  4509
..0610	  4512#	  4523
..0611	  4512#	  4523
..0612	  4512#	  4523
..0613	  4512#	  4523
..0616	  4516#	  4522
..0617	  4516#	  4522
..0620	  4516#	  4522
..0621	  4516#	  4522
..0624	  4586#	  4586
..0625	  4588#	  4588
..0626	  4591#	  4591
..0627	  4597#	  4597
..0630	  4598#	  4598
..0631	  4600#	  4600
..0632	  4601#	  4601
..0633	  4607#	  4607
..0634	  4617#	  4617
..0635	  4619#	  4619
..0636	  4622#	  4622
..0637	  4628#	  4628
..0640	  4629#	  4629
..0641	  4630#	  4630
..0642	  4632#	  4632
..0643	  4633#	  4633
..0644	  4636#	  4636
..0645	  4661#	  4661
..0646	  4662#	  4662
..0647	  4663#	  4663
..0650	  4695#	  4701
..0651	  4695#	  4701
..0652	  4695#	  4701
..0653	  4695#	  4701
..0654	  4695#	  4701
..0657	  4696#	  4696
..0660	  4697#	  4697
..0661	  4698#	  4698
..0662	  4703#	  4707
..0663	  4703#	  4707
..0664	  4703#	  4707
..0665	  4703#	  4707
..0666	  4703#	  4707
..0671	  4704#	  4704
..0672	  4721#	  4721
..0673	  4722#	  4722
..0674	  4725#	  4725
..0675	  4736#	  4736
..0676	  4739#	  4739
..0677	  4741#	  4741
..0700	  4750#	  4750
..0701	  4758#	  4758
..0702	  4760#	  4760
..0703	  4777#	  4777
..0704	  4778#	  4778
..0705	  4779#	  4779
..0706	  4780#	  4780
..0707	  4794#	  4794
..0710	  4801#	  4801
..0711	  4805#	  4805
..0712	  4807#	  4807
..0714	  4819#	  4825
..0715	  4819#	  4825
..0716	  4819#	  4825
..0717	  4819#	  4825
..0721	  4837#	  4837
..0722	  4987#	  4989
..0723	  4987#	  4989
..0724	  4987#	  4989
..0725	  4987#	  4989
..0730	  5047#	  5052
..0731	  5047#	  5052
..0732	  5047#	  5052
..0733	  5047#	  5052
..0736	  5171#	  5171
..0737	  5175#	  5175
..0740	  5178#	  5184
..0741	  5178#	  5184
..0742	  5178#	  5184
..0743	  5178#	  5184
..0746	  5179#	  5183
..0747	  5179#	  5183
..0750	  5179#	  5183
..0751	  5179#	  5183
..0752	  5179#	  5183
..0761	  5243#	  5247
..0762	  5243#	  5247
..0763	  5243#	  5247
..0764	  5243#	  5247
..0771	  5311#	  5318
..0772	  5311#	  5318
..0773	  5311#	  5318
..0774	  5311#	  5318
..0777	  5409#	  5413
..1000	  5409#	  5413
..1001	  5409#	  5413
..1002	  5409#	  5413
..1003	  5409#	  5413
..1006	  5449#	  5449
..1012	  5676#	  5679
..1013	  5676#	  5679
..1014	  5676#	  5679
..1015	  5676#	  5679
..1021	  5947#	  5951
..1022	  5947#	  5951
..1023	  5947#	  5951
..1024	  5947#	  5951
..1027	  5990#	  5996
..1030	  5990#	  5996
..1031	  5990#	  5996
..1032	  5990#	  5996
..1035	  6014#	  6019
..1036	  6014#	  6019
..1037	  6014#	  6019
..1040	  6014#	  6019
..1043	  6089#	  6104
..1044	  6089#	  6104
..1045	  6089#	  6104
..1046	  6089#	  6104
..1051	  6137#	  6144
..1052	  6137#	  6144
..1053	  6137#	  6144
..1054	  6137#	  6144
..1057	  6165#	  6168
..1060	  6165#	  6168
..1061	  6165#	  6168
..1062	  6165#	  6168
..1067	  6551#	  6556
..1070	  6551#	  6556
..1071	  6551#	  6556
..1072	  6551#	  6556
..1103	  7071#	  7099
..1104	  7071#	  7099
..1105	  7071#	  7099
..1106	  7071#	  7099
..1111	  7112#	  7140
..1112	  7112#	  7140
..1113	  7112#	  7140
..1114	  7112#	  7140
..1121	  7230#	  7241
..1122	  7230#	  7241
..1123	  7230#	  7241
..1124	  7230#	  7241
..1131	  7493#	  7498
..1132	  7493#	  7498
..1133	  7493#	  7498
..1134	  7493#	  7498
..1137	  7539#	  7543
..1140	  7539#	  7543
..1141	  7539#	  7543
..1142	  7539#	  7543
..1145	  7546#	  7551
..1146	  7546#	  7551
..1147	  7546#	  7551
..1150	  7546#	  7551
..1153	  7581#	  7595
..1154	  7581#	  7595
..1155	  7581#	  7595
..1156	  7581#	  7595
..1161	  7583#	  7593
..1162	  7583#	  7593
..1163	  7583#	  7593
..1164	  7583#	  7593
..1167	  7587#	  7592
..1170	  7587#	  7592
..1171	  7587#	  7592
..1172	  7587#	  7592
..1175	  7761#	  7761
..1176	  7764#	  7764
..1177	  7768#	  7768
..1200	  7771#	  7771
..1201	  7774#	  7774
..1202	  7789#	  7794
..1203	  7789#	  7794
..1204	  7789#	  7794
..1205	  7789#	  7794
..1210	  7797#	  7797
..1211	  7800#	  7800
..1212	  7803#	  7803
..1213	  7806#	  7806
..1214	  7809#	  7809
..1215	  7834#	  7834
..1216	  7835#	  7835
..1217	  7838#	  7838
..1220	  7840#	  7840
..1221	  7845#	  7845
..1222	  7862#	  7869
..1223	  7862#	  7869
..1224	  7862#	  7869
..1225	  7862#	  7869
..1230	  7871#	  7875
..1231	  7871#	  7875
..1232	  7871#	  7875
..1233	  7871#	  7875
..1236	  7957#	  7968
..1237	  7957#	  7968
..1240	  7957#	  7968
..1241	  7957#	  7968
..CNS	  2704	  2704#	  2857#	  2857	  3189#	  3189	  3425#	  3425	  3457#	  3457	  3459#	  3459	  3570#	  3570
	  3775#	  3775	  4984#	  4984	  6062#	  6062	  6894#	  6894	  6985#	  6985
..CNS2	  2704	  2704#	  2857#	  2857	  3189#	  3189	  3425#	  3425	  3457#	  3457	  3459#	  3459	  3570#	  3570
	  3775#	  3775	  4984#	  4984	  6062#	  6062	  6894#	  6894	  6985#	  6985
..CON	   856#	   856	  1223#	  1223	  2129#	  2129	  2131#	  2131	  2140#	  2140	  2141#	  2141	  2142#	  2142
	  2143#	  2143	  2145#	  2145	  2147#	  2147	  2163#	  2163	  2371#	  2371	  2375#	  2375	  2376#	  2376
	  3418#	  3418	  3419#	  3419	  3890#	  3890	  3891#	  3891	  3892#	  3892	  3897#	  3897	  4293#	  4293
	  4296#	  4296	  4298#	  4298	  4357#	  4357	  4360#	  4360	  4362#	  4362	  4586#	  4586	  4588#	  4588
	  4591#	  4591	  4597#	  4597	  4598#	  4598	  4600#	  4600	  4601#	  4601	  4607#	  4607	  4617#	  4617
	  4619#	  4619	  4622#	  4622	  4628#	  4628	  4629#	  4629	  4630#	  4630	  4632#	  4632	  4633#	  4633
	  4636#	  4636	  4661#	  4661	  4662#	  4662	  4663#	  4663	  4696#	  4696	  4697#	  4697	  4698#	  4698
	  4704#	  4704	  4721#	  4721	  4722#	  4722	  4725#	  4725	  4736#	  4736	  4739#	  4739	  4741#	  4741
	  4750#	  4750	  4758#	  4758	  4760#	  4760	  4777#	  4777	  4778#	  4778	  4779#	  4779	  4780#	  4780
	  4794#	  4794	  4801#	  4801	  4805#	  4805	  4807#	  4807	  4837#	  4837	  5171#	  5171	  5175#	  5175
	  5449#	  5449	  7761#	  7761	  7764#	  7764	  7768#	  7768	  7771#	  7771	  7774#	  7774	  7797#	  7797
	  7800#	  7800	  7803#	  7803	  7806#	  7806	  7809#	  7809	  7834#	  7834	  7835#	  7835	  7838#	  7838
	  7840#	  7840	  7845#	  7845
..GCNS	  2704	  2857	  3189	  3425	  3457	  3459	  3570	  3775	  4984	  6062	  6894	  6985
..GET	   856#	   856	  1223#	  1223	  2129#	  2129	  2131#	  2131	  2140#	  2140	  2141#	  2141	  2142#	  2142
	  2143#	  2143	  2145#	  2145	  2147#	  2147	  2163#	  2163	  2371#	  2371	  2375#	  2375	  2376#	  2376
	  3418#	  3418	  3419#	  3419	  3890#	  3890	  3891#	  3891	  3892#	  3892	  3897#	  3897	  4293#	  4293
	  4296#	  4296	  4298#	  4298	  4357#	  4357	  4360#	  4360	  4362#	  4362	  4586#	  4586	  4588#	  4588
	  4591#	  4591	  4597#	  4597	  4598#	  4598	  4600#	  4600	  4601#	  4601	  4607#	  4607	  4617#	  4617
	  4619#	  4619	  4622#	  4622	  4628#	  4628	  4629#	  4629	  4630#	  4630	  4632#	  4632	  4633#	  4633
	  4636#	  4636	  4661#	  4661	  4662#	  4662	  4663#	  4663	  4696#	  4696	  4697#	  4697	  4698#	  4698
	  4704#	  4704	  4721#	  4721	  4722#	  4722	  4725#	  4725	  4736#	  4736	  4739#	  4739	  4741#	  4741
	  4750#	  4750	  4758#	  4758	  4760#	  4760	  4777#	  4777	  4778#	  4778	  4779#	  4779	  4780#	  4780
	  4794#	  4794	  4801#	  4801	  4805#	  4805	  4807#	  4807	  4837#	  4837	  5171#	  5171	  5175#	  5175
	  5449#	  5449	  7761#	  7761	  7764#	  7764	  7768#	  7768	  7771#	  7771	  7774#	  7774	  7797#	  7797
	  7800#	  7800	  7803#	  7803	  7806#	  7806	  7809#	  7809	  7834#	  7834	  7835#	  7835	  7838#	  7838
	  7840#	  7840	  7845#	  7845
..INDF	   924	   970	  1233	  1351	  1442	  1465	  1500	  1770	  1774	  1823	  1900	  1921	  2477	  2533
	  2564	  2615	  2646	  2657	  2670	  2703	  2710	  2722	  2728	  2787	  2860	  2960	  3006	  3017
	  3101	  3196	  3238	  3244	  3324	  3356	  3380	  3386	  3514	  3517	  3527	  3650	  3660	  3668
	  3677	  3738	  3851	  4013	  4017	  4404	  4450	  4492	  4505	  4512	  4516	  4819	  4987	  5047
	  5178	  5243	  5311	  5676	  5947	  5990	  6014	  6089	  6137	  6165	  6551	  7071	  7112	  7230
	  7493	  7539	  7546	  7581	  7583	  7587	  7789	  7862	  7871	  7957
..JN	  1834	  2796	  2984	  3186	  3189	  3192	  3283	  3286	  3352	  3373	  3376	  3775	  3780	  3893
	  4482	  5096	  5670	  5818	  6216	  6246	  6288	  6638
..RSDF	   930	   974	  1238	  1352	  1454	  1470	  1505	  1780	  1781	  1826	  1904	  1925	  2487	  2536
	  2567	  2616	  2654	  2664	  2690	  2706	  2720	  2725	  2732	  2793	  2863	  2974	  3014	  3020
	  3113	  3200	  3242	  3247	  3337	  3359	  3384	  3390	  3524	  3525	  3534	  3655	  3673	  3709
	  3710	  3750	  3855	  4024	  4025	  4408	  4457	  4503	  4509	  4522	  4523	  4825	  4989	  5052
	  5184	  5247	  5318	  5679	  5951	  5996	  6019	  6104	  6144	  6168	  6556	  7099	  7140	  7241
	  7498	  7543	  7551	  7592	  7593	  7595	  7794	  7869	  7875	  7968
..STR3	  2857	  3189	  3775
..SVDF	   924	   970	  1233	  1351	  1442	  1465	  1500	  1770	  1774	  1823	  1900	  1921	  2477	  2533
	  2564	  2615	  2646	  2657	  2670	  2703	  2710	  2722	  2728	  2787	  2860	  2960	  3006	  3017
	  3101	  3196	  3238	  3244	  3324	  3356	  3380	  3386	  3514	  3517	  3527	  3650	  3660	  3668
	  3677	  3738	  3851	  4013	  4017	  4404	  4450	  4492	  4505	  4512	  4516	  4819	  4987	  5047
	  5178	  5243	  5311	  5676	  5947	  5990	  6014	  6089	  6137	  6165	  6551	  7071	  7112	  7230
	  7493	  7539	  7546	  7581	  7583	  7587	  7789	  7862	  7871	  7957
..SVLD	   855	  4695	  4703	  5179	  5409
..TAGE	   924	   925#	   930#	   970	   971#	   974#	  1233	  1233#	  1238#	  1351	  1351#	  1352#	  1442	  1443#
	  1454#	  1465	  1466#	  1470#	  1500	  1501#	  1505#	  1770	  1771#	  1772	  1773	  1774	  1775#	  1778
	  1779	  1780#	  1781#	  1823	  1824#	  1826#	  1900	  1901#	  1904#	  1921	  1922#	  1925#	  2477	  2478#
	  2487#	  2533	  2534#	  2536#	  2564	  2565#	  2567#	  2615	  2615#	  2616#	  2646	  2647#	  2654#	  2657
	  2658#	  2664#	  2670	  2672#	  2690#	  2703	  2704#	  2706#	  2710	  2711#	  2714	  2715	  2720#	  2722
	  2723#	  2725#	  2728	  2730#	  2732#	  2787	  2788#	  2793#	  2860	  2860#	  2863#	  2960	  2961#	  2974#
	  3006	  3007#	  3014#	  3017	  3018#	  3020#	  3101	  3102#	  3111	  3112	  3113#	  3196	  3197#	  3200#
	  3238	  3239#	  3242#	  3244	  3245#	  3247#	  3324	  3325#	  3337#	  3356	  3357#	  3359#	  3380	  3381#
	  3384#	  3386	  3387#	  3390#	  3514	  3514#	  3517	  3518#	  3520	  3521	  3524#	  3525#	  3527	  3528#
	  3534#	  3650	  3651#	  3655#	  3660	  3661#	  3663	  3664	  3668	  3669#	  3673#	  3677	  3678#	  3709#
	  3710#	  3738	  3740#	  3750#	  3851	  3852#	  3855#	  4013	  4014#	  4015	  4016	  4017	  4018#	  4024#
	  4025#	  4404	  4405#	  4406	  4407	  4408#	  4450	  4451#	  4457#	  4492	  4494#	  4500	  4501	  4503#
	  4505	  4505#	  4509#	  4512	  4513#	  4516	  4518#	  4522#	  4523#	  4819	  4819#	  4825#	  4987	  4988#
	  4989#	  5047	  5049#	  5052#	  5178	  5179#	  5184#	  5243	  5244#	  5245	  5246	  5247#	  5311	  5313#
	  5318#	  5676	  5676#	  5679#	  5947	  5948#	  5951#	  5990	  5992#	  5996#	  6014	  6016#	  6019#	  6089
	  6091#	  6104#	  6137	  6138#	  6144#	  6165	  6166#	  6168#	  6551	  6552#	  6556#	  7071	  7072#	  7085
	  7086	  7099#	  7112	  7113#	  7126	  7127	  7140#	  7230	  7231#	  7241#	  7493	  7494#	  7498#	  7539
	  7540#	  7543#	  7546	  7547#	  7551#	  7581	  7582#	  7583	  7584#	  7585	  7586	  7587	  7588#	  7590
	  7591	  7592#	  7593#	  7595#	  7789	  7790#	  7791	  7792	  7794#	  7862	  7863#	  7865	  7866	  7869#
	  7871	  7872#	  7875#	  7957	  7958#	  7965	  7966	  7968#
..TAGF	   924	   925#	   930	   930#	   970	   971#	   974	   974#	  1233	  1233#	  1238	  1238#	  1351	  1351#
	  1352	  1352#	  1442	  1443#	  1454	  1454#	  1465	  1466#	  1467	  1470	  1470#	  1500	  1501#	  1505
	  1505#	  1770	  1771#	  1773	  1773#	  1774	  1775#	  1776	  1779	  1779#	  1780	  1780#	  1781	  1781#
	  1823	  1824#	  1826	  1826#	  1900	  1901#	  1904	  1904#	  1921	  1922#	  1925	  1925#	  2477	  2478#
	  2487	  2487#	  2533	  2534#	  2536	  2536#	  2564	  2565#	  2567	  2567#	  2615	  2615#	  2616	  2616#
	  2646	  2647#	  2654	  2654#	  2657	  2658#	  2664	  2664#	  2670	  2672#	  2690	  2690#	  2703	  2704#
	  2706	  2706#	  2710	  2711#	  2713	  2715	  2715#	  2720	  2720#	  2722	  2723#	  2725	  2725#	  2728
	  2730#	  2732	  2732#	  2787	  2788#	  2793	  2793#	  2860	  2860#	  2863	  2863#	  2960	  2961#	  2974
	  2974#	  3006	  3007#	  3014	  3014#	  3017	  3018#	  3020	  3020#	  3101	  3102#	  3112	  3112#	  3113
	  3113#	  3196	  3197#	  3198	  3200	  3200#	  3238	  3239#	  3240	  3242	  3242#	  3244	  3245#	  3247
	  3247#	  3324	  3325#	  3337	  3337#	  3356	  3357#	  3359	  3359#	  3380	  3381#	  3384	  3384#	  3386
	  3387#	  3388	  3390	  3390#	  3514	  3514#	  3517	  3518#	  3521	  3521#	  3524	  3524#	  3525	  3525#
	  3527	  3528#	  3530	  3534	  3534#	  3650	  3651#	  3655	  3655#	  3660	  3661#	  3664	  3664#	  3668
	  3669#	  3673	  3673#	  3677	  3678#	  3678	  3709	  3709#	  3710	  3710#	  3738	  3740#	  3747	  3750
	  3750#	  3851	  3852#	  3855	  3855#	  4013	  4014#	  4016	  4016#	  4017	  4018#	  4020	  4024	  4024#
	  4025	  4025#	  4404	  4405#	  4407	  4407#	  4408	  4408#	  4450	  4451#	  4457	  4457#	  4492	  4494#
	  4501	  4501#	  4503	  4503#	  4505	  4505#	  4509	  4509#	  4512	  4513#	  4516	  4518#	  4522	  4522#
	  4523	  4523#	  4819	  4819#	  4820	  4825	  4825#	  4987	  4988#	  4989	  4989#	  5047	  5049#	  5052
	  5052#	  5178	  5179#	  5184	  5184#	  5243	  5244#	  5246	  5246#	  5247	  5247#	  5311	  5313#	  5318
	  5318#	  5676	  5676#	  5679	  5679#	  5947	  5948#	  5951	  5951#	  5990	  5992#	  5996	  5996#	  6014
	  6016#	  6019	  6019#	  6089	  6091#	  6104	  6104#	  6137	  6138#	  6139	  6144	  6144#	  6165	  6166#
	  6168	  6168#	  6551	  6552#	  6553	  6556	  6556#	  7071	  7072#	  7086	  7086#	  7099	  7099#	  7112
	  7113#	  7127	  7127#	  7140	  7140#	  7230	  7231#	  7241	  7241#	  7493	  7494#	  7495	  7498	  7498#
	  7539	  7540#	  7543	  7543#	  7546	  7547#	  7551	  7551#	  7581	  7582#	  7583	  7584#	  7586	  7586#
	  7587	  7588#	  7591	  7591#	  7592	  7592#	  7593	  7593#	  7595	  7595#	  7789	  7790#	  7792	  7792#
	  7794	  7794#	  7862	  7863#	  7866	  7866#	  7869	  7869#	  7871	  7872#	  7875	  7875#	  7957	  7958#
	  7966	  7966#	  7968	  7968#
..TYNE	  2610	  2886	  4018	  8047
..TYNN	  1848	  2660	  3023	  3397	  3657	  4016	  4451	  4490	  4513	  4845	  5594	  7853
.CKLC1	  1119	  1421	  1437	  1452	  1493	  1521	  1988	  2024	  2970	  3333	  3626	  3702	  3881	  7201
.CKLC2	  1119	  1421	  1437	  1452	  1493	  1521	  1988	  2024	  2970	  3333	  3626	  3702	  3881	  7201
.CPYRT	   587
.ENAV1	  2815	  4652	  4711	  7689
.ENAV2	  2815	  4652	  4711	  7689
.ENAV3	  2815	  4652	  4711	  7689
.ENSV1	  6936
.ENSV2	  6936
.ENSV3	  6936
.POPX	   859	   930	   974	  1238	  1352	  1454	  1470	  1505	  1780	  1781	  1826	  1904	  1925	  2487
	  2536	  2567	  2616	  2654	  2664	  2690	  2706	  2720	  2725	  2732	  2793	  2863	  2974	  3014
	  3020	  3113	  3200	  3242	  3247	  3337	  3359	  3384	  3390	  3524	  3525	  3534	  3655	  3673
	  3709	  3710	  3750	  3855	  4024	  4025	  4408	  4457	  4503	  4509	  4522	  4523	  4701	  4707
	  4825	  4989	  5052	  5183	  5184	  5247	  5318	  5413	  5679	  5951	  5996	  6019	  6104	  6144
	  6168	  6556	  7099	  7140	  7241	  7498	  7543	  7551	  7592	  7593	  7595	  7794	  7869	  7875
	  7968
.POPX2	   859	   930	   974	  1238	  1352	  1454	  1470	  1505	  1780	  1781	  1826	  1904	  1925	  2487
	  2536	  2567	  2616	  2654	  2664	  2690	  2706	  2720	  2725	  2732	  2793	  2863	  2974	  3014
	  3020	  3113	  3200	  3242	  3247	  3337	  3359	  3384	  3390	  3524	  3525	  3534	  3655	  3673
	  3709	  3710	  3750	  3855	  4024	  4025	  4408	  4457	  4503	  4509	  4522	  4523	  4701	  4707
	  4825	  4989	  5052	  5183	  5184	  5247	  5318	  5413	  5679	  5951	  5996	  6019	  6104	  6144
	  6168	  6556	  7099	  7140	  7241	  7498	  7543	  7551	  7592	  7593	  7595	  7794	  7869	  7875
	  7968
.POPX3	   859	   930	   974	  1238	  1352	  1454	  1470	  1505	  1780	  1781	  1826	  1904	  1925	  2487
	  2536	  2567	  2616	  2654	  2664	  2690	  2706	  2720	  2725	  2732	  2793	  2863	  2974	  3014
	  3020	  3113	  3200	  3242	  3247	  3337	  3359	  3384	  3390	  3524	  3525	  3534	  3655	  3673
	  3709	  3710	  3750	  3855	  4024	  4025	  4408	  4457	  4503	  4509	  4522	  4523	  4701	  4707
	  4825	  4989	  5052	  5183	  5184	  5247	  5318	  5413	  5679	  5951	  5996	  6019	  6104	  6144
	  6168	  6556	  7099	  7140	  7241	  7498	  7543	  7551	  7592	  7593	  7595	  7794	  7869	  7875
	  7968
.POPX4	   859	   930	   974	  1238	  1352	  1454	  1470	  1505	  1780	  1781	  1826	  1904	  1925	  2487
	  2536	  2567	  2616	  2654	  2664	  2690	  2706	  2720	  2725	  2732	  2793	  2863	  2974	  3014
	  3020	  3113	  3200	  3242	  3247	  3337	  3359	  3384	  3390	  3524	  3525	  3534	  3655	  3673
	  3709	  3710	  3750	  3855	  4024	  4025	  4408	  4457	  4503	  4509	  4522	  4523	  4701	  4707
	  4825	  4989	  5052	  5183	  5184	  5247	  5318	  5413	  5679	  5951	  5996	  6019	  6104	  6144
	  6168	  6556	  7099	  7140	  7241	  7498	  7543	  7551	  7592	  7593	  7595	  7794	  7869	  7875
	  7968
.PSHX	   855	   924	   970	  1233	  1351	  1442	  1465	  1500	  1770	  1774	  1823	  1900	  1921	  2477
	  2533	  2564	  2615	  2646	  2657	  2670	  2703	  2710	  2722	  2728	  2787	  2860	  2960	  3006
	  3017	  3101	  3196	  3238	  3244	  3324	  3356	  3380	  3386	  3514	  3517	  3527	  3650	  3660
	  3668	  3677	  3738	  3851	  4013	  4017	  4404	  4450	  4492	  4505	  4512	  4516	  4695	  4703
	  4819	  4987	  5047	  5178	  5179	  5243	  5311	  5409	  5676	  5947	  5990	  6014	  6089	  6137
	  6165	  6551	  7071	  7112	  7230	  7493	  7539	  7546	  7581	  7583	  7587	  7789	  7862	  7871
	  7957
.PSHX1	   855	   855#	   859	   859#	   924	   924#	   930	   930#	   970	   970#	   974	   974#	  1233	  1233#
	  1238	  1238#	  1351	  1351#	  1352	  1352#	  1442	  1442#	  1454	  1454#	  1465	  1465#	  1470	  1470#
	  1500	  1500#	  1505	  1505#	  1770	  1770#	  1774	  1774#	  1780	  1780#	  1781	  1781#	  1823	  1823#
	  1826	  1826#	  1900	  1900#	  1904	  1904#	  1921	  1921#	  1925	  1925#	  2477	  2477#	  2487	  2487#
	  2533	  2533#	  2536	  2536#	  2564	  2564#	  2567	  2567#	  2615	  2615#	  2616	  2616#	  2646	  2646#
	  2654	  2654#	  2657	  2657#	  2664	  2664#	  2670	  2670#	  2690	  2690#	  2703	  2703#	  2706	  2706#
	  2710	  2710#	  2720	  2720#	  2722	  2722#	  2725	  2725#	  2728	  2728#	  2732	  2732#	  2787	  2787#
	  2793	  2793#	  2860	  2860#	  2863	  2863#	  2960	  2960#	  2974	  2974#	  3006	  3006#	  3014	  3014#
	  3017	  3017#	  3020	  3020#	  3101	  3101#	  3113	  3113#	  3196	  3196#	  3200	  3200#	  3238	  3238#
	  3242	  3242#	  3244	  3244#	  3247	  3247#	  3324	  3324#	  3337	  3337#	  3356	  3356#	  3359	  3359#
	  3380	  3380#	  3384	  3384#	  3386	  3386#	  3390	  3390#	  3514	  3514#	  3517	  3517#	  3524	  3524#
	  3525	  3525#	  3527	  3527#	  3534	  3534#	  3650	  3650#	  3655	  3655#	  3660	  3660#	  3668	  3668#
	  3673	  3673#	  3677	  3677#	  3709	  3709#	  3710	  3710#	  3738	  3738#	  3750	  3750#	  3851	  3851#
	  3855	  3855#	  4013	  4013#	  4017	  4017#	  4024	  4024#	  4025	  4025#	  4404	  4404#	  4408	  4408#
	  4450	  4450#	  4457	  4457#	  4492	  4492#	  4503	  4503#	  4505	  4505#	  4509	  4509#	  4512	  4512#
	  4516	  4516#	  4522	  4522#	  4523	  4523#	  4695	  4695#	  4701	  4701#	  4703	  4703#	  4707	  4707#
	  4819	  4819#	  4825	  4825#	  4987	  4987#	  4989	  4989#	  5047	  5047#	  5052	  5052#	  5178	  5178#
	  5179	  5179#	  5183	  5183#	  5184	  5184#	  5243	  5243#	  5247	  5247#	  5311	  5311#	  5318	  5318#
	  5409	  5409#	  5413	  5413#	  5676	  5676#	  5679	  5679#	  5947	  5947#	  5951	  5951#	  5990	  5990#
	  5996	  5996#	  6014	  6014#	  6019	  6019#	  6089	  6089#	  6104	  6104#	  6137	  6137#	  6144	  6144#
	  6165	  6165#	  6168	  6168#	  6551	  6551#	  6556	  6556#	  7071	  7071#	  7099	  7099#	  7112	  7112#
	  7140	  7140#	  7230	  7230#	  7241	  7241#	  7493	  7493#	  7498	  7498#	  7539	  7539#	  7543	  7543#
	  7546	  7546#	  7551	  7551#	  7581	  7581#	  7583	  7583#	  7587	  7587#	  7592	  7592#	  7593	  7593#
	  7595	  7595#	  7789	  7789#	  7794	  7794#	  7862	  7862#	  7869	  7869#	  7871	  7871#	  7875	  7875#
	  7957	  7957#	  7968	  7968#
.PSHX2	   855	   924	   970	  1233	  1351	  1442	  1465	  1500	  1770	  1774	  1823	  1900	  1921	  2477
	  2533	  2564	  2615	  2646	  2657	  2670	  2703	  2710	  2722	  2728	  2787	  2860	  2960	  3006
	  3017	  3101	  3196	  3238	  3244	  3324	  3356	  3380	  3386	  3514	  3517	  3527	  3650	  3660
	  3668	  3677	  3738	  3851	  4013	  4017	  4404	  4450	  4492	  4505	  4512	  4516	  4695	  4703
	  4819	  4987	  5047	  5178	  5179	  5243	  5311	  5409	  5676	  5947	  5990	  6014	  6089	  6137
	  6165	  6551	  7071	  7112	  7230	  7493	  7539	  7546	  7581	  7583	  7587	  7789	  7862	  7871
	  7957
.XCMSY	   588