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.

016599,000002:                                                                                                  ## Copyright:   Public domain.
016600,000003:                                                                                                  ## Filename:    SYSTEM_TEST_STANDARD_LEAD_INS.agc
016601,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
016602,000005:                                                                                                  ##              It is part of the source code for the original release
016603,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
016604,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
016605,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
016606,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
016607,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
016608,000011:                                                                                                  ##              that the code format has been changed to conform to the
016609,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
016610,000013:                                                                                                  ##              original YUL assembler.
016611,000014:                                                                                                  ## Reference:   pp. 383-385
016612,000015:                                                                                                  ## Assembler:   yaYUL
016613,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
016614,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
016615,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
016616,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
016617,000020:                                                                                                  ##              2017-01-17 RRB  Updated for Luminary 69.
016618,000021:                                                                                                  ##              2017-01-27 RSB  Proofed comment text using octopus/prooferComments
016619,000022:                                                                                                  ##                              and fixed errors found.
016620,000023: 

Page 383

016622,000025: 22,3242  E5,1642                                  EBANK=   XSM                                   
016623,000026: 
016624,000027: 33,2045                                           BANK     33                                    
016625,000028: 04,2000                                           SETLOC   E/PROG                                
016626,000029: 04,2000                                           BANK                                           
016627,000030: 
016628,000031: 04,2533                                           COUNT*   $$/P07                                
016629,000032: 
016630,000033:                                                                                                  #  SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
016631,000034: 
016632,000035:                                                                                                  #  E/BKCALL      FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
016633,000036: 
016634,000037:                                                                                                  #  THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED.  LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
016635,000038:                                                                                                  #  IS NOT POSSIBLE.
016636,000039: 
016637,000040:                                                                                                  #  THE CALLING SEQUENCE IS:
016638,000041: 
016639,000042:                                                                                                  #        TC      BANKCALL
016640,000043:                                                                                                  #        CADR    E/BKCALL
016641,000044:                                                                                                  #        CADR    ROUTINE         WHERE YOU WANT TO GO IN FIXED.
016642,000045:                                                                                                  #        RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
016643,000046:                                                                                                  #        RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
016644,000047:                                                                                                  #        RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
016645,000048: 
016646,000049:                                                                                                  #  THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
016647,000050:                                                                                                  #  OTHER EMEMORY PROGRAMS.
016648,000051: 
016649,000052:                                                                                                  #  A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
016650,000053: 
016651,000054: 04,2533           52134        E/BKCALL           DXCH     BUF2                                  #  SAVE A,L AND GET DP RETURN.
016652,000055: 04,2534           53170                           DXCH     EBUF2                                 #  SAVE DP RETURN.
016653,000056: 04,2535           25167                           INCR     EBUF2                                 #  RETURN +1 BECAUSE DOUBLE CADR.
016654,000057: 04,2536           30006                           CA       BBANK                                 
016655,000058: 04,2537           75012                           MASK     LOW10                                 #  GET CURRENT EBANK.  (SBANK SOMEDAY)
016656,000059: 04,2540           27170                           ADS      EBUF2      +1                         #  FORM BBCON.  (WAS FBANK)
016657,000060: 04,2541           51167                           NDX      EBUF2                                 
016658,000061: 04,2542           27777                           CA       0          -1                         #  GET CADR OF ROUTINE.
016659,000062: 04,2543           04622                           TC       SWCALL                                #  GO TO ROUTINE, SETTING Q TO SWRETURN
016660,000063:                                                                                                  #  AND RESTORING A + L.
016661,000064: 04,2544           02550                           TC       +4                                    #  TX Q, V34, OR BAD STALL RETURN.
016662,000065: 04,2545           02547                           TC       +2                                    #  PROCEED OR GOOD STALL RETURN.
016663,000066: 04,2546           25167                           INCR     EBUF2                                 #  ENTER OR RECYCLE RETURN.
016664,000067: 04,2547           25167                           INCR     EBUF2                                 
016665,000068: 04,2550           53170        E/SWITCH           DXCH     EBUF2                                 
016666,000069: 04,2551           52006                           DTCB                                           
016667,000070: 

Page 384

016669,000072:                                                                                                  #  E/CALL        FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
016670,000073: 
016671,000074:                                                                                                  #  THE CALLING SEQUENCE IS...
016672,000075: 
016673,000076:                                                                                                  #        RTB
016674,000077:                                                                                                  #                E/CALL
016675,000078:                                                                                                  #        CADR    ROUTINE                 THE INTERPRETIVE SUBROUTINE YOU WANT.
016676,000079:                                                                                                  #                                        RETURNS HERE IN INTERPRETIVE.
016677,000080: 
016678,000081: 04,2552           22164        E/CALL             LXCH     LOC                                   #  ADRES -1 OF CADR.
016679,000082: 04,2553           50001                           INDEX    L                                     
016680,000083: 04,2554           30001                           CA       L                                     #  CADR IN A.
016681,000084: 04,2555           24001                           INCR     L                                     
016682,000085: 04,2556           24001                           INCR     L                                     #  RETURN ADRES IN L.
016683,000086: 04,2557           53170                           DXCH     EBUF2                                 #  STORE CADR AND RETURN.
016684,000087: 04,2560           06036                           TC       INTPRET                               
016685,000088: 04,2561           77624                           CALL                                           
016686,000089: 04,2562           01167                                    EBUF2                                 #  INDIRECTLY EXECUTE ROUTINE.  IT MUST
016687,000090: 04,2563           77776                           EXIT                                           #  LEAVE VIA RVQ OR EQUIVALENT.
016688,000091: 04,2564           23170                           LXCH     EBUF2      +1                         #  PICK UP RETURN.
016689,000092: 04,2565           16040                           TCF      INTPRET    +2                         #  SET LOC AND RETURN TO CALLER.
016690,000093: 

Page 385

016692,000095:                                                                                                  #  E/JOBWAK      FOR WAKING UP ERASABLE MEMORY JOBS.
016693,000096: 
016694,000097:                                                                                                  #  THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
016695,000098: 
016696,000099:                                                                                                  #  THE CALLING SEQUENCE IS:
016697,000100: 
016698,000101:                                                                                                  #        INHINT
016699,000102:                                                                                                  #          .
016700,000103:                                                                                                  #          .
016701,000104:                                                                                                  #        CA      WAKEADR         ADDRESS OF SLEEPING JOB
016702,000105:                                                                                                  #        TC      IBNKCALL
016703,000106:                                                                                                  #        CADR    E/JOBWAK
016704,000107:                                                                                                  #          .                     RETURNS HERE
016705,000108:                                                                                                  #          .
016706,000109:                                                                                                  #          .
016707,000110:                                                                                                  #        RELINT                  IF YOU DID AN INHINT.
016708,000111: 
016709,000112: 33,2045                                           BANK     33                                    
016710,000113: 04,2000                                           SETLOC   E/PROG                                
016711,000114: 04,2000                                           BANK                                           
016712,000115: 
016713,000116: 04,2566                                           COUNT*   $$/P07                                
016714,000117: 
016715,000118: 04,2566           05137        E/JOBWAK           TC       JOBWAKE                               #  ARRIVE IWTH ADRES IN A.
016716,000119: 04,2567           44741                           CS       BIT11                                 
016717,000120: 04,2570           50064                           NDX      LOCCTR                                
016718,000121: 04,2571           26164                           ADS      LOC                                   #  KNOCK FIXED MEMORY BIT OUT OF ADRES.
016719,000122: 04,2572           00072                           TC       RUPTREG3                              #  RETURN
016720,000123: 

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