Source Code

These source-code files are part of a reconstructed copy of Comanche 44, the initial release (though not the final mission release) of the Apollo 10 Command Module (CM) Apollo Guidance Computer (AGC) software. Subsequent releases were Comanche 45 and Comanche 45/2 (the flown release on Apollo 10). The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 44, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 51 (separately previously reconstructed from an Apollo-era listing of Comanche 55, flown on Apollo 11). Comanche 51 source code was then modified by undoing changes known to have been made between revisions 44 and 51. The now-reconstructed Comanche 44 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 printout, although the source code would likely have different page numbers in a contemporary Comanche 44 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 51. Here's a guide to the Apollo documentation referenced in those annotations:
In most cases, only the titles (rather than the full texts) of PCRs are known. In addition to the explanatory annotations, there is also a step-by-step commentary about the reconstruction process.

Comments expected to have been present in the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC Project's GitHub repository.

021999,000002:                                                                                                  ## Copyright:   Public domain.
022000,000003:                                                                                                  ## Filename:    P76.agc
022001,000004:                                                                                                  ## Purpose:     A section of Comanche revision 044.
022002,000005:                                                                                                  ##              It is part of the reconstructed source code for the
022003,000006:                                                                                                  ##              original release of the flight software for the Command
022004,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 10.
022005,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
022006,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
022007,000010:                                                                                                  ##              exactly match those specified for Comanche 44 in NASA drawing
022008,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
022009,000012:                                                                                                  ##              reconstruction is correct.
022010,000013:                                                                                                  ## Assembler:   yaYUL
022011,000014:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
022012,000015:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
022013,000016:                                                                                                  ## Mod history: 2020-12-03 MAS  Created from Comanche 51.
022014,000017: 

Page 511

022016,000019:                                                                                                  #  1)    PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
022017,000020:                                                                                                  #  2)    FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
022018,000021:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
022019,000022:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
022020,000023:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
022021,000024:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS).  USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
022022,000025:                                                                                                  #        VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
022023,000026:                                                                                                  #        STATES CORRESPOND TO THE SAME TIME.
022024,000027:                                                                                                  #  3)    ERASABLE INITIALIZATION REQUIRED - NONE.
022025,000028:                                                                                                  #  4)    CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
022026,000029:                                                                                                  #        EXITS BY TCF ENDOFJOB.
022027,000030:                                                                                                  #  5)    OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
022028,000031:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
022029,000032:                                                                                                  #        TO REF COSYS.
022030,000033:                                                                                                  #  6)    DEBRIS - OTHER VEHICLE STATE VECTOR.
022031,000034:                                                                                                  #  7)    SUBROUTINES CALLED - BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
022032,000035:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
022033,000036:                                                                                                  #  8)    FLAG USE - MOONFLAG, CMOONFLAG, INTYPFLG, RASFLAG, AND MARKCTR.
022034,000037: 
022035,000038: 30,2000                                           BANK     30                                    
022036,000039: 13,2000                                           SETLOC   P76LOC                                
022037,000040: 13,2000                                           BANK                                           
022038,000041: 
022039,000042: 13,2071                                           COUNT*   $$/P76                                
022040,000043: 
022041,000044: 13,2071  E7,1412                                  EBANK=   TIG                                   
022042,000045: 
022043,000046: 13,2071           05546        P76                TC       UPFLAG                                
022044,000047: 13,2072           00031                           ADRES    TRACKFLG                              
022045,000048: 
022046,000049: 13,2073           32220                           CAF      V06N84                                #  FLASH LAST DELTA V,
022047,000050: 13,2074           04662                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
022048,000051: 13,2075           20720                           CADR     GOFLASH                               
022049,000052: 13,2076           12212                           TCF      ENDP76                                
022050,000053: 13,2077           02101                           TC       +2                                    #  PROCEED
022051,000054: 13,2100           02073                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
022052,000055: 13,2101           32221                           CAF      V06N84     +1                         #  FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
022053,000056: 13,2102           04662                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
022054,000057: 13,2103           20720                           CADR     GOFLASH                               
022055,000058: 13,2104           12212                           TCF      ENDP76                                
022056,000059: 13,2105           02107                           TC       +2                                    
022057,000060: 13,2106           02101                           TC       -5                                    
022058,000061: 13,2107           06006                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE
022059,000062: 13,2110           77745                           DLOAD                                          #  SET D(MPAC)=TIG IN CSEC B28
022060,000063: 13,2111           03413                                    TIG                                   
022061,000064: 13,2112           34041                           STCALL   TDEC1                                 #  SET TDEC1=TIG FOR ORBITAL INTEGRATION
022062,000065: 13,2113           27105                                    OTHPREC                               
022063,000066: 13,2114           53575        COMPMAT            VLOAD    UNIT                                  
022064,000067: 13,2115           00001                                    RATT                                  

Page 512

