Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof PHASE_TABLE_MAINTENANCE #620 #832

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
137 changes: 72 additions & 65 deletions Luminary099/PHASE_TABLE_MAINTENANCE.agc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ TCQ = Q+2 +1

COUNT* $$/PHASE
SETUPDSP INHINT
DXCH RUPTREG1 # SAVE CALLER'S RETURN 2CADR
DXCH RUPTREG1 # SAVE CALLER-S RETURN 2CADR
CAF PRIO30 # EITHER A TASK OR JOB CAN COME TO
TC NOVAC # NEWMODE X
TC NOVAC # NEWMODEX
EBANK= MODREG
2CADR DSPMMJOB

Expand All @@ -82,24 +82,30 @@ DSPMMJOB EQUALS DSPMMJB

# Page 1295
# PHASCHNG IS THE MAIN WAY OF MAKING PHASE CHANGES FOR RESTARTS. THERE ARE THREE FORMS OF PHASCHNG, KNOWN AS TYPE
# A, TYPE B, AND TYPE C. THEY ARE ALL CALLED AS FOLLOWS, WHERE OCT XXXXX CONTAINS THE PHASE INFORMATION,
# A, TYPE B, AND TYPE C. THEY ARE ALL CALLED AS FOLLOWS, WHERE OCT XXXXX CONTAINS THE PHASE INFORMATION,
#
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also unclear about when to add an empty comment line or just an empty line with no comment symbol.

