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:
|
018940,000002: ## Copyright: Public domain.
018941,000003: ## Filename: S-BAND_ANTENNA_FOR_LM.agc
018942,000004: ## Purpose: A section of an attempt to reconstruct Sundance revision 306
018943,000005: ## as closely as possible with available information. Sundance
018944,000006: ## 306 is the source code for the Lunar Module's (LM) Apollo
018945,000007: ## Guidance Computer (AGC) for Apollo 9. This program was created
018946,000008: ## using the mixed-revision SundanceXXX as a starting point, and
018947,000009: ## pulling back features from Luminary 69 believed to have been
018948,000010: ## added based on memos, checklists, observed address changes,
018949,000011: ## or the Sundance GSOPs.
018950,000012: ## Assembler: yaYUL
018951,000013: ## Contact: Ron Burkey <info@sandroid.org>.
018952,000014: ## Website: www.ibiblio.org/apollo/index.html
018953,000015: ## Mod history: 2020-07-24 MAS Created from SundanceXXX.
018954,000016:
018955,000017:
018956,000018:
018957,000019: # SUBROUTINE NAME: R05 - S-BAND ANTENNA FOR LM
018958,000020:
018959,000021: # MOD0 BY T. JAMES
018960,000022: # MOD1 BY P. SHAKIR
018961,000023:
018962,000024: # FUNCTIONAL DESCRIPTION
018963,000025:
018964,000026: # THE S-BAND ANTENNA ROUTINE, R05, COMPUTES AND DISPLAYS THE PITCH AND
018965,000027: # YAW ANTENNA GIMBAL ANGLES REQUIRED TO POINT THE LM STEERABLE ANTENNA
018966,000028: # TOWARD THE CENTER OF THE EARTH. THIS ROUTINE IS SELECTED BY THE ASTRO-
018967,000029: # NAUT VIA DSKY ENTRY DURING COASTING FLIGHT OR WHEN THE LM IS ON THE MOON
018968,000030: # SURFACE. THE EARTH OR MOON REFERENCE COORDINATE SYSTEM IS USED DEPENDING
018969,000031: # ON WHETHER THE LM IS ABOUT TO ENTER OR HAS ALREADY ENTERED THE MOON
018970,000032: # SPHERE OF INFLUENCE, RESPECTIVELY
018971,000033:
018972,000034: # TO CALL SUBROUTINE, ASTRONAUT KEYS IN V 64 E
018973,000035:
018974,000036: # SUBROUTINES CALLED-
018975,000037: # R02BOTH
018976,000038: # INTPRET
018977,000039: # LOADTIME
018978,000040: # LEMCONIC
018979,000041: # LUNPOS
018980,000042: # CDUTRIG
018981,000043: # *SMNB*
018982,000044: # BANKCALL
018983,000045: # B5OFF
018984,000046: # ENDOFJOB
018985,000047: # BLANKET
018986,000048:
018987,000049: # RETURNS WITH
018988,000050: # PITCH ANGLE IN PITCHANG REV. B0
018989,000051: # YAW ANGLE IN YAWANG REV. B0
018990,000052:
018991,000053: # ERASABLES USED
018992,000054: # PITCHANG
018993,000055: # YAWANG
018994,000056: # RLM
018995,000057: # VAC AREA
018996,000058:
018997,000059: 41,3724 BANK 41
018998,000060: 42,2000 SETLOC SBAND
018999,000061: 42,2000 BANK
019000,000062:
019001,000063: 42,3563 E7,1456 EBANK= WHOCARES
019002,000064: 42,3563 COUNT* $$/R05
019003,000065: 42,3563 35022 SBANDANT CAF BIT5
019004,000066: 42,3564 27045 ADS EXTVBACT
019005,000067: 42,3565 04655 TC BANKCALL
019006,000068: 42,3566 11067 CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
019007,000069: 42,3567 06014 TC INTPRET
019008,000070: 42,3570 45034 RTB CALL
019009,000071: 42,3571 21454 LOADTIME # PICK UP CURRENT TIME
019010,000072: 42,3572 47335 CDUTRIG
019011,000073: 42,3573 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
019012,000074: 42,3574 27051 LEMCONIC # USING CONIC INTEGRATION
019013,000075: 42,3575 77775 VLOAD
019014,000076: 42,3576 00001 RATT
019015,000077: 42,3577 02213 STORE RLM
019016,000078: 42,3600 77745 DLOAD
019017,000079: 42,3601 00015 TAT
019018,000080: 42,3602 77624 CONV3 CALL
019019,000081: 42,3603 33236 LUNPOS # UNIT POSITION VECTOR FROM EARTH TO MOON
019020,000082: 42,3604 57455 VAD VCOMP
019021,000083: 42,3605 02213 RLM
019022,000084: 42,3606 76521 MXV VSL1 # TRANSFORM REF. COORDINATE SYSTEM TO
019023,000085: 42,3607 01736 REFSMMAT # STABLE MEMBER B-1 X B-1 X B+1 = B-1
019024,000086: 42,3610 71206 PUSH DLOAD # 8D
019025,000087: 42,3611 06233 HI6ZEROS
019026,000088: 42,3612 02207 STORE PITCHANG
019027,000089: 42,3613 26211 STOVL YAWANG # ZERO OUT ANGLES
019028,000090: 42,3614 02213 RLM
019029,000091: 42,3615 77624 CALL
019030,000092: 42,3616 47477 *SMNB*
019031,000093: 42,3617 02213 STORE RLM # PRE-MULTIPLY RLM BY (NBSA) MATRIX(B0)
019032,000094: 42,3620 63256 UNIT PDVL
019033,000095: 42,3621 02213 RLM
019034,000096: 42,3622 72431 VPROJ VSL2 # PROJECTION OF R ONTO LM XZ PLANE
019035,000097: 42,3623 06227 HIUNITY
019036,000098: 42,3624 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF ON
019037,000099: 42,3625 02213 RLM
019038,000100: 42,3626 65627 COVCNV
019039,000101: 42,3627 40056 COVCNV UNIT BOV # EXIT ON OVERFLOW
019040,000102: 42,3630 65707 SBANDEX
019041,000103: 42,3631 47206 PUSH VXV # URP VECTOR B-1
019042,000104: 42,3632 06225 HIUNITZ
019043,000105: 42,3633 57572 VSL1 VCOMP # UZ X URP = -(URP X UZ)
019044,000106: 42,3634 02213 STORE RLM # X VEC B-1
019045,000107: 42,3635 77646 ABVAL
019046,000108: 42,3636 26207 STOVL PITCHANG
019047,000109: 42,3637 02213 RLM
019048,000110: 42,3640 72441 DOT SL1 # SGN(X.UY) UNSCALED
019049,000111: 42,3641 06227 HIUNITY
019050,000112: 42,3642 16213 STODL RLM
019051,000113: 42,3643 02207 PITCHANG
019052,000114: 42,3644 67565 SIGN ASIN # ASIN((SGN(X.UY))ABV(X)) REV B0
019053,000115: 42,3645 02213 RLM
019054,000116: 42,3646 26207 STOVL PITCHANG
019055,000117: 42,3647 00017 URP
019056,000118: 42,3650 72441 DOT SL1
019057,000119: 42,3651 06225 HIUNITZ
019058,000120: 42,3652 71244 BPL DLOAD
019059,000121: 42,3653 65660 NOADJUST # YES, -90 TO +90
019060,000122: 42,3654 06231 HIDPHALF
019061,000123: 42,3655 77625 DSU
019062,000124: 42,3656 02207 PITCHANG
019063,000125: 42,3657 02207 STORE PITCHANG
019064,000126: 42,3660 47375 NOADJUST VLOAD VXV
019065,000127: 42,3661 00011 UR # Z = (UR X URP)
019066,000128: 42,3662 00017 URP
019067,000129: 42,3663 77772 VSL1
019068,000130: 42,3664 02213 STORE RLM # Z VEC B-1
019069,000131: 42,3665 73545 DLOAD SIN
019070,000132: 42,3666 02207 PITCHANG
019071,000133: 42,3667 76561 VXSC VSL1
019072,000134: 42,3670 06225 HIUNITZ
019073,000135: 42,3671 14011 STODL UR
019074,000136: 42,3672 02207 PITCHANG
019075,000137: 42,3673 74346 COS VXSC
019076,000138: 42,3674 06231 HIUNITX # (UX COS ALPHA) - (UZ SIN ALPHA)
019077,000139: 42,3675 52372 VSL1 VSU
019078,000140: 42,3676 00011 UR
019079,000141: 42,3677 72441 DOT SL1 # YAW.Z
019080,000142: 42,3700 02213 RLM
019081,000143: 42,3701 24011 STOVL UR
019082,000144: 42,3702 02213 RLM
019083,000145: 42,3703 75246 ABVAL SIGN
019084,000146: 42,3704 00011 UR
019085,000147: 42,3705 77736 ASIN
019086,000148: 42,3706 02211 STORE YAWANG
019087,000149: 42,3707 77776 SBANDEX EXIT
019088,000150: 42,3710 33725 CAF V06N51 # DISPLAY ANGLES
019089,000151: 42,3711 04655 TC BANKCALL
019090,000152: 42,3712 20245 CADR GOMARKFR
019091,000153: 42,3713 05645 TC B5OFF # TERMINATE
019092,000154: 42,3714 05225 TC ENDOFJOB # PROCEED
019093,000155: 42,3715 05225 TC ENDOFJOB # RECYCLE
019094,000156: 42,3716 35024 CAF BIT3 # IMMEDIATE RETURN
019095,000157: 42,3717 05556 TC BLANKET # BLANK R3
019096,000158: 42,3720 31045 CA EXTVBACT
019097,000159: 42,3721 75022 MASK BIT5 # IS BIT5 STILL ON
019098,000160: 42,3722 00006 EXTEND
019099,000161: 42,3723 15564 BZF ENDEXT # NO
019100,000162: 42,3724 03565 TC SBANDANT +2 # YES, CONTINUE DISPLAYING ANGLES
019101,000163: 42,3725 01463 V06N51 VN 0651
019102,000164:
019103,000165: 42,3726 UR EQUALS 8D
019104,000166: 42,3726 URP EQUALS 14D
019105,000167: 42,3726 30,2000 SBANK= LOWSUPER
End of include-file S-BAND_ANTENNA_FOR_LM.agc. Parent file is MAIN.agc