Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

023188,000002:                                                                                                  ## Copyright:   Public domain.
023189,000003:                                                                                                  ## Filename:    P15.agc
023190,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
023191,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM) 
023192,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for 
023193,000007:                                                                                                  ##              Apollo 15-17.
023194,000008:                                                                                                  ## Assembler:   yaYUL
023195,000009:                                                                                                  ## Contact:     Hartmuth Gutsche <hgutsche@xplornet.com>
023196,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
023197,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
023198,000012:                                                                                                  ## Mod history: 2009-12-17 HG   Initial version
023199,000013:                                                                                                  ##              2010-01-26 JL   Updated header comments.
023200,000014:                                                                                                  ##              2010-01-26 JL   Minor updates.
023201,000015:                                                                                                  ##              2010-01-31 JL   Fixed build errors.
023202,000016:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
023203,000017:                                                                                                  ##              2017-02-05 RSB  Proofed comment-text the old-fashioned
023204,000018:                                                                                                  ##                              way.  (No corresponding file in any
023205,000019:                                                                                                  ##                              other AGC version to diff against, at 
023206,000020:                                                                                                  ##                              this writing.)
023207,000021: 

Page 527

023209,000023: 
023210,000024:                                                                                                  #  P15 TLI INITIATE/CUTOFF
023211,000025:                                                                                                  #        
023212,000026:                                                                                                  #        DISPLAYS N33 : TIME OF SIVB INJECTION SEQUENCE START (TB6)
023213,000027:                                                                                                  #        ESTABLISHES T6SET TO BE EXECUTED AT TB6 TIME
023214,000028:                                                                                                  #        SETS TLITIG = TB6 + 9:37.6
023215,000029:                                                                                                  #        DISPLAYS N14 : INERTIAL VELOCITY MAGNITUDE AT TLI C/O
023216,000030:                                                                                                  #        DISPLAYS N95 : TFI - TIME FROM TLITIG (DECREASING)
023217,000031:                                                                                                  #                       VG  - VELOCITY-TO-BE-GAINED
023218,000032:                                                                                                  #                       V   - INERTIAL VELOCITY MAGNITUDE
023219,000033:                                                                                                  #        T6SET : SETS THE SIVB INJECTION SEQUENCE START BIT,
023220,000034:                                                                                                  #        ESTABLISHES T6RESET (DT = 10 SECS), AND
023221,000035:                                                                                                  #        TURNS ON THE UPLINK ACTIVITY LIGHT
023222,000036:                                                                                                  #        T6RESET : CLEARS THE SIVB I.S.S. BIT AND
023223,000037:                                                                                                  #        TURNS OFF THE UPLINK ACTIVITY LIGHT
023224,000038:                                                                                                  #        P40S/SV : CALLS MIDTOAV1 TO INTEGRATE THE CSM
023225,000039:                                                                                                  #        STATE VECTOR TO TLITLIG - 100 AND
023226,000040:                                                                                                  #        ESTABLISHES TIGBLNK AT TLITIG - 105
023227,000041:                                                                                                  #        TIGBLNK : BLANKS THE DSKY FOR 5 SECS AND
023228,000042:                                                                                                  #        ESTABLISHES TIGAVEG FOR TLITIG - 100 
023229,000043:                                                                                                  #        TIGAVEG : STARTS READACCS AND REDISPLAYS
023230,000044:                                                                                                  #        N95 (VG AND V NOW DYNAMIC)
023231,000045:                                                                                                  #        SIVBCOMP : UPDATES VG AND V AND
023232,000046:                                                                                                  #        AFTER TLITIG + 10 CALCULATES TGO AND
023233,000047:                                                                                                  #        CHANGES THE N95 R1 DISPLAY TO TFC
023234,000048:                                                                                                  #        WHEN TGO < 4 SECS, SIVBCOMP ESTABLISHES SIVBOFF (DT = TGO)
023235,000049:                                                                                                  #        SIVBOFF : SHUTS DOWN THE SIVB AND CALLS POSTTLI
023236,000050:                                                                                                  #        POSTTLI : FLASHES N95 TO INDICATE TLI IS COMPLETED
023237,000051:                                                                                                  #        P15 EXITS VIA GOTOPOOH
023238,000052: 33,2000                                           SETLOC   P15LOC1                               
023239,000053: 33,2000                                           BANK                                           
023240,000054: 33,3455                                           COUNT*   $$/P15                                
023241,000055: 33,3455  E7,1412                                  EBANK=   TIG                                   
023242,000056: 33,3455           35026        P15JOB             CAF      V06N33                                #  DISPLAY TB6 TIME
023243,000057: 33,3456           05535                           TC       VNFLASH                               
023244,000058: 33,3457           06006                           TC       INTPRET                               
023245,000059: 33,3460           43345                           DLOAD    DAD                                   
023246,000060: 33,3461           03413                                    TIG                                   
023247,000061: 33,3462           27533                                    TLIDT                                 
023248,000062: 33,3463           03464                           STORE    TLITMP                                
023249,000063: 33,3464           44234                           RTB      BDSU                                  
023250,000064: 33,3465           51751                                    LOADTIME                              
023251,000065: 33,3466           03413                                    TIG                                   
023252,000066: 33,3467           03673                           STORE    P40TMP                                #  TIG-TIME2
023253,000067: 33,3470           77776                           EXIT                                           #  .TO P40TMP
023254,000068: 33,3471           52155                           DXCH     MPAC                                  #  ..AND A,L
023255,000069: 33,3472           05332                           TC       LONGCALL                              
023256,000070: 33,3473  E7,1672                                  EBANK=   P40TMP                                
023257,000071: 33,3473           02311 40067                     2CADR    T6SET                                 
023258,000072: 33,3475           05362                           TC       2PHSCHNG                              

