Source Code
These source-code files are part of a reconstructed copy of Luminary 163, the
first (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with reconstructed source code for Luminary 173. Changes between revision 163 and 173 were backed out, as described by Luminary memos 157 and 158. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 163 listing would be different. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. |
014541,000002: ## Copyright: Public domain.
014542,000003: ## Filename: R63.agc
014543,000004: ## Purpose: A section of Luminary revision 163.
014544,000005: ## It is part of the reconstructed source code for the first
014545,000006: ## (unflown) release of the flight software for the Lunar
014546,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
014547,000008: ## The code has been recreated from a reconstructed copy of
014548,000009: ## Luminary 173, as well as Luminary memos 157 amd 158.
014549,000010: ## It has been adapted such that the resulting bugger words
014550,000011: ## exactly match those specified for Luminary 163 in NASA
014551,000012: ## drawing 2021152N, which gives relatively high confidence
014552,000013: ## that the reconstruction is correct.
014553,000014: ## Reference: pp. 343-346
014554,000015: ## Assembler: yaYUL
014555,000016: ## Contact: Ron Burkey <info@sandroid.org>.
014556,000017: ## Website: www.ibiblio.org/apollo/index.html
014557,000018: ## Mod history: 2019-08-21 MAS Created from Luminary 173.
014558,000019:
Page 343 |
014560,000021: # SUBROUTINE NAME: V89CALL
014561,000022: # MOD NO: 0 DATE: 9 JAN 1968
014562,000023: # MOD BY: DIGITAL DEVEL GROUP LOG SECTION: R63
014563,000024:
014564,000025: # FUNCTIONAL DESCRIPTION:
014565,000026:
014566,000027: # CALLED BY VERB 89 ENTER DURING P00. PRIO 10 USED. CALCULATES AND
014567,000028: # DISPLAYS FINAL FDAI BALL ANGLES TO POINT LM +X OR +Z AXIS AT CSM.
014568,000029:
014569,000030: # 1. KEY IN V 89 E ONLY IF IN PROG 00. IF NOT IN P00, OPERATOR ERROR AND
014570,000031: # EXIT R63, OTHERWISE CONTINUE.
014571,000032:
014572,000033: # 2. IF IN P00, DO IMU STATUS CHECK ROUTINE (R02BOTH). IF IMU ON AND ITS
014573,000034: # ORIENTATION KNOWN TO LGC, CONTINUE.
014574,000035:
014575,000036: # 3. FLASH DISPLAY V 04 N 06. R2 INDICATES WHICH SPACECRAFT AXIS IS TO
014576,000037: # BE POINTED AT CSM. INITIAL CHOICE IS PREFERRED (+Z) AXIS (R2=1).
014577,000038: # ASTRONAUT CAN CHANGE TO (+X) AXIS (R2 NOT = 1) BY V 22 E 2 E. CONTINUE
014578,000039: # AFTER KEYING IN PROCEED.
014579,000040:
014580,000041: # 4. BOTH VEHICLE STATE VECTORS UPDATED BY CONIC EQS.
014581,000042:
014582,000043: # 5. HALF MAGNITUDE UNIT LOS VECTOR (IN STABLE MEMBER COORDINATES) AND
014583,000044: # HALF MAGNITUDE UNIT SPACECRAFT AXIS VECTOR (IN BODY COORDINATES)
014584,000045: # PREPARED FOR VECPOINT.
014585,000046:
014586,000047: # 6. GIMBAL ANGLES FROM VECPOINT TRANSFORMED INTO FDAI BALL ANGLES BY
014587,000048: # BALLANGS. FLASH DISPLAY V 06 N 18 AND AWAIT RESPONSE.
014588,000049:
014589,000050: # 7. RECYCLE - RETURN TO STEP 4.
014590,000051: # TERMINATE - EXIT R63.
014591,000052: # PROCEED - RESET 3AXISFLG AND CALL R60LEM FOR ATTITUDE MANEUVER.
014592,000053:
014593,000054:
014594,000055: # CALLING SEQUENCE: V 89 E.
014595,000056:
014596,000057: # SUBROUTINES CALLED: CHKPOOH, R02BOTH, GOXDSPF, CSMCONIC, LEMCONIC,
014597,000058: # VECPOINT, BALLANGS, R60LEM.
014598,000059:
014599,000060: # NORMAL EXIT MODES: TC ENDEXT
014600,000061:
014601,000062: # ALARMS: 1. OPERATOR ERROR IF NOT IN P00.
014602,000063: # 2. PROGRAM ALARM IF IMU IS OFF.
014603,000064: # 3. PROGRAM ALARM IF IMU ORIENTATION IS UNKNOWN.
014604,000065:
014605,000066: # OUTPUT: NONE
014606,000067:
014607,000068: # ERASABLE INITIALIZATION REQUIRED: NONE
014608,000069:
014609,000070: # DEBRIS: OPTION1, +1, TDEC1, POINTVSM, SCAXIS, CPHI, CTHETA, CPSI,
014610,000071:
Page 344 |
014612,000073: # 3AXISFLG.
014613,000074:
014614,000075: 06,3723 E4,1606 EBANK= RONE
014615,000076: 32,2217 BANK 32
014616,000077: 26,2000 SETLOC BAWLANGS
014617,000078: 26,2000 BANK
014618,000079:
014619,000080:
014620,000081: 26,2024 COUNT* $$/R63
014621,000082: 26,2024 04616 V89CALL TC BANKCALL # IMU STATUS CHECK. RETURNS IF ORIENTATION
014622,000083: 26,2025 11241 CADR R02BOTH # KNOWN. ALARMS IF NOT.
014623,000084: 26,2026 36250 CAF THREE # ALLOW ASTRONAUT TO SELECT DESIRED
014624,000085: 26,2027 55050 TS OPTIONX # TRACKING ATTITUDE AXIS.
014625,000086: 26,2030 34753 CAF ONE
014626,000087: 26,2031 55051 TS OPTIONX +1
014627,000088: 26,2032 32121 CAF VB04N12 # V 04 N 12
014628,000089: 26,2033 04616 TC BANKCALL
014629,000090: 26,2034 20477 CADR GOFLASH
014630,000091: 26,2035 05503 TC ENDEXT # TERMINATE
014631,000092: 26,2036 02040 TC +2 # PROCEED
014632,000093: 26,2037 02032 TC -5 # DATA IN. OPTION1+1 = 1 FOR Z AXIS
014633,000094: 26,2040 06042 V89RECL TC INTPRET # = 2 FOR X AXIS
014634,000095: 26,2041 43234 RTB DAD
014635,000096: 26,2042 21574 LOADTIME # READ PRESENT TIME
014636,000097: 26,2043 14124 DP1MIN
014637,000098: 26,2044 02205 STORE TSTART82 # SAVE TIME FOR LEMCONIC CALL
014638,000099: 26,2045 34041 STCALL TDEC1 # STORE TIME FOR CSMCONIC CALL
014639,000100: 26,2046 27065 CSMCONIC # CSM STATE VECTOR UPDATE
014640,000101: 26,2047 77775 VLOAD # CSMCONIC LEFT R VECTOR IN RATT
014641,000102: 26,2050 00001 RATT
014642,000103: 26,2051 16207 STODL RONE # SAVE FOR LINE OF SIGHT (LOS) COMPUTATION
014643,000104: 26,2052 02205 TSTART82
014644,000105: 26,2053 34041 STCALL TDEC1 # STORE TIME FOR LEMCONIC CALL
014645,000106: 26,2054 27077 LEMCONIC # LEM STATE VECTOR UPDATE
014646,000107: 26,2055 52375 VLOAD VSU # CSM POSITION - LEM POSITION = LOS
014647,000108: 26,2056 02207 RONE # LOS VECTOR LEFT IN MPAC
014648,000109: 26,2057 00001 RATT
014649,000110: 26,2060 47121 MXV RTB # (REFSMMAT X LOS). TRANSFORMS LOS FROM
014650,000111: 26,2061 01732 REFSMMAT # REFERENCE COORD TO STAB MEMB COORD.
014651,000112: 26,2062 21727 NORMUNIT
014652,000113: 26,2063 03773 STORE POINTVSM # STORE LOS FOR VECPOINT CALL
014653,000114: 26,2064 77776 EXIT
014654,000115: 26,2065 41051 CS OPTIONX +1 # 1 FOR Z AXIS. 2 FOR X AXIS.
014655,000116: 26,2066 64753 AD ONE
014656,000117: 26,2067 00006 EXTEND
014657,000118: 26,2070 12115 BZF ALINEZ
014658,000119: 26,2071 06042 ALINEX TC INTPRET # X AXIS ALIGNMENT
014659,000120: 26,2072 77775 VLOAD
014660,000121: 26,2073 06516 UNITX # READ (.5, 0, 0)
014661,000122:
Page 345 |
014663,000124: 26,2074 37765 V89CALL1 STCALL SCAXIS # STORE SELECTED ALIGNMENT AXIS
014664,000125: 26,2075 56040 VECPOINT # PUTS DESIRED GIM ANG (OG,IG,MG) IN TMPAC
014665,000126: 26,2076 00322 STORE CPHI # STORE GIMBAL ANGLES FOR BALLANGS CALL.
014666,000127: 26,2077 77776 EXIT
014667,000128: 26,2100 04616 TC BANKCALL
014668,000129: 26,2101 54274 CADR BALLANGS # PUTS DESIRED BALL ANGLES IN FDAIX,Y,Z
014669,000130: 26,2102 32122 CAF VB06N18 # V 06 N 18
014670,000131: 26,2103 04616 TC BANKCALL # NOUN 18 REFERS TO FDAIX,Y,Z
014671,000132: 26,2104 20477 CADR GOFLASH
014672,000133: 26,2105 05503 TC ENDEXT # TERMINATE
014673,000134: 26,2106 02110 TC +2 # PROCEED
014674,000135: 26,2107 02040 TC V89RECL # RECYCLE
014675,000136: 26,2110 05527 TC DOWNFLAG # RESET 3 AXIS FLAG
014676,000137: 26,2111 00124 ADRES 3AXISFLG # RESET BIT6 FLAG WORD 5
014677,000138: 26,2112 04616 TC BANKCALL # PERFORMS LEM MANEUVER TO ALIGN SELECTED
014678,000139: 26,2113 54125 CADR R60LEM # SPACECRAFT AXIS TO CSM.
014679,000140: 26,2114 15503 TCF ENDEXT # TERMINATE R63
014680,000141:
014681,000142:
014682,000143: 26,2115 06042 ALINEZ TC INTPRET # Z AXIS ALIGNMENT
014683,000144: 26,2116 52175 VLOAD GOTO
014684,000145: 26,2117 06512 UNITZ # READ (0, 0, .5)
014685,000146: 26,2120 54074 V89CALL1
014686,000147:
014687,000148:
014688,000149: 26,2121 01014 VB04N12 VN 412
014689,000150: 26,2122 01422 VB06N18 VN 0618
014690,000151:
Page 346 |
014692,000153: 26,2123 00000 13560 DP1MIN 2DEC 6000 B-28
End of include-file R63.agc. Parent file is MAIN.agc