Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

050514,000002:                                                                                                  ## Copyright:   Public domain.
050515,000003:                                                                                                  ## Filename:    PHASE_TABLE_MAINTENANCE.agc
050516,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
050517,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
050518,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
050519,000007:                                                                                                  ##              No original listings of this program are available;
050520,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
050521,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
050522,000010:                                                                                                  ## Assembler:   yaYUL
050523,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
050524,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
050525,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
050526,000014: 
050527,000015:                                                                                                  ## Sundance 292
050528,000016: 
050529,000017:                                                                                                  #  SUBROUTINE TO UPDATE THE PROGRAM NUMBER DISPLAY ON THE DSKY.
050530,000018: 
050531,000019: 43,3724                                           COUNT*   $$/PHASE                              
050532,000020:    5351                                           BLOCK    02                                    
050533,000021:    4000                                           SETLOC   FFTAG1                                
050534,000022:    4000                                           BANK                                           
050535,000023: 
050536,000024:    5351           50002        NEWMODEX           INDEX    Q                                     #  UPDATE MODREG. ENTRY FOR MODE IN FIXED.
050537,000025:    5352           30000                           CAF      0                                     
050538,000026:    5353           24002                           INCR     Q                                     
050539,000027: 
050540,000028:    5354           57012        NEWMODEA           XCH      MODREG                                #  ENTRY FOR MODE IN A
050541,000029:    5355           40000                           COM                                            #  IF NO CHANGE IN MODE, RETURN IMMEDIATELY
050542,000030:    5356           61012                           AD       MODREG                                
050543,000031:    5357           00006                           EXTEND                                         
050544,000032:    5360           16716                           BZF      TCQ                                   
050545,000033: 
050546,000034:    5361           35364        MMDSPLAY           CAF      +3                                    #  DISPLAY MAJOR MODE.
050547,000035:    5362           22006        PREBJUMP           LXCH     BBANK                                 #  PUTS BBANK IN L
050548,000036:    5363           14677                           TCF      BANKJUMP                              #  PUTS Q INTO A
050549,000037:    5364           20100                           CADR     SETUPDSP                              
050550,000038: 
050551,000039:                                                                                                  #  RETURN TO CALLER +3 IF MODE = THAT AT CALLER +1. OTHERWISE RETURN TO CALLER +2.
050552,000040: 
050553,000041:    5365           50002        CHECKMM            INDEX    Q                                     
050554,000042:    5366           40000                           CS       0                                     
050555,000043:    5367           61012                           AD       MODREG                                
050556,000044:    5370           00006                           EXTEND                                         
050557,000045:    5371           16715                           BZF      Q+2                                   
050558,000046:    5372           16713                           TCF      Q+1                                   #  NO MATCH
050559,000047: 
050560,000048:    5373     6716               TCQ                =        Q+2        +1                         
050561,000049: 

Sundance 302

050563,000051: 
050564,000052: 14,3734                                           BANK     14                                    
050565,000053: 10,2000                                           SETLOC   PHASETAB                              
050566,000054: 10,2000                                           BANK                                           
050567,000055: 
050568,000056: 10,2100                                           COUNT*   $$/PHASE                              
050569,000057: 10,2100           00004        SETUPDSP           INHINT                                         
050570,000058: 10,2101           52071                           DXCH     RUPTREG1                              #  SAVE CALLER-S RETURN 2CADR
050571,000059: 10,2102           34367                           CAF      PRIO30                                #    EITHER A TASK OR JOB CAN COME TO
050572,000060: 10,2103           05142                           TC       NOVAC                                 #    NEWMODE X
050573,000061: 10,2104     1012                                  EBANK=   MODREG                                
050574,000062: 10,2104           03636 60102                     2CADR    DSPMMJOB                              
050575,000063: 
050576,000064: 10,2106           52071                           DXCH     RUPTREG1                              
050577,000065: 10,2107           00003                           RELINT                                         
050578,000066: 10,2110           52006                           DXCH     Z                                     #  RETURN
050579,000067: 
050580,000068: 10,2111  40,3636               DSPMMJOB           EQUALS   DSPMMJB                               
050581,000069: 

Sundance 292

