Source Code
This is a reconstructed version of Luminary 130, the initial AGC program released
in November 1969 for the Apollo 13 LM. Three more releases
followed before the flown revision was finally manufactured in February 1970.
This reconstruction was created from a previous transcription of the original listing of Luminary 131, combined with Luminary memo #129 which describes the small difference between the Luminary 130 and 131. The reconstructed source code was verified by matching memory-bank checksums to those listed for Luminary 130 in drawing 2021152G. In this source code, program comments from the original (Luminary 131) code are prefixed with '#', while those added later by the Virtual AGC project are prefixed with '##'. |
015585,000002: ## Copyright: Public domain.
015586,000003: ## Filename: SYSTEM_TEST_STANDARD_LEAD_INS.agc
015587,000004: ## Purpose: A section of the reconstructed source code for Luminary 130.
015588,000005: ## This was the original program released for the Apollo 13 LM,
015589,000006: ## although several more revisions would follow. It has been
015590,000007: ## reconstructed from a listing of Luminary 131, from which it
015591,000008: ## differs on only two lines in P70-P71. The difference is
015592,000009: ## described in detail in Luminary memo #129, which was used
015593,000010: ## to perform the reconstruction. This file is intended to be a
015594,000011: ## faithful reconstruction, except that the code format has been
015595,000012: ## changed to conform to the requirements of the yaYUL assembler
015596,000013: ## rather than the original YUL assembler.
015597,000014: ## Reference: pp. 372-374
015598,000015: ## Contact: Ron Burkey <info@sandroid.org>.
015599,000016: ## Website: www.ibiblio.org/apollo/index.html
015600,000017: ## Mod history: 05/11/03 RSB. Began transcribing.
015601,000018: ## 05/14/05 RSB Corrected website reference above.
015602,000019: ## 2017-01-06 RSB Page numbers now agree with those on the
015603,000020: ## original harcopy, as opposed to the PDF page
015604,000021: ## numbers in 1701.pdf.
015605,000022: ## 2017-02-23 RSB Proofed comment text using octopus/ProoferComments.
015606,000023: ## 2018-09-04 MAS Copied from Luminary 131 for Luminary 130.
015607,000024:
Page 372 |
015609,000026: 22,3242 E5,1642 EBANK= XSM
015610,000027:
015611,000028: 33,2045 BANK 33
015612,000029: 04,2000 SETLOC E/PROG
015613,000030: 04,2000 BANK
015614,000031:
015615,000032: 04,2562 COUNT* $$/P07
015616,000033:
015617,000034: # SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
015618,000035:
015619,000036: # E/BKCALL FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
015620,000037:
015621,000038: # THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED. LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
015622,000039: # IS NOT POSSIBLE.
015623,000040:
015624,000041: # THE CALLING SEQUENCE IS:
015625,000042:
015626,000043: # TC BANKCALL
015627,000044: # CADR E/BKCALL
015628,000045: # CADR ROUTINE WHERE YOU WANT TO GO IN FIXED.
015629,000046: # RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
015630,000047: # RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
015631,000048: # RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
015632,000049:
015633,000050: # THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
015634,000051: # OTHER EMEMORY PROGRAMS.
015635,000052:
015636,000053: # A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
015637,000054:
015638,000055: 04,2562 52134 E/BKCALL DXCH BUF2 # SAVE A,L AND GET DP RETURN.
015639,000056: 04,2563 53167 DXCH EBUF2 # SAVE DP RETURN.
015640,000057: 04,2564 25166 INCR EBUF2 # RETURN +1 BECAUSE DOUBLE CADR.
015641,000058: 04,2565 30006 CA BBANK
015642,000059: 04,2566 75012 MASK LOW10 # GET CURRENT EBANK. (SBANK SOMEDAY)
015643,000060: 04,2567 27167 ADS EBUF2 +1 # FORM BBCON. (WAS FBANK)
015644,000061: 04,2570 51166 NDX EBUF2
015645,000062: 04,2571 27777 CA 0 -1 # GET CADR OF ROUTINE.
015646,000063: 04,2572 04622 TC SWCALL # GO TO ROUTINE, SETTING Q TO SWRETURN
015647,000064: # AND RESTORING A + L.
015648,000065: 04,2573 02577 TC +4 # TX Q, V34, OR BAD STALL RETURN.
015649,000066: 04,2574 02576 TC +2 # PROCEED OR GOOD STALL RETURN.
015650,000067: 04,2575 25166 INCR EBUF2 # ENTER OR RECYCLE RETURN.
015651,000068: 04,2576 25166 INCR EBUF2
015652,000069: 04,2577 53167 E/SWITCH DXCH EBUF2
015653,000070: 04,2600 52006 DTCB
015654,000071:
Page 373 |
015656,000073: # E/CALL FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
015657,000074:
015658,000075: # THE CALLING SEQUENCE IS...
015659,000076:
015660,000077: # RTB
015661,000078: # E/CALL
015662,000079: # CADR ROUTINE THE INTERPRETIVE SUBROUTINE YOU WANT.
015663,000080: # RETURNS HERE IN INTERPRETIVE.
015664,000081:
015665,000082: 04,2601 22164 E/CALL LXCH LOC # ADRES -1 OF CADR.
015666,000083: 04,2602 50001 INDEX L
015667,000084: 04,2603 30001 CA L # CADR IN A.
015668,000085: 04,2604 24001 INCR L
015669,000086: 04,2605 24001 INCR L # RETURN ADRES IN L.
015670,000087: 04,2606 53167 DXCH EBUF2 # STORE CADR AND RETURN.
015671,000088: 04,2607 06042 TC INTPRET
015672,000089: 04,2610 77624 CALL
015673,000090: 04,2611 01166 EBUF2 # INDIRECTLY EXECUTE ROUTINE. IT MUST
015674,000091: 04,2612 77776 EXIT # LEAVE VIA RVQ OR EQUIVALENT.
015675,000092: 04,2613 23167 LXCH EBUF2 +1 # PICK UP RETURN.
015676,000093: 04,2614 16044 TCF INTPRET +2 # SET LOC AND RETURN TO CALLER.
015677,000094:
Page 374 |
015679,000096: # E/JOBWAK FOR WAKING UP ERASABLE MEMORY JOBS.
015680,000097:
015681,000098: # THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
015682,000099:
015683,000100: # THE CALLING SEQUENCE IS:
015684,000101:
015685,000102: # INHINT
015686,000103: # .
015687,000104: # .
015688,000105: # CA WAKEADR ADDRESS OF SLEEPING JOB
015689,000106: # TC IBNKCALL
015690,000107: # CADR E/JOBWAK
015691,000108: # . RETURNS HERE
015692,000109: # .
015693,000110: # .
015694,000111: # RELINT IF YOU DID AN INHINT.
015695,000112:
015696,000113: 33,2045 BANK 33
015697,000114: 04,2000 SETLOC E/PROG
015698,000115: 04,2000 BANK
015699,000116:
015700,000117: 04,2615 COUNT* $$/P07
015701,000118:
015702,000119: 04,2615 05137 E/JOBWAK TC JOBWAKE # ARRIVE IWTH ADRES IN A.
015703,000120: 04,2616 44741 CS BIT11
015704,000121: 04,2617 50064 NDX LOCCTR
015705,000122: 04,2620 26164 ADS LOC # KNOCK FIXED MEMORY BIT OUT OF ADRES.
015706,000123: 04,2621 00072 TC RUPTREG3 # RETURN
015707,000124:
End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc. Parent file is MAIN.agc