Proof WAITLIST (#274) (#330)

Proof WAITLIST (#274)
This commit is contained in:
cai 2018-05-28 10:03:11 +08:00 committed by James Harris
parent 4e0940e275
commit 95475a353e

View File

@ -28,15 +28,15 @@
# Colossus 2A # Colossus 2A
# Page 1221 # Page 1221
# PROGRAM DESCRIPTION DATE -- 10 OCTOBER 1966 # PROGRAM DESCRIPTION DATE - 10 OCTOBER 1966
# MOD NO -- 2 LOG SECTION -- WAITLIST # MOD NO - 2 LOG SECTION - WAITLIST
# MOD BY -- MILLER (DTMAX INCREASED TO 162.5 SEC) ASSEMBLY -- SUNBURST REV 5 # MOD BY - MILLER (DTMAX INCREASED TO 162.5 SEC) ASSEMBLY SUNBURST REV 5
# MOD 3 BY KERNAN (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4 # MOD 3 BY KERNAN (INHINT INSERTED AT WAITLIST) 2/28/68 SKIPPER REV 4
# MOD 4BY KERNAN (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13. # MOD 4BY KERNAN (TWIDDLE IN 54) 3/28/68 SKIPPER REV 13.
# #
# FUNCTIONAL DESCRIPTION -- # FUNCTIONAL DESCRIPTION-
# PART OF A SECTION OF PROGRAMS -- WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM (CALLED A TASK), # PART OF A SECTION OF PROGRAMS,-WAITLIST, TASKOVER, T3RUPT, USED TO CALL A PROGRAM, (CALLED A TASK),
# WHICH IS TO BEGIN IN C(A) CENTISECONDS. WAITLIST UPDATES TIME3, LST1, AND LST2. THE MEANING OF THESE LISTS # WHICH IS TO BEGIN IN C(A) CENTISECONDS. WAITLIST UPDATES TIME3, LST1 AND LST2. THE MEANING OF THESE LISTS
# FOLLOW. # FOLLOW.
# #
# C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1) # C(TIME3) = 16384 -(T1-T) CENTISECONDS, (T=PRESENT TIME, T1-TIME FOR TASK1)
@ -54,59 +54,68 @@
# C(LST2 +14) = 2CADR OF TASK8 # C(LST2 +14) = 2CADR OF TASK8
# C(LST2 +16) = 2CADR OF TASK9 # C(LST2 +16) = 2CADR OF TASK9
# #
# WARNINGS -- # WARNINGS-
# --------
# 1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC) # 1) 1 <= C(A) <= 16250D (1 CENTISECOND TO 162.5 SEC)
# 2) 9 TASKS MAXIMUM # 2) 9 TASKS MAXIMUM
# 3) TASKS CALLED UNDER INTERRUPT INHIBITED # 3) TASKS CALLED UNDER INTERRUPT INHIBITED
# 4) TASKS END BY TC TASKOVER # 4) TASKS END BY TC TASKOVER
# #
# CALLING SEQUENCE -- # CALLING SEQUENCE-
#
# L-1 CA DELTAT (TIME IN CENTISECONDS TO TASK START) # L-1 CA DELTAT (TIME IN CENTISECONDS TO TASK START)
# L TC WAITLIST # L TC WAITLIST
# L+1 2CADR DESIRED TASK # L+1 2CADR DESIRED TASK
# L+2 (MINOR OF 2CADR) # L+2 (MINOR OF 2CADR)
# L+3 RELINT (RETURNS HERE) # L+3 RELINT (RETURNS HERE)
# #
# TWIDDLE -- # TWIDDLE-
# -------
# TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER. IN # TWIDDLE IS FOR USE WHEN THE TASK BEING SET UP IS IN THE SAME EBANK AND FBANK AS THE USER. IN
# SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR, # SUCH CASES, IT IMPROVES UPON WAITLIST BY ELIMINATING THE NEED FOR THE BBCON HALF OF THE 2CADR,
# Page 1222 # Page 1222
# SAVING A WORD. TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT, # SAVING A WORD. TWIDDLE IS LIKE WAITLIST IN EVERY RESPECT EXCEPT CALLING SEQUENCE, TO WIT-
#
# L-1 CA DELTAT # L-1 CA DELTAT
# L TC TWIDDLE # L TC TWIDDLE
# L+1 ADRES DESIRED TASK # L+1 ADRES DESIRED TASK
# L+2 RELINT (RETURNS HERE) # L+2 RELINT (RETURNS HERE)
# #
# NORMAL EXIT MODES -- # NORMAL EXIT MODES-
# AT L+3 OF CALLING SEQUENCE. #
# AT L+3 OF CALLING SEQUENCE
#
# ALARM OR ABORT EXIT MODES-
# #
# ALARM OR ABORT EXIT MODES --
# TC ABORT # TC ABORT
# OCT 1203 (WAITLIST OVERFLOW -- TOO MANY TASKS) # OCT 1203 (WAITLIST OVERFLOW - TOO MANY TASKS)
# #
# ERASABLE INITIALIZATION REQUIRED -- # ERASABLE INITIALIZATION REQUIRED-
# ACCOMPLISHED BY FRESH START -- LST2, ..., LST2 +16 = ENDTASK #
# ACCOMPLISHED BY FRESH START,-- LST2,..., LST2 +16 =ENDTASK
# LST1,..., LST1 +7 =NEG1/2 # LST1,..., LST1 +7 =NEG1/2
# #
# OUTPUT-- # OUTPUT--
#
# LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME. # LST1 AND LST2 UPDATED WITH NEW TASK AND ASSOCIATED TIME.
# DEBRIS-
# CENTRALS- A,Q,L
# OTHER - WAITEXIT, WAITADR, WAITTEMP, WAITBANK
# DETAILED ANALYSIS OF TIMING-
# #
# DEBRIS --
# CENTRALS -- A,Q,L
# OTHER -- WAITEXIT, WAITADR, WAITTEMP, WAITBANK
#
# DETAILED ANALYSIS OF TIMING --
# CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS. # CONTROL WILL NOT BE RETURNED TO THE SPECIFIED ADDRESS (2CADR) IN EXACTLY DELTA T CENTISECONDS.
# THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS: # THE APPROXIMATE TIME MAY BE CALCULATED AS FOLLOWS
#
# LET T0 = THE TIME OF THE TC WAITLIST # LET T0 = THE TIME OF THE TC WAITLIST
# LET TS = T0 +147U + COUNTER INCREMENTS (SET UP TIME) # LET TS = T0 +147U + COUNTER INCREMENTS (SET UP TIME)
# LET X = TS -(100TS)/100 (VARIANCE FROM COUNTERS) # LET X = TS -(100TS)/100 (VARIANCE FROM COUNTERS)
# LET Y = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT # LET Y = LENGTH OF TIME OF INHIBIT INTERRUPT AFTER T3RUPT
# LET Z = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER. # LET Z = LENGTH OF TIME TO PROCESS TASKS WHICH ARE DUE THIS T3RUPT BUT DISPATCHED EARLIER.
# (Z=0, USUALLY). # (Z=0, USUALLY)
# LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR # LET DELTD = THE ACTUAL TIME TAKEN TO GIVE CONTROL TO 2CADR
# THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS* # THEN DELTD = TS+DELTA T -X +Y +Z +1.05MS* +COUNTERS*
# *THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME. # *THE TIME TAKEN BY WAITLIST ITSELF AND THE COUNTER TICKING DURING THIS WAITLIST TIME.
#
# IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK'S # IN SHORT, THE ACTUAL TIME TO RETURN CONTROL TO A 2CADR IS AUGMENTED BY THE TIME TO SET UP THE TASK'S
# INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY # INTERRUPT, ALL COUNTERS TICKING, THE T3RUPT PROCESSING TIME, THE WAITLIST PROCESSING TIME AND THE POSSIBILITY
# OF OTHER TASKS INHIBITING THE INTERRUPT. # OF OTHER TASKS INHIBITING THE INTERRUPT.
@ -154,8 +163,7 @@ WAITBB BBCON WAIT2
# RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1. # RETURN TO CALLER +2 AFTER WAITING DT SPECIFIED AT CALLER +1.
FIXDELAY INDEX Q # BOTH ROUTINES MUST BE CALLED UNDER FIXDELAY INDEX Q # BOTH ROUTINES MUST BE CALLED UNDER
# Was CAF --- RSB 2004. CAF 0 # WAITLIST CONTROL AND TERMINATE THE TASK
CA 0 # WAITLIST CONTROL AND TERMINATE THE TASK
INCR Q # IN WHICH THEY WERE CALLED. INCR Q # IN WHICH THEY WERE CALLED.
# RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A. # RETURN TO CALLER +1 AFTER WAITING THE DT AS ARRIVING IN A.
@ -171,7 +179,7 @@ VARDELAY XCH Q # DT TO Q. TASK ADRES TO WAITADR.
TS WAITEXIT # GO TO TASKOVER AFTER TASK ENTRY. TS WAITEXIT # GO TO TASKOVER AFTER TASK ENTRY.
TCF DLY2 TCF DLY2
DELAYEX TCF TASKOVER -2 # RETURNS TO TASKOVER. DELAYEX TCF TASKOVER -2 # RETURNS TO TASKOVER
# Page 1225 # Page 1225
# ENDTASK MUST ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE. # ENDTASK MUST ENTERED IN FIXED-FIXED SO IT IS DISTINGUISHABLE BY ITS ADRES ALONE.
@ -179,6 +187,7 @@ DELAYEX TCF TASKOVER -2 # RETURNS TO TASKOVER.
EBANK= LST1 EBANK= LST1
ENDTASK -2CADR SVCT3 ENDTASK -2CADR SVCT3
SVCT3 CCS FLAGWRD2 # DRIFT FLAG SVCT3 CCS FLAGWRD2 # DRIFT FLAG
TCF TASKOVER TCF TASKOVER
TCF TASKOVER TCF TASKOVER
@ -201,7 +210,7 @@ SVCT3 CCS FLAGWRD2 # DRIFT FLAG
SVCT3X TC FIXDELAY # DELAY MAX OF 2 TIMES FOR IMU ZERO SVCT3X TC FIXDELAY # DELAY MAX OF 2 TIMES FOR IMU ZERO
DEC 500 DEC 500
TC SVCT3 TC SVCT3 # CHECK DRIFT FLAG AGAIN
# Page 1226 # Page 1226
# BEGIN TASK INSERTION. # BEGIN TASK INSERTION.
@ -225,7 +234,7 @@ WAIT2 TS WAITBANK # BBANK OF CALLING PROGRAM.
AD OCT40201 AD OCT40201
AD Q # RESULT = TD - T1 + 1. AD Q # RESULT = TD - T1 + 1.
CCS A # TEST TD - T1 +1. CCS A # TEST TD - T1 + 1
AD LST1 # IF TD - T1 POS, GO TO WTLST5 WITH AD LST1 # IF TD - T1 POS, GO TO WTLST5 WITH
TCF WTLST5 # C(A) = (TD - T1) + C(LST1) = TD-T2+1 TCF WTLST5 # C(A) = (TD - T1) + C(LST1) = TD-T2+1
@ -327,7 +336,7 @@ WTLST5 CCS A # TEST TD - T2 + 1
OCT 7 OCT 7
+4 CCS A +4 CCS A
WTABORT TC BAILOUT # NO ROOM IN THE INN WTABORT TC BAILOUT # NO ROOM IN THE INN.
OCT 1203 OCT 1203
AD ONE AD ONE
@ -337,7 +346,7 @@ WTABORT TC BAILOUT # NO ROOM IN THE INN
OCT40201 OCT 40201 OCT40201 OCT 40201
# Page 1230 # Page 1230
# THE ENTRY TC WTLST2 JUST PRECEDING OCT N IS FOR T LE TD LE T -1. # THE ENTRY TO WTLST2 JUST PRECEDING OCT N IS FOR T LE TD LE T -1.
# N N+1 # N N+1
# #
# (LE MEANS LESS THAN OR EQUAL TO). AT ENTRY, C(A) = -(TD - T + 1) # (LE MEANS LESS THAN OR EQUAL TO). AT ENTRY, C(A) = -(TD - T + 1)
@ -351,8 +360,7 @@ OCT40201 OCT 40201
WTLST2 TS WAITTEMP # C(A) = -(TD - T + 1) WTLST2 TS WAITTEMP # C(A) = -(TD - T + 1)
INDEX Q INDEX Q
# Was CAF --- RSB 2004. CAF 0
CA 0
TS Q # INDEX VALUE INTO Q. TS Q # INDEX VALUE INTO Q.
CAF ONE CAF ONE
@ -383,7 +391,7 @@ T3RUPT2 CAF NEG1/2 # DISPATCH WAITLIST TASK.
XCH LST1 +1 # INTERVAL 81.91 SEC FOR ENDTASK. XCH LST1 +1 # INTERVAL 81.91 SEC FOR ENDTASK.
XCH LST1 XCH LST1
AD POSMAX # 2. SET T3 = 1.0 - T2 - T USING LIST 1. AD POSMAX # 2. SET T3 = 1.0 - T2 - T USING LIST 1.
ADS TIME3 # SO T3 WON'T TICK DURING UPDATE. ADS TIME3 # SO T3 WONT TICK DURING UPDATE.
TS RUPTAGN TS RUPTAGN
CS ZERO CS ZERO
TS RUPTAGN # SETS RUPTAGN TO +1 ON OVERFLOW. TS RUPTAGN # SETS RUPTAGN TO +1 ON OVERFLOW.
@ -431,42 +439,43 @@ NOQBRSM DXCH ARUPT
# Page 1233 # Page 1233
# LONGCALL # LONGCALL
# PROGRAM DESCRIPTION DATE -- 17 MARCH 1967
# PROGRAM WRITTEN BY W.H.VANDEVER LOG SECTION WAITLIST
# MOD BY -- R. MELANSON TO ADD DOCUMENTATION ASSEMBLY SUNDISK REV. 100
# #
# FUNCTIONAL DESCRIPTION -- # PROGRAM DESCRIPTION DATE- 17 MARCH 1967
# PROGRAM WRITTEN BY W.H. VANDEVER LOG SECTION WAITLIST
# MOD BY- R. MELANSON TO ADD DOCUMENTATION ASSEMBLY SUNDISK REV. 100
#
# FUNCTIONAL DESCRIPTION-
# LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK # LONGCALL IS CALLED WITH THE DELTA TIME ARRIVING IN A,L SCALED AS TIME2,TIME1 WITH THE 2CADR OF THE TASK
# IMMEDIATELY FOLLOWING THE TC LONGCALL. FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF # IMMEDIATELY FOLLOWING THE TC LONGCALL. FOR EXAMPLE, IT MIGHT BE DONE AS FOLLOWS WHERE TIMELOC IS THE NAME OF
# A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO # A DP REGISTER CONTAINING A DELTA TIME AND WHERE TASKTODO IS THE NAME OF THE LOCATION AT WHICH LONGCALL IS TO
# START. # START
# #
# CALLING SEQUENCE -- # CALLING SEQUENCE-
# EXTEND # EXTEND
# DCA TIMELOC # DCA TIMELOC
# TC LONGCALL # TC LONGCALL
# 2CADR TASKTODO # 2CADR TASKTODO
# #
# NORMAL EXIT MODE -- # NORMAL EXIT MODE-
# 1) TC WAITLIST # 1). TC WAITLIST
# 2) DTCB (TC L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL) # 2). DTCB (TC L+3 OF CALLING ROUTINE 1ST PASS THRU LONGCYCL)
# 3) DTCB (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL) # 3). DTCB (TO TASKOVER ON SUBSEQUENT PASSES THRU LONGCYCL)
# #
# ALARM OR ABORT EXIT MODE -- # ALARM OR ABORT EXIT MODE-
# NONE # NONE
# #
# OUTPUT -- # OUTPUT-
# LONGTIME AND LONGTIME+1 = DELTA TIME # LONGTIME AND LONGTIME+1 = DELTA TIME
# LONGEXIT AND LONGEXIT+1 = RETURN 2CADR # LONGEXIT AND LONGEXIT+1 = RETURN 2CADR
# LONGCADR AND LONGCADR+1 = TASK 2CADR # LONGCADR AND LONGCADR+1 = TASK 2CADR
# A = SINGLE PRECISION TIME FOR WAITLIST # A = SINGLE PRECISION TIME FOR WAITLIST
# #
# ERASABLE INITIALIZATION -- # ERASABLE INITIALIZATION-
# A = MOST SIGNIFICANT PART OF DELTA TIME # A = MOST SIGNIFICANT PART OF DELTA TIME
# L = LEAST SIGNIFICANT PART OF DELTA TIME # L = LEAST SIGNIFICANT PART OF DELTA TIME
# Q = ADDRESS OF 2CADR TASK VALUE # Q = ADDRESS OF 2CADR TASK VALUE
# #
# DEBRIS -- # DEBRIS-
# A,Q,L # A,Q,L
# LONGCADR AND LONGCADR+1 # LONGCADR AND LONGCADR+1
# LONGEXIT AND LONGEXIT+1 # LONGEXIT AND LONGEXIT+1
@ -484,7 +493,7 @@ LONGCALL DXCH LONGTIME # OBTAIN THE DELTA TIME
DCA 0 DCA 0
DXCH LONGCADR DXCH LONGCADR
EXTEND # NO GO TO THE APPROPRIATE SWITCHED BANK EXTEND # NOW GO TO THE APPROPRIATE SWITCHED BANK
DCA LGCL2CDR # FOR THE REST OF LONGCALL DCA LGCL2CDR # FOR THE REST OF LONGCALL
DTCB DTCB
@ -502,7 +511,6 @@ LNGCALL2 LXCH LONGEXIT +1 # SAVE THE CORRECT BB FOR RETURN
TS LONGEXIT TS LONGEXIT
# *** WAITLIST TASK LONGCYCL *** # *** WAITLIST TASK LONGCYCL ***
LONGCYCL EXTEND # CAN WE SUCCESFULLY TAKE ABOUT 1.25 LONGCYCL EXTEND # CAN WE SUCCESFULLY TAKE ABOUT 1.25
DCS DPBIT14 # MINUTES OFF OF LONGTIME DCS DPBIT14 # MINUTES OFF OF LONGTIME
DAS LONGTIME DAS LONGTIME
@ -514,7 +522,7 @@ LONGCYCL EXTEND # CAN WE SUCCESFULLY TAKE ABOUT 1.25
# DO NOT SIGN CORRECT) AND THAT WE SUBTRAC- # DO NOT SIGN CORRECT) AND THAT WE SUBTRAC-
# TED BIT14 (1 OVER HALF THE POS. VALUE # TED BIT14 (1 OVER HALF THE POS. VALUE
# REPRESENTABLE IN SINGLE WORD) # REPRESENTABLE IN SINGLE WORD)
NOOP # CAN'T GET HERE ************* NOOP # CAN'T GET HERE **********
TCF +1 TCF +1
CCS LONGTIME CCS LONGTIME
TCF MUCHTIME TCF MUCHTIME
@ -538,13 +546,11 @@ MUCHTIME CA BIT14 # WE HAVE OVER OUR ABOUT 1.25 MINUTES
EBANK= LST1 EBANK= LST1
2CADR LONGCYCL 2CADR LONGCYCL
TCF LONGRTRN # NOW EXIT PROPERLY TCF LONGRTRN # NOW EXIT PROPERLY
# *** WAITLIST TASK GETCADR *** # *** WAITLIST TASK GETCADR ***
GETCADR DXCH LONGCADR # GET THE LONGCALL THAT WE WISHED TO START GETCADR DXCH LONGCADR # GET THE LONGCALL THAT WE WISHED TO START
DTCB # AND TRANSFER CONTROL TO IT DTCB # AND TRANSFER CONTROL TO IT
TSKOVCDR GENADR TASKOVER TSKOVCDR GENADR TASKOVER