050583,000071: 
050584,000072:    5373                                           BLOCK    02                                    
050585,000073:    4000                                           SETLOC   FFTAG1                                
050586,000074:    4000                                           BANK                                           
050587,000075: 
050588,000076:                                                                                                  #  PHASCHNG IS THE MAIN WAY OF MAKING PHASE CHANGES FOR RESTARTS.  THERE ARE THREE FORMS OF PHASCHNG, KNOWN AS TYPE
050589,000077:                                                                                                  #  A, TYPE B, AND TYPE C. THEY ARE ALL CALLED AS FOLLOWS, WHERE OCT XXXXX CONTAINS THE PHASE INFORMATION,
050590,000078:                                                                                                  #                TC      PHASCHNG
050591,000079:                                                                                                  #                OCT     XXXXX
050592,000080:                                                                                                  #  TYPE A IS CONCERNED WITH FIXED PHASE CHANGES, THAT IS, PHASE INFORMATION THAT IS STORED PERMANENTLY.  THESE
050593,000081:                                                                                                  #  OPTIONS ARE, WHERE G STANDS FOR A GROUP AND .X FOR THE PHASE,
050594,000082:                                                                                                  #        G.0             INACTIVE, WILLNOT PERMIT A GROUP G RESTART
050595,000083:                                                                                                  #        G.1             WILL CAUSE THE LAST DISPLAY TO BE REACTIVATED, USED MAINLY IN MANNED FLIGHTS
050596,000084:                                                                                                  #        G.EVEN          A DOUBLE TABLE RESTART, CAN CAUSE ANY COMBINATION OF TWO JOBS, TASKS, AND/OR
050597,000085:                                                                                                  #                        LONGCALL TO BE RESTARTED.
050598,000086:                                                                                                  #        G.ODD NOT .1    A SINGLE TABLE RESTART, CAN CAUSE EITHER A JOB, TASK, OR LONGCALL RESTART
050599,000087: 
050600,000088:                                                                                                  #  THIS INFORMATION IS PUT INTO THE OCTAL WORD AFTER TC PHASCHNG AS FOLLOWS
050601,000089:                                                                                                  #        TL0 00P PPP PPP GGG                                               ,
050602,000090:                                                                                                  #  WHERE EACH LETTER OR NUMBER STANDS FOR A BIT.  THE G:S STAND FOR THE GROUP, OCTAL 1-7, THE P:S FOR THE PHASE,
050603,000091:                                                                                                  #  OCTAL 0 - 127.  0:S MUST BE 0.              IF ONE WISHES TO HAVE THE TBASE OF GROUP G TO BE SET AT THIS TIME,
050604,000092:                                                                                                  #  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
050605,000093:                                                                                                  #  IT IS SET TO 0.  SOME EXAMPLES,
050606,000094:                                                                                                  #                TC      PHASCHNG        THIS WILL CAUSE GROUP 3 TO BE SET TO 0,
050607,000095:                                                                                                  #                OCT     00003           MAKING GROUP 3 INACTIVE
050608,000096: 
050609,000097:                                                                                                  #                TC      PHASCHNG        IF A RESTART OCCURS THIS WOULD CAUSE
050610,000098:                                                                                                  #                OCT     00012           GROUP 2 TO RESTART THE LAST DISPLAY
050611,000099: 
050612,000100:                                                                                                  #                TC      PHASCHNG        THIS SETS THE TBASE OF GROUP 4 AND IN
050613,000101:                                                                                                  #                OCT     40064           CASE OF A RESTART WOULD START UP THE TWO
050614,000102:                                                                                                  #                                        THINGS LOCATED IN THE DOUBLE 4.6 RESTART
050615,000103:                                                                                                  #                                        LOCATION
050616,000104:                                                                                                  #                TC      PHASCHNG        THIS SETS LONGBASE AND UPON A RESTART
050617,000105:                                                                                                  #                OCT     20135           CAUSES 5.13 TO BE RESTARTED (SINCE
050618,000106:                                                                                                  #                                        LONGBASE WAS SET THIS SINGLE ENTRY
050619,000107:                                                                                                  #                                        SHOULD BE A LONGCALL)
050620,000108: 
050621,000109:                                                                                                  #                TC      PHASCHNG        SINCE BOTH TBASE4 AND LONGBASE ARE SET,
050622,000110:                                                                                                  #                OCT     60124           4.12 SHOULD CONTAIN BOTH A TASK AND A
050623,000111:                                                                                                  #                                        LONGCALL TO BE RESTARTED
050624,000112: 
050625,000113:                                                                                                  #  TYPE C PHASCHNG CONTAINS THE VARIABLE TYPE OF PHASCHNG INFORMATION. INSTEAD OF THE INFORMATION BEING IN A
050626,000114:                                                                                                  #  PERMANENT FORM, ONE STORES THE DESIRED RESTART INFORMATION IN A VARIABKE LOCATION. THE BITS ARE AS FOLLOWS,
050627,000115:                                                                                                  #        TL0 1AD XXX CJW GGG
050628,000116:                                                                                                  #  WHERE EACH LETTER OR NUMBER STANDS FOR A BIT.  THE G:S STAND FOR THE GROUP, OCTAL 1 - 7.  IF THE RESTART IS TO
050629,000117:                                                                                                  #  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
050630,000118:                                                                                                  #  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,
050631,000119:                                                                                                  #  AND L FOR LONGBASE.  THE BITS A AND D ARE CONCERNED WITH THE VARIABLE INFORMATION. IF D IS SET TO 1, A PRIORITY
050632,000120:                                                                                                  #  OR DELTA TIME WILL BE READ FROM THE NEXT LOCATION AFTER THE OCTAL INFORMATION, IF THIS IS TO BE INDIRECT, THAT
050633,000121:                                                                                                  #  IS, THE NAME OF A LOCATION COMT+INING THE INFORMATION (DELTA TIME ONLY), THEN THIS IS GIVEN AS THE -GENADR OF
050634,000122:                                                                                                  #  THAT LOCATION WHICH CONTAINS THE DELTA TIME.  IF THE OLD PRIORITY OR DELTA TIME IS TO BE USED, THAT WHICH IS
050635,000123:                                                                                                  #  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
050636,000124:                                                                                                  #  THAT WOULD BE RESTARTED DURING A RESTART IS THE NEXT LOCATION AFTER  THE PHASE INFORMATION, THAT IS, EITHER
050637,000125:                                                                                                  #  (TC PHASCHNG) +2 OR +3, DEPENDING ON WHETHER D HAD BEEN SET OR NOT.  IF A IS SET TO 1, THEN THE ADDRESS THAT
050638,000126:                                                                                                  #  WOULD BE RESTARTED IS THE 2CADR THAT IS READ FROM THE NEXT TWO LOCATIONS.  EXAMPLES,
050639,000127:                                                                                                  #        AD      TC      PHASCHNG        THIS WOULD CAUSE LOCATION AD +3 TO BE
050640,000128:                                                                                                  #        AD+1    OCT     05023           RESTARTED BY GROUP THREE WITH A PRIORITY
050641,000129:                                                                                                  #        AD+2    OCT     23000           OF 23.  NOTE UPON RETURNING IT WOULD
050642,000130:                                                                                                  #        AD+3                            ALSO GO TO AD+3
050643,000131: 
050644,000132:                                                                                                  #        AD      TC      PHASCHNG        GROUP 1 WOULD CAUSE CAUSE CALLCALL TO
050645,000133:                                                                                                  #        AD+1    OCT     27441           BE STARTED AS A LONGCALL FROM THE TIME
050646,000134:                                                                                                  #        AD+2    -GENADR DELTIME         STORED IN LONGBASE (LONGBASE WAS SET) BY
050647,000135:                                                                                                  #        AD+3    2CADR   CALLCALL        A DELTA TIME STORED IN DELTIME.  THE
050648,000136:                                                                                                  #        AD+4                            BBCON OF THE 2CADR SHOULD CONTAIN THE E
050649,000137:                                                                                                  #        AD+5                            BANK OF DELTIME.  PHASCHNG RETURNS TO
050650,000138:                                                                                                  #                                        LOCATION AD+5
050651,000139: 
050652,000140:                                                                                                  #  NOTE THAT IF A VARIABLE PRIORITY IS GIVEN FOR A JOB, THE JOB WILL BE RESTARTED AS A NOVAC IF THE PRIORITY IS
050653,000141:                                                                                                  #  NEGATIVE, AS A FINDVAC IF THE PRIORITY IS POSITIVE.
050654,000142: 
050655,000143:                                                                                                  #  TYPE B PHASCHNG IS A COMBINATION OF VARIABLE AND FIXED PHASE CHANGES. IT WILL START UP A JOB AS INDICATED
050656,000144:                                                                                                  #  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
050657,000145:                                                                                                  #  DOUBLE ENTRY.  THE BIT INFORMATION IS AS FOLLOWS,
050658,000146:                                                                                                  #        TL1 DAP PPP PPP GGG
050659,000147:                                                                                                  #  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
050660,000148:                                                                                                  #  PHASE INFORMATION, OCTAL 0 - 127. 1 MUST BE 1.  AND AGAIN T STANDS FOR THE TBASE AND L FOR LONGBASE. D THIS
050661,000149:                                                                                                  #  TIME STANDS ONLY FOR PRIORITY SINCE THIS WILL BE CONSIDERED A JOB, AND IT MUST BE GIVEN DIRECTLY IF GIVEN.
050662,000150:                                                                                                  #  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
050663,000151:                                                                                                  #  THE NEXT LOCATION.  (THE RETURN LOCATION OF PHASCHNG) EXAMPLES,
050664,000152:                                                                                                  #        AD      TC      PHASCHNG        TBASE IS SET AND A RESTART CAUSE GROUP 3
050665,000153:                                                                                                  #        AD+1    OCT     56043           TO START THE JOB AJOBAJOB WITH PRIORITY
050666,000154:                                                                                                  #        AD+2    OCT     31000           31 AND THE FIRST ENTRY OF 3.4SPOT (WE CAN
050667,000155:                                                                                                  #        AD+3    2CADR   AJOBAJOB        ASSUME IT IS A TASK SINCE WE SET TBASE3)
050668,000156:                                                                                                  #        AD+4                            UPON RETURN FROM PHASCHNG CONTROL WOULD
050669,000157:                                                                                                  #        AD+5                            GO TO AD+5
050670,000158: 
050671,000159:                                                                                                  #        AD      TC      PHASCHNG        UPON A RESTART THE LAST DISPLAY WOULD BE
050672,000160:                                                                                                  #        AD+1    OCT     10015           RESTARTED AND A JOB WITH THE PREVIOUSLY
050673,000161:                                                                                                  #        AD+2                            STORED PRIORITY WOULD BE BEGUN AT AD+2
050674,000162:                                                                                                  #                                        BY MEANS OF GROUP 5
050675,000163:                                                                                                  #  THE NOVAC-FINDVAC CHOICE FOR JOBS HOLDS HERE ALSO - NEGATIVE PRIORITY CAUSES A NOVAC CALL, POSITIVE A FINDVAC.
050676,000164: 
050677,000165:                                                                                                  #  SUMMARY OF BITS
050678,000166:                                                                                                  #        TYPE A          TL0 00P PPP PPP GGG
050679,000167:                                                                                                  #        TYPE B          TL1 DAP PPP PPP GGG
050680,000168:                                                                                                  #        TYPE C          TL0 1AD XXX CJW GGG
050681,000169: 
050682,000170:                                                                                                  #  2PHSCHNG IS USED WHEN ONE WISHES TO START UP A GROUP OR CHANGE A GROUP WHILE UNDER THE CONTROL OF A DIFFERENT
050683,000171:                                                                                                  #  GROUP. FOR EXAMPLE, CHANGE THE PHASE OF GROUP 3 WHILE THE PORTION OF THE PROGRAM IS UNDER GROUP 5. ALL 2PHSCHNG
050684,000172:                                                                                                  #  CALLS ARE MADE IN THE FOLLOWING MANNER,
050685,000173:                                                                                                  #                TC      2PHSCHNG
050686,000174:                                                                                                  #                OCT     XXXXX
050687,000175:                                                                                                  #                OCT     YYYYY
050688,000176:                                                                                                  #  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
050689,000177:                                                                                                  #  DIFFERENCE --- NOTE- IF LONGBASE IS TO BE SET THIS INFORMATION IS GIVEN IN THE OCT YYYYY INFORMATION, IT WILL
050690,000178:                                                                                                  #  BE DISREGARDED IF GIVEN WITH THE OCT XXXXX INFORMATION.  A COUPLE OF EXAMPLES MAY HELP,
050691,000179:                                                                                                  #        AD      TC      2PHSCHNG        SET TBASE3 AND IF A RESTART OCCURS START
050692,000180:                                                                                                  #        AD+1    OCT     40083           THE TWO ENTRIES IN 3.8 TABLE LOCATION
050693,000181:                                                                                                  #        AD+2    OCT     05025           THIS IS OF TYPE C, SET THE JOB TO BE
050694,000182:                                                                                                  #        AD+3    OCT     18000           TO BE LOCATION AD+4, WITH A PRIORITY 18,
050695,000183:                                                                                                  #        AD+4                            FOR GROUP 5 PHASE INFORMATION
050696,000184: 
050697,000185:    5373                                           COUNT*   $$/PHASE                              
050698,000186:    5373           00004        2PHSCHNG           INHINT                                         #  THE ENTRY FOR A DOUBLE PHASE CHANGE
050699,000187:    5374           50002                           NDX      Q                                     
050700,000188:    5375           30000                           CA       0                                     
050701,000189:    5376           24002                           INCR     Q                                     
050702,000190:    5377           54072                           TS       TEMPP2                                
050703,000191: 
050704,000192:    5400           75032                           MASK     OCT7                                  
050705,000193:    5401           60000                           DOUBLE                                         
050706,000194:    5402           54071                           TS       TEMPG2                                
050707,000195: 
050708,000196:    5403           30072                           CA       TEMPP2                                
050709,000197:    5404           75100                           MASK     OCT17770                              #  NEED ONLY 1770, BUT WHY GET A NEW CONST.
050710,000198:    5405           00006                           EXTEND                                         
050711,000199:    5406           75013                           MP       BIT12                                 
050712,000200:    5407           56072                           XCH      TEMPP2                                
050713,000201: 
050714,000202:    5410           75010                           MASK     BIT15                                 
050715,000203:    5411           54066                           TS       TEMPSW2                               #  INDICATES WHETHER TO SET TBASE OR NOT
050716,000204: 
050717,000205:    5412           15416                           TCF      PHASCHNG   +3                         
050718,000206: 
050719,000207:    5413           00004        PHASCHNG           INHINT                                         
050720,000208:    5414           35026                           CA       ONE                                   #  INDICATESWE CAME FROM A PHASCHNG ENTRY
050721,000209:    5415           54066                           TS       TEMPSW2                               
050722,000210: 
050723,000211:    5416           50002                           NDX      Q                                     
050724,000212:    5417           30000                           CA       0                                     
050725,000213:    5420           24002                           INCR     Q                                     
050726,000214:    5421           54065                           TS       TEMPSW                                
050727,000215: 
050728,000216:    5422           00006                           EXTEND                                         
050729,000217:    5423           35426                           DCA      ADRPCHN2                              #  OFF TO SWITCHED BANK
050730,000218:    5424           52006                           DTCB                                           
050731,000219: 
050732,000220:    5425  E3,1400                                  EBANK=   LST1                                  
050733,000221:    5425           02111 20103  ADRPCHN2           2CADR    PHSCHNG2                              
050734,000222: 
050735,000223:    5427           22073        ONEORTWO           LXCH     TEMPBBCN                              
050736,000224:    5430           22006                           LXCH     BBANK                                 
050737,000225:    5431           22073                           LXCH     TEMPBBCN                              
050738,000226: 
050739,000227:    5432           75074                           MASK     OCT14000                              #  SEE WHAT KIND OF PHASE CHANGE IT IS
050740,000228:    5433           10000                           CCS      A                                     
050741,000229:    5434           15475                           TCF      CHECKB                                #  IT IS OF TYPE :B:
050742,000230: 
050743,000231:    5435           30062                           CA       TEMPP                                 
050744,000232:    5436           75020                           MASK     BIT7                                  
050745,000233:    5437           10000                           CCS      A                                     #  SHALL WE USE THE OLD PRIORITY
050746,000234:    5440           15462                           TCF      GETPRIO                               #  NO GET A NEW PRIORITY (OR DELTA T)
050747,000235: 
050748,000236:    5441           50061        OLDPRIO            NDX      TEMPG                                 #  USE THE OLD PRIORITY (OR DELTA T)
050749,000237:    5442           31053                           CA       PHSPRDT1   -2                         
050750,000238:    5443           54070                           TS       TEMPPR                                
050751,000239: 
050752,000240:    5444           30062        CON1               CA       TEMPP                                 #  SEE IF A 2CADR IS GIVEN
050753,000241:    5445           75017                           MASK     BIT8                                  
050754,000242:    5446           10000                           CCS      A                                     
050755,000243:    5447           15466                           TCF      GETNEWNM                              
050756,000244: 
050757,000245:    5450           30002                           CA       Q                                     
050758,000246:    5451           54063                           TS       TEMPNM                                
050759,000247:    5452           30006                           CA       BB                                    
050760,000248:    5453           00006                           EXTEND                                         #  PICK UP USERS SUPERBANK
050761,000249:    5454           04007                           ROR      SUPERBNK                              
050762,000250:    5455           54064                           TS       TEMPBB                                
050763,000251: 
050764,000252:    5456           35461        TOCON2             CA       CON2ADR                               #  BACK TO SWITCHED BANK
050765,000253:    5457           22073                           LXCH     TEMPBBCN                              
050766,000254:    5460           52006                           DTCB                                           
050767,000255: 
050768,000256:    5461           02177        CON2ADR            GENADR   CON2                                  
050769,000257: 
050770,000258:    5462           50002        GETPRIO            NDX      Q                                     #  DON:T CARE IF DIRECT OR INDIRECT
050771,000259:    5463           30000                           CA       0                                     #  LEAVE THAT DECISION TO RESTARTS
050772,000260:    5464           24002                           INCR     Q                                     #  OBTAIN RETURN ADDRESS
050773,000261:    5465           15443                           TCF      CON1       -1                         
050774,000262: 
050775,000263:    5466           00006        GETNEWNM           EXTEND                                         
050776,000264:    5467           50002                           INDEX    Q                                     
050777,000265:    5470           30001                           DCA      0                                     
050778,000266:    5471           52064                           DXCH     TEMPNM                                
050779,000267:    5472           35025                           CA       TWO                                   
050780,000268:    5473           26002                           ADS      Q                                     #  OBTAIN RETURN ADDRESS
050781,000269: 
050782,000270:    5474           15456                           TCF      TOCON2                                
050783,000271: 
050784,000272:    5475     5074               OCT14000           EQUALS   PRIO14                                
050785,000273:    5475     0061               TEMPG              EQUALS   ITEMP1                                
050786,000274:    5475     0062               TEMPP              EQUALS   ITEMP2                                
050787,000275:    5475     0063               TEMPNM             EQUALS   ITEMP3                                
050788,000276:    5475     0064               TEMPBB             EQUALS   ITEMP4                                
050789,000277:    5475     0065               TEMPSW             EQUALS   ITEMP5                                
050790,000278:    5475     0066               TEMPSW2            EQUALS   ITEMP6                                
050791,000279:    5475     0070               TEMPPR             EQUALS   RUPTREG1                              
050792,000280:    5475     0071               TEMPG2             EQUALS   RUPTREG2                              
050793,000281:    5475     0072               TEMPP2             EQUALS   RUPTREG3                              
050794,000282: 
050795,000283:    5475     0073               TEMPBBCN           EQUALS   RUPTREG4                              
050796,000284:    5475  0000006               BB                 EQUALS   BBANK                                 
050797,000285: 

