Source Code
![]() |
These source-code files were from the printout at the MIT Museum, with many thanks
to Deborah Douglas, the Museum's Curator of Science and Technology, for releasing
it to us. The printout was digitally photographed by Paul Fjeld. A team of
volunteers transcribed the source code manually from these images or, where
appropriate, modified already-transcribed but similar source Luminary 131 (Apollo 13)
source code to agree with the images from the printout. Note that the page images
presented online are of reduced quality, and that higher-quality images
are available. Report any conversion errors or legibility
problems in page images to info@sandroid.org.
Notations on the program listing read, in part:GAP: ASSEMBLE REVISION 001 OF AGC PROGRAM LMY99 BY NASA 2021112-061 16:27 JULY 14,1969Note that the date is the date of the printout, not the date of the program revision. |
060404,000002: ## Copyright: Public domain.
060405,000003: ## Filename: DAP_INTERFACE_SUBROUTINES.agc
060406,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
060407,000005: ## It is part of the source code for the Lunar Module's (LM)
060408,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
060409,000007: ## Assembler: yaYUL
060410,000008: ## Contact: Ron Burkey <info@sandroid.org>.
060411,000009: ## Website: www.ibiblio.org/apollo.
060412,000010: ## Pages: 1406-1409
060413,000011: ## Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
060414,000012: ## from the Luminary131/ file of the same
060415,000013: ## name, using Luminary099 page images.
060416,000014: ## 2011-01-06 JL Fixed pseudo-label indentation.
060417,000015: ## 2016-12-18 RSB Proofed text comments with octopus/ProoferComments
060418,000016: ## and corrected the errors found.
060419,000017: ## 2017-03-10 RSB Comment-text fixes noted in proofing Luminary 116.
060420,000018:
060421,000019: ## This source code has been transcribed or otherwise adapted from
060422,000020: ## digitized images of a hardcopy from the MIT Museum. The digitization
060423,000021: ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
060424,000022: ## the Museum. Many thanks to both. The images (with suitable reduction
060425,000023: ## in storage size and consequent reduction in image quality as well) are
060426,000024: ## available online at www.ibiblio.org/apollo. If for some reason you
060427,000025: ## find that the images are illegible, contact me at info@sandroid.org
060428,000026: ## about getting access to the (much) higher-quality images which Paul
060429,000027: ## actually created.
060430,000028: ##
060431,000029: ## Notations on the hardcopy document read, in part:
060432,000030: ##
060433,000031: ## Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
060434,000032: ## 16:27 JULY 14, 1969
060435,000033:
![]() |
Page 1406 |
060437,000035: 20,2123 BANK 20
060438,000036: 20,2000 SETLOC DAPS3
060439,000037: 20,2000 BANK
060440,000038:
060441,000039: 20,2123 E6,1635 EBANK= CDUXD
060442,000040: 20,2123 COUNT* $$/DAPIF
060443,000041:
060444,000042: # MOD 0 DATE 11/15/66 BY GEORGE W. CHERRY
060445,000043: # MOD 1 1/23/67 MODIFICATION BY PETER ADLER
060446,000044:
060447,000045: # FUNCTIONAL DESCRIPTION
060448,000046: # HEREIN ARE A COLLECTION OF SUBROUTINES WHICH ALLOW MISSION CONTROL PROGRAMS TO CONTROL THE MODE
060449,000047: # AND INTERFACE WITH THE DAP.
060450,000048:
060451,000049: # CALLING SEQUENCES
060452,000050: # IN INTERRUPT OR WITH INTERRUPT INHIBITED
060453,000051: # TC IBNKCALL
060454,000052: # FCADR ROUTINE
060455,000053: # IN A JOB WITHOUT INTERRUPT INHIBITED
060456,000054: # INHINT
060457,000055: # TC IBNKCALL
060458,000056: # FCADR ROUTINE
060459,000057: # RELINT
060460,000058:
060461,000059: # OUTPUT
060462,000060: # SEE INDIVIDUAL ROUTINES BELOW
060463,000061:
060464,000062: # DEBRIS
060465,000063: # A, L, AND SOMETIMES MDUETEMP ODE NOT IN PULSES MODE
060466,000064:
![]() |
Page 1407 |
060468,000066: # SUBROUTINE NAMES:
060469,000067: # SETMAXDB, SETMINDB, RESTORDB, PFLITEDB
060470,000068: # MODIFIED: 30 JANUARY 1968 BY P S WEISSMAN TO CREATE RESTORDB.
060471,000069: # MODIFIED: 1 MARCH 1968 BY P S WEISSMAN TO SAVE EBANK AND CREATE PFLITEDB
060472,000070:
060473,000071: # FUNCTIONAL DESCRIPTION:
060474,000072: # SETMAXDB - SET DEADBAND TO 5.0 DEGREES
060475,000073: # SETMINDB - SET DEADBAND TO 0.3 DEGREE
060476,000074: # RESTORDB - SET DEADBAND TO MAX OR MIN ACCORDING TO SETTING OF DBSELECT BIT OF DAPBOOLS
060477,000075: # PFLITEDB - SET DEADBAND TO 1.0 DEGREE AND ZERO THE COMMANDED ATTITUDE CHANGE AND COMMANDED RATE
060478,000076:
060479,000077: # ALL ENTRIES SET UP A NOVAC JOB TO DO 1/ACCS SO THAT THE TJETLAW SWITCH CURVES ARE POSITIONED TO
060480,000078: # REFLECT THE NEW DEADBAND. IT SHOULD BE NOTED THAT THE DEADBAND REFERS TO THE ATTITUDE IN THE P-, U-, AND V-AXES.
060481,000079:
060482,000080: # SUBROUTINE CALLED: NOVAC
060483,000081:
060484,000082: # CALLING SEQUENCE: SAME AS ABOVE
060485,000083: # OR TC RESTORDB +1 FROM ALLCOAST
060486,000084:
060487,000085: # DEBRIS: A, L, Q, RUPTREG1, (ITEMPS IN NOVAC)
060488,000086:
060489,000087: 20,2123 30111 RESTORDB CAE DAPBOOLS # DETERMINE CREW-SELECTED DEADBAND.
060490,000088: 20,2124 74750 MASK DBSELECT
060491,000089: 20,2125 00006 EXTEND
060492,000090: 20,2126 12140 BZF SETMINDB
060493,000091:
060494,000092: 20,2127 32151 SETMAXDB CAF WIDEDB # SET 5 DEGREE DEADBAND.
060495,000093: 20,2130 55346 +1 TS DB
060496,000094:
060497,000095: 20,2131 00006 EXTEND # SET UP JOB TO RE-POSITION SWITCH CURVES.
060498,000096: 20,2132 22070 QXCH RUPTREG1
060499,000097: 20,2133 37715 CALLACCS CAF PRIO27
060500,000098: 20,2134 05072 TC NOVAC
060501,000099: 20,2135 E6,1537 EBANK= AOSQ
060502,000100: 20,2135 02454 40106 2CADR 1/ACCJOB
060503,000101:
060504,000102: 20,2137 00070 TC RUPTREG1 # RETURN TO CALLER.
060505,000103:
060506,000104: 20,2140 32150 SETMINDB CAF NARROWDB # SET 0.3 DEGREE DEADBAND.
060507,000105: 20,2141 12130 TCF SETMAXDB +1
060508,000106:
060509,000107: 20,2142 00006 PFLITEDB EXTEND # THE RETURN FROM CALLACCS IS TO RUPTREG1.
060510,000108: 20,2143 22070 QXCH RUPTREG1
060511,000109: 20,2144 02153 TC ZATTEROR # ZERO THE ERRORS AND COMMANDED RATES.
060512,000110: 20,2145 32152 CAF POWERDB # SET DB TO 1.0 DEG.
060513,000111: 20,2146 55346 TS DB
060514,000112: 20,2147 12133 TCF CALLACCS # SET UP 1/ACCS AND RETURN TO CALLER.
060515,000113: 20,2150 00155 NARROWDB OCTAL 00155 # 0.3 DEGREE SCALED AT 45.
![]() |
Page 1408 |
060517,000115: 20,2151 03434 WIDEDB OCTAL 03434 # 5.0 DEGREES SCALED AT 45.
060518,000116: 20,2152 00554 POWERDB DEC .02222 # 1.0 DEGREE SCALED AT 45.
060519,000117:
060520,000118: 20,2153 35015 ZATTEROR CAF EBANK6
060521,000119: 20,2154 56003 XCH EBANK
060522,000120: 20,2155 54001 TS L # SAVE CALLERS EBANK IN L.
060523,000121: 20,2156 30032 CAE CDUX
060524,000122: 20,2157 55635 TS CDUXD
060525,000123: 20,2160 30033 CAE CDUY
060526,000124: 20,2161 55636 TS CDUYD
060527,000125: 20,2162 30034 CAE CDUZ
060528,000126: 20,2163 55637 TS CDUZD
060529,000127: 20,2164 12170 TCF STOPRATE +3
060530,000128:
060531,000129: 20,2165 35015 STOPRATE CAF EBANK6
060532,000130: 20,2166 56003 XCH EBANK
060533,000131: 20,2167 54001 TS L # SAVE CALLERS EBANK IN L.
060534,000132: 20,2170 34755 +3 CAF ZERO
060535,000133: 20,2171 55643 TS OMEGAPD
060536,000134: 20,2172 55644 TS OMEGAQD
060537,000135: 20,2173 55645 TS OMEGARD
060538,000136: 20,2174 55640 TS DELCDUX
060539,000137: 20,2175 55641 TS DELCDUY
060540,000138: 20,2176 55642 TS DELCDUZ
060541,000139: 20,2177 55277 TS DELPEROR
060542,000140: 20,2200 55300 TS DELQEROR
060543,000141: 20,2201 55301 TS DELREROR
060544,000142: 20,2202 22003 LXCH EBANK # RESTORE CALLERS EBANK.
060545,000143: 20,2203 00002 TC Q
060546,000144:
060547,000145: # SUBROUTINE NAME: ALLCOAST
060548,000146: # WILL BE CALLED BY FRESH STARTS AND ENGINE OFF ROUTINES. .
060549,000147:
060550,000148: # CALLING SEQUENCE: (SAME AS ABOVE)
060551,000149:
060552,000150: # EXIT: RETURN TO Q.
060553,000151:
060554,000152: # SUBROUTINES CALLED: STOPRATE, RESTORDB, NOVAC
060555,000153:
060556,000154: # ZERO: (FOR ALL AXES) AOS, ALPHA, AOSTERM, OMEGAD, DELCDU, DELEROR
060557,000155:
060558,000156: # OUTPUT: DRIFTBIT/DAPBOOLS, DB, JOB TO DO 1/ACCS
060559,000157:
060560,000158: # DEBRIS: A, L, Q, RUPTREG1, RUPTREG2, (ITEMPS IN NOVAC)
060561,000159:
060562,000160: 20,2204 00006 ALLCOAST EXTEND # SAVE Q FOR RETURN
060563,000161: 20,2205 22071 QXCH RUPTREG2
![]() |
Page 1409 |
060565,000163: 20,2206 02165 TC STOPRATE # CLEAR RATE INTERFACE. RETURN WITH A=0
060566,000164: 20,2207 22003 LXCH EBANK # AND L=EBANK6. SAVE CALLERS EBANK.
060567,000165: 20,2210 55537 TS AOSQ
060568,000166: 20,2211 55540 TS AOSQ +1
060569,000167: 20,2212 55541 TS AOSR
060570,000168: 20,2213 55542 TS AOSR +1
060571,000169: 20,2214 55424 TS ALPHAQ # FOR DOWNLIST.
060572,000170: 20,2215 55425 TS ALPHAR
060573,000171: 20,2216 55545 TS AOSQTERM
060574,000172: 20,2217 55546 TS AOSRTERM
060575,000173: 20,2220 22003 LXCH EBANK # RESTORE EBANK (EBANK6 NO LONGER NEEDED)
060576,000174:
060577,000175: 20,2221 40111 CS DAPBOOLS # SET UP DRIFTBIT
060578,000176: 20,2222 74744 MASK DRIFTBIT
060579,000177: 20,2223 26111 ADS DAPBOOLS
060580,000178: 20,2224 02124 TC RESTORDB +1 # RESTORE DEADBANK TO CREW-SELECTED VALUE.
060581,000179:
060582,000180: 20,2225 00071 TC RUPTREG2 # RETURN.
060583,000181:
End of include-file DAP_INTERFACE_SUBROUTINES.agc. Parent file is MAIN.agc