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.

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

Page 527

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

Page 528

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

Page 529

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

Page 530

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

Page 531

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

Page 532

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

Page 533

023469,000289: 

This page empty.

023471,000291: 

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