Source Code
These source-code files are part of a reconstructed copy of Luminary 173, the
second (unflown) release of the Apollo 14 Lunar Module (LM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with reconstructed source code for Luminary 178. Changes between revision 173 and 178 were backed out, as described by Luminary memo 167 (revision 1). 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 173 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. |
059716,000002: ## Copyright: Public domain.
059717,000003: ## Filename: DAP_INTERFACE_SUBROUTINES.agc
059718,000004: ## Purpose: A section of Luminary revision 173.
059719,000005: ## It is part of the reconstructed source code for the second
059720,000006: ## (unflown) release of the flight software for the Lunar
059721,000007: ## Module's (LM) Apollo Guidance Computer (AGC) for Apollo 14.
059722,000008: ## The code has been recreated from a reconstructed copy of
059723,000009: ## Luminary 178, as well as Luminary memo 167 (revision 1).
059724,000010: ## It has been adapted such that the resulting bugger words
059725,000011: ## exactly match those specified for Luminary 173 in NASA
059726,000012: ## drawing 2021152N, which gives relatively high confidence
059727,000013: ## that the reconstruction is correct.
059728,000014: ## Reference: pp. 1394-1397
059729,000015: ## Assembler: yaYUL
059730,000016: ## Contact: Ron Burkey <info@sandroid.org>.
059731,000017: ## Website: www.ibiblio.org/apollo/index.html
059732,000018: ## Mod history: 2019-09-18 MAS Created from Luminary 178.
059733,000019:
Page 1394 |
059735,000021: 20,2115 BANK 20
059736,000022: 20,2000 SETLOC DAPS3
059737,000023: 20,2000 BANK
059738,000024:
059739,000025: 20,2115 E6,1634 EBANK= CDUXD
059740,000026: 20,2115 COUNT* $$/DAPIF
059741,000027:
059742,000028: # MOD 0 DATE 11/15/66 BY GEORGE W. CHERRY
059743,000029:
059744,000030: # MOD 1 1/23/67 MODIFICATION BY PETER ADLER
059745,000031:
059746,000032: # FUNCTIONAL DESCRIPTION
059747,000033:
059748,000034: # HEREIN ARE A COLLECTION OF SUBROUTINES WHICH ALLOW MISSION CONTROL PROGRAMS TO CONTROL THE MODE
059749,000035: # AND INTERFACE WITH THE DAP.
059750,000036:
059751,000037: # CALLING SEQUENCES
059752,000038:
059753,000039: # IN INTERRUPT OR WITH INTERRUPT INHIBITED
059754,000040: # TC IBNKCALL
059755,000041: # FCADR ROUTINE
059756,000042:
059757,000043: # IN A JOB WITHOUT INTERRUPT INHIBITED
059758,000044: # INHINT
059759,000045: # TC IBNKCALL
059760,000046: # FCADR ROUTINE
059761,000047: # RELINT
059762,000048:
059763,000049: # OUTPUT
059764,000050:
059765,000051: # SEE INDIVIDUAL ROUTINES BELOW
059766,000052:
059767,000053: # DEBRIS
059768,000054:
059769,000055: # A,L, AND SOMETIMES MDUETEMP ODE NOT IN PULSES MODE
059770,000056:
Page 1395 |
059772,000058: # SUBROUTINE NAMES:
059773,000059: # SETMAXDB, SETMINDB, RESTORDB, PFLITEDB
059774,000060:
059775,000061: # MODIFIED: 30 JANUARY 1968 BY P S WEISSMAN TO CREATE RESTORDB.
059776,000062:
059777,000063: # MODIFIED: 1 MARCH 1968 BY P S WEISSMAN TO SAVE EBANK AND CREATE PFLITEDB
059778,000064:
059779,000065: # FUNCTIONAL DESCRIPTION:
059780,000066: # SETMAXDB - SET DEADBAND TO 5.0 DEGREES
059781,000067: # SETMINDB - SET DEADBAND TO 0.3 DEGREE
059782,000068: # RESTORDB - SET DEADBAND TO .3,1, OR 5 ACCORDING TO BITS 4 AND 5 OF DAPBOOLS
059783,000069: # PFLITEDB - SET DEADBAND TO 1.0 DEGREE AND ZERO THE COMMANDED ATTITUDE CHANGE AND COMMANDED RATE
059784,000070: # ALL ENTRIES SET UP A NOVAC JOB TO DO 1/ACCS SO THAT THE TJETLAW SWITCH CURVES ARE POSITIONED TO
059785,000071: # REFLECT THE NEW DEADBAND. IT SHOULD BE NOTED THAT THE DEADBAND REFERS TO THE ATTITUDE IN THE P-,U-,AND V-AXES.
059786,000072:
059787,000073: # SUBROUTINE CALLED: NOVAC
059788,000074:
059789,000075: # CALLING SEQUENCE: SAME AS ABOVE
059790,000076: # OR TC RESTORDB +1 FROM ALLCOAST
059791,000077: # DEBRIS: A, L, Q, RUPTREG1, (ITEMPS IN NOVAC)
059792,000078:
059793,000079: 20,2115 30111 RESTORDB CAE DAPBOOLS # DETERMINE CREW-SELECTED DEADBAND.
059794,000080: 20,2116 74747 MASK DBSLECT2 # CHECK FOR MAX DB (5 DEG)
059795,000081: 20,2117 00006 EXTEND
059796,000082: 20,2120 12122 BZF +2
059797,000083: 20,2121 12130 TCF SETMAXDB # BIT5 DAPBOOLS IS SET - CREW WANTS 5 DEG
059798,000084: 20,2122 30111 CAE DAPBOOLS
059799,000085: 20,2123 74750 MASK DBSELECT # CHECK FOR 1 DEG DEADBAND SELECTION
059800,000086: 20,2124 00006 EXTEND
059801,000087: 20,2125 12141 BZF SETMINDB
059802,000088:
059803,000089: 20,2126 32153 CAF POWERDB # BIT4 DAPBOOLS IS SET - CREW WANTS 1 DEG
059804,000090: 20,2127 12131 TCF SETMAXDB +1
059805,000091: 20,2130 32152 SETMAXDB CAF WIDEDB # SET 5 DEGREE DEADBAND.
059806,000092: 20,2131 55343 +1 TS DB
059807,000093:
059808,000094: 20,2132 00006 EXTEND # SET UP JOB TO RE-POSITION SWITCH CURVES.
059809,000095: 20,2133 22070 QXCH RUPTREG1
059810,000096: 20,2134 37720 CALLACCS CAF PRIO27
059811,000097: 20,2135 05072 TC NOVAC
059812,000098: 20,2136 E6,1536 EBANK= AOSQ
059813,000099: 20,2136 03635 42106 2CADR 1/ACCJOB
059814,000100:
059815,000101:
059816,000102: 20,2140 00070 TC RUPTREG1 # RETURN TO CALLER.
059817,000103:
059818,000104: 20,2141 32151 SETMINDB CAF NARROWDB # SET 0.3 DEGREE DEADBAND.
059819,000105: 20,2142 12131 TCF SETMAXDB +1
059820,000106:
Page 1396 |
059822,000108: 20,2143 00006 PFLITEDB EXTEND # THE RETURN FROM CALLACCS IS TO RUPTREG1.
059823,000109: 20,2144 22070 QXCH RUPTREG1
059824,000110: 20,2145 02154 TC ZATTEROR # ZERO THE ERRORS AND COMMANDED RATES.
059825,000111: 20,2146 32153 CAF POWERDB # SET DB TO 1.0 DEG.
059826,000112: 20,2147 55343 TS DB
059827,000113: 20,2150 12134 TCF CALLACCS # SET UP 1/ACCS AND RETURN TO CALLER.
059828,000114: 20,2151 00155 NARROWDB OCTAL 00155 # 0.3 DEGREE SCALED AT 45.
059829,000115: 20,2152 03434 WIDEDB OCTAL 03434 # 5.0 DEGREES SCALED AT 45.
059830,000116: 20,2153 00554 POWERDB DEC .02222 # 1.0 DEGREE SCALED AT 45.
059831,000117:
059832,000118:
059833,000119: 20,2154 35015 ZATTEROR CAF EBANK6
059834,000120: 20,2155 56003 XCH EBANK
059835,000121: 20,2156 54001 TS L # SAVE CALLERS EBANK IN L.
059836,000122: 20,2157 30032 CAE CDUX
059837,000123: 20,2160 55634 TS CDUXD
059838,000124: 20,2161 30033 CAE CDUY
059839,000125: 20,2162 55635 TS CDUYD
059840,000126: 20,2163 30034 CAE CDUZ
059841,000127: 20,2164 55636 TS CDUZD
059842,000128: 20,2165 12171 TCF STOPRATE +3
059843,000129:
059844,000130:
059845,000131: 20,2166 35015 STOPRATE CAF EBANK6
059846,000132: 20,2167 56003 XCH EBANK
059847,000133: 20,2170 54001 TS L # SAVE CALLERS EBANK IN L.
059848,000134: 20,2171 34755 +3 CAF ZERO
059849,000135: 20,2172 55642 TS OMEGAPD
059850,000136: 20,2173 55643 TS OMEGAQD
059851,000137: 20,2174 55644 TS OMEGARD
059852,000138: 20,2175 55637 TS DELCDUX
059853,000139: 20,2176 55640 TS DELCDUY
059854,000140: 20,2177 55641 TS DELCDUZ
059855,000141: 20,2200 55274 TS DELPEROR
059856,000142: 20,2201 55275 TS DELQEROR
059857,000143: 20,2202 55276 TS DELREROR
059858,000144: 20,2203 22003 LXCH EBANK # RESTORE CALLERS EBANK.
059859,000145: 20,2204 00002 TC Q
059860,000146:
059861,000147: # SUBROUTINE NAME: ALLCOAST
059862,000148:
059863,000149: # WILL BE CALLED BY FRESH STARTS AND ENGINE OFF ROUTINES. .
059864,000150:
059865,000151: # CALLING SEQUENCE: (SAME AS ABOVE)
059866,000152:
059867,000153: # EXIT: RETURN TO Q.
059868,000154:
059869,000155: # SUBROUTINES CALLED: STOPRATE, RESTORDB, NOVAC
059870,000156:
059871,000157: # ZERO: (FOR ALL AXES) AOS, ALPHA, AOSTERM, OMEGAD, DELCDU, DELEROR
059872,000158:
Page 1397 |
059874,000160: # OUTPUT: DRIFTBIT/DAPBOOLS, DB, JOB TO DO 1/ACCS
059875,000161:
059876,000162: # DEBRIS: A, L, Q, RUPTREG1, RUPTREG2, (ITEMPS IN NOVAC)
059877,000163:
059878,000164: 20,2205 00006 ALLCOAST EXTEND # SAVE Q FOR RETURN
059879,000165: 20,2206 22071 QXCH RUPTREG2
059880,000166: 20,2207 02166 TC STOPRATE # CLEAR RATE INTERFACE. RETURN WITH A=0
059881,000167: 20,2210 22003 LXCH EBANK # AND L=EBANK6. SAVE CALLERS EBANK.
059882,000168: 20,2211 55536 TS AOSQ
059883,000169: 20,2212 55537 TS AOSQ +1
059884,000170: 20,2213 55540 TS AOSR
059885,000171: 20,2214 55541 TS AOSR +1
059886,000172: 20,2215 55424 TS ALPHAQ # FOR DOWNLIST.
059887,000173: 20,2216 55425 TS ALPHAR
059888,000174: 20,2217 55544 TS AOSQTERM
059889,000175: 20,2220 55545 TS AOSRTERM
059890,000176: 20,2221 22003 LXCH EBANK # RESTORE EBANK (EBANK6 NO LONGER NEEDED)
059891,000177:
059892,000178: 20,2222 40111 CS DAPBOOLS # SET UP DRIFTBIT
059893,000179: 20,2223 74744 MASK DRIFTBIT
059894,000180: 20,2224 26111 ADS DAPBOOLS
059895,000181: 20,2225 02116 TC RESTORDB +1 # RESTORE DEADBANK TO CREW-SELECTED VALUE.
059896,000182:
059897,000183: 20,2226 00071 TC RUPTREG2 # RETURN.
End of include-file DAP_INTERFACE_SUBROUTINES.agc. Parent file is MAIN.agc