022066,000069: 13,2116           77676                           VCOMP                                          #  U(-R)
022067,000070: 13,2117           00031                           STORE    24D                                   #  U(-R) TO 24D
022068,000071: 13,2120           53435                           VXV      UNIT                                  #  U(-R) X V = U(V X R)
022069,000072: 13,2121           00007                                    VATT                                  
022070,000073: 13,2122           00023                           STORE    18D                                   
022071,000074: 13,2123           53435                           VXV      UNIT                                  #  U(V X R) X U(-R) = U((R X V) X R)
022072,000075: 13,2124           00031                                    24D                                   
022073,000076: 13,2125           24015                           STOVL    12D                                   
022074,000077: 13,2126           03540                                    DELVOV                                
022075,000078: 13,2127           76505                           VXM      VSL1                                  #  V(MPAC)=DELTA V IN REFCOSYS
022076,000079: 13,2130           00015                                    12D                                   
022077,000080: 13,2131           77655                           VAD                                            
022078,000081: 13,2132           00007                                    VATT                                  
022079,000082: 13,2133           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
022080,000083: 13,2134           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
022081,000084: 13,2135           27442                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
022082,000085: 13,2136           77624                           CALL                                           
022083,000086: 13,2137           26222                                    P76SUB1                               
022084,000087: 13,2140           53775                           VLOAD    VSR*                                  
022085,000088: 13,2141           00007                                    6                                     
022086,000089: 13,2142           57176                                    0,2                                   
022087,000090: 13,2143           25543                           STOVL    VCV                                   
022088,000091: 13,2144           00001                                    RATT                                  
022089,000092: 13,2145           77657                           VSR*                                           
022090,000093: 13,2146           57176                                    0,2                                   
022091,000094: 13,2147           15535                           STODL    RCV                                   
022092,000095: 13,2150           03413                                    TIG                                   
022093,000096: 13,2151           01517                           STORE    TET                                   
022094,000097: 13,2152           71214                           CLEAR    DLOAD                                 
022095,000098: 13,2153           01673                                    INTYPFLG                              
022096,000099: 13,2154           01571                                    TETTHIS                               
022097,000100: 13,2155           34041        INTOTHIS           STCALL   TDEC1                                 
022098,000101: 13,2156           27135                                    INTEGRVS                              
022099,000102: 13,2157           77624                           CALL                                           
022100,000103: 13,2160           27442                                    INTSTALL                              
022101,000104: 13,2161           77624                           CALL                                           
022102,000105: 13,2162           26222                                    P76SUB1                               #  SET/CLEAR MOONFLAG
022103,000106: 13,2163           77775                           VLOAD                                          
022104,000107: 13,2164           00017                                    RATT1                                 
022105,000108: 13,2165           01503                           STORE    RRECT                                 
022106,000109: 13,2166           15535                           STODL    RCV                                   
022107,000110: 13,2167           00015                                    TAT                                   
022108,000111: 13,2170           25517                           STOVL    TET                                   
022109,000112: 13,2171           00025                                    VATT1                                 
022110,000113: 13,2172           77624                           CALL                                           
022111,000114: 13,2173           23435                                    MINIRECT                              
022112,000115: 13,2174           77776                           EXIT                                           
022113,000116: 13,2175           05412                           TC       PHASCHNG                              
022114,000117: 13,2176           04024                           OCT      04024                                 

Page 513

022116,000119: 13,2177           05546                           TC       UPFLAG                                
022117,000120: 13,2200           00236                           ADRES    REINTFLG                              
022118,000121: 
022119,000122: 13,2201           06006                           TC       INTPRET                               
022120,000123: 13,2202           77624                           CALL                                           
022121,000124: 13,2203           26760                                    ATOPOTH                               
022122,000125: 13,2204           77531                           SSP      EXIT                                  
022123,000126: 13,2205           00053                                    QPRET                                 
022124,000127: 13,2206           26211                                    OUT                                   
022125,000128: 13,2207           04662                           TC       BANKCALL                              #  PERMIT USE OF ORBITAL INTEGRATION
022126,000129: 13,2210           27477                           CADR     INTWAKE1                              
022127,000130: 13,2211           77776        OUT                EXIT                                           
022128,000131: 13,2212           35021        ENDP76             CAF      ZERO                                  
022129,000132: 13,2213           55126                           TS       MARKCTR                               #  CLEAR RR TRACKING MARK COUNTER
022130,000133: 13,2214           55125                           TS       VHFCNT                                
022131,000134: 
022132,000135: 13,2215           37716                           CAF      NEGONE                                
022133,000136: 13,2216           55734                           TS       MRKBUF2                               #  INVALIDATE MARK BUFFER
022134,000137: 
022135,000138: 13,2217           14106                           TCF      GOTOPOOH                              
022136,000139: 
022137,000140: 13,2220           01524        V06N84             NV       0684                                  
022138,000141: 13,2221           01441                           NV       0633                                  
022139,000142: 13,2222           67214        P76SUB1            CLEAR    SLOAD                                 
022140,000143: 13,2223           00263                                    MOONFLAG                              
022141,000144: 13,2224           00050                                    X2                                    
022142,000145: 13,2225           43030                           BHIZ     SET                                   #  X2=0...CLEAR MOONFLAG
022143,000146: 13,2226           26230                                    +2                                    #    =2.....SET MOONFLAG
022144,000147: 13,2227           00063                                    MOONFLAG                              
022145,000148: 13,2230           77616                           RVQ                                            
022146,000149: 

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