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
	20'35 OCT. 28,1968
Note that the date is the date of the printout, not the date of the program revision.

014056,000002:                                                                                                  ## Copyright:   Public domain.
014057,000003:                                                                                                  ## Filename:    R63.agc
014058,000004:                                                                                                  ## Purpose:     Part of the source code for Luminary 1A build 099.
014059,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
014060,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for Apollo 11.
014061,000007:                                                                                                  ## Assembler:   yaYUL
014062,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014063,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo.
014064,000010:                                                                                                  ## Pages:       338-341
014065,000011:                                                                                                  ## Mod history: 2009-05-16 RSB  Adapted from the corresponding 
014066,000012:                                                                                                  ##                              Luminary131 file, using page 
014067,000013:                                                                                                  ##                              images from Luminary 1A.
014068,000014:                                                                                                  ##              2016-12-14 RSB  Proofed text comments with octopus/ProoferComments
014069,000015:                                                                                                  ##                              and corrected the errors found.
014070,000016:                                                                                                  ##              2017-01-26 RSB  Back-ported a comment-text fix from Luminary 69.
014071,000017:                                                                                                  ##              2017-03-07 RSB  Comment-text fixes noted in proofing Luminary 116.
014072,000018: 
014073,000019:                                                                                                  ## This source code has been transcribed or otherwise adapted from
014074,000020:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
014075,000021:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
014076,000022:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
014077,000023:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
014078,000024:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
014079,000025:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
014080,000026:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
014081,000027:                                                                                                  ## actually created.
014082,000028:                                                                                                  ##
014083,000029:                                                                                                  ## Notations on the hardcopy document read, in part:
014084,000030:                                                                                                  ##
014085,000031:                                                                                                  ##      Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
014086,000032:                                                                                                  ##      16:27 JULY 14, 1969 
014087,000033: 

Page 338

014089,000035:                                                                                                  #  SUBROUTINE NAME:      V89CALL
014090,000036:                                                                                                  #  MOD NO:       0                       DATE:           9 JAN 1968
014091,000037:                                                                                                  #  MOD BY:       DIGITAL DEVEL GROUP     LOG SECTION:    R63
014092,000038: 
014093,000039:                                                                                                  #  FUNCTIONAL DESCRIPTION:
014094,000040: 
014095,000041:                                                                                                  #  CALLED BY VERB 89 ENTER DURING P00.  PRIO 10 USED.  CALCULATES AND
014096,000042:                                                                                                  #  DISPLAYS FINAL FDAI BALL ANGLES TO POINT LM +X OR +Z AXIS AT CSM.
014097,000043: 
014098,000044:                                                                                                  #  1. KEY IN V 89 E ONLY IF IN PROG 00.  IF NOT IN P00, OPERATOR ERROR AND
014099,000045:                                                                                                  #  EXIT R63, OTHERWISE CONTINUE.
014100,000046: 
014101,000047:                                                                                                  #  2. IF IN P00, DO IMU STATUS CHECK ROUTINE (R02BOTH).  IF IMU ON AND ITS
014102,000048:                                                                                                  #  ORIENTATION KNOWN TO LGC, CONTINUE.
014103,000049: 
014104,000050:                                                                                                  #  3. FLASH DISPLAY V 04 N 06.  R2 INDICATES WHICH SPACECRAFT AXIS IS TO
014105,000051:                                                                                                  #  BE POINTED AT CSM.  INITIAL CHOICE IS PREFERRED (+Z) AXIS (R2=1).
014106,000052:                                                                                                  #  ASTRONAUT CAN CHANGE TO (+X) AXIS (R2 NOT =1) BY V 22 E 2 E.  CONTINUE
014107,000053:                                                                                                  #  AFTER KEYING IN PROCEED.
014108,000054: 
014109,000055:                                                                                                  #  4. BOTH VEHICLE STATE VECTORS UPDATED BY CONIC EQS.
014110,000056: 
014111,000057:                                                                                                  #  5. HALF MAGNITUDE UNIT LOS VECTOR (IN STABLE MEMBER COORDINATES) AND
014112,000058:                                                                                                  #  HALF MAGNITUDE UNIT SPACECRAFT AXIS VECTOR (IN BODY COORDINATES)
014113,000059:                                                                                                  #  PREPARED FOR VECPOINT.
014114,000060: 
014115,000061:                                                                                                  #  6. GIMBAL ANGLES FROM VECPOINT TRANSFORMED INTO FDAI BALL ANGLES BY
014116,000062:                                                                                                  #  BALLANGS.  FLASH DISPLAY V 06 N 18 AND AWAIT RESPONSE.
014117,000063: 
014118,000064:                                                                                                  #  7.    RECYCLE - RETURN TO STEP 4.
014119,000065:                                                                                                  #        TERMINATE - EXIT R63.
014120,000066:                                                                                                  #        PROCEED - RESET 3AXISFLG AND CALL R60LEM FOR ATTITUDE MANEUVER.
014121,000067: 
014122,000068:                                                                                                  #  CALLING SEQUENCE:     V 89 E.
014123,000069: 
014124,000070:                                                                                                  #  SUBROUTINES CALLED:   CHKPOOH, R02BOTH, GOXDSPF, CSMCONIC, LEMCONIC,
014125,000071:                                                                                                  #                        VECPOINT, BALLANGS, R60LEM.
014126,000072: 
014127,000073:                                                                                                  #  NORMAL EXIT MODES:    TC ENDEXT
014128,000074: 
014129,000075:                                                                                                  #  ALARMS:       1. OPERATOR ERROR IF NOT IN P00.
014130,000076:                                                                                                  #                2. PROGRAM ALARM IF IMU IS OFF.
014131,000077:                                                                                                  #                3. PROGRAM ALARM IF IMU ORIENTATION IS UNKNOWN.
014132,000078: 
014133,000079:                                                                                                  #  OUTPUT:       NONE
014134,000080: 
014135,000081:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:  NONE
014136,000082: 
014137,000083:                                                                                                  #  DEBRIS:       OPTION1, +1, TDEC1, POINTVSM, SCAXIS, CPHI, CTHETA, CPSI,