Page 528

023260,000074: 33,3476           00153                           OCT      00153                                 #  A,3.15=T6SET IN P40TMP CSEC
023261,000075: 33,3477           24024                           OCT      24024                                 #  C,JOB BELOW,LONGBASE FOR A ABOVE
023262,000076: 33,3500  01,2077               3P15SPT1           =        3.15SPOT                              
023263,000077: 33,3500           00006                           EXTEND                                         
023264,000078: 33,3501           31464                           DCA      TLITMP                                
023265,000079: 33,3502           53413                           DXCH     TIG                                   #  TLITIG = TB6 + 9:37.6
023266,000080: 33,3503           33536        DISP14             CAF      V06N14                                #  DISPLAY V AT TLI C/O
023267,000081: 33,3504           05535                           TC       VNFLASH                               
023268,000082: 33,3505           06006                           TC       INTPRET                               
023269,000083: 33,3506           51575                           VLOAD    ABVAL                                 
023270,000084: 33,3507           01563                                    VRECTCSM                              #  M/CS B+7
023271,000085: 33,3510           03723                           STORE    VNOW                                  
023272,000086: 33,3511           43021                           BDSU     SET                                   
023273,000087: 33,3512           02356                                    VC/O                                  #       B+7
023274,000088: 33,3513           03464                                    TIMRFLAG                              #  ENABLE CLOKTASK
023275,000089: 33,3514           17725                           STODL    VGTLI                                 #  VGTLI = VC/O - |VRECTCSM| B+7
023276,000090: 33,3515           27535                                    S4BCOMP                               
023277,000091: 33,3516           01062                           STORE    AVEGEXIT                              #  SET AVERAGEG EXIT TO SIVBCOMP
023278,000092: 33,3517           77776                           EXIT                                           
023279,000093: 33,3520           33537                           CAF      V06N95                                
023280,000094: 33,3521           54777                           TS       NVWORD1                               #  ENABLE CLOCKJOB
023281,000095: 33,3522           34770        CLOKNOW            CAF      ONE                                   
023282,000096: 33,3523           05233                           TC       WAITLIST                              
023283,000097: 33,3524  E7,1412                                  EBANK=   TIG                                   
023284,000098: 33,3524           03225 50067                     2CADR    CLOKTASK                              
023285,000099: 
023286,000100: 33,3526           05362                           TC       2PHSCHNG                              
023287,000101: 33,3527           40036                           OCT      40036                                 #  6.3SPOT FOR CLOKTASK
023288,000102: 33,3530           00004                           OCT      00004                                 #  KILL GROUP 4
023289,000103: 33,3531  01,2325               6P3SPT4            =        6.3SPOT                               
023290,000104: 33,3531           15205                           TCF      ENDOFJOB                              
023291,000105: 
023292,000106: 33,3532           00003 20640  TLIDT              2DEC     57760      B-28                       #  9 MIN 37.6 SEC (TB6 + TLIDT = TLITIG)
023293,000107: 
023294,000108: 33,3534  E7,1412                                  EBANK=   TIG                                   
023295,000109: 33,3534           03540 66067  S4BCOMP            2CADR    SIVBCOMP                              
023296,000110: 
023297,000111: 33,3536           01416        V06N14             VN       0614                                  
023298,000112: 33,3537           01537        V06N95             VN       0695                                  
023299,000113: 
023300,000114: 
023301,000115: 20,2000                                           SETLOC   P15LOC                                
023302,000116: 20,2000                                           BANK                                           
023303,000117: 20,2311  E7,1412                                  EBANK=   TIG                                   
023304,000118: 20,2311                                           COUNT*   $$/P15                                
023305,000119: 20,2311           00006        T6SET              EXTEND                                         
023306,000120: 20,2312           30025                           DCA      TIME2                                 
023307,000121: 20,2313           53022                           DXCH     TEVENT                                
023308,000122: 20,2314           32330                           CAF      10SEC                                 #  T6RESET IN 10 SEC.
023309,000123: 20,2315           05223                           TC       TWIDDLE                               

