Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

015114,000002:                                                                                                  ## Copyright:   Public domain.
015115,000003:                                                                                                  ## Filename:    R63.agc
015116,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
015117,000005:                                                                                                  ##              It is part of the source code for the original release
015118,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
015119,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
015120,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
015121,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
015122,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
015123,000011:                                                                                                  ##              that the code format has been changed to conform to the
015124,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
015125,000013:                                                                                                  ##              original YUL assembler.
015126,000014:                                                                                                  ## Reference:   pp. 351-354
015127,000015:                                                                                                  ## Assembler:   yaYUL
015128,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
015129,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
015130,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
015131,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
015132,000020:                                                                                                  ##              2017-01-17 RRB  Updated for Luminary 69
015133,000021:                                                                                                  ##              2017-01-25 RSB  Proofed comment text using octopus/prooferComments
015134,000022:                                                                                                  ##                              and fixed errors found.
015135,000023:                                                                                                  ##              2017-03-07 RSB  Comment-text fixes noted in proofing Luminary 116.
015136,000024: 

Page 351

015138,000026:                                                                                                  #  SUBROUTINE NAME:      V89CALL
015139,000027:                                                                                                  #  MOD NO:       0                       DATE:           9 JAN 1968
015140,000028:                                                                                                  #  MOD BY:       DIGITAL DEVEL GROUP     LOG SECTION:    R63
015141,000029: 
015142,000030:                                                                                                  #  FUNCTIONAL DESCRIPTION:
015143,000031: 
015144,000032:                                                                                                  #  CALLED BY VERB 89 ENTER DURING P00.  PRIO 10 USED.  CALCULATES AND
015145,000033:                                                                                                  #  DISPLAYS FINAL FDAI BALL ANGLES TO POINT LM +X OR +Z AXIS AT CSM.
015146,000034: 
015147,000035:                                                                                                  #  1. KEY IN V 89 E ONLY IF IN PROG 00.  IF NOT IN P00, OPERATOR ERROR AND
015148,000036:                                                                                                  #  EXIT R63, OTHERWISE CONTINUE.
015149,000037: 
015150,000038:                                                                                                  #  2. IF IN P00, DO IMU STATUS CHECK ROUTINE (R02BOTH).  IF IMU ON AND ITS
015151,000039:                                                                                                  #  ORIENTATION KNOWN TO LGC, CONTINUE.
015152,000040: 
015153,000041:                                                                                                  #  3. FLASH DISPLAY V 04 N 06.  R2 INDICATES WHICH SPACECRAFT AXIS IS TO
015154,000042:                                                                                                  #  BE POINTED AT CSM.  INITIAL CHOICE IS PREFERRED (+Z) AXIS (R2=1).
015155,000043:                                                                                                  #  ASTRONAUT CAN CHANGE TO (+X) AXIS (R2 NOT =1) BY V 22 E 2 E.  CONTINUE
015156,000044:                                                                                                  #  AFTER KEYING IN PROCEED.
015157,000045: 
015158,000046:                                                                                                  #  4. BOTH VEHICLE STATE VECTORS UPDATED BY CONIC EQS.
015159,000047: 
015160,000048:                                                                                                  #  5. HALF MAGNITUDE UNIT LOS VECTOR (IN STABLE MEMBER COORDINATES) AND
015161,000049:                                                                                                  #  HALF MAGNITUDE UNIT SPACECRAFT AXIS VECTOR (IN BODY COORDINATES)
015162,000050:                                                                                                  #  PREPARED FOR VECPOINT.
015163,000051: 
015164,000052:                                                                                                  #  6. GIMBAL ANGLES FROM VECPOINT TRANSFORMED INTO FDAI BALL ANGLES BY
015165,000053:                                                                                                  #  BALLANGS.  FLASH DISPLAY V 06 N 18 AND AWAIT RESPONSE.
015166,000054: 
015167,000055:                                                                                                  #  7.    RECYCLE - RETURN TO STEP 4.
015168,000056:                                                                                                  #        TERMINATE - EXIT R63.
015169,000057:                                                                                                  #        PROCEED - RESET 3AXISFLG AND CALL R60LEM FOR ATTITUDE MANEUVER.
015170,000058: 
015171,000059:                                                                                                  #  CALLING SEQUENCE:     V 89 E.
015172,000060: 
015173,000061:                                                                                                  #  SUBROUTINES CALLED:   CHKPOOH, R02BOTH, GOXDSPF, CSMCONIC, LEMCONIC,
015174,000062:                                                                                                  #                        VECPOINT, BALLANGS, R60LEM.
015175,000063: 
015176,000064:                                                                                                  #  NORMAL EXIT MODES:    TC ENDEXT
015177,000065: 
015178,000066:                                                                                                  #  ALARMS:       1. OPERATOR ERROR IF NOT IN P00.
015179,000067:                                                                                                  #                2. PROGRAM ALARM IF IMU IS OFF.
015180,000068:                                                                                                  #                3. PROGRAM ALARM IF IMU ORIENTATION IS UNKNOWN.
015181,000069: 
015182,000070:                                                                                                  #  OUTPUT:       NONE
015183,000071: 
015184,000072:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:  NONE
015185,000073: 
015186,000074:                                                                                                  #  DEBRIS:       OPTION1, +1, TDEC1, POINTVSM, SCAXIS, CPHI, CTHETA, CPSI,

