Source Code
These source-code files were transcribed from scans made from Don Eyles's personal
copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston
facility, and the scanning was sponsored by Mike Stewart. The code was transcribed
from these scans by a team of volunteers who are referenced in the program
comments. Comments from the original source code are in ALL-CAPS, whereas
comments added later in transcription are in Mixed-Case. In some cases, where
similar code blocks exist in previously-transcribed AGC programs (primarily
Luminary 99, from Apollo 11) those code blocks were used as a starting point and
then corrected to agree with the BURST120 scans. The full scans are available
at the Virtual AGC
project's collection at archive.org, while more-convenient reduced-size (but reduced-quality)
images are available at
the main Virtual AGC website. Report any errors noted by creating an
issue report at the Virtual AGC
project's GitHub repository. Notations on the program listing read, in part:YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 BY NASA 2021106-031 DEC 7, 1967 THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.Note that the date is the date of the printout, not the date of the program revision. |
026373,000002: ## Copyright: Public domain.
026374,000003: ## Filename: SPS_BACK-UP_RCS_CONTROL.agc
026375,000004: ## Purpose: A module for revision 0 of BURST120 (Sunburst). It
026376,000005: ## is part of the source code for the Lunar Module's
026377,000006: ## (LM) Apollo Guidance Computer (AGC) for Apollo 5.
026378,000007: ## Assembler: yaYUL
026379,000008: ## Contact: Ron Burkey <info@sandroid.org>.
026380,000009: ## Website: www.ibiblio.org/apollo/index.html
026381,000010: ## Mod history: 2016-09-30 RSB Created draft version.
026382,000011: ## 2016-09-30 MAS Transcribed.
026383,000012: ## 2016-10-31 RSB Typos.
026384,000013: ## 2016-12-06 RSB Comment-proofing with octopus/ProoferComments.
026385,000014:
Page 629 |
026387,000016: 21,3417 BANK 21
026388,000017: 21,3417 E6,1542 EBANK= DT
026389,000018:
026390,000019: 21,3417 40775 SPSRCS CS OMEGAQD
026391,000020: 21,3420 61416 AD OMEGAQ
026392,000021: 21,3421 55423 TS EDOTQ # EDOT = OMEGAQ - OMEGAQD
026393,000022:
026394,000023: 21,3422 61413 AD ER
026395,000024: 21,3423 00006 EXTEND # F = 1/4 E + EDOT
026396,000025: 21,3424 63464 BZMF PLUSD # DQ NEGATIVE FOR POSITIVE F
026397,000026:
026398,000027: 21,3425 33571 CAF NEGD # STORE DIRECTION TO THRUST IN ITEMP3
026399,000028:
026400,000029: 21,3426 54063 GCOMPUTE TS ITEMP3
026401,000030: 21,3427 31423 CAE EDOTQ
026402,000031: 21,3430 00006 EXTEND
026403,000032: 21,3431 73570 MP ACONST # ACONST = 2**(-11) X SQRT(1/2A X PI/1024)
026404,000033: 21,3432 10000 CCS A
026405,000034: 21,3433 13455 TCF LIMSQQ
026406,000035: 21,3434 13436 TCF +2
026407,000036: 21,3435 13455 TCF LIMSQQ
026408,000037: 21,3436 22000 LXCH A # A = 2**(3) X SQRT(1/2A X PI/1024)
026409,000038: 21,3437 00006 LIMRETQ EXTEND
026410,000039: 21,3440 70000 SQUARE
026411,000040: 21,3441 54062 TS ITEMP2 # ITEMP2 = (1/2A) EDOT**2
026412,000041:
026413,000042: 21,3442 61413 AD ER
026414,000043: 21,3443 63571 AD NEGD # DB IS SPECIFIED BY NEGD IN SPS MODE
026415,000044:
026416,000045: 21,3444 00006 EXTEND
026417,000046: 21,3445 63472 BZMF UZERO
026418,000047:
026419,000048: 21,3446 31423 CAE EDOTQ # G WAS POSITIVE, NOW TEST EDOT
026420,000049:
026421,000050: 21,3447 00006 EXTEND
026422,000051: 21,3450 63461 BZMF ULOW
026423,000052:
026424,000053: 21,3451 60062 AD ITEMP2 # EDOT WAS POSITIVE, CALCULATE HIGH U CASE
026425,000054: 21,3452 61413 AD ER
026426,000055: 21,3453 55502 TS URGENCYQ
026427,000056:
026428,000057: 21,3454 13474 TCF RCALC
026429,000058:
026430,000059: 21,3455 37743 LIMSQQ CAF POSMAX
026431,000060: 21,3456 13437 TCF LIMRETQ
026432,000061: 21,3457 37743 LIMSQR CAF POSMAX
026433,000062: 21,3460 13514 TCF LIMRETR
026434,000063: 21,3461 61413 ULOW AD ER # EDOT WAS NEGATIVE, CALCULATE LOW U CASE
026435,000064: 21,3462 55502 TS URGENCYQ
Page 630 |
026437,000066: 21,3463 13474 TCF RCALC
026438,000067:
026439,000068: 21,3464 41413 PLUSD CS ER
026440,000069: 21,3465 57413 XCH ER
026441,000070: 21,3466 41423 CS EDOTQ
026442,000071: 21,3467 57423 XCH EDOTQ
026443,000072: 21,3470 43571 CS NEGD
026444,000073: 21,3471 13426 TCF GCOMPUTE
026445,000074:
026446,000075: 21,3472 37767 UZERO CAF ZERO # G = 0, NO URGENCY
026447,000076: 21,3473 55502 TS URGENCYQ
026448,000077:
026449,000078: 21,3474 40776 RCALC CS OMEGARD # REPEAT CALCULATIONS FOR R-AXIS
026450,000079: 21,3475 61420 AD OMEGAR
026451,000080: 21,3476 55424 TS EDOTR
026452,000081:
026453,000082: 21,3477 61411 AD E # F = 1/4 E + EDOT
026454,000083: 21,3500 00006 EXTEND
026455,000084: 21,3501 63535 BZMF PLUSDR
026456,000085:
026457,000086: 21,3502 33571 CAF NEGD
026458,000087:
026459,000088: 21,3503 54064 GCOMPUTR TS ITEMP4
026460,000089: 21,3504 31424 CAE EDOTR
026461,000090: 21,3505 00006 EXTEND
026462,000091: 21,3506 73570 MP ACONST # ACONST = 2**(-11) X SQRT(1/2A X PI/1024)
026463,000092: 21,3507 10000 CCS A
026464,000093: 21,3510 13457 TCF LIMSQR
026465,000094: 21,3511 13513 TCF +2
026466,000095: 21,3512 13457 TCF LIMSQR
026467,000096: 21,3513 22000 LXCH A # A = 2**(3) X SQRT(1/2A X PI/1024)
026468,000097: 21,3514 00006 LIMRETR EXTEND
026469,000098: 21,3515 70000 SQUARE
026470,000099: 21,3516 54062 TS ITEMP2
026471,000100:
026472,000101: 21,3517 61411 AD E
026473,000102: 21,3520 63571 AD NEGD
026474,000103:
026475,000104: 21,3521 00006 EXTEND
026476,000105: 21,3522 63543 BZMF UZEROR
026477,000106:
026478,000107: 21,3523 31424 CAE EDOTR
026479,000108:
026480,000109: 21,3524 00006 EXTEND
026481,000110: 21,3525 63532 BZMF ULOWR
026482,000111:
026483,000112: 21,3526 60062 AD ITEMP2 # EDOT WAS POSITIVE, CALCULATE HIGH U CASE
026484,000113: 21,3527 61411 AD E
026485,000114: 21,3530 55504 TS URGENCYR
Page 631 |
026487,000116: 21,3531 13545 TCF URGRECT
026488,000117: 21,3532 61411 ULOWR AD E # EDOT WAS NEGATIVE, CALCULATE LOW U CASE
026489,000118: 21,3533 55504 TS URGENCYR
026490,000119:
026491,000120: 21,3534 13545 TCF URGRECT
026492,000121: 21,3535 41411 PLUSDR CS E
026493,000122: 21,3536 57411 XCH E
026494,000123: 21,3537 41424 CS EDOTR
026495,000124: 21,3540 57424 XCH EDOTR
026496,000125: 21,3541 43571 CS NEGD
026497,000126: 21,3542 13503 TCF GCOMPUTR
026498,000127:
026499,000128: 21,3543 37767 UZEROR CAF ZERO
026500,000129: 21,3544 55504 TS URGENCYR
026501,000130:
026502,000131: 21,3545 10064 URGRECT CCS ITEMP4 # DR = ITEMP4, NON-ZERO
026503,000132: 21,3546 41504 CS URGENCYR # DR POS = POSR JETS = URGENCY NEG
026504,000133: 21,3547 55504 TS URGENCYR # URGENCYR NEGATIVE
026505,000134:
026506,000135: 21,3550 10063 CCS ITEMP3 # DQ = ITEMP3, NON-ZERO
026507,000136: 21,3551 41502 CS URGENCYQ # DQ POS = POSR JETS = NEGATIVE URGENCY
026508,000137: 21,3552 55502 TS URGENCYQ
026509,000138:
026510,000139: 21,3553 33572 CAF RESADR # RESADR = JETSON AFTER POLICY LOCATION
026511,000140: 21,3554 54062 TS TJETADR
026512,000141:
026513,000142: 21,3555 37744 CAF NEG1/2 # SET URGLIMIT = NEGMAX FOR ONLY
026514,000143: 21,3556 54066 TS URGLIMIT # 2 JET RESPONSE
026515,000144: 21,3557 55673 TS NJ-U # SET JETS FOR NO OFFSET CORRECTION
026516,000145: 21,3560 55672 TS NJ+U
026517,000146: 21,3561 55675 TS NJ-V
026518,000147: 21,3562 55674 TS NJ+V
026519,000148:
026520,000149: 21,3563 00006 EXTEND
026521,000150: 21,3564 33567 DCA URGAXADR
026522,000151: 21,3565 52006 DTCB
026523,000152:
026524,000153: 21,3566 E6,1416 EBANK= OMEGAQ
026525,000154: 21,3566 03154 36066 URGAXADR 2CADR URGPLANE
026526,000155:
026527,000156: 21,3570 00016 ACONST OCTAL 00016
026528,000157: 21,3571 77511 NEGD DEC -0.0111
026529,000158: 21,3572 03730 RESADR REMADR JETSON # JETSON IS IN Q,R TJETLAW
026530,000159:
Page 632 |
026532,000161: # THE TRYGTS CODING IS AN EXTENSION OF THE Q,R-AXES REACTION CONTROL SYSTEM AUTOPILOT. TRYGTS CALLS UPON THE GTS
026533,000162: # CODING WHENEVER Q,R-AXIS CONTROL FINDS ITSELF ENTERING A COAST REGION WITH JETS OFF.
026534,000163:
026535,000164: 21,3573 E6,1542 EBANK= DT
026536,000165: 21,3573 37762 TRYGTS CAF USEQRJTS # IS JET USE MANDATORY.
026537,000166: 21,3574 70077 MASK DAPBOOLS
026538,000167: 21,3575 10000 CCS A
026539,000168: 21,3576 15733 TCF RESUME # YES. RESUME.
026540,000169:
026541,000170: 21,3577 00006 EXTEND # NO. CALL IN GTS, IF POSSIBLE.
026542,000171: 21,3600 00012 READ 12
026543,000172: 21,3601 73617 MASK BGIM21 # ARE GIMBALS STILL DRIVING.
026544,000173: 21,3602 10000 CCS A
026545,000174: 21,3603 15733 TCF RESUME # GIMBALS STILL DRIVING. TRY AGAIN LATER.
026546,000175:
026547,000176: 21,3604 46311 GOTOGTS CS THREE # GIMBALS STOPPED. RESET TIME5 COUNTER
026548,000177: 21,3605 26030 ADS TIME5 # FROM 20 MS TO 50 MS.
026549,000178: 21,3606 00006 EXTEND # NEXT T5RUPT IN 50 MS IS PAXIS.
026550,000179: 21,3607 32100 DCA PAX/FILT
026551,000180: 21,3610 53001 DXCH T5ADR
026552,000181:
026553,000182: 21,3611 13404 INSRT21A TCF TESTCNTR # DETERMINE WHAT TO PUT IN PASSCTR.
026554,000183: 21,3612 55736 LOADCNTR TS PASSCTR # NMBR PASSES REQUIRED TO WARM UP FILTER
026555,000184: 21,3613 00006 EXTEND
026556,000185: 21,3614 33621 DCA RATEINAD # NEXT T5RUPT AFTER NEXT PAXIS IS RATEINIT
026557,000186: 21,3615 53573 DXCH PFILTADR # CONTROL FLOW SWITCH CELL FOR PAXIS RUPT.
026558,000187: 21,3616 15733 TCF RESUME
026559,000188:
026560,000189: 21,3617 07400 BGIM21 OCT 07400 # TRIM GIMBAL BITS IN CHANNEL 12 ARE 9-12.
026561,000190: 21,3620 E6,1542 EBANK= DT
026562,000191: 21,3620 03622 42066 RATEINAD 2CADR RATEINIT # RATE INITIALIZATION FOR KALMAN FILTER.
026563,000192:
Page 633 |
026565,000194: 21,3622 33645 RATEINIT CAF FILTMS50 # RESET TIMER IMMEDIATELY DT = 50 MS.
026566,000195: 21,3623 54030 TS TIME5
026567,000196:
026568,000197: 21,3624 22016 LXCH BANKRUPT # INTERRUPT LEAD-IN (CONTINUED)
026569,000198: 21,3625 00006 EXTEND
026570,000199: 21,3626 22012 QXCH QRUPT
026571,000200:
026572,000201: 21,3627 00006 EXTEND # FILTINIT WILL BE NEXT T5RUPT, IN 50 MS.
026573,000202: 21,3630 33644 DCA FILINADR
026574,000203: 21,3631 53001 DXCH T5ADR
026575,000204:
026576,000205: 21,3632 33635 CA BACKHOME # ESTABLISH RETURN SWITCH FROM THE PROCESS
026577,000206: 21,3633 55544 TS STEERADR # OF READING CDUY,Z AND TIMER. TO BE USED
026578,000207: 21,3634 12042 TCF FILSTART +1 # IN FILTINIT FOR RATE INITIALIZATION
026579,000208:
026580,000209: 21,3635 03636 BACKHOME GENADR BACKHOME +1
026581,000210:
026582,000211: 21,3636 23543 LXCH DAPTIME # RETURN HERE TO STORE DATA JUST DESCRIBED
026583,000212: 21,3637 00006 EXTEND
026584,000213: 21,3640 31541 DCA STORCDUY # IN 2S COMPLEMENT, SCALED AT PI
026585,000214: 21,3641 53741 DXCH HOLDCDUY # HOLD FOR RATE DERIVATION
026586,000215: 21,3642 15733 TCF RESUME
026587,000216:
026588,000217: 21,3643 E6,1542 EBANK= DT
026589,000218: 21,3643 02000 42066 FILINADR 2CADR FILTINIT
026590,000219:
026591,000220: 21,3645 37773 FILTMS50 OCT 37773 # 50 MS CONSTANT FOR TIME5
026592,000221:
026593,000222: 21,3646 03647 HOMAGAIN GENADR HOMAGAIN +1
026594,000223: 21,3647 37763 CA BIT1 # SET UP RATE CALCULATION LOOP, Z AXIS 1ST
026595,000224: 21,3650 54066 HOMELOOP TS QRCNTR
026596,000225: 21,3651 60000 DOUBLE
026597,000226: 21,3652 54061 TS KCENTRAL
026598,000227: 21,3653 50066 INDEX QRCNTR
026599,000228: 21,3654 31540 CA STORCDUY # 2S COMPLEMENT AT PI
026600,000229: 21,3655 00006 EXTEND
026601,000230: 21,3656 50066 INDEX QRCNTR
026602,000231: 21,3657 21740 MSU HOLDCDUY # DIFFERENCE IN 1S COMPLEMENT, AT PI
026603,000232: 21,3660 00006 EXTEND
026604,000233: 21,3661 77756 MP BIT6 # DIFFERENCE IN L, AT PI/2(5)
026605,000234: 21,3662 56001 XCH L # ZERO L, PREPARE FOR DIVISION BY DT
026606,000235: 21,3663 00006 EXTEND
026607,000236: 21,3664 11542 DV DT # DT IS AT 1/8, SO RATE IS AT PI/4
026608,000237: 21,3665 50061 INDEX KCENTRAL
026609,000238: 21,3666 53560 DXCH DCDUYFIL # STORE S.P. INITIAL RATE ESTIMATE
026610,000239: 21,3667 10066 CCS QRCNTR # ARE BOTH RATES DONE YET.
026611,000240: 21,3670 13650 TCF HOMELOOP # NO. NOW DO Y AXIS
026612,000241: 21,3671 33674 CA ORDINARY # YES. SET SWITCH FOR NORMAL OPERATION
Page 634 |
026614,000243: 21,3672 55742 TS STEERAD2
026615,000244: 21,3673 12323 TCF FILFIRST +1
026616,000245: 21,3674 02075 ORDINARY GENADR PAX/FILT -2
026617,000246:
026618,000247: 21,3675 37767 CLEARCH5 CAF ZERO # TURN OFF Q,R-AXES RCS JETS.
026619,000248: 21,3676 00006 EXTEND
026620,000249: 21,3677 01005 WRITE 5
026621,000250: 21,3700 33646 CAF HOMAGAIN # SET UP TO PREVENT FILTERING DURING THE
026622,000251: 21,3701 55742 TS STEERAD2 # INITIALIZATION.
026623,000252: 21,3702 12042 TCF FILSTART +1 # T6JOBCHK NOT NEEDED. CHANNEL 5 ZEROED.
026624,000253:
026625,000254: 21,3703 53575 COUNTDWN DXCH PFRPTLST # FINISH CYCLING POST RUPT LIST.
026626,000255:
026627,000256: 21,3704 11736 CCS PASSCTR # DECREMENT PASSCTR.
026628,000257: 21,3705 55736 TS PASSCTR
026629,000258: 21,3706 12041 TCF FILSTART
026630,000259:
026631,000260: 21,3707 55542 TIMEDONE TS DT # DT STORED. SCALED AT 1/8.
026632,000261: 21,3710 01742 TC STEERAD2 # BYPASS FILTERING DURING INITIALIZATION.
026633,000262: 21,3711 12075 TCF PAX/FILT -2
026634,000263:
026635,000264: 21,3712 33720 USUALXIT CA GOQADR
026636,000265: 21,3713 55737 TS SLECTLAW # SET LOOP EXIT FOR SIMPLE CONTROL OR NOT.
026637,000266: 21,3714 13005 TCF GTSQAXIS
026638,000267:
026639,000268: 21,3715 11736 TESTPCTR CCS PASSCTR # EITHER ZERO (+) , OR POSITIVE
026640,000269: 21,3716 13722 TCF SIMPCTRL # USE SIMPLE CONTROL - NULLIFY ALPHA.
026641,000270: 21,3717 12731 TCF RCSCNTRL # TO TO Q,R JETS.
026642,000271:
026643,000272: 21,3720 03003 GOQADR GENADR GOQTRIMG
026644,000273: 21,3721 03726 SIMPQADR GENADR SIMPQTRG
026645,000274:
026646,000275: 21,3722 33721 SIMPCTRL CA SIMPQADR # SET UP 2ND PASS THROUGH CONTROL LOOP.
026647,000276: 21,3723 55737 TS SLECTLAW
026648,000277: 21,3724 37762 CAF TWO # SET UP INDEX FOR 1ST PASS THROUGH SIM
026649,000278: 21,3725 13727 TCF SIMPLOOP # PLE CONTROL LAW. (R-AXIS)
026650,000279: 21,3726 37767 SIMPQTRG CAF ZERO # SET INDEX FOR Q-AXIS
026651,000280: 21,3727 54066 SIMPLOOP TS QRCNTR
026652,000281: 21,3730 50066 INDEX QRCNTR
026653,000282: 21,3731 11417 CCS ALPHAQ # CHOOSE DRIVE TO NULL ALPHA
026654,000283: 21,3732 37763 CA BIT1
026655,000284: 21,3733 13176 TCF POSDRIVE
026656,000285: 21,3734 47763 CS BIT1
026657,000286: 21,3735 13176 TCF POSDRIVE # DRIVE BITS GO TO THE CHANNEL
026658,000287:
Page 635 |
026660,000289: # START CODING FOR MODULE 3 REMAKE, AUGUST 1967***START CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
026661,000290:
026662,000291: # FROM GTS: WHEN TRIMCNTR ACTIVE, DO SIMPCTRL IF THE FILTER IS NOT WARM
026663,000292: # AND DO A TGOFF DRIVE IF IT IS.
026664,000293:
026665,000294: 21,3736 11764 CHKCNTR CCS SIMPCNTR # CHOOSE SIMPCTRL OR NORMAL GTS CONTROL.
026666,000295: 21,3737 13715 TCF TESTPCTR # SIMPCTRL UNTIL PASSCTR IS ZERO,THEN EXIT
026667,000296: 21,3740 13743 TCF NORMCTRL # NORMAL GTS CONTROL.
026668,000297: 21,3741 04736 TC CCSHOLE
026669,000298: 21,3742 04736 TC CCSHOLE
026670,000299:
026671,000300: 21,3743 37763 NORMCTRL CAF BIT1 # RETURN TO NORMAL GTS CONTROL.
026672,000301: 21,3744 12701 TCF INSERT21 +1
026673,000302:
026674,000303: # FROM CHEKDRIV: ALLOW TGOFFCAL DRIVES AND DISABLE SPECIAL GTS INDICATORS
026675,000304:
026676,000305: 21,3745 03307 WARMFILT TC TGOFFCAL # (A= 0, INDEX FOR Q-AXIS IN TGOFFCAL)
026677,000306: 21,3746 37745 CAF NEGMAX # RETURN HERE FOR NO Q DRIVE.
026678,000307: 21,3747 54063 TS ITEMP3 # RETURN HERE WITH TIME IN A (DECASECONDS)
026679,000308:
026680,000309: 21,3750 37762 CAF TWO # INDEX FOR R-AXIS.
026681,000310: 21,3751 03307 TC TGOFFCAL
026682,000311: 21,3752 37745 CAF NEGMAX # RETURN HERE FOR NO R DRIVE.
026683,000312: 21,3753 54001 TS L # RETURN HERE WITH TIME IN A (DECASECONDS)
026684,000313: 21,3754 30063 CAE ITEMP3
026685,000314: 21,3755 53754 DXCH QGIMTIMR # SET TIMERS SIMULTANEOUSLY FOR RESTART
026686,000315: # PROTECTION.
026687,000316: 21,3756 03243 TC WRCHN12 # START DRIVES
026688,000317:
026689,000318: 21,3757 11744 CCS TRIMCNTR # DEACTIVATE TRIMCNTR IF IT HAS REACHED -0
026690,000319: 21,3760 13765 TCF +5
026691,000320: 21,3761 04736 TC CCSHOLE
026692,000321: 21,3762 13765 TCF +3
026693,000322: 21,3763 37745 CAF NEGMAX
026694,000323: 21,3764 55744 TS TRIMCNTR
026695,000324: 21,3765 37767 +5 CAF ZERO # DEACTIVATE GTSMNITR NOW THAT TGOFFCAL
026696,000325: 21,3766 55745 TS GTSMNITR # HAS BEEN DONE
026697,000326: 21,3767 15727 TCF TASKOVER
026698,000327:
026699,000328: # **END CODING FOR MODULE 3 REMAKE, AUGUST 1967*****END CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************
026700,000329:
026701,000330: 21,3770 37777 CHKSUM21 OCT 37777
End of include-file SPS_BACK-UP_RCS_CONTROL.agc. Parent file is MAIN.agc