Source Code
These source-code files are part of a reconstructed copy of Comanche 67, the
Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 12.
They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141. Since only binary dumps (rather than listings) of Comanche 67 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
017368,000002: ## Copyright: Public domain.
017369,000003: ## Filename: KALCMANU_STEERING.agc
017370,000004: ## Purpose: A section of Comanche revision 067.
017371,000005: ## It is part of the reconstructed source code for the flight
017372,000006: ## software for the Command Module's (CM) Apollo Guidance Computer
017373,000007: ## (AGC) for Apollo 12. No original listings of this program are
017374,000008: ## available; instead, this file was created via dissassembly of
017375,000009: ## dumps of Comanche 067 core rope modules and comparison with
017376,000010: ## other AGC programs.
017377,000011: ## Assembler: yaYUL
017378,000012: ## Contact: Ron Burkey <info@sandroid.org>.
017379,000013: ## Website: www.ibiblio.org/apollo/index.html
017380,000014: ## Mod history: 2023-08-16 MAS Created from Comanche 055.
017381,000015:
017382,000016: # GENERATION OF STEERING COMMANDS FOR DIGITAL AUTOPILOT FREE FALL MANEUVERS
017383,000017:
017384,000018: # NEW COMMANDS WILL BE GENERATED EVERY ONE SECOND DURING THE MANEUVER
017385,000019:
017386,000020: 15,2000 BANK 15
017387,000021:
017388,000022: 22,2000 SETLOC KALCMON1
017389,000023: 22,2000 BANK
017390,000024:
017391,000025: 22,3026 E6,1661 EBANK= BCDU
017392,000026:
017393,000027: 22,3026 COUNT 22/KALC
017394,000028:
017395,000029: 22,3026 41332 NEWDELHI CS HOLDFLAG # SEE IF MANEUVER HAS BEEN INTERRUPTED
017396,000030: 22,3027 00006 EXTEND # BY ASTRONAUT
017397,000031: 22,3030 62726 BZMF NOGO -2 # IF SO, TERMINATE KALCMANU
017398,000032: 22,3031 06006 NEWANGL TC INTPRET
017399,000033: 22,3032 75160 AXC,1 AXC,2
017400,000034: 22,3033 03320 MIS # COMPUTE THE NEW MATRIX FROM S/C TO
017401,000035: 22,3034 03425 DEL # STABLE MEMBER AXES
017402,000036: 22,3035 77624 CALL
017403,000037: 22,3036 44304 MXM3
017404,000038: 22,3037 45575 VLOAD STADR
017405,000039: 22,3040 50442 STOVL MIS +12D # CALCULATE NEW DESIRED CDU ANGLES
017406,000040: 22,3041 77626 STADR
017407,000041: 22,3042 50450 STOVL MIS +6D
017408,000042: 22,3043 77626 STADR
017409,000043: 22,3044 74456 STORE MIS
017410,000044: 22,3045 45160 AXC,1 CALL
017411,000045: 22,3046 03320 MIS
017412,000046: 22,3047 44655 DCMTOCDU # PICK UP THE NEW CDU ANGLES FROM MATRIX
017413,000047: 22,3050 77634 RTB
017414,000048: 22,3051 45552 V1STO2S
017415,000049: 22,3052 03267 STORE NCDU # NEW CDU ANGLES
017416,000050: 22,3053 77414 BONCLR EXIT
017417,000051: 22,3054 01215 CALCMAN2
017418,000052: 22,3055 40065 MANUSTAT # TO START MANEUVER
017419,000053: 22,3056 35032 CAF TWO # +0 OTHERWISE
017420,000054: 22,3057 55664 INCRDCDU TS KSPNDX
017421,000055: 22,3060 60000 DOUBLE
017422,000056: 22,3061 55665 TS KDPNDX
017423,000057: 22,3062 51664 INDEX KSPNDX
017424,000058: 22,3063 31666 CA NCDU # NEW DESIRED CDU ANGLES
017425,000059: 22,3064 00006 EXTEND
017426,000060: 22,3065 51664 INDEX KSPNDX
017427,000061: 22,3066 21661 MSU BCDU # INITIAL S/C ANGLE OR PREVIOUS DESIRED
017428,000062: 22,3067 00006 EXTEND # CDU ANGLES
017429,000063: 22,3070 73002 MP QUADROT
017430,000064: 22,3071 51665 INDEX KDPNDX
017431,000065: 22,3072 53576 DXCH DELCDUX # ANGLE INCREMENTS TO BE ADDED TO
017432,000066: 22,3073 51664 INDEX KSPNDX # DCDU EVERY TENTH SEC
017433,000067: 22,3074 31666 CA NCDU # BY LEM DAP
017434,000068: 22,3075 51664 INDEX KSPNDX
017435,000069: 22,3076 57661 XCH BCDU
017436,000070: 22,3077 51665 INDEX KDPNDX
017437,000071: 22,3100 55646 TS CDUXD
017438,000072: 22,3101 11664 CCS KSPNDX
017439,000073: 22,3102 13057 TCF INCRDCDU # LOOP FOR THREE AXES
017440,000074:
017441,000075: 22,3103 00003 RELINT
017442,000076: # COMPARE PRESENT TIME WITH TIME TO TERMINATE MANEUVER
017443,000077:
017444,000078: 22,3104 03115 TMANUCHK TC TIMECHK
017445,000079: 22,3105 04715 TC POSTJUMP
017446,000080: 22,3106 40131 CADR CONTMANU
017447,000081:
017448,000082: 22,3107 35033 CAF ONE
017449,000083: 22,3110 05261 MANUSTAL TC WAITLIST
017450,000084: 22,3111 E6,1661 EBANK= BCDU
017451,000085: 22,3111 02012 42066 2CADR MANUSTOP
017452,000086:
017453,000087: 22,3113 00003 RELINT
017454,000088: 22,3114 15233 TCF ENDOFJOB
017455,000089:
017456,000090:
017457,000091: 22,3115 00006 TIMECHK EXTEND
017458,000092: 22,3116 40025 DCS TIME2
017459,000093: 22,3117 53673 DXCH TTEMP
017460,000094: 22,3120 00006 EXTEND
017461,000095: 22,3121 31717 DCA TM
017462,000096: 22,3122 21673 DAS TTEMP
017463,000097: 22,3123 11672 CCS TTEMP
017464,000098: 22,3124 00002 TC Q
017465,000099: 22,3125 13127 TCF +2
017466,000100: 22,3126 13137 TCF 2NDRETRN
017467,000101: 22,3127 11673 CCS TTEMP +1
017468,000102: 22,3130 00002 TC Q
017469,000103: 22,3131 13133 TCF MANUOFF
017470,000104: 22,3132 40000 COM
017471,000105: 22,3133 65055 MANUOFF AD 1SEC
017472,000106: 22,3134 00006 EXTEND
017473,000107: 22,3135 63137 BZMF 2NDRETRN
017474,000108: 22,3136 24002 INCR Q
017475,000109: 22,3137 24002 2NDRETRN INCR Q
017476,000110: 22,3140 24002 INCR Q
017477,000111: 22,3141 00002 TC Q
017478,000112:
017479,000113: 20,2000 SETLOC MANUSTUF
017480,000114: 20,2000 BANK
017481,000115: 20,2065 77776 MANUSTAT EXIT # INITIALIZATION ROUTINE
017482,000116: 20,2066 00006 EXTEND # FOR AUTOMATIC MANEUVERS
017483,000117: 20,2067 30025 DCA TIME2
017484,000118: 20,2070 21717 DAS TM # TM+T0 MANEUVER COMPLETION TIME
017485,000119: 20,2071 45055 CS 1SEC
017486,000120: 20,2072 54001 TS L
017487,000121: 20,2073 45035 CS ZERO
017488,000122: 20,2074 21717 DAS TM # (TM+T0)-1
017489,000123: 20,2075 00004 INHINT
017490,000124: 20,2076 45033 CS ONE # ENABLE AUTOPILOT TO PERFORM
017491,000125: 20,2077 55332 TS HOLDFLAG # AUTOMATIC MANEUVERS
017492,000126: 20,2100 41130 CS RATEINDX # SEE IF MANEUVERING AT HIGH RATE
017493,000127: 20,2101 66211 AD SIX
017494,000128: 20,2102 00006 EXTEND
017495,000129: 20,2103 62105 BZMF HIGHGAIN
017496,000130: 20,2104 12110 TCF +4
017497,000131: 20,2105 41501 HIGHGAIN CS RCSFLAGS # IF SO, SET HIGH RATE FLAG (BIT 15 OF
017498,000132: 20,2106 75015 MASK BIT15 # RCSFLAGS)
017499,000133: 20,2107 27501 ADS RCSFLAGS
017500,000134: 20,2110 53711 DXCH BRATE # X-AXIS MANEUVER RATE
017501,000135: 20,2111 53526 DXCH WBODY
017502,000136: 20,2112 53713 DXCH BRATE +2 # Y-AXIS MANEUVER RATE
017503,000137: 20,2113 53530 DXCH WBODY1
017504,000138: 20,2114 53715 DXCH BRATE +4 # Z-AXIS MANEUVER RATE
017505,000139: 20,2115 53532 DXCH WBODY2
017506,000140: 20,2116 31675 CA BIASTEMP +1 # INSERT ATTITUDE ERROR BIASES
017507,000141: 20,2117 55564 TS BIAS # INTO AUTOPILOT
017508,000142: 20,2120 31677 CA BIASTEMP +3
017509,000143: 20,2121 55565 TS BIAS1
017510,000144: 20,2122 31701 CA BIASTEMP +5
017511,000145: 20,2123 55566 TS BIAS2
017512,000146: 20,2124 30025 CA TIME1
017513,000147: 20,2125 65055 AD 1SEC
017514,000148: 20,2126 57671 XCH NEXTIME
017515,000149: 20,2127 04715 TC POSTJUMP
017516,000150: 20,2130 45056 CADR INCRDCDU -1
017517,000151:
017518,000152: 20,2131 00004 CONTMANU INHINT # CONTINUE WITH UPDATE PROCESS
017519,000153: 20,2132 40025 CS TIME1
017520,000154: 20,2133 61671 AD NEXTIME
017521,000155: 20,2134 10000 CCS A
017522,000156: 20,2135 65033 AD ONE
017523,000157: 20,2136 12141 TCF MANUCALL
017524,000158: 20,2137 65015 AD NEGMAX
017525,000159: 20,2140 40000 COM
017526,000160: 20,2141 05261 MANUCALL TC WAITLIST
017527,000161: 20,2142 E6,1661 EBANK= BCDU
017528,000162: 20,2142 02150 40066 2CADR UPDTCALL
017529,000163:
017530,000164: 20,2144 00003 RELINT
017531,000165: 20,2145 35055 CAF 1SEC # INCREMENT TIME FOR NEXT UPDATE
017532,000166: 20,2146 27671 ADS NEXTIME
017533,000167: 20,2147 15233 TCF ENDOFJOB
017534,000168:
017535,000169:
017536,000170: 20,2150 37663 UPDTCALL CAF PRIO26 # CALL FOR UPDATE
017537,000171: 20,2151 05163 TC FINDVAC # OF STEERING COMMANDS
017538,000172: 20,2152 E6,1661 EBANK= BCDU
017539,000173: 20,2152 03026 44066 2CADR NEWDELHI
017540,000174:
017541,000175: 20,2154 05340 TC TASKOVER
017542,000176:
017543,000177: # ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
017544,000178:
017545,000179: 21,2000 SETLOC KALCMON3
017546,000180: 21,2000 BANK
017547,000181:
017548,000182: 21,2012 04537 MANUSTOP TC STOPYZ
017549,000183: 21,2013 04754 TC IBNKCALL
017550,000184: 21,2014 45144 CADR LOADYZ
017551,000185:
017552,000186: 21,2015 31155 ENDROLL CA CPHI
017553,000187: 21,2016 55646 TS CDUXD # SET CDUXD TO THE COMMANDED OUTER GIMBAL
017554,000188: 21,2017 04526 TC STOPRATE
017555,000189: 21,2020 31327 ENDMANU CA ATTPRIO # RESTORE USERS PRIORITY
017556,000190: 21,2021 54063 TS NEWPRIO
017557,000191:
017558,000192: 21,2022 35035 CA ZERO # ZERO ATTCADR
017559,000193: 21,2023 53326 DXCH ATTCADR
017560,000194:
017561,000195: 21,2024 05174 TC SPVAC # RETURN TO USER OF GOMANUR
017562,000196:
017563,000197: 21,2025 05340 TC TASKOVER
017564,000198:
017565,000199: 4000 SETLOC STOPRAT
017566,000200: 4000 BANK
017567,000201: 4526 35035 STOPRATE CAF ZERO
017568,000202: 4527 55575 TS DELCDUX
017569,000203: 4530 55576 TS DELCDUX +1 # ZERO ROLL INCREMENTAL ANGLES
017570,000204: 4531 55525 TS WBODY # RATE
017571,000205: 4532 55526 TS WBODY +1
017572,000206: 4533 55564 TS BIAS # BIAS
017573,000207:
017574,000208: 4534 45015 CS BIT15 # MAKE SURE HIGH RATE FLAG (BIT 15 OF
017575,000209: 4535 71501 MASK RCSFLAGS # RCSFLAGS) IS RESET.
017576,000210: 4536 55501 TS RCSFLAGS
017577,000211:
017578,000212: 4537 35035 STOPYZ CAF ZERO
017579,000213: 4540 55577 TS DELCDUY # ZERO PITCH, YAW
017580,000214: 4541 55600 TS DELCDUY +1 # INCREMENTAL ANGLES
017581,000215: 4542 55601 TS DELCDUZ
017582,000216: 4543 55602 TS DELCDUZ +1
017583,000217: 4544 55527 TS WBODY1 # RATES
017584,000218: 4545 55530 TS WBODY1 +1
017585,000219: 4546 55531 TS WBODY2
017586,000220: 4547 55532 TS WBODY2 +1
017587,000221: 4550 55565 TS BIAS1 # BIASES
017588,000222: 4551 55566 TS BIAS2
017589,000223: 4552 00002 TC Q
017590,000224:
017591,000225: 20,2000 SETLOC MANUSTUF
017592,000226: 20,2000 BANK
017593,000227:
017594,000228: 20,2155 30032 ZEROEROR CA CDUX # PICK UP CDU ANGLES AND STORE IN
017595,000229: 20,2156 55646 TS CDUXD # CDU DESIRED
017596,000230: 20,2157 30033 CA CDUY
017597,000231: 20,2160 55650 TS CDUYD
017598,000232: 20,2161 30034 CA CDUZ
017599,000233: 20,2162 55652 TS CDUZD
017600,000234: 20,2163 00002 TC Q
017601,000235:
017602,000236: 22,2000 SETLOC KALCMON1
017603,000237: 22,2000 BANK
017604,000238:
017605,000239: 22,3142 31155 LOADCDUD CA CPHI # STORE TERMINAL ANGLES INTO
017606,000240: 22,3143 55646 TS CDUXD # COMMAND ANGLES
017607,000241: 22,3144 31156 LOADYZ CA CTHETA
017608,000242: 22,3145 55650 TS CDUYD
017609,000243: 22,3146 31157 CA CPSI
017610,000244: 22,3147 55652 TS CDUZD
017611,000245: 22,3150 00002 TC Q
End of include-file KALCMANU_STEERING.agc. Parent file is MAIN.agc