Source Code

These source-code files were from the printout at the MIT Museum, with many thanks to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing it to us. The printout was digitally photographed by Paul Fjeld. A team of volunteers transcribed the source code manually from these images or, where appropriate, modified already-transcribed but similar source Colossus 249 (Apollo 9) source code to agree with the images from the printout. Note that the page images presented online are of reduced quality, and that higher-quality images are 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 055 OF AGC PROGRAM COMANCHE BY NASA 2021113-051
	10:28 APR.  1,1969
Note that the date is the date of the printout, not the date of the program revision.

022272,000002:                                                                                                  ## Copyright:   Public domain.
022273,000003:                                                                                                  ## Filename:    P76.agc
022274,000004:                                                                                                  ## Purpose:     Part of the source code for Colossus 2A, AKA Comanche 055.
022275,000005:                                                                                                  ##              It is part of the source code for the Command Module's (CM)
022276,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
022277,000007:                                                                                                  ## Assembler:   yaYUL
022278,000008:                                                                                                  ## Contact:     Hartmuth Gutsche <hgutsche@xplornet.com>.
022279,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
022280,000010:                                                                                                  ## Pages:       pp  511-513
022281,000011:                                                                                                  ## Mod history: 2009-05-08 HG   Adapting from the Luminary131/ file 
022282,000012:                                                                                                  ##                              of the same name, using Comanche055 page 
022283,000013:                                                                                                  ##                              images 0511.jpg - 0513.jpg. 
022284,000014:                                                                                                  ##              2016-12-10 RSB  Proofed comments with octopus/ProoferComments
022285,000015:                                                                                                  ##                              and fixed the errors found.
022286,000016:                                                                                                  ##              2016-12-10 RSB  All of the GOTOPOOH's should have been
022287,000017:                                                                                                  ##                              GOTOPOOH, and I've changed them back.
022288,000018:                                                                                                  ##              2017-01-18 RSB  Fixed comment-text errors noted while diff'ing
022289,000019:                                                                                                  ##                              vs Colossus 249.
022290,000020:                                                                                                  ##
022291,000021:                                                                                                  ## This source code has been transcribed or otherwise adapted from digitized
022292,000022:                                                                                                  ## images of a hardcopy from the MIT Museum.  The digitization was performed
022293,000023:                                                                                                  ## by Paul Fjeld, and arranged for by Deborah Douglas of the Museum.  Many
022294,000024:                                                                                                  ## thanks to both.  The images (with suitable reduction in storage size and
022295,000025:                                                                                                  ## consequent reduction in image quality as well) are available online at
022296,000026:                                                                                                  ## www.ibiblio.org/apollo.  If for some reason you find that the images are
022297,000027:                                                                                                  ## illegible, contact me at info@sandroid.org about getting access to the 
022298,000028:                                                                                                  ## (much) higher-quality images which Paul actually created.
022299,000029:                                                                                                  ##
022300,000030:                                                                                                  ## Notations on the hardcopy document read, in part:
022301,000031:                                                                                                  ##
022302,000032:                                                                                                  ##    Assemble revision 055 of AGC program Comanche by NASA
022303,000033:                                                                                                  ##    2021113-051.  10:28 APR. 1, 1969  
022304,000034:                                                                                                  ##
022305,000035:                                                                                                  ##    This AGC program shall also be referred to as
022306,000036:                                                                                                  ##            Colossus 2A
022307,000037: 

Page 511

022309,000039:                                                                                                  #  1)    PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
022310,000040:                                                                                                  #  2)    FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
022311,000041:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
022312,000042:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
022313,000043:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
022314,000044:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
022315,000045:                                                                                                  #        VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
022316,000046:                                                                                                  #        STATES CORRESPOND TO THE SAME TIME.
022317,000047:                                                                                                  #  3)    ERASABLE INITIALIZATION REQUIRED - NONE.
022318,000048:                                                                                                  #  4)    CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
022319,000049:                                                                                                  #        EXITS BY TCF ENDOFJOB.
022320,000050:                                                                                                  #  5)    OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
022321,000051:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
022322,000052:                                                                                                  #        TO REF COSYS.
022323,000053:                                                                                                  #  6)    DEBRIS - OTHER VEHICLE STATE VECTOR.
022324,000054:                                                                                                  #  7)    SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
022325,000055:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
022326,000056:                                                                                                  #  8)    FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
022327,000057: 
022328,000058: 30,2000                                           BANK     30                                    
022329,000059: 13,2000                                           SETLOC   P76LOC                                
022330,000060: 13,2000                                           BANK                                           
022331,000061: 
022332,000062: 13,2071                                           COUNT*   $$/P76                                
022333,000063: 
022334,000064: 13,2071  E7,1412                                  EBANK=   TIG                                   
022335,000065: 
022336,000066: 13,2071           05546        P76                TC       UPFLAG                                
022337,000067: 13,2072           00031                           ADRES    TRACKFLG                              
022338,000068: 
022339,000069: 13,2073           32220                           CAF      V06N84                                #  FLASH LAST DELTA V,
022340,000070: 13,2074           04662                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
022341,000071: 13,2075           20720                           CADR     GOFLASH                               
022342,000072: 13,2076           12212                           TCF      ENDP76                                
022343,000073: 13,2077           02101                           TC       +2                                    #  PROCEED
022344,000074: 13,2100           02073                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
022345,000075: 13,2101           32221                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
022346,000076: 13,2102           04662                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
022347,000077: 13,2103           20720                           CADR     GOFLASH                               
022348,000078: 13,2104           12212                           TCF      ENDP76                                
022349,000079: 13,2105           02107                           TC       +2                                    
022350,000080: 13,2106           02101                           TC       -5                                    
022351,000081: 13,2107           06006                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE
022352,000082: 13,2110           77745                           DLOAD                                          #  SET D(MPAC)=TIG IN CSEC B28
022353,000083: 13,2111           03413                                    TIG                                   
022354,000084: 13,2112           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
022355,000085: 13,2113           27105                                    OTHPREC                               
022356,000086: 13,2114           53575        COMPMAT            VLOAD    UNIT                                  
022357,000087: 13,2115           00001                                    RATT                                  

