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,1968Note that the date is the date of the printout, not the date of the program revision. |
016593,000002: ## Copyright: Public domain.
016594,000003: ## Filename: SYSTEM_TEST_STANDARD_LEAD_INS.agc
016595,000004: ## Purpose: The main source file for Luminary revision 069.
016596,000005: ## It is part of the source code for the original release
016597,000006: ## of the flight software for the Lunar Module's (LM) Apollo
016598,000007: ## Guidance Computer (AGC) for Apollo 10. The actual flown
016599,000008: ## version was Luminary 69 revision 2, which included a
016600,000009: ## newer lunar gravity model and only affected module 2.
016601,000010: ## This file is intended to be a faithful transcription, except
016602,000011: ## that the code format has been changed to conform to the
016603,000012: ## requirements of the yaYUL assembler rather than the
016604,000013: ## original YUL assembler.
016605,000014: ## Reference: pp. 383-385
016606,000015: ## Assembler: yaYUL
016607,000016: ## Contact: Ron Burkey <info@sandroid.org>.
016608,000017: ## Website: www.ibiblio.org/apollo/index.html
016609,000018: ## Mod history: 2016-12-13 MAS Created from Luminary 99.
016610,000019: ## 2016-12-14 MAS Updated from comment-proofed Luminary 99 version.
016611,000020: ## 2017-01-17 RRB Updated for Luminary 69.
016612,000021: ## 2017-01-27 RSB Proofed comment text using octopus/prooferComments
016613,000022: ## and fixed errors found.
016614,000023:
![]() |
Page 383 |
016616,000025: 22,3242 E5,1642 EBANK= XSM
016617,000026:
016618,000027: 33,2045 BANK 33
016619,000028: 04,2000 SETLOC E/PROG
016620,000029: 04,2000 BANK
016621,000030:
016622,000031: 04,2533 COUNT* $$/P07
016623,000032:
016624,000033: # SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
016625,000034:
016626,000035: # E/BKCALL FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
016627,000036:
016628,000037: # THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED. LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
016629,000038: # IS NOT POSSIBLE.
016630,000039:
016631,000040: # THE CALLING SEQUENCE IS:
016632,000041:
016633,000042: # TC BANKCALL
016634,000043: # CADR E/BKCALL
016635,000044: # CADR ROUTINE WHERE YOU WANT TO GO IN FIXED.
016636,000045: # RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
016637,000046: # RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
016638,000047: # RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
016639,000048:
016640,000049: # THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
016641,000050: # OTHER EMEMORY PROGRAMS.
016642,000051:
016643,000052: # A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
016644,000053:
016645,000054: 04,2533 52134 E/BKCALL DXCH BUF2 # SAVE A,L AND GET DP RETURN.
016646,000055: 04,2534 53170 DXCH EBUF2 # SAVE DP RETURN.
016647,000056: 04,2535 25167 INCR EBUF2 # RETURN +1 BECAUSE DOUBLE CADR.
016648,000057: 04,2536 30006 CA BBANK
016649,000058: 04,2537 75012 MASK LOW10 # GET CURRENT EBANK. (SBANK SOMEDAY)
016650,000059: 04,2540 27170 ADS EBUF2 +1 # FORM BBCON. (WAS FBANK)
016651,000060: 04,2541 51167 NDX EBUF2
016652,000061: 04,2542 27777 CA 0 -1 # GET CADR OF ROUTINE.
016653,000062: 04,2543 04622 TC SWCALL # GO TO ROUTINE, SETTING Q TO SWRETURN
016654,000063: # AND RESTORING A + L.
016655,000064: 04,2544 02550 TC +4 # TX Q, V34, OR BAD STALL RETURN.
016656,000065: 04,2545 02547 TC +2 # PROCEED OR GOOD STALL RETURN.
016657,000066: 04,2546 25167 INCR EBUF2 # ENTER OR RECYCLE RETURN.
016658,000067: 04,2547 25167 INCR EBUF2
016659,000068: 04,2550 53170 E/SWITCH DXCH EBUF2
016660,000069: 04,2551 52006 DTCB
016661,000070:
![]() |
Page 384 |
016663,000072: # E/CALL FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
016664,000073:
016665,000074: # THE CALLING SEQUENCE IS...
016666,000075:
016667,000076: # RTB
016668,000077: # E/CALL
016669,000078: # CADR ROUTINE THE INTERPRETIVE SUBROUTINE YOU WANT.
016670,000079: # RETURNS HERE IN INTERPRETIVE.
016671,000080:
016672,000081: 04,2552 22164 E/CALL LXCH LOC # ADRES -1 OF CADR.
016673,000082: 04,2553 50001 INDEX L
016674,000083: 04,2554 30001 CA L # CADR IN A.
016675,000084: 04,2555 24001 INCR L
016676,000085: 04,2556 24001 INCR L # RETURN ADRES IN L.
016677,000086: 04,2557 53170 DXCH EBUF2 # STORE CADR AND RETURN.
016678,000087: 04,2560 06036 TC INTPRET
016679,000088: 04,2561 77624 CALL
016680,000089: 04,2562 01167 EBUF2 # INDIRECTLY EXECUTE ROUTINE. IT MUST
016681,000090: 04,2563 77776 EXIT # LEAVE VIA RVQ OR EQUIVALENT.
016682,000091: 04,2564 23170 LXCH EBUF2 +1 # PICK UP RETURN.
016683,000092: 04,2565 16040 TCF INTPRET +2 # SET LOC AND RETURN TO CALLER.
016684,000093:
![]() |
Page 385 |
016686,000095: # E/JOBWAK FOR WAKING UP ERASABLE MEMORY JOBS.
016687,000096:
016688,000097: # THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
016689,000098:
016690,000099: # THE CALLING SEQUENCE IS:
016691,000100:
016692,000101: # INHINT
016693,000102: # .
016694,000103: # .
016695,000104: # CA WAKEADR ADDRESS OF SLEEPING JOB
016696,000105: # TC IBNKCALL
016697,000106: # CADR E/JOBWAK
016698,000107: # . RETURNS HERE
016699,000108: # .
016700,000109: # .
016701,000110: # RELINT IF YOU DID AN INHINT.
016702,000111:
016703,000112: 33,2045 BANK 33
016704,000113: 04,2000 SETLOC E/PROG
016705,000114: 04,2000 BANK
016706,000115:
016707,000116: 04,2566 COUNT* $$/P07
016708,000117:
016709,000118: 04,2566 05137 E/JOBWAK TC JOBWAKE # ARRIVE IWTH ADRES IN A.
016710,000119: 04,2567 44741 CS BIT11
016711,000120: 04,2570 50064 NDX LOCCTR
016712,000121: 04,2571 26164 ADS LOC # KNOCK FIXED MEMORY BIT OUT OF ADRES.
016713,000122: 04,2572 00072 TC RUPTREG3 # RETURN
016714,000123:
End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc. Parent file is MAIN.agc