Source Code
These source code files are an attempted reconstruction of Sundance revision 306, the Apollo 9
LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of
original core rope program modules, as follows:
|
028132,000002: ## Copyright: Public domain.
028133,000003: ## Filename: STABLE_ORBIT_-_P38-P39.agc
028134,000004: ## Purpose: A section of an attempt to reconstruct Sundance revision 306
028135,000005: ## as closely as possible with available information. Sundance
028136,000006: ## 306 is the source code for the Lunar Module's (LM) Apollo
028137,000007: ## Guidance Computer (AGC) for Apollo 9. This program was created
028138,000008: ## using the mixed-revision SundanceXXX as a starting point, and
028139,000009: ## pulling back features from Luminary 69 believed to have been
028140,000010: ## added based on memos, checklists, observed address changes,
028141,000011: ## or the Sundance GSOPs.
028142,000012: ## Assembler: yaYUL
028143,000013: ## Contact: Ron Burkey <info@sandroid.org>.
028144,000014: ## Website: www.ibiblio.org/apollo/index.html
028145,000015: ## Mod history: 2020-07-24 MAS Created from SundanceXXX.
028146,000016:
028147,000017:
028148,000018:
028149,000019: # STABLE ORBIT RENDEZVOUS PROGRAMS (P38 AND P78)
028150,000020:
028151,000021: # MOD NO -1 LOG SECTION - STABLE ORBIT - P38-P39
028152,000022: # MOD BY RUDNICKI.S DATE 25JAN68
028153,000023:
028154,000024: # FUNCTIONAL DESCRIPTION
028155,000025:
028156,000026: # P38 AND P78 CALCULATE THE REQUIRED DELTA V AND OTHER INITIAL
028157,000027: # CONDITIONS REQUIRED BY THE AGC TO (1) PUT THE ACTIVE VEHICLE
028158,000028: # ON A TRANSFER TRAJECTORY THAT INTERCEPTS THE PASSIVE VEHICLE
028159,000029: # ORBIT A GIVEN DISTANCE, DELTA R, EITHER AHEAD OF OR BEHIND THE
028160,000030: # PASSIVE VEHICLE AND (2) ACTUALLY PLACE THE ACTIVE VEHICLE IN THE
028161,000031: # PASSIVE VEHICLE ORBIT WITH A DELTA R SEPARATION BETWEEN THE TWO
028162,000032: # VEHICLES
028163,000033:
028164,000034: # CALLING SEQUENCE
028165,000035:
028166,000036: # ASTRONAUT REQUEST THRU DSKY
028167,000037:
028168,000038: # V37E38E IF THIS VEHICLE IS ACTIVE VEHICLE
028169,000039: # V37E78E IF OTHER VEHICLE IS ACTIVE VEHICLE
028170,000040:
028171,000041: # INPUT
028172,000042:
028173,000043: # (1) SOI MANEUVER
028174,000044:
028175,000045: # (A) TIG TIME OF SOI MANEUVER
028176,000046: # (B) CENTANG ORBITAL CENTRAL ANGLE OF THE PASSIVE VEHICLE
028177,000047: # DURING TRANSFER FROM TIG TO TIME OF INTERCEPT
028178,000048: # (C) DELTAR THE DESIRED SEPARATION OF THE TWO VEHICLES
028179,000049: # SPECIFIED AS A DISTANCE ALONG THE PASSIVE VEHICLE
028180,000050: # ORBIT
028181,000051: # (D) OPTION EQUALS 1 FOR SOI
028182,000052:
028183,000053: # (2) SOR MANEUVER
028184,000054:
028185,000055: # (A) TIG TIME OF SOR MANEUVER
028186,000056: # (B) CENTANG AN OPTIONAL RESPECIFICATION OF 1 (B) ABOVE
028187,000057: # (C) OPTION EQUALS 2 FOR SOR
028188,000058: # (D) DELTTIME THE TIME REQUIRED TO TRAVERSE DELTA R WHEN
028189,000059: # TRAVELING AT A VELOCITY EQUAL TO THE HORIZONTAL
028190,000060: # VELOCITY OF THE PASSIVE VEHICLE - SAVED FROM
028191,000061: # SOI PHASE
028192,000062: # (E) TINT TIME OF INTERCEPT (SOI) - SAVED FROM SOI PHASE
028193,000063:
028194,000064: # OUTPUT
028195,000065:
028196,000066: # (1) TRKMKCNT NUMBER OF MARKS
028197,000067: # (2) TTOGO TIME TO GO
028198,000068: # (3) +MGA MIDDLE GIMBAL ANGLE
028199,000069: # (4) DSPTEM1 TIME OF INTERCEPT OF PASSIVE VEHICLE ORBIT
028200,000070: # (FOR SOI ONLY)
028201,000071: # (5) POSTTPI PERIGEE ALTITUDE OF ACTIVE VEHICLE ORBIT AFTER
028202,000072: # THE SOI (SOR) MANEUVER
028203,000073: # (6) DELVTPI MAGNITUDE OF DELTA V AT SOI (SOR) TIME
028204,000074: # (7) DELVTPF MAGNITUDE OF DELTA V AT INTERCEPT TIME
028205,000075: # (8) DELVLVC DELTA VELOCITY AT SOI (AND SOR) - LOCAL VERTICAL
028206,000076: # COORDINATES
028207,000077:
028208,000078: # SUBROUTINES USED
028209,000079:
028210,000080: # AVFLAGA
028211,000081: # AVFLAGP
028212,000082: # VNDSPLY
028213,000083: # BANKCALL
028214,000084: # GOFLASHR
028215,000085: # GOTOPOOH
028216,000086: # BLANKET
028217,000087: # ENDOFJOB
028218,000088: # PREC/TT
028219,000089: # SELECTMU
028220,000090: # INTRPVP
028221,000091: # MAINRTNE
028222,000092:
028223,000093: 04,2666 BANK 04
028224,000094: 34,2000 SETLOC STBLEORB
028225,000095: 34,2000 BANK
028226,000096:
028227,000097: 34,3411 E7,1455 EBANK= SUBEXIT
028228,000098: 34,3411 COUNT* $$/P3879
028229,000099:
028230,000100: 34,3411 04655 P38 TC BANKCALL
028231,000101: 34,3412 72405 CADR AVFLAGA # THIS VEHICLE ACTIVE
028232,000102: 34,3413 03416 TC +3
028233,000103: 34,3414 04655 P78 TC BANKCALL
028234,000104: 34,3415 72412 CADR AVFLAGP # OTHER VEHICLE ACTIVE
028235,000105: 34,3416 33745 CAF V06N33SR # DISPLAY TIG
028236,000106: 34,3417 03734 TC VNDSPLY
028237,000107: 34,3420 33746 CAF V06N55SR # DISPLAY CENTANG
028238,000108: 34,3421 04655 TCR BANKCALL
028239,000109: 34,3422 20544 CADR GOFLASHR
028240,000110: 34,3423 14106 TCF GOTOPOOH # TERMINATE
028241,000111: 34,3424 13431 TCF +5 # PROCEED
028242,000112: 34,3425 13420 TCF -5 # RECYCLE
028243,000113: 34,3426 36221 CAF THREE # IMMEDIATE RETURN - BLANK R1, R2
028244,000114: 34,3427 05556 TCR BLANKET
028245,000115: 34,3430 15225 TCF ENDOFJOB
028246,000116: 34,3431 35031 CAF FIVE
028247,000117: 34,3432 55155 TS OPTION1
028248,000118: 34,3433 35026 CAF ONE
028249,000119: 34,3434 55156 TS OPTION2 # OPTION CODE IS SET TO 1
028250,000120: 34,3435 33747 CAF V04N06SR # DISPLAY OPTION CODE - 1 = SOI, 2 = SOR
028251,000121: 34,3436 04655 TCR BANKCALL
028252,000122: 34,3437 20544 CADR GOFLASHR
028253,000123: 34,3440 14106 TCF GOTOPOOH # TERMINATE
028254,000124: 34,3441 13446 TCF +5 # PROCEED
028255,000125: 34,3442 13435 TCF -5 # RECYCLE
028256,000126: 34,3443 35024 CAF BIT3 # IMMEDIATE RETURN - BLANK R3
028257,000127: 34,3444 05556 TCR BLANKET
028258,000128: 34,3445 15225 TCF ENDOFJOB
028259,000129: 34,3446 06014 TC INTPRET
028260,000130: 34,3447 70535 SLOAD SR1
028261,000131: 34,3450 01157 OPTION2
028262,000132: 34,3451 71230 BHIZ DLOAD
028263,000133: 34,3452 71460 OPTN1
028264,000134: 34,3453 03616 TINT
028265,000135: 34,3454 02317 STORE TINTSOI # STORE FOR SOR PHASE
028266,000136: 34,3455 77614 CLRGO
028267,000137: 34,3456 01230 OPTNSW # OPTNSW; ON = SOI, OFF = SOR
028268,000138: 34,3457 71504 JUNCTN1
028269,000139: 34,3460 45014 OPTN1 SET CALL # SOI
028270,000140: 34,3461 01070 OPTNSW
028271,000141: 34,3462 71667 PREC/TT
028272,000142: 34,3463 77615 DAD
028273,000143: 34,3464 03425 TIG
028274,000144: 34,3465 03616 STORE TINT # TI = TIG + TF
028275,000145: 34,3466 01047 STORE DSPTEM1
028276,000146: 34,3467 77776 EXIT
028277,000147: 34,3470 33750 CAF V06N57SR # DISPLAY DELTA R
028278,000148: 34,3471 04655 TCR BANKCALL
028279,000149: 34,3472 20544 CADR GOFLASHR
028280,000150: 34,3473 14106 TCF GOTOPOOH # TERMINATE
028281,000151: 34,3474 13501 TCF +5 # PROCEED
028282,000152: 34,3475 13470 TCF -5 # RECYCLE
028283,000153: 34,3476 36216 CAF SIX # IMMEDIATE RETURN - BLANK R2, R3
028284,000154: 34,3477 05556 TCR BLANKET
028285,000155: 34,3500 15225 TCF ENDOFJOB
028286,000156: 34,3501 33751 +5 CAF V06N34SR # DISPLAY TIME OF INTERCEPT
028287,000157: 34,3502 03734 TC VNDSPLY
028288,000158: 34,3503 06014 TC INTPRET
028289,000159: 34,3504 45014 JUNCTN1 CLEAR CALL
028290,000160: 34,3505 04266 P39/79SW
028291,000161: 34,3506 20045 SELECTMU # SELECT MU, CLEAR FINALFLG, GO TO VN1645
028292,000162: 34,3507 77624 RECYCLE CALL
028293,000163: 34,3510 71667 PREC/TT
028294,000164: 34,3511 71214 BOFF DLOAD
028295,000165: 34,3512 01350 OPTNSW
028296,000166: 34,3513 71533 OPTN2
028297,000167: 34,3514 03616 TINT
028298,000168: 34,3515 34041 STCALL TDEC1 # PRECISION UPDATE PASSIVE VEHICLE TO
028299,000169: 34,3516 71720 INTRPVP # INTERCEPT TIME
028300,000170: 34,3517 53575 VLOAD UNIT
028301,000171: 34,3520 00001 RATT # RP/(RP)
028302,000172: 34,3521 47315 PDVL VXV
028303,000173: 34,3522 00007 VATT
028304,000174: 34,3523 60246 ABVAL NORM # (VP X RP/(RP))
028305,000175: 34,3524 00047 X1
028306,000176: 34,3525 56325 PDDL DDV
028307,000177: 34,3526 02317 DELTAR
028308,000178: 34,3527 77657 SL* # DELTA R / (VP X RP/RP)
028309,000179: 34,3530 20172 0 -7,1
028310,000180: 34,3531 36321 STCALL DELTTIME # DELTA T = (RP) DELTA R / (VP X RP)
028311,000181: 34,3532 71537 JUNCTN2
028312,000182: 34,3533 43345 OPTN2 DLOAD DAD
028313,000183: 34,3534 02317 TINTSOI
028314,000184: 34,3535 00037 T
028315,000185: 34,3536 03616 STORE TINT # TI = TI + TF
028316,000186: 34,3537 45345 JUNCTN2 DLOAD DSU
028317,000187: 34,3540 03616 TINT
028318,000188: 34,3541 02321 DELTTIME
028319,000189: 34,3542 02323 STORE TARGTIME # TT = TI - DELTA T
028320,000190:
028321,000191: # .... MAINRTNE ....
028322,000192:
028323,000193: # SUBROUTINES USED
028324,000194:
028325,000195: # S3435.25
028326,000196: # PERIAPO1
028327,000197: # SHIFTR1
028328,000198: # VNDSPLY
028329,000199: # BANKCALL
028330,000200: # GOFLASH
028331,000201: # GOTOPOOH
028332,000202: # VN1645
028333,000203:
028334,000204: 34,3543 34041 MAINRTNE STCALL TDEC1 # PRECISION UPDATE PASSIVE VEHICLE TO
028335,000205: 34,3544 71720 INTRPVP # TARGET TIME
028336,000206: 34,3545 77745 DLOAD
028337,000207: 34,3546 03425 TIG
028338,000208: 34,3547 03577 STORE INTIME
028339,000209: 34,3550 77331 SSP VLOAD
028340,000210: 34,3551 03451 NORMEX
028341,000211: 34,3552 71556 TEST3979
028342,000212: 34,3553 00001 RATT
028343,000213: 34,3554 77624 CALL
028344,000214: 34,3555 73253 S3435.25
028345,000215: 34,3556 43014 TEST3979 BOFF BON
028346,000216: 34,3557 04346 P39/79SW
028347,000217: 34,3560 71567 MAINRTN1
028348,000218: 34,3561 01311 FINALFLG
028349,000219: 34,3562 71565 P39P79
028350,000220: 34,3563 77614 SET
028351,000221: 34,3564 00470 UPDATFLG
028352,000222: 34,3565 77776 P39P79 EXIT
028353,000223: 34,3566 03614 TC DSPLY81 # FOR P39 AND P79
028354,000224: 34,3567 51575 MAINRTN1 VLOAD ABVAL
028355,000225: 34,3570 03363 DELVEET3
028356,000226: 34,3571 27563 STOVL DELVTPI # DELTA V
028357,000227: 34,3572 03473 VPASS4
028358,000228: 34,3573 51451 VSU ABVAL
028359,000229: 34,3574 03553 VTPRIME
028360,000230: 34,3575 27565 STOVL DELVTPF # DELTA V (FINAL) = V'T - VT
028361,000231: 34,3576 03523 RACT3
028362,000232: 34,3577 45115 PDVL CALL
028363,000233: 34,3600 02357 VIPRIME
028364,000234: 34,3601 46106 PERIAPO1 # GET PERIGEE ALTITUDE
028365,000235: 34,3602 77624 CALL
028366,000236: 34,3603 46216 SHIFTR1
028367,000237: 34,3604 03575 STORE POSTTPI
028368,000238: 34,3605 43014 BON SET
028369,000239: 34,3606 01311 FINALFLG
028370,000240: 34,3607 71611 DSPLY58
028371,000241: 34,3610 00470 UPDATFLG
028372,000242: 34,3611 77776 DSPLY58 EXIT
028373,000243: 34,3612 33752 CAF V06N58SR # DISPLAY HP, DELTA V, DELTA V (FINAL)
028374,000244: 34,3613 03734 TC VNDSPLY
028375,000245: 34,3614 33753 DSPLY81 CAF V06N81SR # DISPLAY DELTA V (LV)
028376,000246: 34,3615 03734 TC VNDSPLY
028377,000247: 34,3616 06014 TC INTPRET
028378,000248: 34,3617 77214 CLEAR VLOAD
028379,000249: 34,3620 01267 XDELVFLG
028380,000250: 34,3621 03363 DELVEET3
028381,000251: 34,3622 37643 STCALL DELVSIN
028382,000252: 34,3623 73502 VN1645 # DISPLAY TRKMKCNT, TTOGO, +MGA
028383,000253: 34,3624 52014 BON GOTO
028384,000254: 34,3625 04306 P39/79SW
028385,000255: 34,3626 71662 P39/P79B
028386,000256: 34,3627 71507 RECYCLE
028387,000257:
028388,000258: # STABLE ORBIT MIDCOURSE PROGRAM (P39 AND P79)
028389,000259:
028390,000260: # MOD NO -1 LOG SECTION - STABLE ORBIT - P38-P39
028391,000261: # MOD BY RUDNICKI.S DATE 25JAN68
028392,000262:
028393,000263: # FUNCTIONAL DESCRIPTION
028394,000264:
028395,000265: # P39 AND P79 CALCULATE THE REQUIRED DELTA V AND OTHER INITIAL
028396,000266: # CONDITIONS REQUIRED BY THE AGC TO MAKE A MIDCOURSE CORRECTION
028397,000267: # MANEUVER AFTER COMPLETING THE SOI MANEUVER BUT BEFORE MAKING
028398,000268: # THE SOR MANEUVER
028399,000269:
028400,000270: # CALLING SEQUENCE
028401,000271:
028402,000272: # ASTRONAUT REQUEST THRU DSKY
028403,000273:
028404,000274: # V37E39E IF THIS VEHICLE IS ACTIVE VEHICLE
028405,000275: # V37E79E IF OTHER VEHICLE IS ACTIVE VEHICLE
028406,000276:
028407,000277: # INPUT
028408,000278:
028409,000279: # (1) TPASS4 TIME OF INTERCEPT - SAVED FROM P38/P78
028410,000280: # (2) TARGTIME TIME THAT PASSIVE VEHICLE IS AT INTERCEPT POINT -
028411,000281: # SAVED FROM P38/P78
028412,000282:
028413,000283: # OUTPUT
028414,000284:
028415,000285: # (1) TRKMKCNT NUMBER OF MARKS
028416,000286: # (2) TTOGO TIME TO GO
028417,000287: # (3) +MGA MIDDLE GIMBAL ANGLE
028418,000288: # (4) DELVLVC DELTA VELOCITY AT MID - LOCAL VERTICAL COORDINATES
028419,000289:
028420,000290: # SUBROUTINES USED
028421,000291:
028422,000292: # AVFLAGA
028423,000293: # AVFLAGP
028424,000294: # LOADTIME
028425,000295: # SELECTMU
028426,000296: # PRECSET
028427,000297: # S34/35.1
028428,000298: # MAINRTNE
028429,000299:
028430,000300: 34,3630 04655 P39 TC BANKCALL
028431,000301: 34,3631 72405 CADR AVFLAGA # THIS VEHICLE ACTIVE
028432,000302: 34,3632 00006 EXTEND
028433,000303: 34,3633 31401 DCA ATIGINC
028434,000304: 34,3634 03641 TC P39/P79A
028435,000305: 34,3635 04655 P79 TC BANKCALL
028436,000306: 34,3636 72412 CADR AVFLAGP # OTHER VEHICLE ACTIVE
028437,000307: 34,3637 00006 EXTEND
028438,000308: 34,3640 31403 DCA PTIGINC
028439,000309: 34,3641 53563 P39/P79A DXCH KT # TIME TO PREPARE FOR BURN
028440,000310: 34,3642 06014 TC INTPRET
028441,000311: 34,3643 43234 RTB DAD
028442,000312: 34,3644 21454 LOADTIME
028443,000313: 34,3645 03563 KT
028444,000314: 34,3646 37425 STCALL TIG
028445,000315: 34,3647 20045 SELECTMU # SELECT MU, CLEAR FINALFLG, GO TO VN1645
028446,000316: 34,3650 43145 P39/P79C DLOAD SET
028447,000317: 34,3651 03425 TIG
028448,000318: 34,3652 04066 P39/79SW
028449,000319: 34,3653 34041 STCALL TDEC1 # PRECISION UPDATE ACTIVE AND PASSIVE
028450,000320: 34,3654 46150 PRECSET # VEHICLES TO TIG
028451,000321: 34,3655 77624 CALL
028452,000322: 34,3656 73226 S34/35.1 # GET UNIT NORMAL
028453,000323: 34,3657 52145 DLOAD GOTO
028454,000324: 34,3660 02323 TARGTIME
028455,000325: 34,3661 71543 MAINRTNE # CALCULATE DELTA V AND DELTA V (LV)
028456,000326:
028457,000327: 34,3662 43234 P39/P79B RTB DAD
028458,000328: 34,3663 21454 LOADTIME
028459,000329: 34,3664 03563 KT
028460,000330: 34,3665 37425 STCALL TIG # TIG = T (PRESENT) + PREPARATION TIME
028461,000331: 34,3666 71650 P39/P79C
028462,000332:
028463,000333: # .... PREC/TT ....
028464,000334: # SUBROUTINES USED
028465,000335:
028466,000336: # PRECSET
028467,000337: # TIMETHET
028468,000338: # S34/35.1
028469,000339:
028470,000340: 34,3667 71220 PREC/TT STQ DLOAD
028471,000341: 34,3670 03452 RTRN
028472,000342: 34,3671 03425 TIG
028473,000343: 34,3672 34041 STCALL TDEC1 # PRECISION UPDATE ACTIVE AND PASSIVE
028474,000344: 34,3673 46150 PRECSET # VEHICLES TO TIG
028475,000345: 34,3674 53775 VLOAD VSR*
028476,000346: 34,3675 03537 RPASS3
028477,000347: 34,3676 57176 0,2
028478,000348: 34,3677 16655 STODL RVEC
028479,000349: 34,3700 03606 CENTANG
028480,000350: 34,3701 71406 PUSH COS
028481,000351: 34,3702 16732 STODL CSTH
028482,000352: 34,3703 43156 SIN SET
028483,000353: 34,3704 03466 RVSW
028484,000354: 34,3705 26730 STOVL SNTH
028485,000355: 34,3706 03545 VPASS3
028486,000356: 34,3707 77657 VSR*
028487,000357: 34,3710 57176 0,2
028488,000358: 34,3711 36744 STCALL VVEC # GET TRANSFER TIME BASED ON CENTANG OF
028489,000359: 34,3712 24732 TIMETHET # PASSIVE VEHICLE
028490,000360: 34,3713 77624 CALL
028491,000361: 34,3714 73226 S34/35.1 # GET UNIT NORMAL
028492,000362: 34,3715 52145 DLOAD GOTO
028493,000363: 34,3716 00037 T
028494,000364: 34,3717 03452 RTRN
028495,000365:
028496,000366: # .... INTRPVP ....
028497,000367: # SUBROUTINES USED
028498,000368:
028499,000369: # CSMPREC
028500,000370: # LEMPREC
028501,000371: 34,3720 43020 INTRPVP STQ BOFF # PRECISION UPDATE PASSIVE VEHICLE TO
028502,000372: 34,3721 03452 RTRN # TDEC1
028503,000373: 34,3722 01352 AVFLAG
028504,000374: 34,3723 71730 OTHERV
028505,000375: 34,3724 77624 CALL
028506,000376: 34,3725 27014 CSMPREC
028507,000377: 34,3726 77650 GOTO
028508,000378: 34,3727 03452 RTRN
028509,000379: 34,3730 77624 OTHERV CALL
028510,000380: 34,3731 27030 LEMPREC
028511,000381: 34,3732 77650 GOTO
028512,000382: 34,3733 03452 RTRN
028513,000383:
028514,000384: # .... VNDSPLY ....
028515,000385: # SUBROUTINES USED
028516,000386:
028517,000387: # BANKCALL
028518,000388: # GOFLASH
028519,000389: # GOTOPOOH
028520,000390:
028521,000391: 34,3734 00006 VNDSPLY EXTEND # FLASH DISPLAY
028522,000392: 34,3735 23452 QXCH RTRN
028523,000393: 34,3736 55602 TS VERBNOUN
028524,000394: 34,3737 31602 CA VERBNOUN
028525,000395: 34,3740 04655 TCR BANKCALL
028526,000396: 34,3741 20406 CADR GOFLASH
028527,000397: 34,3742 14106 TCF GOTOPOOH # TERMINATE
028528,000398: 34,3743 01452 TC RTRN # PROCEED
028529,000399: 34,3744 13737 TCF -5 # RECYCLE
028530,000400: 34,3745 01441 V06N33SR VN 0633
028531,000401: 34,3746 01467 V06N55SR VN 0655
028532,000402: 34,3747 01006 V04N06SR VN 0406
028533,000403: 34,3750 01471 V06N57SR VN 0657
028534,000404: 34,3751 01442 V06N34SR VN 0634
028535,000405: 34,3752 01472 V06N58SR VN 0658
028536,000406: 34,3753 01521 V06N81SR VN 0681
028537,000407:
028538,000408:
028539,000409:
End of include-file STABLE_ORBIT_-_P38-P39.agc. Parent file is MAIN.agc