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. |
021876,000002: ## Copyright: Public domain.
021877,000003: ## Filename: STABLE_ORBIT_-_P38-P39.agc
021878,000004: ## Purpose: A section of Comanche revision 067.
021879,000005: ## It is part of the reconstructed source code for the flight
021880,000006: ## software for the Command Module's (CM) Apollo Guidance Computer
021881,000007: ## (AGC) for Apollo 12. No original listings of this program are
021882,000008: ## available; instead, this file was created via dissassembly of
021883,000009: ## dumps of Comanche 067 core rope modules and comparison with
021884,000010: ## other AGC programs.
021885,000011: ## Assembler: yaYUL
021886,000012: ## Contact: Ron Burkey <info@sandroid.org>.
021887,000013: ## Website: www.ibiblio.org/apollo/index.html
021888,000014: ## Mod history: 2023-08-16 MAS Created from Comanche 055.
021889,000015:
021890,000016: # STABLE ORBIT RENDEZVOUS PROGRAMS (P38 AND P78)
021891,000017:
021892,000018: # MOD NO -1 LOG SECTION - STABLE ORBIT - P38-P39
021893,000019: # MOD BY RUDNICKI.S DATE 25JAN68
021894,000020:
021895,000021: # FUNCTIONAL DESCRIPTION
021896,000022:
021897,000023: # P38 AND P78 CALCULATE THE REQUIRED DELTA V AND OTHER INITIAL
021898,000024: # CONDITIONS REQUIRED BY THE AGC TO (1) PUT THE ACTIVE VEHICLE
021899,000025: # ON A TRANSFER TRAJECTORY THAT INTERCEPTS THE PASSIVE VEHICLE
021900,000026: # ORBIT A GIVEN DISTANCE, DELTA R, EITHER AHEAD OF OR BEHIND THE
021901,000027: # PASSIVE VEHICLE AND (2) ACTUALLY PLACE THE ACTIVE VEHICLE IN THE
021902,000028: # PASSIVE VEHICLE ORBIT WITH A DELTA R SEPARATION BETWEEN THE TWO
021903,000029: # VEHICLES
021904,000030:
021905,000031: # CALLING SEQUENCE
021906,000032:
021907,000033: # ASTRONAUT REQUEST THRU DSKY
021908,000034:
021909,000035: # V37E38E IF THIS VEHICLE IS ACTIVE VEHICLE
021910,000036: # V37E78E IF OTHER VEHICLE IS ACTIVE VEHICLE
021911,000037:
021912,000038: # INPUT
021913,000039:
021914,000040: # (1) SOI MANEUVER
021915,000041:
021916,000042: # (A) TIG TIME OF SOI MANEUVER
021917,000043: # (B) CENTANG ORBITAL CENTRAL ANGLE OF THE PASSIVE VEHICLE
021918,000044: # DURING TRANSFER FROM TIG TO TIME OF INTERCEPT
021919,000045: # (C) DELTAR THE DESIRED SEPARATION OF THE TWO VEHICLES
021920,000046: # SPECIFIED AS A DISTANCE ALONG THE PASSIVE VEHICLE
021921,000047: # ORBIT
021922,000048: # (D) OPTION EQUALS 1 FOR SOI
021923,000049:
021924,000050: # (2) SOR MANEUVER
021925,000051:
021926,000052: # (A) TIG TIME OF SOR MANEUVER
021927,000053: # (B) CENTANG AN OPTIONAL RESPECIFICATION OF 1 (B) ABOVE
021928,000054: # (C) OPTION EQUALS 2 FOR SOR
021929,000055: # (D) DELTTIME THE TIME REQUIRED TO TRAVERSE DELTA R WHEN
021930,000056: # TRAVELING AT A VELOCITY EQUAL TO THE HORIZONTAL
021931,000057: # VELOCITY OF THE PASSIVE VEHICLE - SAVED FROM
021932,000058: # SOI PHASE
021933,000059: # (E) TINT TIME OF INTERCEPT (SOI) - SAVED FROM SOI PHASE
021934,000060:
021935,000061: # OUTPUT
021936,000062:
021937,000063: # (1) TRKMKCNT NUMBER OF MARKS
021938,000064: # (2) TTOGO TIME TO GO
021939,000065: # (3) +MGA MIDDLE GIMBAL ANGLE
021940,000066: # (4) DSPTEM1 TIME OF INTERCEPT OF PASSIVE VEHICLE ORBIT
021941,000067: # (FOR SOI ONLY)
021942,000068: # (5) POSTTPI PERIGEE ALTITUDE OF ACTIVE VEHICLE ORBIT AFTER
021943,000069: # THE SOI (SOR) MANEUVER
021944,000070: # (6) DELVTPI MAGNITUDE OF DELTA V AT SOI (SOR) TIME
021945,000071: # (7) DELVTPF MAGNITUDE OF DELTA V AT INTERCEPT TIME
021946,000072: # (8) DELVLVC DELTA VELOCITY AT SOI (AND SOR) - LOCAL VERTICAL
021947,000073: # COORDINATES
021948,000074:
021949,000075: # SUBROUTINES USED
021950,000076:
021951,000077: # AVFLAGA
021952,000078: # AVFLAGP
021953,000079: # VNDSPLY
021954,000080: # BANKCALL
021955,000081: # GOFLASHR
021956,000082: # GOTOPOOH
021957,000083: # BLANKET
021958,000084: # ENDOFJOB
021959,000085: # PREC/TT
021960,000086: # SELECTMU
021961,000087: # INTRPVP
021962,000088: # MAINRTNE
021963,000089:
021964,000090: 04,2742 BANK 04
021965,000091: 04,2000 SETLOC STBLEORB
021966,000092: 04,2000 BANK
021967,000093:
021968,000094: 04,2742 E4,1770 EBANK= SUBEXIT
021969,000095: 04,2742 COUNT* $$/P3879
021970,000096:
021971,000097: 04,2742 04627 P38 TC AVFLAGA # THIS VEHICLE ACTIVE
021972,000098: 04,2743 02745 TC +2
021973,000099: 04,2744 04642 P78 TC AVFLAGP # OTHER VEHICLE ACTIVE
021974,000100: 04,2745 04647 TC P20FLGON # SET UPDATFLG, TRACKFLG
021975,000101: 04,2746 33274 CAF V06N33SR # DISPLAY TIG
021976,000102: 04,2747 03263 TC VNDSPLY
021977,000103: 04,2750 33275 CAF V06N55SR # DISPLAY CENTANG
021978,000104: 04,2751 04676 TCR BANKCALL
021979,000105: 04,2752 21057 CADR GOFLASHR
021980,000106: 04,2753 14106 TCF GOTOPOOH # TERMINATE
021981,000107: 04,2754 12761 TCF +5 # PROCEED
021982,000108: 04,2755 12750 TCF -5 # RECYCLE
021983,000109: 04,2756 36214 CAF THREE # IMMEDIATE RETURN - BLANK R1, R2
021984,000110: 04,2757 05542 TCR BLANKET
021985,000111: 04,2760 15233 TCF ENDOFJOB
021986,000112: 04,2761 35036 CAF FIVE
021987,000113: 04,2762 55131 TS OPTION1
021988,000114: 04,2763 35033 CAF ONE
021989,000115: 04,2764 55132 TS OPTION2 # OPTION CODE IS SET TO 1
021990,000116: 04,2765 33276 CAF V04N06SR # DISPLAY OPTION CODE -1 = SOI, 2 = SOR
021991,000117: 04,2766 04676 TCR BANKCALL
021992,000118: 04,2767 21057 CADR GOFLASHR
021993,000119: 04,2770 14106 TCF GOTOPOOH # TERMINATE
021994,000120: 04,2771 12776 TCF +5 # PROCEED
021995,000121: 04,2772 12765 TCF -5 # RECYCLE
021996,000122: 04,2773 35031 CAF BIT3 # IMMEDIATE RETURN - BLANK R3
021997,000123: 04,2774 05542 TCR BLANKET
021998,000124: 04,2775 15233 TCF ENDOFJOB
021999,000125: 04,2776 06006 TC INTPRET
022000,000126: 04,2777 77731 SSP
022001,000127: 04,3000 03766 NN
022002,000128: 04,3001 00002 2
022003,000129: 04,3002 70535 SLOAD SR1
022004,000130: 04,3003 01133 OPTION2
022005,000131: 04,3004 71230 BHIZ DLOAD
022006,000132: 04,3005 11013 OPTN1
022007,000133: 04,3006 03656 TINT
022008,000134: 04,3007 02611 STORE TINTSOI # STORE FOR SOR PHASE
022009,000135: 04,3010 77614 CLRGO
022010,000136: 04,3011 01230 OPTNSW # OPTNSW; ON = SOI, OFF = SOR
022011,000137: 04,3012 11042 JUNCTN1
022012,000138: 04,3013 43014 OPTN1 SET CLEAR # SOI
022013,000139: 04,3014 01070 OPTNSW
022014,000140: 04,3015 00670 UPDATFLG
022015,000141: 04,3016 77624 CALL
022016,000142: 04,3017 11216 PREC/TT
022017,000143: 04,3020 43214 SET DAD
022018,000144: 04,3021 00470 UPDATFLG
022019,000145: 04,3022 03413 TIG
022020,000146: 04,3023 03656 STORE TINT # TI = TIG + TF
022021,000147: 04,3024 01046 STORE DSPTEM1 # FOR DISPLAY
022022,000148: 04,3025 77776 EXIT
022023,000149: 04,3026 33277 CAF V06N57SR # DISPLAY DELTA R
022024,000150: 04,3027 04676 TCR BANKCALL
022025,000151: 04,3030 21057 CADR GOFLASHR
022026,000152: 04,3031 14106 TCF GOTOPOOH # TERMINATE
022027,000153: 04,3032 13037 TCF +5 # PROCEED
022028,000154: 04,3033 13026 TCF -5 # RECYCLE
022029,000155: 04,3034 36211 CAF SIX # IMMEDIATE RETURN - BLANK R2, R3
022030,000156: 04,3035 05542 TCR BLANKET
022031,000157: 04,3036 15233 TCF ENDOFJOB
022032,000158: 04,3037 33300 CAF V06N34SR # DISPLAY TIME OF INTERCEPT
022033,000159: 04,3040 03263 TC VNDSPLY
022034,000160: 04,3041 06006 TC INTPRET
022035,000161: 04,3042 45014 JUNCTN1 CLEAR CALL
022036,000162: 04,3043 04266 P39/79SW
022037,000163: 04,3044 10712 SELECTMU # SELECT MU, CLEAR FINALFLG, GO TO VN1645
022038,000164: 04,3045 77624 RECYCLE CALL
022039,000165: 04,3046 11216 PREC/TT
022040,000166: 04,3047 71214 BOFF DLOAD
022041,000167: 04,3050 01350 OPTNSW
022042,000168: 04,3051 11071 OPTN2
022043,000169: 04,3052 03656 TINT
022044,000170: 04,3053 34041 STCALL TDEC1 # PRECISION UPDATE PASSIVE VEHICLE TO
022045,000171: 04,3054 11247 INTRPVP # INTERCEPT TIME
022046,000172: 04,3055 53575 VLOAD UNIT
022047,000173: 04,3056 00001 RATT # RP/(RP)
022048,000174: 04,3057 47315 PDVL VXV
022049,000175: 04,3060 00007 VATT
022050,000176: 04,3061 60246 ABVAL NORM # (VP X RP/(RP))
022051,000177: 04,3062 00047 X1
022052,000178: 04,3063 56325 PDDL DDV
022053,000179: 04,3064 02611 DELTAR
022054,000180: 04,3065 77657 SL* # DELTA R / (VP X RP/RP)
022055,000181: 04,3066 20172 0 -7,1
022056,000182: 04,3067 36613 STCALL DELTTIME # DELTA T = (RP) DELTA R / (VP X RP)
022057,000183: 04,3070 11075 JUNCTN2
022058,000184: 04,3071 43345 OPTN2 DLOAD DAD
022059,000185: 04,3072 02611 TINTSOI
022060,000186: 04,3073 00037 T
022061,000187: 04,3074 03656 STORE TINT # TI = TI + TF
022062,000188: 04,3075 45345 JUNCTN2 DLOAD DSU
022063,000189: 04,3076 03656 TINT
022064,000190: 04,3077 02613 DELTTIME
022065,000191: 04,3100 02615 STORE TARGTIME # TT = TI - DELTA T
022066,000192:
022067,000193: # .... MAINRTNE ....
022068,000194:
022069,000195: # SUBROUTINES USED
022070,000196:
022071,000197: # S3435.25
022072,000198: # PERIAPO1
022073,000199: # SHIFTR1
022074,000200: # VNDSPLY
022075,000201: # BANKCALL
022076,000202: # GOFLASH
022077,000203: # GOTOPOOH
022078,000204: # VN1645
022079,000205:
022080,000206: 04,3101 34041 MAINRTNE STCALL TDEC1 # PRECISION UPDATE PASSIVE VEHICLE TO
022081,000207: 04,3102 11247 INTRPVP # TARGET TIME
022082,000208: 04,3103 77745 DLOAD
022083,000209: 04,3104 03413 TIG
022084,000210: 04,3105 03503 STORE INTIME
022085,000211: 04,3106 77331 SSP VLOAD
022086,000212: 04,3107 02371 SUBEXIT
022087,000213: 04,3110 11114 TEST3979
022088,000214: 04,3111 00001 RATT
022089,000215: 04,3112 77624 CALL
022090,000216: 04,3113 72546 S3435.25
022091,000217: 04,3114 43014 TEST3979 BOFF BON
022092,000218: 04,3115 04346 P39/79SW
022093,000219: 04,3116 11125 MAINRTN1
022094,000220: 04,3117 01311 FINALFLG
022095,000221: 04,3120 11123 P39P79
022096,000222: 04,3121 77614 SET
022097,000223: 04,3122 00470 UPDATFLG
022098,000224: 04,3123 77776 P39P79 EXIT
022099,000225: 04,3124 03152 TC DSPLY81 # FOR P39 AND P79
022100,000226: 04,3125 51575 MAINRTN1 VLOAD ABVAL
022101,000227: 04,3126 03646 DELVEET3
022102,000228: 04,3127 26635 STOVL DELVTPI # DELTA V
022103,000229: 04,3130 03640 VPASS4
022104,000230: 04,3131 51451 VSU ABVAL
022105,000231: 04,3132 03620 VTPRIME
022106,000232: 04,3133 26637 STOVL DELVTPF # DELTA V (FINAL) = V'T - VT
022107,000233: 04,3134 03540 RACT3
022108,000234: 04,3135 45115 PDVL CALL
022109,000235: 04,3136 03612 VIPRIME
022110,000236: 04,3137 45153 PERIAPO1 # GET PERIGEE ALTITUDE
022111,000237: 04,3140 77624 CALL
022112,000238: 04,3141 45263 SHIFTR1
022113,000239: 04,3142 02641 STORE POSTTPI
022114,000240: 04,3143 43014 BON SET
022115,000241: 04,3144 01311 FINALFLG
022116,000242: 04,3145 11147 DSPLY58
022117,000243: 04,3146 00470 UPDATFLG
022118,000244: 04,3147 77776 DSPLY58 EXIT
022119,000245: 04,3150 33301 CAF V06N58SR # DISPLAY HP, DELTA V, DELTA V (FINAL)
022120,000246: 04,3151 03263 TC VNDSPLY
022121,000247: 04,3152 33302 DSPLY81 CAF V06N81SR # DISPLAY DELTA V (LV)
022122,000248: 04,3153 03263 TC VNDSPLY
022123,000249: 04,3154 06006 TC INTPRET
022124,000250: 04,3155 77214 CLEAR VLOAD
022125,000251: 04,3156 01267 XDELVFLG
022126,000252: 04,3157 03646 DELVEET3
022127,000253: 04,3160 37646 STCALL DELVSIN
022128,000254: 04,3161 73002 VN1645 # DISPLAY TRKMKCNT, TTOGO, +MGA
022129,000255: 04,3162 52014 BON GOTO
022130,000256: 04,3163 04306 P39/79SW
022131,000257: 04,3164 11203 P39/P79B
022132,000258: 04,3165 11045 RECYCLE
022133,000259:
022134,000260: # STABLE ORBIT MIDCOURSE PROGRAM (P39 AND P79)
022135,000261:
022136,000262: # MOD NO -1 LOG SECTION - STABLE ORBIT - P38-P39
022137,000263: # MOD BY RUDNICKI.S DATE 25JAN68
022138,000264:
022139,000265: # FUNCTIONAL DESCRIPTION
022140,000266:
022141,000267: # P39 AND P79 CALCULATE THE REQUIRED DELTA V AND OTHER INITIAL
022142,000268: # CONDITIONS REQUIRED BY THE AGC TO MAKE A MIDCOURSE CORRECTION
022143,000269: # MANEUVER AFTER COMPLETING THE SOI MANEUVER BUT BEFORE MAKING
022144,000270: # THE SOR MANEUVER
022145,000271:
022146,000272: # CALLING SEQUENCE
022147,000273:
022148,000274: # ASTRONAUT REQUEST THRU DSKY
022149,000275:
022150,000276: # V37E39E IF THIS VEHICLE IS ACTIVE VEHICLE
022151,000277: # V37E79E IF OTHER VEHICLE IS ACTIVE VEHICLE
022152,000278:
022153,000279: # INPUT
022154,000280:
022155,000281: # (1) TPASS4 TIME OF INTERCEPT - SAVED FROM P38/P78
022156,000282: # (2) TARGTIME TIME THAT PASSIVE VEHICLE IS AT INTERCEPT POINT -
022157,000283: # SAVED FROM P38/P78
022158,000284:
022159,000285: # OUTPUT
022160,000286:
022161,000287: # (1) TRKMKCNT NUMBER OF MARKS
022162,000288: # (2) TTOGO TIME TO GO
022163,000289: # (3) +MGA MIDDLE GIMBAL ANGLE
022164,000290: # (4) DELVLVC DELTA VELOCITY AT MID - LOCAL VERTICAL COORDINATES
022165,000291:
022166,000292: # SUBROUTINES USED
022167,000293:
022168,000294: # AVFLAGA
022169,000295: # AVFLAGP
022170,000296: # LOADTIME
022171,000297: # SELECTMU
022172,000298: # PRECSET
022173,000299: # S34/35.1
022174,000300: # MAINRTNE
022175,000301:
022176,000302: 04,3166 04627 P39 TC AVFLAGA # THIS VEHICLE ACTIVE
022177,000303: 04,3167 00006 EXTEND
022178,000304: 04,3170 31422 DCA ATIGINC
022179,000305: 04,3171 03175 TC P39/P79A
022180,000306: 04,3172 04642 P79 TC AVFLAGP # OTHER VEHICLE ACTIVE
022181,000307: 04,3173 00006 EXTEND
022182,000308: 04,3174 31424 DCA PTIGINC
022183,000309: 04,3175 53764 P39/P79A DXCH KT # TIME TO PREPARE FOR BURN
022184,000310: 04,3176 04647 TC P20FLGON # SET UPDATFLG, TRACKFLG
022185,000311: 04,3177 06006 TC INTPRET
022186,000312: 04,3200 45014 SET CALL
022187,000313: 04,3201 04066 P39/79SW
022188,000314: 04,3202 10712 SELECTMU # SELECT MU, CLEAR FINALFLG, GO TO VN1645
022189,000315: 04,3203 43234 P39/P79B RTB DAD
022190,000316: 04,3204 45510 LOADTIME
022191,000317: 04,3205 02364 KT
022192,000318: 04,3206 03413 STORE TIG # TIG = T (PRESENT) + PREPARATION TIME
022193,000319: 04,3207 34041 STCALL TDEC1 # PRECISION UPDATE ACTIVE AND PASSIVE
022194,000320: 04,3210 45215 PRECSET # VEHICLES TO TIG
022195,000321: 04,3211 77624 CALL
022196,000322: 04,3212 74000 S34/35.1 # GET UNIT NORMAL
022197,000323: 04,3213 52145 DLOAD GOTO
022198,000324: 04,3214 02615 TARGTIME
022199,000325: 04,3215 11101 MAINRTNE # CALCULATE DELTA V AND DELTA V (LV)
022200,000326:
022201,000327: # .... PREC/TT ....
022202,000328:
022203,000329: # SUBROUTINES USED
022204,000330:
022205,000331: # PRECSET
022206,000332: # TIMETHET
022207,000333: # S34/35.1
022208,000334:
022209,000335: 04,3216 71220 PREC/TT STQ DLOAD
022210,000336: 04,3217 02367 RTRN
022211,000337: 04,3220 03413 TIG
022212,000338: 04,3221 34041 STCALL TDEC1 # PRECISION UPDATE ACTIVE AND PASSIVE
022213,000339: 04,3222 45215 PRECSET # VEHICLES TO TIG
022214,000340: 04,3223 53775 VLOAD VSR*
022215,000341: 04,3224 03554 RPASS3
022216,000342: 04,3225 57176 0,2
022217,000343: 04,3226 16657 STODL RVEC
022218,000344: 04,3227 03754 CENTANG
022219,000345: 04,3230 71406 PUSH COS
022220,000346: 04,3231 16734 STODL CSTH
022221,000347: 04,3232 43156 SIN SET
022222,000348: 04,3233 03466 RVSW
022223,000349: 04,3234 26732 STOVL SNTH
022224,000350: 04,3235 03562 VPASS3
022225,000351: 04,3236 77657 VSR*
022226,000352: 04,3237 57176 0,2
022227,000353: 04,3240 36746 STCALL VVEC # GET TRANSFER TIME BASED ON CENTANG OF
022228,000354: 04,3241 24744 TIMETHET # PASSIVE VEHICLE
022229,000355: 04,3242 77624 CALL
022230,000356: 04,3243 74000 S34/35.1 # GET UNIT NORMAL
022231,000357: 04,3244 52145 DLOAD GOTO
022232,000358: 04,3245 00037 T
022233,000359: 04,3246 02367 RTRN
022234,000360:
022235,000361: # .... INTRPVP ....
022236,000362:
022237,000363: # SUBROUTINES USED
022238,000364:
022239,000365: # CSMPREC
022240,000366: # LEMPREC
022241,000367:
022242,000368: 04,3247 43020 INTRPVP STQ BOFF # PRECISION UPDATE PASSIVE VEHICLE TO
022243,000369: 04,3250 02367 RTRN # TDEC1
022244,000370: 04,3251 01352 AVFLAG
022245,000371: 04,3252 11257 OTHERV
022246,000372: 04,3253 77624 CALL
022247,000373: 04,3254 27101 CSMPREC
022248,000374: 04,3255 77650 GOTO
022249,000375: 04,3256 02367 RTRN
022250,000376: 04,3257 77624 OTHERV CALL
022251,000377: 04,3260 27115 LEMPREC
022252,000378: 04,3261 77650 GOTO
022253,000379: 04,3262 02367 RTRN
022254,000380:
022255,000381: # .... VNDSPLY ....
022256,000382:
022257,000383: # SUBROUTINES USED
022258,000384:
022259,000385: # BANKCALL
022260,000386: # GOFLASH
022261,000387: # GOTOPOOH
022262,000388:
022263,000389: 04,3263 00006 VNDSPLY EXTEND # FLASH DISPLAY
022264,000390: 04,3264 23767 QXCH RTRN
022265,000391: 04,3265 55765 TS VERBNOUN
022266,000392: 04,3266 31765 CA VERBNOUN
022267,000393: 04,3267 04676 TCR BANKCALL
022268,000394: 04,3270 20720 CADR GOFLASH
022269,000395: 04,3271 14106 TCF GOTOPOOH # TERMINATE
022270,000396: 04,3272 01767 TC RTRN # PROCEED
022271,000397: 04,3273 13266 TCF -5 # RECYCLE
022272,000398: 04,3274 01441 V06N33SR VN 0633
022273,000399: 04,3275 01467 V06N55SR VN 0655
022274,000400: 04,3276 01006 V04N06SR VN 0406
022275,000401: 04,3277 01471 V06N57SR VN 0657
022276,000402: 04,3300 01442 V06N34SR VN 0634
022277,000403: 04,3301 01472 V06N58SR VN 0658
022278,000404: 04,3302 01521 V06N81SR VN 0681
022279,000405:
End of include-file STABLE_ORBIT_-_P38-P39.agc. Parent file is MAIN.agc