Page 339

014139,000085:                                                                                                  #                3AXISFLG.
014140,000086: 
014141,000087: 06,3715  E4,1606                                  EBANK=   RONE                                  
014142,000088: 32,2217                                           BANK     32                                    
014143,000089: 26,2000                                           SETLOC   BAWLANGS                              
014144,000090: 26,2000                                           BANK                                           
014145,000091: 
014146,000092: 26,2022                                           COUNT*   $$/R63                                
014147,000093: 26,2022           04616        V89CALL            TC       BANKCALL                              #  IMU STATUS CHECK.  RETURNS IF ORIENTATION
014148,000094: 26,2023           11254                           CADR     R02BOTH                               #  KNOWN.  ALARMS IF NOT.
014149,000095: 26,2024           36245                           CAF      THREE                                 #  ALLOW ASTRONAUT TO SELECT DESIRED
014150,000096: 26,2025           55051                           TS       OPTIONX                               #  TRACKING ATTITUDE AXIS.
014151,000097: 26,2026           34753                           CAF      ONE                                   
014152,000098: 26,2027           55052                           TS       OPTIONX    +1                         
014153,000099: 26,2030           32117                           CAF      VB04N12                               #  V 04 N 12
014154,000100: 26,2031           04616                           TC       BANKCALL                              
014155,000101: 26,2032           20476                           CADR     GOFLASH                               
014156,000102: 26,2033           05472                           TC       ENDEXT                                #  TERMINATE
014157,000103: 26,2034           02036                           TC       +2                                    #  PROCEED
014158,000104: 26,2035           02030                           TC       -5                                    #  DATA IN. OPTION1+1 = 1 FOR Z AXIS
014159,000105: 26,2036           06037        V89RECL            TC       INTPRET                               #                    = 2 FOR X AXIS
014160,000106: 26,2037           43234                           RTB      DAD                                   
014161,000107: 26,2040           21573                                    LOADTIME                              #  READ PRESENT TIME
014162,000108: 26,2041           14122                                    DP1MIN                                
014163,000109: 26,2042           02205                           STORE    TSTART82                              #  SAVE TIME FOR LEMCONIC CALL
014164,000110: 26,2043           34041                           STCALL   TDEC1                                 #  STORE TIME FOR CSMCONIC CALL
014165,000111: 26,2044           27066                                    CSMCONIC                              #  CSM STATE VECTOR UPDATE
014166,000112: 26,2045           77775                           VLOAD                                          #  CSMCONIC LEFT R VECTOR IN RATT
014167,000113: 26,2046           00001                                    RATT                                  
014168,000114: 26,2047           16207                           STODL    RONE                                  #  SAVE FOR LINE OF SIGHT (LOS) COMPUTATION
014169,000115: 26,2050           02205                                    TSTART82                              
014170,000116: 26,2051           34041                           STCALL   TDEC1                                 #  STORE TIME FOR LEMCONIC CALL
014171,000117: 26,2052           27100                                    LEMCONIC                              #  LEM STATE VECTOR UPDATE
014172,000118: 26,2053           52375                           VLOAD    VSU                                   #  CSM POSITION - LEM POSITION = LOS
014173,000119: 26,2054           02207                                    RONE                                  #  LOS VECTOR LEFT IN MPAC
014174,000120: 26,2055           00001                                    RATT                                  
014175,000121: 26,2056           47121                           MXV      RTB                                   #  (REFSMMAT X LOS).  TRANSFORMS LOS FROM
014176,000122: 26,2057           01734                                    REFSMMAT                              #  REFERENCE COORD TO STAB MEMB COORD.
014177,000123: 26,2060           21726                                    NORMUNIT                              
014178,000124: 26,2061           03773                           STORE    POINTVSM                              #  STORE LOS FOR VECPOINT CALL
014179,000125: 26,2062           77776                           EXIT                                           
014180,000126: 26,2063           41052                           CS       OPTIONX    +1                         #  1 FOR Z AXIS.  2 FOR X AXIS.
014181,000127: 26,2064           64753                           AD       ONE                                   
014182,000128: 26,2065           00006                           EXTEND                                         
014183,000129: 26,2066           12113                           BZF      ALINEZ                                
014184,000130: 26,2067           06037        ALINEX             TC       INTPRET                               #  X AXIS ALIGNMENT
014185,000131: 26,2070           77775                           VLOAD                                          
014186,000132: 26,2071           06520                                    UNITX                                 #  READ (.5, 0, 0)

