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.

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

Page 351

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

Page 352

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

Page 353

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

Page 354

015267,000151: 26,2077           00000 13560  DP1MIN             2DEC     6000       B-28                       
015268,000152: 

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