Page 512

022359,000089: 13,2116           77676                           VCOMP                                          #  U(-R)
022360,000090: 13,2117           00031                           STORE    24D                                   #  U(-R) TO 24D
022361,000091: 13,2120           53435                           VXV      UNIT                                  #  U(-R) X V = U(V X R)
022362,000092: 13,2121           00007                                    VATT                                  
022363,000093: 13,2122           00023                           STORE    18D                                   
022364,000094: 13,2123           53435                           VXV      UNIT                                  #  U(V X R) X U(-R) = U((R X V) X R)
022365,000095: 13,2124           00031                                    24D                                   
022366,000096: 13,2125           24015                           STOVL    12D                                   
022367,000097: 13,2126           03540                                    DELVOV                                
022368,000098: 13,2127           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
022369,000099: 13,2130           00015                                    12D                                   
022370,000100: 13,2131           77655                           VAD                                            
022371,000101: 13,2132           00007                                    VATT                                  
022372,000102: 13,2133           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
022373,000103: 13,2134           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
022374,000104: 13,2135           27442                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
022375,000105: 13,2136           77624                           CALL                                           
022376,000106: 13,2137           26222                                    P76SUB1                               
022377,000107: 13,2140           53775                           VLOAD    VSR*                                  
022378,000108: 13,2141           00007                                    6                                     
022379,000109: 13,2142           57176                                    0,2                                   
022380,000110: 13,2143           25543                           STOVL    VCV                                   
022381,000111: 13,2144           00001                                    RATT                                  
022382,000112: 13,2145           77657                           VSR*                                           
022383,000113: 13,2146           57176                                    0,2                                   
022384,000114: 13,2147           15535                           STODL    RCV                                   
022385,000115: 13,2150           03413                                    TIG                                   
022386,000116: 13,2151           01517                           STORE    TET                                   
022387,000117: 13,2152           71214                           CLEAR    DLOAD                                 
022388,000118: 13,2153           01673                                    INTYPFLG                              
022389,000119: 13,2154           01571                                    TETTHIS                               
022390,000120: 13,2155           34041        INTOTHIS           STCALL   TDEC1                                 
022391,000121: 13,2156           27135                                    INTEGRVS                              
022392,000122: 13,2157           77624                           CALL                                           
022393,000123: 13,2160           27442                                    INTSTALL                              
022394,000124: 13,2161           77624                           CALL                                           
022395,000125: 13,2162           26222                                    P76SUB1                               #  SET/CLEAR MOONFLAG
022396,000126: 13,2163           77775                           VLOAD                                          
022397,000127: 13,2164           00017                                    RATT1                                 
022398,000128: 13,2165           01503                           STORE    RRECT                                 
022399,000129: 13,2166           15535                           STODL    RCV                                   
022400,000130: 13,2167           00015                                    TAT                                   
022401,000131: 13,2170           25517                           STOVL    TET                                   
022402,000132: 13,2171           00025                                    VATT1                                 
022403,000133: 13,2172           77624                           CALL                                           
022404,000134: 13,2173           23435                                    MINIRECT                              
022405,000135: 13,2174           77776                           EXIT                                           
022406,000136: 13,2175           05412                           TC       PHASCHNG                              
022407,000137: 13,2176           04024                           OCT      04024                                 

Page 513

022409,000139: 13,2177           05546                           TC       UPFLAG                                
022410,000140: 13,2200           00236                           ADRES    REINTFLG                              
022411,000141: 
022412,000142: 13,2201           06006                           TC       INTPRET                               
022413,000143: 13,2202           77624                           CALL                                           
022414,000144: 13,2203           26760                                    ATOPOTH                               
022415,000145: 13,2204           77531                           SSP      EXIT                                  
022416,000146: 13,2205           00053                                    QPRET                                 
022417,000147: 13,2206           26211                                    OUT                                   
022418,000148: 13,2207           04662                           TC       BANKCALL                              #  PERMIT USE OF ORBITAL INTEGRATION
022419,000149: 13,2210           27477                           CADR     INTWAKE1                              
022420,000150: 13,2211           77776        OUT                EXIT                                           
022421,000151: 13,2212           35021        ENDP76             CAF      ZERO                                  
022422,000152: 13,2213           55126                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
022423,000153: 13,2214           55125                           TS       VHFCNT                                
022424,000154: 
022425,000155: 13,2215           37716                           CAF      NEGONE                                
022426,000156: 13,2216           55734                           TS       MRKBUF2                               #  INVALIDATE MARK BUFFER
022427,000157: 
022428,000158: 13,2217           14106                           TCF      GOTOPOOH                              
022429,000159: 
022430,000160: 13,2220           01524        V06N84             NV       0684                                  
022431,000161: 13,2221           01441                           NV       0633                                  
022432,000162: 13,2222           67214        P76SUB1            CLEAR    SLOAD                                 
022433,000163: 13,2223           00263                                    MOONFLAG                              
022434,000164: 13,2224           00050                                    X2                                    
022435,000165: 13,2225           43030                           BHIZ     SET                                   #  X2=0...CLEAR MOONFLAG
022436,000166: 13,2226           26230                                    +2                                    #    =2.....SET MOONFLAG
022437,000167: 13,2227           00063                                    MOONFLAG                              
022438,000168: 13,2230           77616                           RVQ                                            
022439,000169: 

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