# TC PHASCHNG
# OCT XXXXX
# TYPE A IS CONCERNED WITH FIXED PHASE CHANGES, THAT IS, PHASE INFORMATION THAT IS STORED PERMANENTLY. THESE
#
# TYPE A IS CONCERNED WITH FIXED PHASE CHANGES, THAT IS, PHASE INFORMATIONTHAT IS STORED PERMANENTLY. THESE
# OPTIONS ARE, WHERE G STANDS FOR A GROUP AND .X FOR THE PHASE,
# G.0 INACTIVE, WILL NOT PERMIT A GROUP G RESTART
#
# G.0 INACTIVE, WILLNOT PERMIT A GROUP G RESTART
# G.1 WILL CAUSE THE LAST DISPLAY TO BE REACTIVATED, USED MAINLY IN MANNED FLIGHTS
# G.EVEN A DOUBLE TABLE RESTART, CAN CAUSE ANY COMBINATION OF TWO JOBS, TASKS, AND/OR
# LONGCALL TO BE RESTARTED.
# G.ODD NOT .1 A SINGLE TABLE RESTART, CAN CAUSE EITHER A JOB, TASK, OR LONGCALL RESTART.
# G.ODD NOT .1 A SINGLE TABLE RESTART, CAN CAUSE EITHER A JOB, TASK, OR LONGCALL RESTART
#
# THIS INFORMATION IS PUT INTO THE OCTAL WORD AFTER TC PHASCHNG AS FOLLOWS
# TL0 00P PPP PPP GGG
# WHERE EACH LETTER OR NUMBER STANTS FOR A BIT. THE G'S STAND FOR THE GROUP, OCTAL 1-7, THE P'S FOR THE PHASE,
# OCTAL 0 - 127. 0'S MUST BE 0. IF ONE WISHES TO HAVE THE TBASE OF GROUP G TO BE SET AT THIS TIME,
# T IS SET TO 1, OTHERWISE IT IS SET TO 0. SIMILARLY IF ONE WISHES TO SET LONGBASE, THEN L IS SET TO 1, OTHERWISE
#
# TL0 00P PPP PPP GGG ,
#
# WHERE EACH LETTER OR NUMBER STANTS FOR A BIT. THE G:S STAND FOR THE GROUP, OCTAL 1 - 7, THE P:S FOR THE PHASE,
# OCTAL 0 - 127. 0:S MUST BE 0. IF ONE WISHES TO HAVE THE TBASE OF GROUP G TO BE SET AT THIS TIME,
# T IS SET TO 1, OTHERWISE IT IS SET TO 0. SIMIARLY IF ONE WISHES TO SET LONGBASE, THEN L IS SET TO 1, OTHERWISE
# IT IS SET TO 0. SOME EXAMPLES,
# TC PHASCHNG # THIS WILL CAUSE GROUP 3 TO BE SET TO 0,
#
# TC PHASCHNG # THIS WILL CAUSE GROUP 3 TOBE SET TO 0,
# OCT 00003 # MAKING GROUP 3 INACTIVE
#
# TC PHASCHNG # IF A RESTART OCCURS THIS WOULD CAUSE
Expand All @@ -108,60 +114,64 @@ DSPMMJOB EQUALS DSPMMJB
# TC PHASCHNG # THIS SETS THE TBASE OF GROUP 4 AND IN
# OCT 40064 # CASE OF A RESTART WOULD START UP THE TWO
# # THINGS LOCATED IN THE DOUBLE 4.6 RESTART
# # LOCATION.
#
# # LOCATION
# TC PHASCHNG # THIS SETS LONGBASE AND UPON A RESTART
# OCT 20135 # CAUSES 5.13 TO BE RESTARTED (SINCE
# # LONGBASE WAS SET THIS SINGLE ENTRY
# # SHOULD BE A LONGCALL)
#
# TC PHASCHNG # SINCE BOTH TBASE4 AND LONGBASE ARE SET,
# OCT 60124 # 4.12 SHOULD CONTAIN BOTH A TASK AND A
# # LONGCALL TO BE RESTARTED
#
# TYPE C PHASCHNG CONTAINS THE VARIABLE TYPE OF PHASCHNG INFORMATION. INSTEAD OF THE INFORMATION BEING IN A
# PERMANENT FORM, ONE STORES THE DESIRED RESTART INFORMATION IN A VARIABLE LOCATION. THE BITS ARE AS FOLLOWS,
# TYPE C PHASCHNG CONTAINS THE VARIABLE TYPE OF PHASCHNG INFORMATION. INSTEAD OF THE INFORMATION BEING IN A
# PERMANENT FORM, ONE STORES THE DESIRED RESTART INFORMATION IN A VARIABKE LOCATION. THE BITS ARE AS FOLLOWS,
#
# TL0 1AD XXX CJW GGG
# WHERE EACH LETTER OR NUMBER STANDS FOR A BIT. THE G'S STAND FOR THE GROUP, OCTAL 1 - 7. IF THE RESTART IS TO
#
# WHERE EACH LETTER OR NUMBER STANDS FOR A BIT. THE G:S STAND FOR THE GROUP, OCTAL 1 - 7. IF THE RESTART IS TO
# BE BY WAITLIST, W IS SET TO 1, IF IT IS A JOB, J IS SET TO 1, IF IT IS A LONGCALL, C IS SET TO 1. ONLY ONE OF
# THESE THREE BITS MAY BE SET. X'S ARE IGNORED, 1 MUST BE 1, AND 0 MUST BE 0. AGAIN T STANDS FOR THE TBASE,
# THESE THREE BIT S MAY BE SET. X:S ARE IGNORED 1 MUST BE 1, AND 0 MUST BE 0. AGAIN T STANDS FOR THE TBASE,
# Page 1296
# AND L FOR LONGBASE. THE BITS A AND D ARE CONCERNED WITH THE VARIABLE INFORMATION. IF D IS SET TO 1, A PRIORITY
# OR DELTA TIME WILL BE READ FROM THE NEXT LOCATION AFTER THE OCTAL INFORMATION., IF THIS IS TO BE INDIRECT, THAT
# IS, THE NAME OF A LOCATION CONTAINING THE INFORMATION (DELTA TIME ONLY), THEN THIS IS GIVEN AS THE -GENADR OF
# AND L FOR LONGBASE. THE BITS A AND D ARE CONCERNED WITH THE VARIABLE INFORMATION. IF D IS SET TO 1, A PRIORITY
# OR DELTA TIME WILL BE READ FROM THE NEXT LOCATION AFTER THE OCTAL INFORMATION, IF THIS IS TO BE INDIRECT, THAT
# IS, THE NAME OF A LOCATION COMT+INING THE INFORMATION (DELTA TIME ONLY), THEN THIS IS GIVEN AS THE -GENADR OF
# THAT LOCATION WHICH CONTAINS THE DELTA TIME. IF THE OLD PRIORITY OR DELTA TIME IS TO BE USED, THAT WHICH IS
# ALREADY IN THE VARIABLE STORAGE, THEN D IS SET TO 0. NEXT THE A BIT IS USED. IF IT IS SET TO 0, THE ADDRESS
# THAT WOULD BE RESTARTED DURING A RESTART IS THE NEXT LOCATION AFTER THE PHASE INFORMATION, THAT IS, EITHER
# ALREADY IN THE VARIABLE STORAGE, THEN D IS SET TO 0. NEXT THE A BIT IS USED. IF IT IS SET TO 0, THE ADDRESS
# THAT WOULD BE RESTARTED DURING A RESTART IS THE NEXT LOCATION AFTER THE PHASE INFORMATION, THAT IS, EITHER
# (TC PHASCHNG) +2 OR +3, DEPENDING ON WHETHER D HAD BEEN SET OR NOT. IF A IS SET TO 1, THEN THE ADDRESS THAT
# WOULD BE RESTARTED IS THE 2CADR THAT IS READ FROM THE NEXT TWO LOCATION. EXAMPLES,
# WOULD BE RESTARTED IS THE 2CADR THAT IS READ FROM THE NEXT TWO LOCATIONS. EXAMPLES,
#
# AD TC PHASCHNG # THIS WOULD CAUSE LOCATION AD +3 TO BE
# AD+1 OCT 05023 # RESTARTED BY GROUP THREE WITH A PRIORITY
# AD+1 OCT 05023 # RESTARTED BY GROUP THREE WITHA PRIORITY
# AD+2 OCT 23000 # OF 23. NOTE UPON RETURNING IT WOULD
# AD+3 # ALSO GO TO AD+3
#
# AD TC PHASCHNG # GROUP 1 WOULD CAUSE CALLCALL TO BE
# AD TC PHASCHNG # GROUP 1 WOULD CAUSE CAUSE CALLCALL TO
# AD+1 OCT 27441 # BE STARTED AS A LONGCALL FROM THE TIME
# AD+2 -GENADR DELTIME # STORED IN LONGBASE (LONGBASE WAS SET) BY
# AD+3 2CADR CALLCALL # A DELTA TIME STORED IN DELTIME. THE
# AD+3 2CADR CALLCALL # A DELTATIME STORED IN DELTIME. THE
# AD+4 # BBCON OF THE 2CADR SHOULD CONTAIN THE E
# AD+5 # BANK OF DELTIME. PHASCHNG RETURNS TO
# AD+5 # BANK OF DELTIME. PHASCHNG RETURNS TO
# # LOCATION AD+5
#
# NOTE THAT IF A VARIABLE PRIORITY IS GIVEN FOR A JOB, THE JOB WILL BE RESTARTED AS A NOVAC IF THE PRIORITY IS
# NEGATIVE, AS A FINDVAC IF THE PRIORITY IS POSITIVE.
#
# TYPE B PHASCHNG IS A COMBINATION OF VARIABLE AND FIXED PHASE CHANGES. IT WILL START UP A JOB AS INDICATED
# BELOW AND ALSO START UP ONE FIXED RESTART, THAT IS EITHER AN G.1 OR A G.ODD OR THE FIRST ENTRY OF G.EVEN
# DOUBLE ENTRY. THE BIT INFORMATION IS AS FOLLOW,
# TYPE B PHASCHNG IS A COMBINATION OF VARIABLE AND FIXED PHASE CHANGES. IT WILL START UP A JOB AS INDICATED
# BELOW AND ALSO START UP ONE FIXED RESTART, THAT IS EITHER AN G.1 OR A G.ODD OR THE FIRST ENTRY OF G.EVEN
# DOUBLE ENTRY. THE BIT INFORMATION IS AS FOLLOWS,
#
# TL1 DAP PPP PPP GGG
# WHERE EACH LETTER OR NUMBER STANDS FOR A BIT. THE G'S STAND FOR THE GROUP, OCTAL 1 - 7, THE P'S FOR THE FIXED
# PHASE INFORMATION, OCTAL 0 - 127. 1 MUST BE 1. AND AGAIN T STANDS FOR THE TBASE AND L FOR LONGBASE. D THIS
#
# WHERE EACH LETTER OR NUMBER STANDS FOR A BIT. THE G:S STAND FOR THE GROUP, OCTAL 1 - 7. THE P:S FOR THE FIXED
# PHASE INFORMATION, OCTAL 0 - 127. 1 MUST BE 1. AND AGAIN T STANDS FOR THE TBASE AND L FOR LONGBASE. D THIS
# TIME STANDS ONLY FOR PRIORITY SINCE THIS WILL BE CONSIDERED A JOB, AND IT MUST BE GIVEN DIRECTLY IF GIVEN.
# AGAIN A STANDS FOR THE ADDRESS OF THE LOCATION TO BE RESTARTED, 1 IF THE 2CADR IS GIVEN, OR 0 IF IT IS TO BE
# THE NEXT LOCATION. (THE RETURN LOCATION OF PHASCHNG) EXAMPLES,
# AD TC PHASCHNG # TBASE IS SET AND A RESTART CAUSE GROUP 3
# AGAIN A STANDS FOR THE ADDRESS OF THE LOCATION TO BE RESTARTED, 1 IF THE 2CADR IS GIVEN , OR 0 IF IT IS TO BE
# THE NEXT LOCATION.(THE RETURN LOCATION OF PHASCHNG) EXAMPLES,
#
# AD TC PHASCHNG # TBASE IS SET AND ARESTART CAUSE GROUP 3
# AD+1 OCT 56043 # TO START THE JOB AJOBAJOB WITH PRIORITY
# AD+2 OCT 31000 # 31 AND THE FIRST ENTRY OF 3.4SPOT (WE CAN
# AD+2 OCT 31000 # 31 AND THE FIRST ENTRY OF 3.4SPOT(WE CAN
# AD+3 2CADR AJOBAJOB # ASSUME IT IS A TASK SINCE WE SET TBASE3)
# AD+4 # UPON RETURN FROM PHASCHNG CONTROL WOULD
# AD+5 # GO TO AD+5
Expand All @@ -171,32 +181,31 @@ DSPMMJOB EQUALS DSPMMJB
# AD+2 # STORED PRIORITY WOULD BE BEGUN AT AD+2
# # BY MEANS OF GROUP 5
# Page 1297
# THE NOVAC-FINDVAC CHOICE FOR JOBS HOLDS HERE ALSO -- NEGATIVE PRIORITY CAUSES A NOVAC CALL, POSITIVE A FINDVAC.