Page 352

015188,000076:                                                                                                  #                3AXISFLG.
015189,000077: 
015190,000078: 06,3715  E4,1612                                  EBANK=   RONE                                  
015191,000079: 32,2227                                           BANK     32                                    
015192,000080: 26,2000                                           SETLOC   BAWLANGS                              
015193,000081: 26,2000                                           BANK                                           
015194,000082: 
015195,000083: 26,2000                                           COUNT*   $$/R63                                
015196,000084: 26,2000           04616        V89CALL            TC       BANKCALL                              #  IMU STATUS CHECK.  RETURNS IF ORIENTATION
015197,000085: 26,2001           11175                           CADR     R02BOTH                               #  KNOWN.  ALARMS IF NOT.
015198,000086: 26,2002           36244                           CAF      THREE                                 #  ALLOW ASTRONAUT TO SELECT DESIRED
015199,000087: 26,2003           55051                           TS       OPTIONX                               #  TRACKING ATTITUDE AXIS.
015200,000088: 26,2004           34753                           CAF      ONE                                   
015201,000089: 26,2005           55052                           TS       OPTIONX    +1                         
015202,000090: 26,2006           32075                           CAF      VB04N12                               #  V 04 N 12
015203,000091: 26,2007           04616                           TC       BANKCALL                              
015204,000092: 26,2010           20351                           CADR     GOFLASH                               
015205,000093: 26,2011           05472                           TC       ENDEXT                                #  TERMINATE
015206,000094: 26,2012           02014                           TC       +2                                    #  PROCEED
015207,000095: 26,2013           02006                           TC       -5                                    #  DATA IN. OPTION1+1 = 1 FOR Z AXIS
015208,000096: 26,2014           06036        V89RECL            TC       INTPRET                               #                    = 2 FOR X AXIS
015209,000097: 26,2015           43234                           RTB      DAD                                   
015210,000098: 26,2016           21462                                    LOADTIME                              #  READ PRESENT TIME
015211,000099: 26,2017           14100                                    DP1MIN                                
015212,000100: 26,2020           02211                           STORE    TSTART82                              #  SAVE TIME FOR LEMCONIC CALL
015213,000101: 26,2021           34041                           STCALL   TDEC1                                 #  STORE TIME FOR CSMCONIC CALL
015214,000102: 26,2022           27066                                    CSMCONIC                              #  CSM STATE VECTOR UPDATE
015215,000103: 26,2023           77775                           VLOAD                                          #  CSMCONIC LEFT R VECTOR IN RATT
015216,000104: 26,2024           00001                                    RATT                                  
015217,000105: 26,2025           16213                           STODL    RONE                                  #  SAVE FOR LINE OF SIGHT (LOS) COMPUTATION
015218,000106: 26,2026           02211                                    TSTART82                              
015219,000107: 26,2027           34041                           STCALL   TDEC1                                 #  STORE TIME FOR LEMCONIC CALL
015220,000108: 26,2030           27100                                    LEMCONIC                              #  LEM STATE VECTOR UPDATE
015221,000109: 26,2031           52375                           VLOAD    VSU                                   #  CSM POSITION - LEM POSITION = LOS
015222,000110: 26,2032           02213                                    RONE                                  #  LOS VECTOR LEFT IN MPAC
015223,000111: 26,2033           00001                                    RATT                                  
015224,000112: 26,2034           47121                           MXV      RTB                                   #  (REFSMMAT X LOS).  TRANSFORMS LOS FROM
015225,000113: 26,2035           01734                                    REFSMMAT                              #  REFERENCE COORD TO STAB MEMB COORD.
015226,000114: 26,2036           21700                                    NORMUNIT                              
015227,000115: 26,2037           03767                           STORE    POINTVSM                              #  STORE LOS FOR VECPOINT CALL
015228,000116: 26,2040           77776                           EXIT                                           
015229,000117: 26,2041           41052                           CS       OPTIONX    +1                         #  1 FOR Z AXIS.  2 FOR X AXIS.
015230,000118: 26,2042           64753                           AD       ONE                                   
015231,000119: 26,2043           00006                           EXTEND                                         
015232,000120: 26,2044           12071                           BZF      ALINEZ                                
015233,000121: 26,2045           06036        ALINEX             TC       INTPRET                               #  X AXIS ALIGNMENT
015234,000122: 26,2046           77775                           VLOAD                                          
015235,000123: 26,2047           06422                                    UNITX                                 #  READ (.5, 0, 0)