Page 529

023311,000125: 20,2316           02331                           ADRES    T6RESET                               
023312,000126: 20,2317           05402                           TC       PHASCHNG                              
023313,000127: 20,2320           40023                           OCT      40023                                 #  A,3.2=T6CHNSET IMMED.,
023314,000128:                                                                                                  #        T6RESET IN 10 SEC,TBASE NOW
023315,000129: 
023316,000130: 20,2321  01,2052               3P2SPT1            =        3.2SPOT                               
023317,000131: 20,2321           34754        T6CHNSET           CAF      BIT13                                 
023318,000132: 20,2322           00006                           EXTEND                                         #  SIVB INJECTION
023319,000133: 20,2323           05012                           WOR      CHAN12                                #   SEQUENCE START
023320,000134: 20,2324           34766                           CAF      BIT3                                  
023321,000135: 20,2325           00006                           EXTEND                                         
023322,000136: 20,2326           05011                           WOR      DSALMOUT                              #  UPLINK ACTIV. ON
023323,000137: 20,2327           05314                           TC       TASKOVER                              
023324,000138: 
023325,000139: 20,2330           01750        10SEC              DEC      1000       B-14                       
023326,000140: 
023327,000141: 20,2331           44754        T6RESET            CS       BIT13                                 #  PROTECTED BY GROUP 3
023328,000142: 20,2332           00006                           EXTEND                                         #  CLEAR SIVB ISS
023329,000143: 20,2333           03012                           WAND     CHAN12                                
023330,000144: 20,2334           44766                           CS       BIT3                                  #  TURN OFF UPLINK ACTIVITY
023331,000145: 20,2335           00006                           EXTEND                                         
023332,000146: 20,2336           03011                           WAND     DSALMOUT                              
023333,000147: 20,2337           05362                           TC       2PHSCHNG                              
023334,000148: 20,2340           00003                           OCT      00003                                 #  KILL GROUP 3
023335,000149: 20,2341           05014                           OCT      05014                                 
023336,000150: 20,2342           77777                           DEC      -0         B-14                       #  GROUP 4 CONTINUES BELOW
023337,000151: 20,2343           00006        P15INTEG           EXTEND                                         
023338,000152: 20,2344           32354                           DCA      100SEC                                
023339,000153: 20,2345           53460                           DXCH     AVEGDT                                #  START AVERAGEG AT TIG - 100.00
023340,000154: 20,2346           34664                           CAF      PRIO12                                
023341,000155: 20,2347           05135                           TC       FINDVAC                               
023342,000156: 20,2350  E7,1412                                  EBANK=   TIG                                   
023343,000157: 20,2350           02523 50067                     2CADR    P40S/SV                               #  COMMON CODE IN P40
023344,000158: 20,2352           15314                           TCF      TASKOVER                              
023345,000159: 
023346,000160: 20,2353           00000 23420  100SEC             2DEC     10000      B-28                       
023347,000161: 

Page 530