Page 340

014188,000134: 26,2072           37765        V89CALL1           STCALL   SCAXIS                                #  STORE SELECTED ALIGNMENT AXIS
014189,000135: 26,2073           56040                                    VECPOINT                              #  PUTS DESIRED GIM ANG (OG,IG,MG) IN TMPAC
014190,000136: 26,2074           00322                           STORE    CPHI                                  #  STORE GIMBAL ANGLES FOR BALLANGS CALL.
014191,000137: 26,2075           77776                           EXIT                                           
014192,000138: 26,2076           04616                           TC       BANKCALL                              
014193,000139: 26,2077           54266                           CADR     BALLANGS                              #  PUTS DESIRED BALL ANGLES IN FDAIX,Y,Z
014194,000140: 26,2100           32120                           CAF      VB06N18                               #  V 06 N 18
014195,000141: 26,2101           04616                           TC       BANKCALL                              #  NOUN 18 REFERS TO FDAIX,Y,Z
014196,000142: 26,2102           20476                           CADR     GOFLASH                               
014197,000143: 26,2103           05472                           TC       ENDEXT                                #  TERMINATE
014198,000144: 26,2104           02106                           TC       +2                                    #  PROCEED
014199,000145: 26,2105           02036                           TC       V89RECL                               #  RECYCLE
014200,000146: 26,2106           05516                           TC       DOWNFLAG                              #  RESET 3 AXIS FLAG
014201,000147: 26,2107           00124                           ADRES    3AXISFLG                              #  RESET BIT6 FLAG WORD 5
014202,000148: 26,2110           04616                           TC       BANKCALL                              #  PERFORMS LEM MANEUVER TO ALIGN SELECTED
014203,000149: 26,2111           54123                           CADR     R60LEM                                #  SPACECRAFT AXIS TO CSM.
014204,000150: 26,2112           15472                           TCF      ENDEXT                                #  TERMINATE R63
014205,000151: 
014206,000152: 26,2113           06037        ALINEZ             TC       INTPRET                               #  Z AXIS ALIGNMENT
014207,000153: 26,2114           52175                           VLOAD    GOTO                                  
014208,000154: 26,2115           06514                                    UNITZ                                 #  READ (0, 0, .5)
014209,000155: 26,2116           54072                                    V89CALL1                              
014210,000156: 
014211,000157: 26,2117           01014        VB04N12            VN       412                                   
014212,000158: 26,2120           01422        VB06N18            VN       0618                                  

Page 341

014214,000160: 26,2121           00000 13560  DP1MIN             2DEC     6000       B-28                       
014215,000161: 

End of include-file R63.agc.  Parent file is MAIN.agc