# THE NOVAC-FINDVAC CHOICE FOR JOBS HOLDS HERE ALSO - NEGATIVE PRIORITY CAUSES A NOVAC CALL, POSITIVE A FINDVAC.
#
# SUMMARY OF BITS:
# TYPE A TL0 00P PPP PPP GGG
# TYPE B TL1 DAP PPP PPP GGG
# TYPE C TL0 1AD XXX CJW GGG

# Page 1298
# 2PHSCHNG IS USED WHEN ONE WISHES TO START UP A GROUP OR CHANGE A GROUP WHILE UNDER THE CONTROL OF A DIFFERENT
# GROUP. FOR EXAMPLE, CHANGE THE PHASE OF GROUP 3 WHILE THE PORTION OF THE PROGRAM IS UNDER GROUP 5. ALL 2PHSCHNG
# GROUP. FOR EXAMPLE, CHANGE THE PHASE OF GROUP 3 WHILE THE PORTION OF THE PROGRAM IS UNDER GROUP 5. ALL 2PHSCHNG
# CALLS ARE MADE IN THE FOLLOWING MANNER,
#
# TC 2PHSCHNG
# OCT XXXXX
# OCT YYYYY
# WHERE OCT XXXXX MUST BE OF TYPE A AND OCT YYYYY MAY BE OF EITHER TYPE A OR TYPE B OR TYPE C. THERE IS ONE
# DIFFERENCE --- NOTE: IF LONGBASE IS TO BE SET THIS INFORMATION IS GIVEN IN THE OCT YYYYY INFORMATION, IT WILL
# BE DISREGARDED IF GIVEN WITH THE OCT XXXXX INFORMATION. A COUPLE OF EXAMPLES MAY HELP,
# AD TC 2PHACHNG # SET TBASE3 AND IF A RESTART OCCURS START
#
# WHERE OCT XXXXX MUST BE OF TYPE A AND OCT YYYYY MAY BE OF EITHER TYPE A OR TYPE B OR TYPEC. THERE IS ONE
# DIFFERENCE --- NOTE- IF LONGBASE IS TO BE SET THIS INFORMATION IS GIVEN IN THE OCT YYYYY INFORMATION, IT WILL
# BE DISREGARDED IF GIVEN WITH THE OCT XXXXX INFORMATION. A COUPLE OF EXAMPLES MAY HELP,
#
# AD TC 2PHSCHNG # SET TBASE3 AND IF A RESTART OCCURS START
# AD+1 OCT 40083 # THE TWO ENTRIES IN 3.8 TABLE LOCATION
# AD+2 OCT 05025 # THIS IS OF TYPE C, SET THE JOB TO BE
# AD+3 OCT 18000 # TO BE LOCATION AD+4, WITH A PRIORITY 18,
# AD+4 # FOR GROUP 5 PHASE INFORMATION.

