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