Source Code
These source-code files are part of a reconstructed copy of Luminary 69/2,
the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.
The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation. Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
|
015086,000002: ## Copyright: Public domain.
015087,000003: ## Filename: R63.agc
015088,000004: ## Purpose: A section of LUM69 revision 2.
015089,000005: ## It is part of the reconstructed source code for the flown
015090,000006: ## version of the flight software for the Lunar Module's (LM)
015091,000007: ## Apollo Guidance Computer (AGC) for Apollo 10. The code has
015092,000008: ## been recreated from a copy of Luminary revsion 069, using
015093,000009: ## changes present in Luminary 099 which were described in
015094,000010: ## Luminary memos 75 and 78. The code has been adapted such
015095,000011: ## that the resulting bugger words exactly match those specified
015096,000012: ## for LUM69 revision 2 in NASA drawing 2021152B, which gives
015097,000013: ## relatively high confidence that the reconstruction is correct.
015098,000014: ## Reference: pp. 351-354
015099,000015: ## Assembler: yaYUL
015100,000016: ## Contact: Ron Burkey <info@sandroid.org>.
015101,000017: ## Website: www.ibiblio.org/apollo/index.html
015102,000018: ## Mod history: 2019-07-27 MAS Created from Luminary 69.
015103,000019:
Page 351 |
015105,000021: # SUBROUTINE NAME: V89CALL
015106,000022: # MOD NO: 0 DATE: 9 JAN 1968
015107,000023: # MOD BY: DIGITAL DEVEL GROUP LOG SECTION: R63
015108,000024:
015109,000025: # FUNCTIONAL DESCRIPTION:
015110,000026:
015111,000027: # CALLED BY VERB 89 ENTER DURING P00. PRIO 10 USED. CALCULATES AND
015112,000028: # DISPLAYS FINAL FDAI BALL ANGLES TO POINT LM +X OR +Z AXIS AT CSM.
015113,000029:
015114,000030: # 1. KEY IN V 89 E ONLY IF IN PROG 00. IF NOT IN P00, OPERATOR ERROR AND
015115,000031: # EXIT R63, OTHERWISE CONTINUE.
015116,000032:
015117,000033: # 2. IF IN P00, DO IMU STATUS CHECK ROUTINE (R02BOTH). IF IMU ON AND ITS
015118,000034: # ORIENTATION KNOWN TO LGC, CONTINUE.
015119,000035:
015120,000036: # 3. FLASH DISPLAY V 04 N 06. R2 INDICATES WHICH SPACECRAFT AXIS IS TO
015121,000037: # BE POINTED AT CSM. INITIAL CHOICE IS PREFERRED (+Z) AXIS (R2=1).
015122,000038: # ASTRONAUT CAN CHANGE TO (+X) AXIS (R2 NOT =1) BY V 22 E 2 E. CONTINUE
015123,000039: # AFTER KEYING IN PROCEED.
015124,000040:
015125,000041: # 4. BOTH VEHICLE STATE VECTORS UPDATED BY CONIC EQS.
015126,000042:
015127,000043: # 5. HALF MAGNITUDE UNIT LOS VECTOR (IN STABLE MEMBER COORDINATES) AND
015128,000044: # HALF MAGNITUDE UNIT SPACECRAFT AXIS VECTOR (IN BODY COORDINATES)
015129,000045: # PREPARED FOR VECPOINT.
015130,000046:
015131,000047: # 6. GIMBAL ANGLES FROM VECPOINT TRANSFORMED INTO FDAI BALL ANGLES BY
015132,000048: # BALLANGS. FLASH DISPLAY V 06 N 18 AND AWAIT RESPONSE.
015133,000049:
015134,000050: # 7. RECYCLE - RETURN TO STEP 4.
015135,000051: # TERMINATE - EXIT R63.
015136,000052: # PROCEED - RESET 3AXISFLG AND CALL R60LEM FOR ATTITUDE MANEUVER.
015137,000053:
015138,000054: # CALLING SEQUENCE: V 89 E.
015139,000055:
015140,000056: # SUBROUTINES CALLED: CHKPOOH, R02BOTH, GOXDSPF, CSMCONIC, LEMCONIC,
015141,000057: # VECPOINT, BALLANGS, R60LEM.
015142,000058:
015143,000059: # NORMAL EXIT MODES: TC ENDEXT
015144,000060:
015145,000061: # ALARMS: 1. OPERATOR ERROR IF NOT IN P00.
015146,000062: # 2. PROGRAM ALARM IF IMU IS OFF.
015147,000063: # 3. PROGRAM ALARM IF IMU ORIENTATION IS UNKNOWN.
015148,000064:
015149,000065: # OUTPUT: NONE
015150,000066:
015151,000067: # ERASABLE INITIALIZATION REQUIRED: NONE
015152,000068:
015153,000069: # DEBRIS: OPTION1, +1, TDEC1, POINTVSM, SCAXIS, CPHI, CTHETA, CPSI,
Page 352 |
015155,000071: # 3AXISFLG.
015156,000072:
015157,000073: 06,3715 E4,1612 EBANK= RONE
015158,000074: 32,2227 BANK 32
015159,000075: 26,2000 SETLOC BAWLANGS
015160,000076: 26,2000 BANK
015161,000077:
015162,000078: 26,2000 COUNT* $$/R63
015163,000079: 26,2000 04616 V89CALL TC BANKCALL # IMU STATUS CHECK. RETURNS IF ORIENTATION
015164,000080: 26,2001 11175 CADR R02BOTH # KNOWN. ALARMS IF NOT.
015165,000081: 26,2002 36244 CAF THREE # ALLOW ASTRONAUT TO SELECT DESIRED
015166,000082: 26,2003 55051 TS OPTIONX # TRACKING ATTITUDE AXIS.
015167,000083: 26,2004 34753 CAF ONE
015168,000084: 26,2005 55052 TS OPTIONX +1
015169,000085: 26,2006 32075 CAF VB04N12 # V 04 N 12
015170,000086: 26,2007 04616 TC BANKCALL
015171,000087: 26,2010 20351 CADR GOFLASH
015172,000088: 26,2011 05472 TC ENDEXT # TERMINATE
015173,000089: 26,2012 02014 TC +2 # PROCEED
015174,000090: 26,2013 02006 TC -5 # DATA IN. OPTION1+1 = 1 FOR Z AXIS
015175,000091: 26,2014 06036 V89RECL TC INTPRET # = 2 FOR X AXIS
015176,000092: 26,2015 43234 RTB DAD
015177,000093: 26,2016 21462 LOADTIME # READ PRESENT TIME
015178,000094: 26,2017 14100 DP1MIN
015179,000095: 26,2020 02211 STORE TSTART82 # SAVE TIME FOR LEMCONIC CALL
015180,000096: 26,2021 34041 STCALL TDEC1 # STORE TIME FOR CSMCONIC CALL
015181,000097: 26,2022 27066 CSMCONIC # CSM STATE VECTOR UPDATE
015182,000098: 26,2023 77775 VLOAD # CSMCONIC LEFT R VECTOR IN RATT
015183,000099: 26,2024 00001 RATT
015184,000100: 26,2025 16213 STODL RONE # SAVE FOR LINE OF SIGHT (LOS) COMPUTATION
015185,000101: 26,2026 02211 TSTART82
015186,000102: 26,2027 34041 STCALL TDEC1 # STORE TIME FOR LEMCONIC CALL
015187,000103: 26,2030 27100 LEMCONIC # LEM STATE VECTOR UPDATE
015188,000104: 26,2031 52375 VLOAD VSU # CSM POSITION - LEM POSITION = LOS
015189,000105: 26,2032 02213 RONE # LOS VECTOR LEFT IN MPAC
015190,000106: 26,2033 00001 RATT
015191,000107: 26,2034 47121 MXV RTB # (REFSMMAT X LOS). TRANSFORMS LOS FROM
015192,000108: 26,2035 01734 REFSMMAT # REFERENCE COORD TO STAB MEMB COORD.
015193,000109: 26,2036 21700 NORMUNIT
015194,000110: 26,2037 03767 STORE POINTVSM # STORE LOS FOR VECPOINT CALL
015195,000111: 26,2040 77776 EXIT
015196,000112: 26,2041 41052 CS OPTIONX +1 # 1 FOR Z AXIS. 2 FOR X AXIS.
015197,000113: 26,2042 64753 AD ONE
015198,000114: 26,2043 00006 EXTEND
015199,000115: 26,2044 12071 BZF ALINEZ
015200,000116: 26,2045 06036 ALINEX TC INTPRET # X AXIS ALIGNMENT
015201,000117: 26,2046 77775 VLOAD
015202,000118: 26,2047 06422 UNITX # READ (.5, 0, 0)
Page 353 |
015204,000120: 26,2050 37761 V89CALL1 STCALL SCAXIS # STORE SELECTED ALIGNMENT AXIS
015205,000121: 26,2051 56016 VECPOINT # PUTS DESIRED GIM ANG (OG,IG,MG) IN TMPAC
015206,000122: 26,2052 00322 STORE CPHI # STORE GIMBAL ANGLES FOR BALLANGS CALL.
015207,000123: 26,2053 77776 EXIT
015208,000124: 26,2054 04616 TC BANKCALL
015209,000125: 26,2055 54244 CADR BALLANGS # PUTS DESIRED BALL ANGLES IN FDAIX,Y,Z
015210,000126: 26,2056 32076 CAF VB06N18 # V 06 N 18
015211,000127: 26,2057 04616 TC BANKCALL # NOUN 18 REFERS TO FDAIX,Y,Z
015212,000128: 26,2060 20351 CADR GOFLASH
015213,000129: 26,2061 05472 TC ENDEXT # TERMINATE
015214,000130: 26,2062 02064 TC +2 # PROCEED
015215,000131: 26,2063 02014 TC V89RECL # RECYCLE
015216,000132: 26,2064 05516 TC DOWNFLAG # RESET 3 AXIS FLAG
015217,000133: 26,2065 00124 ADRES 3AXISFLG # RESET BIT6 FLAG WORD 5
015218,000134: 26,2066 04616 TC BANKCALL # PERFORMS LEM MANEUVER TO ALIGN SELECTED
015219,000135: 26,2067 54101 CADR R60LEM # SPACECRAFT AXIS TO CSM.
015220,000136: 26,2070 15472 TCF ENDEXT # TERMINATE R63
015221,000137:
015222,000138: 26,2071 06036 ALINEZ TC INTPRET # Z AXIS ALIGNMENT
015223,000139: 26,2072 52175 VLOAD GOTO
015224,000140: 26,2073 06416 UNITZ # READ (0, 0, .5)
015225,000141: 26,2074 54050 V89CALL1
015226,000142:
015227,000143: 26,2075 01014 VB04N12 VN 412
015228,000144: 26,2076 01422 VB06N18 VN 0618
Page 354 |
015230,000146: 26,2077 00000 13560 DP1MIN 2DEC 6000 B-28
015231,000147:
End of include-file R63.agc. Parent file is MAIN.agc