Source Code
These source-code files are part of a reconstructed copy of Luminary 96, the
original release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer
(AGC) software.
The reconstruction began with reconstructed source code for Luminary 97. Changes between revisions 96 and 97 were backed out, as described by anomal report LNY-59. transcribed from a digitized copy of that program. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 96 listing. 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. |
013722,000002: ## Copyright: Public domain.
013723,000003: ## Filename: R63.agc
013724,000004: ## Purpose: A section of Luminary revision 96.
013725,000005: ## It is part of the reconstructed source code for the
013726,000006: ## original release of the flight software for the Lunar
013727,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
013728,000008: ## The code has been recreated from a previously reconstructed
013729,000009: ## copy of Luminary 97 by undoing changes described in anomaly
013730,000010: ## report LNY-59. The code has been adapted such that the
013731,000011: ## resulting bugger words exactly match those specified for
013732,000012: ## Luminary 96 in NASA drawing 2021152D, which gives relatively
013733,000013: ## high confidence that the reconstruction is correct.
013734,000014: ## Reference: pp. 338-341
013735,000015: ## Assembler: yaYUL
013736,000016: ## Contact: Ron Burkey <info@sandroid.org>.
013737,000017: ## Website: www.ibiblio.org/apollo/index.html
013738,000018: ## Mod history: 2019-08-04 MAS Created from Luminary 97.
013739,000019:
Page 338 |
013741,000021: # SUBROUTINE NAME: V89CALL
013742,000022: # MOD NO: 0 DATE: 9 JAN 1968
013743,000023: # MOD BY: DIGITAL DEVEL GROUP LOG SECTION: R63
013744,000024:
013745,000025: # FUNCTIONAL DESCRIPTION:
013746,000026:
013747,000027: # CALLED BY VERB 89 ENTER DURING P00. PRIO 10 USED. CALCULATES AND
013748,000028: # DISPLAYS FINAL FDAI BALL ANGLES TO POINT LM +X OR +Z AXIS AT CSM.
013749,000029:
013750,000030: # 1. KEY IN V 89 E ONLY IF IN PROG 00. IF NOT IN P00, OPERATOR ERROR AND
013751,000031: # EXIT R63, OTHERWISE CONTINUE.
013752,000032:
013753,000033: # 2. IF IN P00, DO IMU STATUS CHECK ROUTINE (R02BOTH). IF IMU ON AND ITS
013754,000034: # ORIENTATION KNOWN TO LGC, CONTINUE.
013755,000035:
013756,000036: # 3. FLASH DISPLAY V 04 N 06. R2 INDICATES WHICH SPACECRAFT AXIS IS TO
013757,000037: # BE POINTED AT CSM. INITIAL CHOICE IS PREFERRED (+Z) AXIS (R2=1).
013758,000038: # ASTRONAUT CAN CHANGE TO (+X) AXIS (R2 NOT =1) BY V 22 E 2 E. CONTINUE
013759,000039: # AFTER KEYING IN PROCEED.
013760,000040:
013761,000041: # 4. BOTH VEHICLE STATE VECTORS UPDATED BY CONIC EQS.
013762,000042:
013763,000043: # 5. HALF MAGNITUDE UNIT LOS VECTOR (IN STABLE MEMBER COORDINATES) AND
013764,000044: # HALF MAGNITUDE UNIT SPACECRAFT AXIS VECTOR (IN BODY COORDINATES)
013765,000045: # PREPARED FOR VECPOINT.
013766,000046:
013767,000047: # 6. GIMBAL ANGLES FROM VECPOINT TRANSFORMED INTO FDAI BALL ANGLES BY
013768,000048: # BALLANGS. FLASH DISPLAY V 06 N 18 AND AWAIT RESPONSE.
013769,000049:
013770,000050: # 7. RECYCLE - RETURN TO STEP 4.
013771,000051: # TERMINATE - EXIT R63.
013772,000052: # PROCEED - RESET 3AXISFLG AND CALL R60LEM FOR ATTITUDE MANEUVER.
013773,000053:
013774,000054: # CALLING SEQUENCE: V 89 E.
013775,000055:
013776,000056: # SUBROUTINES CALLED: CHKPOOH, R02BOTH, GOXDSPF, CSMCONIC, LEMCONIC,
013777,000057: # VECPOINT, BALLANGS, R60LEM.
013778,000058:
013779,000059: # NORMAL EXIT MODES: TC ENDEXT
013780,000060:
013781,000061: # ALARMS: 1. OPERATOR ERROR IF NOT IN P00.
013782,000062: # 2. PROGRAM ALARM IF IMU IS OFF.
013783,000063: # 3. PROGRAM ALARM IF IMU ORIENTATION IS UNKNOWN.
013784,000064:
013785,000065: # OUTPUT: NONE
013786,000066:
013787,000067: # ERASABLE INITIALIZATION REQUIRED: NONE
013788,000068:
013789,000069: # DEBRIS: OPTION1, +1, TDEC1, POINTVSM, SCAXIS, CPHI, CTHETA, CPSI,
Page 339 |
013791,000071: # 3AXISFLG.
013792,000072:
013793,000073: 06,3715 E4,1606 EBANK= RONE
013794,000074: 32,2217 BANK 32
013795,000075: 26,2000 SETLOC BAWLANGS
013796,000076: 26,2000 BANK
013797,000077:
013798,000078: 26,2022 COUNT* $$/R63
013799,000079: 26,2022 04616 V89CALL TC BANKCALL # IMU STATUS CHECK. RETURNS IF ORIENTATION
013800,000080: 26,2023 11254 CADR R02BOTH # KNOWN. ALARMS IF NOT.
013801,000081: 26,2024 36245 CAF THREE # ALLOW ASTRONAUT TO SELECT DESIRED
013802,000082: 26,2025 55051 TS OPTIONX # TRACKING ATTITUDE AXIS.
013803,000083: 26,2026 34753 CAF ONE
013804,000084: 26,2027 55052 TS OPTIONX +1
013805,000085: 26,2030 32117 CAF VB04N12 # V 04 N 12
013806,000086: 26,2031 04616 TC BANKCALL
013807,000087: 26,2032 20476 CADR GOFLASH
013808,000088: 26,2033 05472 TC ENDEXT # TERMINATE
013809,000089: 26,2034 02036 TC +2 # PROCEED
013810,000090: 26,2035 02030 TC -5 # DATA IN. OPTION1+1 = 1 FOR Z AXIS
013811,000091: 26,2036 06037 V89RECL TC INTPRET # = 2 FOR X AXIS
013812,000092: 26,2037 43234 RTB DAD
013813,000093: 26,2040 21573 LOADTIME # READ PRESENT TIME
013814,000094: 26,2041 14122 DP1MIN
013815,000095: 26,2042 02205 STORE TSTART82 # SAVE TIME FOR LEMCONIC CALL
013816,000096: 26,2043 34041 STCALL TDEC1 # STORE TIME FOR CSMCONIC CALL
013817,000097: 26,2044 27066 CSMCONIC # CSM STATE VECTOR UPDATE
013818,000098: 26,2045 77775 VLOAD # CSMCONIC LEFT R VECTOR IN RATT
013819,000099: 26,2046 00001 RATT
013820,000100: 26,2047 16207 STODL RONE # SAVE FOR LINE OF SIGHT (LOS) COMPUTATION
013821,000101: 26,2050 02205 TSTART82
013822,000102: 26,2051 34041 STCALL TDEC1 # STORE TIME FOR LEMCONIC CALL
013823,000103: 26,2052 27100 LEMCONIC # LEM STATE VECTOR UPDATE
013824,000104: 26,2053 52375 VLOAD VSU # CSM POSITION - LEM POSITION = LOS
013825,000105: 26,2054 02207 RONE # LOS VECTOR LEFT IN MPAC
013826,000106: 26,2055 00001 RATT
013827,000107: 26,2056 47121 MXV RTB # (REFSMMAT X LOS). TRANSFORMS LOS FROM
013828,000108: 26,2057 01734 REFSMMAT # REFERENCE COORD TO STAB MEMB COORD.
013829,000109: 26,2060 21726 NORMUNIT
013830,000110: 26,2061 03773 STORE POINTVSM # STORE LOS FOR VECPOINT CALL
013831,000111: 26,2062 77776 EXIT
013832,000112: 26,2063 41052 CS OPTIONX +1 # 1 FOR Z AXIS. 2 FOR X AXIS.
013833,000113: 26,2064 64753 AD ONE
013834,000114: 26,2065 00006 EXTEND
013835,000115: 26,2066 12113 BZF ALINEZ
013836,000116: 26,2067 06037 ALINEX TC INTPRET # X AXIS ALIGNMENT
013837,000117: 26,2070 77775 VLOAD
013838,000118: 26,2071 06520 UNITX # READ (.5, 0, 0)
Page 340 |
013840,000120: 26,2072 37765 V89CALL1 STCALL SCAXIS # STORE SELECTED ALIGNMENT AXIS
013841,000121: 26,2073 56040 VECPOINT # PUTS DESIRED GIM ANG (OG,IG,MG) IN TMPAC
013842,000122: 26,2074 00322 STORE CPHI # STORE GIMBAL ANGLES FOR BALLANGS CALL.
013843,000123: 26,2075 77776 EXIT
013844,000124: 26,2076 04616 TC BANKCALL
013845,000125: 26,2077 54266 CADR BALLANGS # PUTS DESIRED BALL ANGLES IN FDAIX,Y,Z
013846,000126: 26,2100 32120 CAF VB06N18 # V 06 N 18
013847,000127: 26,2101 04616 TC BANKCALL # NOUN 18 REFERS TO FDAIX,Y,Z
013848,000128: 26,2102 20476 CADR GOFLASH
013849,000129: 26,2103 05472 TC ENDEXT # TERMINATE
013850,000130: 26,2104 02106 TC +2 # PROCEED
013851,000131: 26,2105 02036 TC V89RECL # RECYCLE
013852,000132: 26,2106 05516 TC DOWNFLAG # RESET 3 AXIS FLAG
013853,000133: 26,2107 00124 ADRES 3AXISFLG # RESET BIT6 FLAG WORD 5
013854,000134: 26,2110 04616 TC BANKCALL # PERFORMS LEM MANEUVER TO ALIGN SELECTED
013855,000135: 26,2111 54123 CADR R60LEM # SPACECRAFT AXIS TO CSM.
013856,000136: 26,2112 15472 TCF ENDEXT # TERMINATE R63
013857,000137:
013858,000138: 26,2113 06037 ALINEZ TC INTPRET # Z AXIS ALIGNMENT
013859,000139: 26,2114 52175 VLOAD GOTO
013860,000140: 26,2115 06514 UNITZ # READ (0, 0, .5)
013861,000141: 26,2116 54072 V89CALL1
013862,000142:
013863,000143: 26,2117 01014 VB04N12 VN 412
013864,000144: 26,2120 01422 VB06N18 VN 0618
Page 341 |
013866,000146: 26,2121 00000 13560 DP1MIN 2DEC 6000 B-28
013867,000147:
End of include-file R63.agc. Parent file is MAIN.agc