Sundance 302

050799,000287: 
050800,000288: 14,3734                                           BANK     14                                    
050801,000289: 10,2000                                           SETLOC   PHASETAB                              
050802,000290: 10,2000                                           BANK                                           
050803,000291: 
050804,000292: 10,2111  E3,1436                                  EBANK=   PHSNAME1                              
050805,000293: 10,2111                                           COUNT*   $$/PHASE                              
050806,000294: 10,2111           22073        PHSCHNG2           LXCH     TEMPBBCN                              
050807,000295: 10,2112           30065                           CA       TEMPSW                                
050808,000296: 10,2113           75032                           MASK     OCT7                                  
050809,000297: 10,2114           60000                           DOUBLE                                         
050810,000298: 10,2115           54061                           TS       TEMPG                                 
050811,000299: 
050812,000300: 10,2116           30065                           CA       TEMPSW                                
050813,000301: 10,2117           75100                           MASK     OCT17770                              
050814,000302: 10,2120           00006                           EXTEND                                         
050815,000303: 10,2121           75013                           MP       BIT12                                 
050816,000304: 10,2122           54062                           TS       TEMPP                                 
050817,000305: 
050818,000306: 10,2123           30065                           CA       TEMPSW                                
050819,000307: 10,2124           74105                           MASK     OCT60000                              
050820,000308: 10,2125           56065                           XCH      TEMPSW                                
050821,000309: 10,2126           75074                           MASK     OCT14000                              
050822,000310: 10,2127           10000                           CCS      A                                     
050823,000311: 10,2130           15427                           TCF      ONEORTWO                              
050824,000312: 
050825,000313: 10,2131           30062                           CA       TEMPP                                 #  START STORING THE PHASE INFORMATION
050826,000314: 10,2132           50061                           NDX      TEMPG                                 
050827,000315: 10,2133           54751                           TS       PHASE1     -2                         
050828,000316: 
050829,000317: 10,2134           10066        BELOW1             CCS      TEMPSW2                               #  IS IT A PHASCHNG OR A 2PHSCHNG
050830,000318: 10,2135           12151                           TCF      BELOW2                                #  IT:S A PHASCHNG
050831,000319: 
050832,000320: 10,2136           12137                           TCF      +1                                    #  IT:S A 2PHSCHNG
050833,000321: 10,2137           40072                           CS       TEMPP2                                
050834,000322: 10,2140           22072                           LXCH     TEMPP2                                
050835,000323: 10,2141           50071                           NDX      TEMPG2                                
050836,000324: 10,2142           52751                           DXCH     -PHASE1    -2                         
050837,000325: 
050838,000326: 10,2143           10066                           CCS      TEMPSW2                               
050839,000327: 10,2144           12145                           NOOP                                           #  CAN:T GET HERE
050840,000328: 10,2145           12151                           TCF      BELOW2                                
050841,000329: 
050842,000330: 10,2146           40025                           CS       TIME1                                 
050843,000331: 10,2147           50071                           NDX      TEMPG2                                
050844,000332: 10,2150           55052                           TS       TBASE1     -2                         
050845,000333: 
050846,000334: 10,2151           10065        BELOW2             CCS      TEMPSW                                #  SEE IF WE SHOULD SET TBASE OR LONGBASE
050847,000335: 10,2152           12165                           TCF      BELOW3                                #  SET LONGBASE ONLY
050848,000336: 10,2153           12170                           TCF      BELOW4                                #  SET NEITHER
050849,000337: 
050850,000338: 10,2154           40025                           CS       TIME1                                 #  SET TBASE TO BEGIN WITH
050851,000339: 10,2155           50061                           NDX      TEMPG                                 
050852,000340: 10,2156           55052                           TS       TBASE1     -2                         
050853,000341: 
050854,000342: 10,2157           30065                           CA       TEMPSW                                #  SHALL WE NOW SET LONGBASE
050855,000343: 10,2160           62163                           AD       BIT14COM                              
050856,000344: 10,2161           10000                           CCS      A                                     
050857,000345: 10,2162           12163                           NOOP                                           #  ***** CANT GET HERE *****
050858,000346: 10,2163           17777        BIT14COM           OCT      17777                                 #  ***** CANT GET HERE *****
050859,000347: 10,2164           12170                           TCF      BELOW4                                #  NO WE NEED ONLY SET TBASE
050860,000348: 
050861,000349: 10,2165           00006        BELOW3             EXTEND                                         #  SET LONGBASE
050862,000350: 10,2166           30025                           DCA      TIME2                                 
050863,000351: 10,2167           53163                           DXCH     LONGBASE                              
050864,000352: 
050865,000353: 10,2170           40062        BELOW4             CS       TEMPP                                 #  AND STORE THE FINAL PART OF THE PHASE
050866,000354: 10,2171           50061                           NDX      TEMPG                                 
050867,000355: 10,2172           54750                           TS       -PHASE1    -2                         
050868,000356: 
050869,000357: 10,2173           30002                           CA       Q                                     
050870,000358: 10,2174           22073                           LXCH     TEMPBBCN                              
050871,000359: 10,2175           00003                           RELINT                                         
050872,000360: 10,2176           52006                           DTCB                                           
050873,000361: 10,2177           22073        CON2               LXCH     TEMPBBCN                              
050874,000362: 
050875,000363: 10,2200           30062                           CA       TEMPP                                 
050876,000364: 10,2201           50061                           NDX      TEMPG                                 
050877,000365: 10,2202           54751                           TS       PHASE1     -2                         
050878,000366: 
050879,000367: 10,2203           30070                           CA       TEMPPR                                
050880,000368: 10,2204           50061                           NDX      TEMPG                                 
050881,000369: 10,2205           55053                           TS       PHSPRDT1   -2                         
050882,000370: 
050883,000371: 10,2206           00006                           EXTEND                                         
050884,000372: 10,2207           30064                           DCA      TEMPNM                                
050885,000373: 10,2210           50061                           NDX      TEMPG                                 
050886,000374: 10,2211           53435                           DXCH     PHSNAME1   -2                         
050887,000375: 
050888,000376: 10,2212           12134                           TCF      BELOW1                                
050889,000377: 

