Source Code
This is an attempt to recreate Luminary 99 Rev 2, otherwise known as LUM99R2, from Luminary 99 Rev 1 and ephemeris data from Luminary 116. The differences are confined to the last 10-12 lines of the CONTROLLED CONSTANTS. Luminary 99 Rev 1 source-code was transcribed from a printout in the MIT Museum, while Luminary 116 source code was transcribed from a printout belonging to Don Eyles. AGC developer James Kernan, the "rope mother" for the Apollo 11 Lunar Module's AGC, explains as follows: "At the last minute, Dan Lickly, our chief engineer, appeared with ephemerides updates and it took two tries to get it right. The result was that we created Lum99 Revision 1 and Lum99 Revision 2." It is suspected that the former is what's in the MIT Museum, and the latter is what we are trying to recreate here. As for which revision actually flew in Apollo 11, all of the other available surviving evidence points to Rev 1 rather than to Rev 2, so we're just not sure! |
015212,000002: ## Copyright: Public domain.
015213,000003: ## Filename: SYSTEM_TEST_STANDARD_LEAD_INS.agc
015214,000004: ## Purpose: Part of the source code for Luminary 1A build 099.
015215,000005: ## It is part of the source code for the Lunar Module's (LM)
015216,000006: ## Apollo Guidance Computer (AGC), for Apollo 11.
015217,000007: ## Assembler: yaYUL
015218,000008: ## Contact: Ron Burkey <info@sandroid.org>.
015219,000009: ## Website: www.ibiblio.org/apollo.
015220,000010: ## Pages: 370-372
015221,000011: ## Mod history: 2009-05-17 RSB Adapted from the corresponding
015222,000012: ## Luminary131 file, using page
015223,000013: ## images from Luminary 1A.
015224,000014: ## 2016-12-14 RSB Proofed text comments with octopus/ProoferComments
015225,000015: ## and corrected the errors found.
015226,000016: ## 2017-03-03 RSB Snapshot of Luminary 99 Rev 1.
015227,000017: ## 2017-03-07 RSB Comment-text fixes noted in proofing Luminary 116.
015228,000018:
Page 370 |
015230,000020: 22,3242 E5,1642 EBANK= XSM
015231,000021:
015232,000022: 33,2045 BANK 33
015233,000023: 04,2000 SETLOC E/PROG
015234,000024: 04,2000 BANK
015235,000025:
015236,000026: 04,2576 COUNT* $$/P07
015237,000027:
015238,000028: # SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
015239,000029:
015240,000030: # E/BKCALL FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
015241,000031:
015242,000032: # THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED. LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
015243,000033: # IS NOT POSSIBLE.
015244,000034:
015245,000035: # THE CALLING SEQUENCE IS:
015246,000036:
015247,000037: # TC BANKCALL
015248,000038: # CADR E/BKCALL
015249,000039: # CADR ROUTINE WHERE YOU WANT TO GO IN FIXED.
015250,000040: # RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
015251,000041: # RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
015252,000042: # RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
015253,000043:
015254,000044: # THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
015255,000045: # OTHER EMEMORY PROGRAMS.
015256,000046:
015257,000047: # A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
015258,000048:
015259,000049: 04,2576 52134 E/BKCALL DXCH BUF2 # SAVE A,L AND GET DP RETURN.
015260,000050: 04,2577 53170 DXCH EBUF2 # SAVE DP RETURN.
015261,000051: 04,2600 25167 INCR EBUF2 # RETURN +1 BECAUSE DOUBLE CADR.
015262,000052: 04,2601 30006 CA BBANK
015263,000053: 04,2602 75012 MASK LOW10 # GET CURRENT EBANK. (SBANK SOMEDAY)
015264,000054: 04,2603 27170 ADS EBUF2 +1 # FORM BBCON. (WAS FBANK)
015265,000055: 04,2604 51167 NDX EBUF2
015266,000056: 04,2605 27777 CA 0 -1 # GET CADR OF ROUTINE.
015267,000057: 04,2606 04622 TC SWCALL # GO TO ROUTINE, SETTING Q TO SWRETURN
015268,000058: # AND RESTORING A + L.
015269,000059: 04,2607 02613 TC +4 # TX Q, V34, OR BAD STALL RETURN.
015270,000060: 04,2610 02612 TC +2 # PROCEED OR GOOD STALL RETURN.
015271,000061: 04,2611 25167 INCR EBUF2 # ENTER OR RECYCLE RETURN.
015272,000062: 04,2612 25167 INCR EBUF2
015273,000063: 04,2613 53170 E/SWITCH DXCH EBUF2
015274,000064: 04,2614 52006 DTCB
015275,000065:
Page 371 |
015277,000067: # E/CALL FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
015278,000068:
015279,000069: # THE CALLING SEQUENCE IS...
015280,000070:
015281,000071: # RTB
015282,000072: # E/CALL
015283,000073: # CADR ROUTINE THE INTERPRETIVE SUBROUTINE YOU WANT.
015284,000074: # RETURNS HERE IN INTERPRETIVE.
015285,000075:
015286,000076: 04,2615 22164 E/CALL LXCH LOC # ADRES -1 OF CADR.
015287,000077: 04,2616 50001 INDEX L
015288,000078: 04,2617 30001 CA L # CADR IN A.
015289,000079: 04,2620 24001 INCR L
015290,000080: 04,2621 24001 INCR L # RETURN ADRES IN L.
015291,000081: 04,2622 53170 DXCH EBUF2 # STORE CADR AND RETURN.
015292,000082: 04,2623 06037 TC INTPRET
015293,000083: 04,2624 77624 CALL
015294,000084: 04,2625 01167 EBUF2 # INDIRECTLY EXECUTE ROUTINE. IT MUST
015295,000085: 04,2626 77776 EXIT # LEAVE VIA RVQ OR EQUIVALENT.
015296,000086: 04,2627 23170 LXCH EBUF2 +1 # PICK UP RETURN.
015297,000087: 04,2630 16041 TCF INTPRET +2 # SET LOC AND RETURN TO CALLER.
015298,000088:
Page 372 |
015300,000090: # E/JOBWAK FOR WAKING UP ERASABLE MEMORY JOBS.
015301,000091:
015302,000092: # THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
015303,000093:
015304,000094: # THE CALLING SEQUENCE IS:
015305,000095:
015306,000096: # INHINT
015307,000097: # .
015308,000098: # .
015309,000099: # CA WAKEADR ADDRESS OF SLEEPING JOB
015310,000100: # TC IBNKCALL
015311,000101: # CADR E/JOBWAK
015312,000102: # . RETURNS HERE
015313,000103: # .
015314,000104: # .
015315,000105: # RELINT IF YOU DID AN INHINT.
015316,000106:
015317,000107: 33,2045 BANK 33
015318,000108: 04,2000 SETLOC E/PROG
015319,000109: 04,2000 BANK
015320,000110:
015321,000111: 04,2631 COUNT* $$/P07
015322,000112:
015323,000113: 04,2631 05137 E/JOBWAK TC JOBWAKE # ARRIVE IWTH ADRES IN A.
015324,000114: 04,2632 44741 CS BIT11
015325,000115: 04,2633 50064 NDX LOCCTR
015326,000116: 04,2634 26164 ADS LOC # KNOCK FIXED MEMORY BIT OUT OF ADRES.
015327,000117: 04,2635 00072 TC RUPTREG3 # RETURN
015328,000118:
End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc. Parent file is MAIN.agc