Source Code

004669,000002: ## Copyright: Public domain. 004670,000003: ## Filename: RESTART_CONTROL.agc 004671,000004: ## Purpose: Part of the source code for Solarium build 55. This 004672,000005: ## is for the Command Module's (CM) Apollo Guidance 004673,000006: ## Computer (AGC), for Apollo 6. 004674,000007: ## Assembler: yaYUL --block1 004675,000008: ## Contact: Jim Lawton <jim DOT lawton AT gmail DOT com> 004676,000009: ## Website: www.ibiblio.org/apollo/index.html 004677,000010: ## Page Scans: www.ibiblio.org/apollo/ScansForConversion/Solarium055/ 004678,000011: ## Mod history: 2009-09-21 JL Created. 004679,000012: ## 2016-08-22 RSB Typos. 004680,000013: ## 2016-12-28 RSB Proofed comment text using octopus/ProoferComments, 004681,000014: ## and fixed errors found. 004682,000015:

Page 120

004684,000017: 
004685,000018:    2276                                           BANK     1                                     
004686,000019: 
004687,000020:                                                                                                  #  OF THE PHASE TABLE IN ALMOST CONTSTANT AGREEMENT. CALLING SEQUENCES ARE AS FOLLOWS:
004688,000021: 
004689,000022:                                                                                                  #                TC      PHASCHNG        CHANGE GROUP G TO PHASE PPP (127 MAX).
004690,000023:                                                                                                  #                OCT     PPP0G           (CALL UNDER EXECUTIVE ONLY)
004691,000024: 
004692,000025:                                                                                                  #                CAF     --              CHANGE GROUP G TO THE PHASE ARRIVING IN
004693,000026:                                                                                                  #                TC      NEWPHASE        A (MAY BE CALLED ANYTIME).
004694,000027:                                                                                                  #                OCT     0000G
004695,000028: 
004696,000029:                                                                                                  #        IN EACH CASE THE OLD PHASE IS RETURNED TO THE CALLER IN A. IF THE OLD PHASE WAS +0, CONTROL IS
004697,000030:                                                                                                  #  GIVEN TO A ROUTINE SPECIFIED IN A CADR TABLE. THIS ROUTINE MAY EXIT OR RETURN TO CALLER VIA SWRETURN.
004698,000031: 
004699,000032:    2276           30001        PHASCHNG           XCH      Q                                     
004700,000033:    2277           20017                           INHINT                                         
004701,000034:    2300           50642                           TS       RUPTREG4                              
004702,000035:    2301           20000                           INDEX    A                                     
004703,000036:    2302           30000                           CAF      0                                     
004704,000037:    2303           50601                           TS       PHASDATA                              
004705,000038:    2304           73220                           MASK     LOW5                                  #  (MAY WANT MORE GROUPS SOME DAY)
004706,000039:    2305           30601                           XCH      PHASDATA                              
004707,000040:    2306           25777                           EXTEND                                         
004708,000041:    2307           42311                           MP       -BIT9                                 #  NOTE LP NOT SAVED.
004709,000042:    2310           02321                           TC       PHASCH2                               
004710,000043: 
004711,000044:    2311           77377        -BIT9              OCT      -400                                  
004712,000045: 
004713,000046:    2312           20017        NEWPHASE           INHINT                                         
004714,000047:    2313           30001                           XCH      Q                                     
004715,000048:    2314           50642                           TS       RUPTREG4                              
004716,000049:    2315           20000                           INDEX    A                                     
004717,000050:    2316           30000                           CAF      0                                     
004718,000051:    2317           50601                           TS       PHASDATA                              
004719,000052: 
004720,000053:    2320           40001                           CS       Q                                     
004721,000054:    2321           20601        PHASCH2            INDEX    PHASDATA                              
004722,000055:    2322           50655                           TS       -PHASE1    -1                         #  PHASE1 IS FOR PROG NUM 1.
004723,000056:    2323           40000                           COM                                            
004724,000057:    2324           20601                           INDEX    PHASDATA                              
004725,000058:    2325           30647                           XCH      PHASE1     -1                         #  INTO PHASE1 FOR PROG 1.
004726,000059: 
004727,000060:    2326           10000                           CCS      A                                     
004728,000061:    2327           02332                           TC       +3                                    
004729,000062: 
004730,000063:    2330           02341                           TC       UPT                                   #  ON +0.
004731,000064: 
004732,000065:    2331           45503                           CS       TWO                                   #  -1 IS INACTIVE STATE
004733,000066:    2332           64516                 +3        AD       ONE                                   
004734,000067: 
004735,000068:    2333           30642        PHASEXIT           XCH      RUPTREG4                              