023349,000163: 
023350,000164:                                                                                                  #  SIVB SHUTDOWN COMPUTATIONS
023351,000165: 
023352,000166:                                                                                                  #  CALLED VIA AVEGEXIT EVERY 2 SECS STARTING AT TLITIG - 100
023353,000167:                                                                                                  #           VG AND V (N95) ARE ALWAYS UPDATED
023354,000168:                                                                                                  #           TGO CALCULATONS FOR TLI SHUTDOWN AND TTOGO (N95)
023355,000169:                                                                                                  #           ARE ENABLED (STEERSW = 1) AT TLITIG + 10
023356,000170: 33,2000                                           SETLOC   P15LOC1                               
023357,000171: 33,2000                                           BANK                                           
023358,000172: 33,3540  E7,1412                                  EBANK=   TIG                                   
023359,000173: 33,3540                                           COUNT*   $$/P15                                
023360,000174: 33,3540           06006        SIVBCOMP           TC       INTPRET                               
023361,000175: 33,3541           45345                           DLOAD    DSU                                   
023362,000176: 33,3542           03661                                    TTOGO                                 
023363,000177: 33,3543           27667                                    TENSEC                                #  TFI > +10 ? (TFC CAN NEVER EXCEED +2)
023364,000178: 33,3544           43040                           BMN      SET                                   #  YES, SET STERSW TO ENABLE TGO CALC
023365,000179: 33,3545           67547                                    +2                                    #  NO
023366,000180: 33,3546           01064                                    STEERSW                               
023367,000181: 33,3547           77624                           CALL                                           
023368,000182: 33,3550           70537                                    S11.1                                 #  VMAG, HDOT, AND H FOR N62
023369,000183: 33,3551           44345                           DLOAD    BDSU                                  
023370,000184: 33,3552           03723                                    VNOW                                  #  VMAG      M/CS B+7 FOR N95
023371,000185: 33,3553           02356                                    VC/O                                  #  VMAG(C/O) M/CS B+7
023372,000186: 33,3554           17725                           STODL    VGTLI                                 #  VG = VC/O - VNOW FOR N95
023373,000187: 33,3555           03723                                    VNOW                                  
023374,000188: 33,3556           45214                           BOFF     DSU                                   
023375,000189: 33,3557           01344                                    STEERSW                               
023376,000190: 33,3560           67605                                    SETVPAST                              #  STEERSW = 0, EXIT
023377,000191: 33,3561           03462                                    VPAST                                 #  MPAC = VNOW - VPAST (DV FOR LAST 2 SECS)
023378,000192: 33,3562           41440                           BMN      PUSH                                  #  00D = DV FOR LAST 2 SECS
023379,000193: 33,3563           67605                                    SETVPAST                              #  DV NEGATIVE, EXIT
023380,000194: 33,3564           54345                           DLOAD    SR                                    
023381,000195: 33,3565           03725                                    VGTLI                                 #  B+7
023382,000196: 33,3566           20612                                    09D                                   #  SR9 NOW B+16
023383,000197: 33,3567           77671                           DDV                                            #  B+16 / B+7 NOW B+9
023384,000198: 33,3570           41200                           BOV      DMP                                   
023385,000199: 33,3571           67605                                    SETVPAST                              #  OVERFLOW, EXIT
023386,000200: 33,3572           27671                                    200B+19                               #  B+9 X B+19 NOW B+28
023387,000201: 33,3573           67206                           PUSH     SLOAD                                 #  00D = TGO WITHOUT TAILOFF EFFECTS
023388,000202: 33,3574           02355                                    DTF                                   #  TLI TAILOFF CONSTANT B+14
023389,000203: 33,3575           44261                           SR       BDSU                                  #  COMPENSATE FOR TAILOFF
023390,000204: 33,3576           20617                                    14D                                   #  B+28
023391,000205: 33,3577           43206                           PUSH     DAD                                   #  00D = COMPENSATED TGO
023392,000206: 33,3600           01044                                    PIPTIME                               
023393,000207: 33,3601           17413                           STODL    TIG                                   #  FOR CLOKTASK (N95)
023394,000208: 33,3602           50025                           DSU      BMN                                   #  TGO FROM 00D
023395,000209: 33,3603           27665                                    4SEC                                  #  TGO < 4 SECS ?
023396,000210: 33,3604           67611                                    KILLSIVB                              #  YES : SET UP SIVB SHUTDOWN
023397,000211: 33,3605           77745        SETVPAST           DLOAD                                          
023398,000212: 33,3606           03723                                    VNOW                                  
023399,000213: 33,3607           37462                           STCALL   VPAST                                 #  VPAST = VNOW

Page 531

