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. |
035737,000002: ## Copyright: Public domain.
035738,000003: ## Filename: FIND_CDU_DESIRED.agc
035739,000004: ## Purpose: A module for revision 0 of BURST120 (Sunburst). It
035740,000005: ## is part of the source code for the Lunar Module's
035741,000006: ## (LM) Apollo Guidance Computer (AGC) for Apollo 5.
035742,000007: ## Assembler: yaYUL
035743,000008: ## Contact: Ron Burkey <info@sandroid.org>.
035744,000009: ## Website: www.ibiblio.org/apollo/index.html
035745,000010: ## Mod history: 2016-09-30 RSB Created draft version.
035746,000011: ## 2016-10-29 MAS Transcribed.
035747,000012: ## 2016-12-06 RSB Comment-proofing via octopus/ProoferComments;
035748,000013: ## changes were made.
035749,000014:
Page 838 |
035751,000016: # THIS ROUTINE FINDCDUD COMPUTES DESIRED CDU,S WHICH CAN BE FED TO
035752,000017: # DAP LATER ON.
035753,000018: # DESIRED CDU,S WILL BE IN 2,S COMP
035754,000019:
035755,000020: # INPUT
035756,000021:
035757,000022: # DESIRED THRUST VECTOR AXISD COMING FROM GUIDANCE EQUATIONS
035758,000023: # CDUX,CDUY,CDUZ INFORM OF A SP VECTOR CDUTEMP,+2,+4.
035759,000024: # DELV HALF UNIT VECTOR. PIPAS READING
035760,000025: # AXISD IS A HALF UNIT VECTOR
035761,000026: # CDUX,Y,Z ARE IN 2,S COMP
035762,000027:
035763,000028: # THIS ROUTINE CAN BE ENTERED FROM INTERPRETIVE . CALL FINDCDUD
035764,000029:
035765,000030: # CALLING SEQUENCE
035766,000031: # L-1 CALL
035767,000032: # L FINDCDUD
035768,000033: # L+1 INTERPRETIVE RETURN
035769,000034:
035770,000035:
035771,000036:
035772,000037: # USER TO HAVE A UNIT VECTOR AXIS (1,0,0)
035773,000038:
035774,000039:
035775,000040:
035776,000041: 30,2677 BANK 30
035777,000042: 30,2677 E4,1452 EBANK= DELR
035778,000043: 30,2677 24276 14076 2/PI 2DEC .6366198
035779,000044:
035780,000045: 30,2701 00002 00545 LIMOMG 2DEC .0001234
035781,000046:
035782,000047:
035783,000048:
035784,000049: 30,2703 77401 FINDCDUD SETPD EXIT
035785,000050: 30,2704 00001 0
035786,000051: 30,2705 31332 CA CDUTEMP +2
035787,000052: 30,2706 55654 TS SINCDU # TEMPORARY LOCATION FOR CDUY
035788,000053: 30,2707 31334 CA CDUTEMP +4
035789,000054: 30,2710 55656 TS SINCDU +2 # TEMPORARY LOCATION FOR CDUZ
035790,000055: 30,2711 31330 CA CDUTEMP
035791,000056: 30,2712 55660 TS SINCDU +4 # TEMPORARY LOCATION FOR CDUX
035792,000057:
035793,000058:
035794,000059:
035795,000060: # AXISFILT COMPUTES AXIS AND CORRECTS IT FOR QUANTIZATION ERROR AND OTH
035796,000061: # ER ERRORS
035797,000062:
035798,000063:
035799,000064: 30,2713 E6,1422 EBANK= OMEGA
035800,000065: 30,2713 35632 CAF PRIO3 # OCT 03000 SWITCH EBANK
Page 839 |
035802,000067: 30,2714 56003 XCH EBANK
035803,000068: 30,2715 54144 TS MPAC
035804,000069: 30,2716 37767 CAF ZERO
035805,000070: 30,2717 55155 TS TEMX # SQOMEGA
035806,000071: 30,2720 55156 TS TEMX +1 # SQOMEGA +1
035807,000072: 30,2721 00004 INHINT
035808,000073: 30,2722 31415 CAE OMEGAP
035809,000074: 30,2723 00006 EXTEND
035810,000075: 30,2724 70000 SQUARE
035811,000076: 30,2725 21156 DAS TEMX # SQOMEGA
035812,000077: 30,2726 31416 CAE OMEGAQ
035813,000078: 30,2727 00006 EXTEND
035814,000079: 30,2730 70000 SQUARE
035815,000080: 30,2731 21156 DAS TEMX # SQOMEGA
035816,000081: 30,2732 31420 CAE OMEGAR
035817,000082: 30,2733 00006 EXTEND
035818,000083: 30,2734 70000 SQUARE
035819,000084: 30,2735 21156 DAS TEMX # SQOMEGA
035820,000085: 30,2736 00003 RELINT
035821,000086: 30,2737 56144 XCH MPAC
035822,000087: 30,2740 54003 TS EBANK
035823,000088: 30,2741 06112 TC INTPRET
035824,000089: 30,2742 E4,1452 EBANK= DELR
035825,000090: 30,2742 77620 STQ
035826,000091: 30,2743 01304 RETSAVE
035827,000092: 30,2744 45345 AXISFILT DLOAD DSU
035828,000093:
035829,000094:
035830,000095:
035831,000096: 30,2745 01156 TEMX # SQOMEGA
035832,000097: 30,2746 20702 LIMOMG
035833,000098: 30,2747 72044 BPL LXA,1
035834,000099: 30,2750 60774 ROTANGLE
035835,000100: 30,2751 00110 FIXLOC
035836,000101: 30,2752 64110 INCR,1 XCHX,1
035837,000102: 30,2753 00024 20D
035838,000103: 30,2754 00050 S1
035839,000104: 30,2755 77775 VLOAD
035840,000105: 30,2756 02255 SINCDU # TEMPORARY LOCATION FOR CDUY,Z,X IN
035841,000106: 30,2757 00025 STORE 20D # SP 2,S COMP
035842,000107: 30,2760 53575 VLOAD UNIT
035843,000108: 30,2761 00404 DELV
035844,000109: 30,2762 00041 STORE 32D
035845,000110: 30,2763 77624 CALL
035846,000111: 30,2764 32531 SMNB # TRANSFORM DELV FROM SM TO NB
035847,000112: 30,2765 52201 SETPD VSU
035848,000113: 30,2766 00001 0
035849,000114: 30,2767 02241 AXIS
035850,000115: 30,2770 53322 VSR3 VAD
035851,000116: 30,2771 02241 AXIS
035852,000117:
Page 840 |
035854,000119: 30,2772 77656 UNIT
035855,000120: 30,2773 02241 STORE AXIS
035856,000121: 30,2774 62150 ROTANGLE LXA,1 INCR,1
035857,000122: 30,2775 00110 FIXLOC
035858,000123: 30,2776 00024 20D
035859,000124: 30,2777 77320 XCHX,1 VLOAD
035860,000125: 30,3000 00050 S1
035861,000126: 30,3001 02255 SINCDU # TEMPORARY LOCATION FOR CDUY,Z,X IN
035862,000127: 30,3002 00025 STORE 20D # SP 2,S COMP
035863,000128: 30,3003 77775 VLOAD
035864,000129: 30,3004 02241 AXIS
035865,000130: 30,3005 00041 STORE 32D
035866,000131: 30,3006 77624 CALL # TRANSFORM AXIS FROM NB TO SM
035867,000132: 30,3007 32555 NBSM
035868,000133: 30,3010 47201 SETPD VXV
035869,000134: 30,3011 00001 0
035870,000135: 30,3012 02233 AXISD
035871,000136: 30,3013 77761 VXSC
035872,000137: 30,3014 20700 2/PI
035873,000138: 30,3015 00013 STORE 10D # DTHETASM SCALETO ONE REVOLUTION
035874,000139: 30,3016 77624 CALL # COMPUTE SIN AND COS OF CDUS FOR
035875,000140: 30,3017 61064 SINCOSCD # LATER USE
035876,000141:
035877,000142:
035878,000143: # SMCDURES COMPUTES CDU(GIMBAL) ANGLES FROM INCREMENTAL
035879,000144: # CHANGES ABOUT SM AXES. IT REQUIRES SM INCREMENTAL CHANGES
035880,000145: # AS DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4). SIN,COS(CDUX,Y
035881,000146: # ,Z) ARE IN SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY,SCALED TO 2.
035882,000147: # CDU INCREMENTS ARE PLACED IN DCDU,+2,+4 SCALED TO ONE REVOLUTION
035883,000148:
035884,000149:
035885,000150:
035886,000151: 30,3020 41345 SMCDURES DLOAD DMP
035887,000152: 30,3021 00013 10D # DTHETASM
035888,000153: 30,3022 02251 COSCDU +2
035889,000154: 30,3023 41325 PDDL DMP
035890,000155: 30,3024 00017 14D # DTHETASM +4
035891,000156: 30,3025 02257 SINCDU +2
035892,000157: 30,3026 77621 BDSU
035893,000158: 30,3027 77671 DDV
035894,000159: 30,3030 02253 COSCDU +4
035895,000160: 30,3031 00025 STORE 20D # DCDU
035896,000161: 30,3032 72405 DMP SL1 # SCALE
035897,000162: 30,3033 02261 SINCDU +4
035898,000163: 30,3034 77621 BDSU
035899,000164: 30,3035 00015 12D # DTHETASM +2
035900,000165: 30,3036 14027 STODL 22D # DCDU +2
035901,000166: 30,3037 00013 10D
035902,000167: 30,3040 65205 DMP PDDL
035903,000168: 30,3041 02257 SINCDU +2
Page 841 |
035905,000170: 30,3042 00017 14D # DTHETASM +4
035906,000171: 30,3043 43205 DMP DAD
035907,000172: 30,3044 02251 COSCDU +2
035908,000173: 30,3045 77752 SL1 # SCALE
035909,000174: 30,3046 14031 STODL 24D # DCDU +4
035910,000175: 30,3047 00027 22D # DCDU +2
035911,000176: 30,3050 57405 DMP DCOMP
035912,000177: 30,3051 02261 SINCDU +4 # DCDUX =-DCDUY*SIN(CDUZ)
035913,000178: 30,3052 77752 SL1 # SCALE
035914,000179: 30,3053 00025 STORE 20D # DCDU
035915,000180: 30,3054 53375 VLOAD VAD
035916,000181: 30,3055 00025 20D # DCDU
035917,000182: 30,3056 01331 CDUTEMP
035918,000183: 30,3057 77634 RTB
035919,000184: 30,3060 33526 V1STO2S # SCALE FROM 1,S TO 2,S
035920,000185: 30,3061 00767 STORE CDUXD
035921,000186: 30,3062 77650 GOTO
035922,000187: 30,3063 01304 RETSAVE
035923,000188:
035924,000189:
035925,000190: # SINCOSCD COMPUTES SIN AND COS OF CDU AND STORES AS DP VECTORS
035926,000191: # SINCDU ,COSCDU
035927,000192: # INPUT IS CDUS AS A VECTOR CDUTEMP
035928,000193: # OUTPUT IS SIN AND COS OF CDU,S
035929,000194: # CDUS ARE AVAILABLE IN 2,S COMP
035930,000195: # SIN AND COS ARE SCALED TO 2
035931,000196: # SINCOSCD CAN BE ENTERED FROM INTERPRETIVE
035932,000197:
035933,000198:
035934,000199:
035935,000200: 30,3064 76131 SINCOSCD SSP AXT,1 # SET X1 TO 6
035936,000201: 30,3065 00051 S1 # SET S1 TO 2
035937,000202: 30,3066 00002 OCT 2
035938,000203: 30,3067 00006 OCT 6
035939,000204: 30,3070 47133 REPEAT1 SLOAD* RTB
035940,000205: 30,3071 01337 CDUTEMP +6,1
035941,000206: 30,3072 33457 CDULOGIC # CONVERT CDU FROM 2,S TO 1,S. SCALE
035942,000207: 30,3073 05337 STORE CDUTEMP +6,1 # TO ONE REVOLUTION
035943,000208: 30,3074 77756 SIN
035944,000209: 30,3075 06263 STORE SINCDU +6,1
035945,000210: 30,3076 71543 DLOAD* COS
035946,000211: 30,3077 01337 CDUTEMP +6,1
035947,000212: 30,3100 06255 STORE COSCDU +6,1
035948,000213: 30,3101 43500 TIX,1 RVQ
035949,000214: 30,3102 61070 REPEAT1
End of include-file FIND_CDU_DESIRED.agc. Parent file is MAIN.agc