Page 121

004737,000070:    2334           64516                           AD       ONE                                   
004738,000071:    2335           50001                           TS       Q                                     #  WE MUST RELINT BEFORE RETURN.
004739,000072:    2336           30642                           XCH      RUPTREG4                              #  OLD PHASE BITS.
004740,000073:    2337           20016                           RELINT                                         
004741,000074:    2340           00001                           TC       Q                                     
004742,000075: 
004743,000076:    2341           20601        UPT                INDEX    PHASDATA                              
004744,000077:    2342           36651                           CAF      UPTCADR    -1                         
004745,000078:    2343           05662                           TC       SWCALL                                
004746,000079: 
004747,000080:    2344           35501                           CAF      ZERO                                  #  IF RETURN
004748,000081:    2345           02333                           TC       PHASEXIT                              
004749,000082: 

Page 122

004751,000084: 
004752,000085:                                                                                                  #        MAJOR MODE LIGHT MAINTENANCE ROUTINES.
004753,000086: 
004754,000087:                                                                                                  #        ROUTINE TO CHECK EQUALITY BETWEEN THE MAJOR MODE DISPLAY AND THE ARGUMENT AT CALLER +1. RETURNS TO
004755,000088:                                                                                                  #  CALLER +2 IF NOT AND CALLER +3 IF SO.
004756,000089: 
004757,000090:    2346           34516        CHECKMM            CAF      ONE                                   
004758,000091:    2347           60001                           AD       Q                                     
004759,000092:    2350           30001                           XCH      Q                                     
004760,000093:    2351           20000                           INDEX    A                                     
004761,000094:    2352           40000                           CS       0                                     
004762,000095:    2353           60612                           AD       MODREG                                
004763,000096:    2354           10000                           CCS      A                                     
004764,000097:    2355           00001                           TC       Q                                     
004765,000098:    2356           00017        FINEMASK           OCT      17                                    
004766,000099:    2357           00001                           TC       Q                                     
004767,000100:    2360           20001                           INDEX    Q                                     
004768,000101:    2361           00001                           TC       Q                                     
004769,000102: 
004770,000103:                                                                                                  #        TO UPDATE THE MAJOR MODE LIGHTS:
004771,000104: 
004772,000105:    2362           20001        NEWMODE            INDEX    Q                                     
004773,000106:    2363           30000                           CAF      0                                     
004774,000107:    2364           50612                           TS       MODREG                                
004775,000108:    2365           33314                           CAF      GRABUSY    +1                         #  CADR OF BANK CONTAINING DSPMM.
004776,000109:    2366           30015                           XCH      BANKREG                               
004777,000110:    2367           50116                           TS       MPAC       +1                         #  MPACS NOT USED BY DSPMM.
004778,000111:    2370           30001                           XCH      Q                                     
004779,000112:    2371           50115                           TS       MPAC                                  
004780,000113:    2372           06003                           TC       DSPMM                                 
004781,000114: 
004782,000115:    2373           30116                           XCH      MPAC       +1                         
004783,000116:    2374           50015                           TS       BANKREG                               
004784,000117:    2375           20115                           INDEX    MPAC                                  
004785,000118:    2376           00001                           TC       1                                     
004786,000119: 

Page 123