023401,000215: 33,3610           51603                                    SERVXT1                               #  ** NO RETURN ** SAME AS GOTO SERVXT1
023402,000216: 
023403,000217: 
023404,000218: 33,3611  E7,1412                                  EBANK=   TIG                                   
023405,000219: 33,3611           77776        KILLSIVB           EXIT                                           
023406,000220: 33,3612           00004                           INHINT                                         
023407,000221: 33,3613           00006                           EXTEND                                         
023408,000222: 33,3614           31413                           DCA      TIG                                   
023409,000223: 33,3615           52155                           DXCH     MPAC                                  
023410,000224: 33,3616           00006                           EXTEND                                         
023411,000225: 33,3617           40025                           DCS      TIME2                                 
023412,000226: 33,3620           20155                           DAS      MPAC                                  
023413,000227: 33,3621           07224                           TCR      DPAGREE                               
023414,000228: 33,3622           30155                           CAE      MPAC       +1                         #  DT TO C/O = TIG - TIME2 (< 4 SECS TO GO)
023415,000229:                                                                                                  #              PIPTIME + TGO - TIME2     
023416,000230: 33,3623           00006                           EXTEND                                         #  DT <= 0 ?
023417,000231: 33,3624           63626                           BZMF     +2                                    #  YES
023418,000232: 33,3625           13627                           TCF      +2                                    #  NO
023419,000233: 33,3626           34770                           CAF      ONE                                   
023420,000234: 33,3627           55460                           TS       AVEGDT     +1                         
023421,000235: 33,3630           05223                           TC       TWIDDLE                               
023422,000236: 33,3631           03637                           ADRES    SIVBOFF                               
023423,000237: 33,3632           05362                           TC       2PHSCHNG                              
023424,000238: 33,3633           40614                           OCT      40614                                 #  4.61 SIVBOFF IN (AVEGDT+1) CS
023425,000239: 33,3634           10035                           OCT      10035                                 
023426,000240: 
023427,000241: 33,3635  01,2231               4P61SPT1           =        4.61SPOT                              
023428,000242: 33,3635  01,2250               5P3SPT16           =        5.3SPOT                               
023429,000243: 33,3635           04655                           TC       POSTJUMP                              
023430,000244: 33,3636           51134                           CADR     CLEARSTR                              
023431,000245: 
023432,000246: 33,3637  0003777                                  EBANK=   WHOCARES                              
023433,000247: 33,3637           34753        SIVBOFF            CAF      BIT14                                 
023434,000248: 33,3640           00006                           EXTEND                                         
023435,000249: 33,3641           05012                           WOR      CHAN12                                #  SHUTDOWN THE SIVB
023436,000250: 33,3642           00006                           EXTEND                                         
023437,000251: 33,3643           30025                           DCA      TIME2                                 
023438,000252: 33,3644           53022                           DXCH     TEVENT                                #  SET TEVENT
023439,000253: 33,3645           05255                           TC       FIXDELAY                              
023440,000254: 33,3646           00372                           DEC      250        B-14                       #  DELAY 2.5 SECS
023441,000255: 33,3647           34772                           CAF      ZERO                                  
023442,000256: 33,3650           54777                           TS       NVWORD1                               #  ZERO NVWORD1 IN CASE CLOCKJOB WAITING
023443,000257: 33,3651           44756                           CS       TIMRBIT                               
023444,000258: 33,3652           70103                           MASK     FLAGWRD7                              
023445,000259: 33,3653           54103                           TS       FLAGWRD7                              #  DISABLE CLOKTASK
023446,000260: 33,3654           05402                           TC       PHASCHNG                              
023447,000261: 33,3655           05014                           OCT      05014                                 
023448,000262: 33,3656           77777                           DEC      -0         B-14                       #  START BELOW
023449,000263: 33,3657           34664                           CAF      PRIO12                                
023450,000264: 33,3660           05121                           TC       NOVAC                                 

Page 532

023452,000266: 33,3661  0003777                                  EBANK=   WHOCARES                              
023453,000267: 33,3661           02012 74067                     2CADR    POSTTLI                               
023454,000268: 
023455,000269: 33,3663           05314                           TC       TASKOVER                              
023456,000270: 
023457,000271: 33,3664           00000 00620  4SEC               2DEC     400        B-28                       
023458,000272: 33,3666           00000 01750  TENSEC             2DEC     1000       B-28                       
023459,000273: 33,3670           00006 10000  200B+19            2DEC     200        B-19                       
023460,000274: 
023461,000275: 
023462,000276: 36,2000                                           SETLOC   P15LOC2                               
023463,000277: 36,2000                                           BANK                                           
023464,000278: 36,2012  0003777                                  EBANK=   WHOCARES                              
023465,000279: 
023466,000280: 36,2012                                           COUNT*   $$/P15                                
023467,000281: 36,2012           32015        POSTTLI            CAF      V16N95                                
023468,000282: 36,2013           05535                           TC       VNFLASH                               
023469,000283: 36,2014           14103                           TCF      GOTOPOOH                              
023470,000284: 
023471,000285: 
023472,000286: 36,2015           04137        V16N95             VN       1695                                  
023473,000287: 

Page 533

023475,000289: 

This page empty.

023477,000291: 

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