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.

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

Page 511

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

Page 512

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

Page 513

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

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