004788,000121: 
004789,000122:                                                                                                  #  PROGRAM PRGSTALL IS AN EXECUTIVE INTERLOCK ROUTINE. REQUESTING PROGS DO
004790,000123:                                                                                                  #                TC      BANKCALL
004791,000124:                                                                                                  #                CADR    PRGSTALL
004792,000125:                                                                                                  #  RETURN IS TO L+2 AFTER TWO PROGS HAVE CALLED.
004793,000126: 
004794,000127: 
004795,000128: 
004796,000129: 04,6624                                           BANK     4                                     
004797,000130: 04,6624           20017        PRGSTALL           INHINT                                         
004798,000131: 04,6625           40645                           CS       STATE                                 
004799,000132: 04,6626           74516                           MASK     PRGBIT                                
004800,000133: 04,6627           50001                           TS       Q                                     
004801,000134: 04,6630           44516                           CS       PRGBIT                                
004802,000135: 04,6631           70645                           MASK     STATE                                 
004803,000136: 04,6632           60001                           AD       Q                                     
004804,000137: 04,6633           50645                           TS       STATE                                 
004805,000138: 04,6634           10001                           CCS      Q                                     
004806,000139: 04,6635           06642                           TC       PRGSLEEP                              
004807,000140: 04,6636           36651                           CAF      LPRGRET                               
004808,000141: 04,6637           02060                           TC       JOBWAKE                               
004809,000142: 04,6640           20016                           RELINT                                         
004810,000143: 04,6641           05702                           TC       SWRETURN                              
004811,000144: 
004812,000145: 04,6642           05706        PRGSLEEP           TC       MAKECADR                              
004813,000146: 04,6643           30062                           XCH      ADDRWD                                
004814,000147: 04,6644           50117                           TS       MPAC       +2                         
004815,000148: 04,6645           36651                           CAF      LPRGRET                               
004816,000149: 04,6646           02127                           TC       JOBSLEEP                              
004817,000150: 
004818,000151: 04,6647           30117        PRGRET             XCH      MPAC       +2                         
004819,000152: 04,6650           05723                           TC       BANKJUMP                              
004820,000153: 
004821,000154: 04,6651           10647        LPRGRET            CADR     PRGRET                                
004822,000155: 04,6652     4516               PRGBIT             EQUALS   BIT1                                  
004823,000156: 
004824,000157: 04,6652           10652        UPTCADR            CADR     10652                                 
004825,000158: 

Page 124

004827,000160: 
004828,000161:                                                                                                  #        PINBALL COMES TO MODROUT ON RECEIVING THE NEW MODE REQUESTED BY VERB 37. THE DESIRED MODE IN IS A
004829,000162:                                                                                                  #  ON ARRIVAL.
004830,000163: 
004831,000164: 04,6653           20017        MODROUT            INHINT                                         
004832,000165: 04,6654           64341                           AD       NEG3                                  #  FOR FLIGHT 501, ONLY MODES 01 AND 03 MAY
004833,000166: 04,6655           10000                           CCS      A                                     #  BE INITIATED BY VERB 37.
004834,000167: 04,6656           06703                           TC       V37BAD                                
004835,000168: 04,6657           03062                           TC       CCSHOLE                               
004836,000169: 04,6660           06670                           TC       1CHECK                                #  SEE IF 01 CALLED FOR.
004837,000170: 
004838,000171: 04,6661           02346                           TC       CHECKMM                               #  MODE 03 REQUESTED - DEMANDS MODE 02
004839,000172: 04,6662           00002                           OCT      02                                    #  PRESENTLY. 
004840,000173: 04,6663           06703                           TC       V37BAD                                
004841,000174: 
004842,000175: 04,6664           32150                           CAF      PRIO14                                #  START OPTICAL CHECK.
004843,000176: 04,6665           02046                           TC       FINDVAC                               
004844,000177: 04,6666           43262                           CADR     CHKOPT                                
004845,000178: 04,6667           02124                           TC       ENDOFJOB                              
004846,000179: 
004847,000180: 04,6670           64335        1CHECK             AD       MINUS1                                #  SEE IF 01 REQUESTED.
004848,000181: 04,6671           10000                           CCS      A                                     
004849,000182: 04,6672           06703                           TC       V37BAD                                
004850,000183: 04,6673           03062                           TC       CCSHOLE                               
004851,000184: 04,6674           06703                           TC       V37BAD                                
004852,000185: 
004853,000186: 04,6675           10612                           CCS      MODREG                                #  DEMAND IDLE MODE.
004854,000187: 04,6676           06703                           TC       V37BAD                                
004855,000188: 
004856,000189: 04,6677           34501                           CAF      PRIO20                                
004857,000190: 04,6700           02046                           TC       FINDVAC                               
004858,000191: 04,6701           42000                           CADR     TOP1                                  
004859,000192: 04,6702           02124                           TC       ENDOFJOB                              
004860,000193: 
004861,000194: 04,6703           03233        V37BAD             TC       FALTON                                #  ILLEGAL REQUEST.
004862,000195: 04,6704           02124                           TC       ENDOFJOB                              
004863,000196: 

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