## [WORKAROUND] RSB 2004
SBANK= PINSUPER
## [WORKAROUND]
# AD+4 # FOR GROUP 5 PHASE INFORMATION

COUNT* $$/PHASE
2PHSCHNG INHINT # THE ENTRY FOR A DOUBLE PHASE CHANGE
Expand Down Expand Up @@ -247,14 +256,14 @@ ONEORTWO LXCH TEMPBBCN

MASK OCT14000 # SEE WHAT KIND OF PHASE CHANGE IT IS
CCS A
TCF CHECKB # IT IS OF TYPE `B'.
TCF CHECKB # IT IS OF TYPE :B:

CA TEMPP
MASK BIT7
CCS A # SHALL WE USE THE OLD PRIORITY
TCF GETPRIO # NO GET A NEW PRIORITY (OR DELTA T)
CCS A # SHALL WE USE THE OLD PRIORITY
TCF GETPRIO # NO GET A NEW PRIORITY (OR DELTA T)

OLDPRIO NDX TEMPG # USE THE OLD PRIORITY (OR DELTA T)
OLDPRIO NDX TEMPG # USE THE OLD PRIORITY (OR DELTA T)
CA PHSPRDT1 -2
TS TEMPPR

Expand All @@ -266,7 +275,7 @@ CON1 CA TEMPP # SEE IF A 2CADR IS GIVEN
CA Q
TS TEMPNM
CA BB
EXTEND # PICK UP USER'S SUPERBANK
EXTEND # PICK UP USERS SUPERBANK
ROR SUPERBNK
TS TEMPBB

