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.

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

Page 383

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

Page 384

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

Page 385

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

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