Page 353

015237,000125: 26,2050           37761        V89CALL1           STCALL   SCAXIS                                #  STORE SELECTED ALIGNMENT AXIS
015238,000126: 26,2051           56016                                    VECPOINT                              #  PUTS DESIRED GIM ANG (OG,IG,MG) IN TMPAC
015239,000127: 26,2052           00322                           STORE    CPHI                                  #  STORE GIMBAL ANGLES FOR BALLANGS CALL.
015240,000128: 26,2053           77776                           EXIT                                           
015241,000129: 26,2054           04616                           TC       BANKCALL                              
015242,000130: 26,2055           54244                           CADR     BALLANGS                              #  PUTS DESIRED BALL ANGLES IN FDAIX,Y,Z
015243,000131: 26,2056           32076                           CAF      VB06N18                               #  V 06 N 18
015244,000132: 26,2057           04616                           TC       BANKCALL                              #  NOUN 18 REFERS TO FDAIX,Y,Z
015245,000133: 26,2060           20351                           CADR     GOFLASH                               
015246,000134: 26,2061           05472                           TC       ENDEXT                                #  TERMINATE
015247,000135: 26,2062           02064                           TC       +2                                    #  PROCEED
015248,000136: 26,2063           02014                           TC       V89RECL                               #  RECYCLE
015249,000137: 26,2064           05516                           TC       DOWNFLAG                              #  RESET 3 AXIS FLAG
015250,000138: 26,2065           00124                           ADRES    3AXISFLG                              #  RESET BIT6 FLAG WORD 5
015251,000139: 26,2066           04616                           TC       BANKCALL                              #  PERFORMS LEM MANEUVER TO ALIGN SELECTED
015252,000140: 26,2067           54101                           CADR     R60LEM                                #  SPACECRAFT AXIS TO CSM.
015253,000141: 26,2070           15472                           TCF      ENDEXT                                #  TERMINATE R63
015254,000142: 
015255,000143: 26,2071           06036        ALINEZ             TC       INTPRET                               #  Z AXIS ALIGNMENT
015256,000144: 26,2072           52175                           VLOAD    GOTO                                  
015257,000145: 26,2073           06416                                    UNITZ                                 #  READ (0, 0, .5)
015258,000146: 26,2074           54050                                    V89CALL1                              
015259,000147: 
015260,000148: 26,2075           01014        VB04N12            VN       412                                   
015261,000149: 26,2076           01422        VB06N18            VN       0618                                  

Page 354

015263,000151: 26,2077           00000 13560  DP1MIN             2DEC     6000       B-28                       
015264,000152: 

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