Sundance 292

050891,000379: 
050892,000380:    5475                                           BLOCK    02                                    
050893,000381:    4000                                           SETLOC   FFTAG1                                
050894,000382:    4000                                           BANK                                           
050895,000383: 
050896,000384:    5475                                           COUNT*   $$/PHASE                              
050897,000385:    5475           75013        CHECKB             MASK     BIT12                                 #  SINCE THIS IS OF TYPE B, THIS BIT SHOULD
050898,000386:    5476           10000                           CCS      A                                     #   BE HERE IF WE ARE TO GET A NEW PRIORITY
050899,000387:    5477           15462                           TCF      GETPRIO                               #  IT IS, SO GET NEW PRIORITY
050900,000388: 
050901,000389:    5500           15441                           TCF      OLDPRIO                               #  IT ISN:T, USE THE OLD PRIORITY
050902,000390: 
050903,000391:                                                                                                  #  PROGRAM DESCRIPTION: NEWPHASE                                           DATE: 11 NOV 1966
050904,000392:                                                                                                  #  MOD: 1                                                                  ASSEMBLY: SUNBURST REV
050905,000393:                                                                                                  #  MOD BY: COPPS                                                           LOG SECTION: PHASE TABLE MAINTENANCE
050906,000394:                                                                                                  #  FUNCTIONAL DESCRIPTION:
050907,000395:                                                                                                  #                NEWPHASE IS THE QUICK WAY TO MAKE A NON VARIABLE PHASE CHANGE. IT INCLUDES THE OPTION OF SETTING
050908,000396:                                                                                                  #           TBASE OF THE GROUP. IF TBASE IS TO BE SET, -C(TIME1) IS STORED IN THE TBASE TABLE AS FOLLOWS:
050909,000397: 
050910,000398:                                                                                                  #                   (L-1) TBASE0
050911,000399:                                                                                                  #                   (L)   TBASE1 (IF GROUP=1)
050912,000400:                                                                                                  #                   (L+1)
050913,000401:                                                                                                  #                   (L+2) TBASE2 (IF GROUP=2)
050914,000402:                                                                                                  #                   -----
050915,000403:                                                                                                  #                   (L+6) TBASE4 (IF GROUP=4)
050916,000404:                                                                                                  #                   (L+7)
050917,000405:                                                                                                  #                   (L+8) TBASE5 (IF GROUP=5)
050918,000406: 
050919,000407:                                                                                                  #           IN ANY CASE, THE NEGATIVE OF THE PHASE, FOLLOWED (IN THE NEXT REGISTER)  BY THE PHASE, IF STORED IN THE
050920,000408:                                                                                                  #           PHASE TABLE AS FOLLOWS:
050921,000409: 
050922,000410:                                                                                                  #                   (L)   -PHASE1 (IF GROUP=1)
050923,000411:                                                                                                  #                   (L+1) PHASE1
050924,000412:                                                                                                  #                   (L+2) -PHASE2 (IF GROUP=2)
050925,000413:                                                                                                  #                   (L+3) PHASE2
050926,000414:                                                                                                  #                   -----
050927,000415:                                                                                                  #                   (L+7) PHASE 4
050928,000416:                                                                                                  #                   (L+8) -PHASE5 (IF GROUP=5)
050929,000417:                                                                                                  #                   (L+9) PHASE5
050930,000418: 
050931,000419:                                                                                                  #  CALLING SEQUENCE:
050932,000420:                                                                                                  #                EXAMPLE IS FOR PLACING A PHASE OF FIVE INTO GROUP THREE:
050933,000421: 
050934,000422:                                                                                                  #           1) IF TBASE IS NOT TO BE SET:
050935,000423:                                                                                                  #                                          L-1      CA     FIVE
050936,000424:                                                                                                  #                                          L        TC     NEWPHASE
050937,000425:                                                                                                  #                                          L+1      OCT    00003
050938,000426: 
050939,000427:                                                                                                  #           2) IF TBASE IS TO BE SET:
050940,000428:                                                                                                  #                                          L-1      CS     FIVE
050941,000429:                                                                                                  #                                          L        TC     NEWPHASE
050942,000430:                                                                                                  #                                          L+1      OCT    00003
050943,000431: 
050944,000432:                                                                                                  #  SUBROUTINES CALLED: NONE
050945,000433: 
050946,000434:                                                                                                  #  NORMAL EXIT MODE: AT L+2 OF CALLING SEQUENCE
050947,000435: 
050948,000436:                                                                                                  #  ALARM OR ABORT EXITS: NONE
050949,000437: 
050950,000438:                                                                                                  #  OUTPUT: PHASE TABLE AND TBASE TABLE UPDATED
050951,000439: 
050952,000440:                                                                                                  #  ERASABLE INITIALIZATION REQ,D: NONE
050953,000441: 
050954,000442:                                                                                                  #  DEBRIS: A,L,TEMPG
050955,000443: 
050956,000444:                                                                                                  #  ***WARNING*** THIS PROGRAM IS TO BE PLACED IN FIXED-FIXED AND UNSWITCHED ERASABLE.
050957,000445: 
050958,000446:    4000                                           SETLOC   FFTAG1                                
050959,000447:    4000                                           BANK                                           
050960,000448: 
050961,000449:    5501                                           COUNT*   $$/PHASE                              
050962,000450:    5501           00004        NEWPHASE           INHINT                                         
050963,000451: 
050964,000452:    5502           54001                           TS       L                                     #  SAVE FOR FURTHER USE
050965,000453: 
050966,000454:    5503           50002                           NDX      Q                                     #  OBTAIN THE GROUP NUMBER
050967,000455:    5504           30000                           CA       0                                     
050968,000456:    5505           24002                           INCR     Q                                     #  OBTAIN THE RETURN ADDRESS
050969,000457:    5506           60000                           DOUBLE                                         #  SAVE THE GROUP IN A FORM USED FOR
050970,000458:    5507           54061                           TS       TEMPG                                 #  INDEXING
050971,000459: 
050972,000460:    5510           10001                           CCS      L                                     #  SEE IF WE ARE TO SET TBASE
050973,000461:    5511           15520                           TCF      +7                                    #  NO, THE DELTA T WAS POSITIVE
050974,000462:    5512           15520                           TCF      +6                                    
050975,000463: 
050976,000464:    5513           24000        NUFAZ+10           INCR     A                                     #  SET TBASE AND STORE PHASE CORRECTLY
050977,000465:    5514           54001                           TS       L                                     
050978,000466: 
050979,000467:    5515           40025                           CS       TIME1                                 #  SET TBASE
050980,000468:    5516           50061                           NDX      TEMPG                                 
050981,000469:    5517           55052                           TS       TBASE1     -2                         
050982,000470: 
050983,000471:    5520           40001                           CS       L                                     #  NOW PUT THE PHASE IN THE RIGHT TABLE LOC
050984,000472:    5521           50061                           NDX      TEMPG                                 
050985,000473:    5522           52751                           DXCH     -PHASE1    -2                         
050986,000474: 
050987,000475:    5523           00003                           RELINT                                         
050988,000476:    5524           00002                           TC       Q                                     #  NOW RETURN TO CALLER

End of include-file PHASE_TABLE_MAINTENANCE.agc.  Parent file is MAIN.agc