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