Expand All @@ -276,7 +285,7 @@ TOCON2 CA CON2ADR # BACK TO SWITCHED BANK

CON2ADR GENADR CON2

GETPRIO NDX Q # DON'T CARE IF DIRECT OR INDIRECT
GETPRIO NDX Q # DON:T CARE IF DIRECT OR INDIRECT
CA 0 # LEAVE THAT DECISION TO RESTARTS
INCR Q # OBTAIN RETURN ADDRESS
# Page 1300
Expand Down Expand Up @@ -336,16 +345,16 @@ PHSCHNG2 LXCH TEMPBBCN
TS PHASE1 -2

BELOW1 CCS TEMPSW2 # IS IT A PHASCHNG OR A 2PHSCHNG
TCF BELOW2 # IT'S A PHASCHNG
TCF BELOW2 # IT:S A PHASCHNG

TCF +1 # IT'S A 2PHSCHNG
TCF +1 # IT:S A 2PHSCHNG
CS TEMPP2
LXCH TEMPP2
NDX TEMPG2
DXCH -PHASE1 -2

CCS TEMPSW2
NOOP # CAN'T GET HERE
NOOP # CAN:T GET HERE
TCF BELOW2

CS TIME1
Expand All @@ -360,11 +369,11 @@ BELOW2 CCS TEMPSW # SEE IF WE SHOULD SET TBASE OR LONGBASE
NDX TEMPG
TS TBASE1 -2

CA TEMPSW # SHALL WE NOW SET LONGBASE
CA TEMPSW # SHALL WE NOW SET LONGBASE
AD BIT14COM
CCS A
NOOP # ***** CAN'T GET HERE *****
BIT14COM OCT 17777 # ***** CAN'T GET HERE *****
NOOP # ***** CANT GET HERE *****
BIT14COM OCT 17777 # ***** CANT GET HERE *****
TCF BELOW4 # NO WE NEED ONLY SET TBASE

BELOW3 EXTEND # SET LONGBASE
Expand Down Expand Up @@ -403,9 +412,7 @@ CON2 LXCH TEMPBBCN

COUNT* $$/PHASE
CHECKB MASK BIT12 # SINCE THIS IS OF TYPE B, THIS BIT WOULD
CCS A # BE HERE IF WE ARE TO GET A NEW PRIORITY
CCS A # BE HERE IF WE ARE TO GET A NEW PRIORITY
TCF GETPRIO # IT IS, SO GET NEW PRIORITY

TCF OLDPRIO # IT ISN'T, USE THE OLD PRIORITY.


TCF OLDPRIO # IT ISN:T, USE THE OLD PRIORITY