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. |
056263,000002: ## Copyright: Public domain.
056264,000003: ## Filename: RESTARTS_ROUTINE.agc
056265,000004: ## Purpose: The main source file for Luminary revision 069.
056266,000005: ## It is part of the source code for the original release
056267,000006: ## of the flight software for the Lunar Module's (LM) Apollo
056268,000007: ## Guidance Computer (AGC) for Apollo 10. The actual flown
056269,000008: ## version was Luminary 69 revision 2, which included a
056270,000009: ## newer lunar gravity model and only affected module 2.
056271,000010: ## This file is intended to be a faithful transcription, except
056272,000011: ## that the code format has been changed to conform to the
056273,000012: ## requirements of the yaYUL assembler rather than the
056274,000013: ## original YUL assembler.
056275,000014: ## Reference: pp. 1297-1302
056276,000015: ## Assembler: yaYUL
056277,000016: ## Contact: Ron Burkey <info@sandroid.org>.
056278,000017: ## Website: www.ibiblio.org/apollo/index.html
056279,000018: ## Mod history: 2016-12-13 MAS Created from Luminary 99.
056280,000019: ## 2016-12-18 MAS Updated from comment-proofed Luminary 99 version.
056281,000020: ## 2017-01-10 RRB Updated for Luminary 69.
056282,000021: ## 2017-01-28 RSB Proofed comment text using octopus/prooferComments
056283,000022: ## but no errors found.
056284,000023: ## 2017-03-14 RSB Comment-text fixes noted in proofing Luminary 116.
056285,000024: ## 2017-03-16 RSB Comment-text fixes identified in 5-way
056286,000025: ## side-by-side diff of Luminary 69/99/116/131/210.
056287,000026:
Page 1297 |
056289,000028: 01,3523 BANK 01
056290,000029: 01,2000 SETLOC RESTART
056291,000030: 01,2000 BANK
056292,000031:
056293,000032: 01,3523 E3,1436 EBANK= PHSNAME1 # GOPROG MUST SWITCH TO THIS EBANK
056294,000033:
056295,000034: 01,3523 COUNT* $$/RSROU
056296,000035: 01,3523 30161 RESTARTS CA MPAC +5 # GET GROUP NUMBER -1
056297,000036: 01,3524 60000 DOUBLE # SAVE FOR INDEXING
056298,000037: 01,3525 54155 TS TEMP2G
056299,000038:
056300,000039: 01,3526 33765 CA PHS2CADR # SET UP EXIT IN CASE IT IS AN EVEN
056301,000040: 01,3527 54157 TS TEMPSWCH # TABLE PHASE
056302,000041:
056303,000042: 01,3530 33562 CA RTRNCADR # TO SAVE TIME ASSUME IT WILL GET NEXT
056304,000043: 01,3531 54707 TS GOLOC +2 # GROUP AFTER THIS
056305,000044:
056306,000045: 01,3532 30154 CA TEMPPHS
056307,000046: 01,3533 75007 MASK OCT1400
056308,000047: 01,3534 10000 CCS A # IS IT A VARIABLE OR TABLE RESTART
056309,000048: 01,3535 13546 TCF ITSAVAR # IT:S A VARIABLE RESTART
056310,000049:
056311,000050: 01,3536 10154 GETPART2 CCS TEMPPHS # IS IT AN X.1 RESTART
056312,000051: 01,3537 10000 CCS A
056313,000052: 01,3540 13646 TCF ITSATBL # NO, ITS A TABLE RESTART
056314,000053:
056315,000054: 01,3541 35024 CA PRIO14 # IT IS AN X.1 RESTART, THEREFORE START
056316,000055: 01,3542 05105 TC FINDVAC # THE DISPLAY RESTART JOB
056317,000056: 01,3543 E3,1400 EBANK= LST1
056318,000057: 01,3543 02712 20103 2CADR INITDSP
056319,000058:
056320,000059: 01,3545 03562 TC RTRNCADR # FINISHED WITH THIS GROUP, GET NEXT ONE
056321,000060:
056322,000061: 01,3546 75007 ITSAVAR MASK OCT1400 # IS IT TYPE B ?
056323,000062: 01,3547 10000 CCS A
056324,000063: 01,3550 13617 TCF ITSLIKEB # YES, IT IS TYPE B
056325,000064:
056326,000065: 01,3551 00006 EXTEND # STORE THE JOB (OR TASK) 2CADR FOR EXIT
056327,000066: 01,3552 50155 NDX TEMP2G
056328,000067: 01,3553 31437 DCA PHSNAME1
056329,000068: 01,3554 52706 DXCH GOLOC
056330,000069:
056331,000070: 01,3555 30154 CA TEMPPHS # SEE IF THIS IS A JOB, TASK, OR A LONGCAL
056332,000071: 01,3556 74757 MASK OCT7
056333,000072: 01,3557 67745 AD MINUS2
056334,000073: 01,3560 10000 CCS A
056335,000074: 01,3561 13731 TCF ITSLNGCL # ITS A LONGCALL
056336,000075:
056337,000076: 01,3562 04631 RTRNCADR TC SWRETURN # CANT GET HERE
Page 1298 |
056339,000078: 01,3563 13565 TCF ITSAWAIT
056340,000079:
056341,000080: 01,3564 13632 TCF ITSAJOB # ITS A JOB
056342,000081:
056343,000082: 01,3565 33771 ITSAWAIT CA WTLTCADR # SET UP WAITLIST CALL
056344,000083: 01,3566 54704 TS GOLOC -1
056345,000084:
056346,000085: 01,3567 50155 NDX TEMP2G # DIRECTLY STORED
056347,000086: 01,3570 31054 CA PHSPRDT1
056348,000087: 01,3571 10000 TIMETEST CCS A # IS IT AN IMMEDIATE RESTART
056349,000088: 01,3572 24000 INCR A # NO,
056350,000089: 01,3573 13576 TCF FINDTIME # FIND OUT WHEN IT SHOULD BEGIN
056351,000090:
056352,000091: 01,3574 15436 TCF ITSINDIR # STORED INDIRECTLY
056353,000092:
056354,000093: 01,3575 13615 TCF IMEDIATE # IT WANTS AN IMMEDIATE RESTART
056355,000094:
056356,000095: # ***** THIS MUST BE IN FIXED FIXED *****
056357,000096:
056358,000097: 5436 BLOCK 02
056359,000098: 4000 SETLOC FFTAG2
056360,000099: 4000 BANK
056361,000100:
056362,000101: 5436 COUNT* $$/RSROU
056363,000102: 5436 22706 ITSINDIR LXCH GOLOC +1 # GET THE CORRECT E BANK IN CASE THIS IS
056364,000103: 5437 22006 LXCH BB # SWITCHED ERRASIBLE
056365,000104:
056366,000105: 5440 50000 NDX A # GET THE TIME INDIRECTLY
056367,000106: 5441 30001 CA 1
056368,000107:
056369,000108: 5442 22006 LXCH BB # RESTORE THE BB AND GOLOC
056370,000109: 5443 22706 LXCH GOLOC +1
056371,000110:
056372,000111: 5444 13576 TCF FINDTIME # FIND OUT WHEN IT SHOULD BEGIN
056373,000112:
056374,000113: # ***** YOU MAY RETURN TO SWITCHED FIXED *****
056375,000114:
056376,000115: 01,3576 BANK 01
056377,000116: 01,2000 SETLOC RESTART
056378,000117: 01,2000 BANK
056379,000118:
056380,000119: 01,3576 COUNT* $$/RSROU
056381,000120: 01,3576 40000 FINDTIME COM # MAKE NEGITIVE SINCE IT WILL BE SUBTRACTD
056382,000121: 01,3577 54001 TS L # AND SAVE
056383,000122: 01,3600 50155 NDX TEMP2G
056384,000123: 01,3601 41053 CS TBASE1
056385,000124: 01,3602 00006 EXTEND
056386,000125: 01,3603 60025 SU TIME1
056387,000126: 01,3604 10000 CCS A
056388,000127: 01,3605 40000 COM
Page 1299 |
056390,000129: 01,3606 67730 AD OCT37776
056391,000130: 01,3607 64753 AD ONE
056392,000131: 01,3610 60001 AD L
056393,000132: 01,3611 10000 CCS A
056394,000133: 01,3612 34755 CA ZERO
056395,000134: 01,3613 13615 TCF +2
056396,000135: 01,3614 13615 TCF +1
056397,000136: 01,3615 64753 IMEDIATE AD ONE
056398,000137: 01,3616 00704 TC GOLOC -1
056399,000138: 01,3617 33562 ITSLIKEB CA RTRNCADR # TYPE B, SO STORE RETURN IN
056400,000139: 01,3620 54157 TS TEMPSWCH # TEMPSWCH IN CASE OF AN EVEN PHASE
056401,000140:
056402,000141: 01,3621 33766 CA PRT2CADR # SET UP EXIT TO GET TABLE PART OF THIS
056403,000142: 01,3622 54707 TS GOLOC +2 # VARIABLE TYPE OF PHASE
056404,000143:
056405,000144: 01,3623 30154 CA TEMPPHS # MAKE THE PHASE LOOK RIGHT FOR THE TABLE
056406,000145: 01,3624 76073 MASK OCT177 # PART OF THIS VARIABLE PHASE
056407,000146: 01,3625 54154 TS TEMPPHS
056408,000147:
056409,000148: 01,3626 00006 EXTEND
056410,000149: 01,3627 50155 NDX TEMP2G # OBTAIN THE JOB:S 2CADR
056411,000150: 01,3630 31437 DCA PHSNAME1
056412,000151: 01,3631 52706 DXCH GOLOC
056413,000152:
056414,000153: 01,3632 50155 ITSAJOB NDX TEMP2G # NOW ADD THE PRIORITY AND LET:S GO
056415,000154: 01,3633 31054 CA PHSPRDT1
056416,000155: 01,3634 54704 CHKNOVAC TS GOLOC -1 # SAVE PRIO UNTIL WE SEE IF ITS
056417,000156: 01,3635 00006 EXTEND # A FINDVAC OR A NOVAC
056418,000157: 01,3636 63642 BZMF ITSNOVAC
056419,000158:
056420,000159: 01,3637 33770 CAF FVACCADR # POSITIVE, SET UP FINDVAC CALL.
056421,000160: 01,3640 56704 XCH GOLOC -1 # PICK UP PRIO,
056422,000161: 01,3641 00704 TC GOLOC -1 # AND GO
056423,000162:
056424,000163: 01,3642 33772 ITSNOVAC CAF NOVACADR # NEGATIVE,
056425,000164: 01,3643 56704 XCH GOLOC -1 # SET UP NOVAC CALL,
056426,000165: 01,3644 40000 COM # CORRECT PRIO,
056427,000166: 01,3645 00704 TC GOLOC -1 # AND GO
056428,000167:
056429,000168: 01,3646 54020 ITSATBL TS CYR # FIND OUT IF THE PHASE IS ODD OR EVEN
056430,000169: 01,3647 10020 CCS CYR
056431,000170: 01,3650 13651 TCF +1 # IT:S EVEN
056432,000171: 01,3651 13747 TCF ITSEVEN
056433,000172:
056434,000173: 01,3652 33562 CA RTRNCADR # IN CASE THIS IS THE SECOND PART OF A
056435,000174: 01,3653 54707 TS GOLOC +2 # TYPE B RESTART, WE NEED PROPER EXIT
056436,000175:
056437,000176: 01,3654 30154 CA TEMPPHS # SET UP POINTER FOR FINDING OUR PLACE IN
056438,000177: 01,3655 54021 TS SR # THE RESTART TABLES
056439,000178: 01,3656 60021 AD SR
Page 1300 |
056441,000180: 01,3657 50155 NDX TEMP2G
056442,000181: 01,3660 62003 AD SIZETAB +1
056443,000182: 01,3661 54156 TS POINTER
056444,000183:
056445,000184: 01,3662 00006 CONTBL2 EXTEND # FIND OUT WHAT:S IN THE TABLE
056446,000185: 01,3663 50156 NDX POINTER
056447,000186: 01,3664 32002 DCA CADRTAB # GET THE 2CADR
056448,000187:
056449,000188: 01,3665 22706 LXCH GOLOC +1 # STORE THE BB INFORMATION
056450,000189:
056451,000190: 01,3666 10000 CCS A # IS IT A JOB OR IS IT TIMED
056452,000191: 01,3667 24000 INCR A # POSITIVE, MUST BE A JOB
056453,000192: 01,3670 13743 TCF ITSAJOB2
056454,000193:
056455,000194: 01,3671 24000 INCR A # MUST BE EITHER A WAITLIST OR LONGCALL
056456,000195: 01,3672 54705 TS GOLOC # LET-S STORE THE CORRECT CADR
056457,000196:
056458,000197: 01,3673 33771 CA WTLTCADR # SET UP OUR EXIT TO WAITLIST
056459,000198: 01,3674 54704 TS GOLOC -1
056460,000199:
056461,000200: 01,3675 30706 CA GOLOC +1 # NOW FIND OUT IF IT IS A WAITLIST CALL
056462,000201: 01,3676 74742 MASK BIT10 # THIS SHOULD BE ONE IF WE HAVE -BB
056463,000202: 01,3677 10000 CCS A # FOR THAT MATTER SO SHOULD BE BITS 9,8,7,
056464,000203: # 6,5, AND LAST BUT NOT LEAST (PERHAPS NOT
056465,000204: # IN IMPORTANCE ANYWAY. BIT 4
056466,000205: 01,3700 13736 TCF ITSWTLST # IT IS A WAITLIST CALL
056467,000206:
056468,000207: 01,3701 50156 NDX POINTER # OBTAIN THE ORIGINAL DELTA T
056469,000208: 01,3702 32000 CA PRDTTAB # ADDRESS FOR THIS LONGCALL
056470,000209:
056471,000210: 01,3703 15445 TCF ITSLGCL1 # NOW GO GET THE DELTA TIME
056472,000211:
056473,000212: # ***** THIS MUST BE IN FIXED FIXED *****
056474,000213:
056475,000214: 5445 BLOCK 02
056476,000215: 4000 SETLOC FFTAG2
056477,000216: 4000 BANK
056478,000217:
056479,000218: 5445 COUNT* $$/RSROU
056480,000219: 5445 22706 ITSLGCL1 LXCH GOLOC +1 # OBTAIN THE CORRECT E BANK
056481,000220: 5446 22006 LXCH BB
056482,000221: 5447 22706 LXCH GOLOC +1 # AND PRESERVE OUR E AND F BANKS
056483,000222:
056484,000223: 5450 00006 EXTEND # GET THE DELTA TIME
056485,000224: 5451 50000 NDX A
056486,000225: 5452 30001 DCA 0
056487,000226:
056488,000227: 5453 22706 LXCH GOLOC +1 # RESTORE OUR E AND F BANK
056489,000228: 5454 22006 LXCH BB # RESTORE THE TASKS E AND F BANKS
056490,000229: 5455 22706 LXCH GOLOC +1 # AND PRESERVE OUR L
Page 1301 |
056492,000231: 5456 13704 TCF ITSLGCL2 # NOW LET:S PROCESS THIS LONGCALL
056493,000232:
056494,000233: # ***** YOU MAY RETURN TO SWITCHED FIXED *****
056495,000234:
056496,000235: 01,3704 BANK 01
056497,000236: 01,2000 SETLOC RESTART
056498,000237: 01,2000 BANK
056499,000238:
056500,000239: 01,3704 COUNT* $$/RSROU
056501,000240: 01,3704 53154 ITSLGCL2 DXCH LONGTIME
056502,000241:
056503,000242: 01,3705 00006 EXTEND # CALCULATE TIME LEFT
056504,000243: 01,3706 40025 DCS TIME2
056505,000244: 01,3707 21154 DAS LONGTIME
056506,000245: 01,3710 00006 EXTEND
056507,000246: 01,3711 31152 DCA LONGBASE
056508,000247: 01,3712 21154 DAS LONGTIME
056509,000248:
056510,000249: 01,3713 11153 CCS LONGTIME # FIND OUT HOW THIS SHOULD BE RESTARTED
056511,000250: 01,3714 13724 TCF LONGCLCL
056512,000251: 01,3715 13717 TCF +2
056513,000252: 01,3716 13612 TCF IMEDIATE -3
056514,000253: 01,3717 11154 CCS LONGTIME +1
056515,000254: 01,3720 13724 TCF LONGCLCL
056516,000255: 01,3721 13722 NOOP # CAN:T GET HERE *********
056517,000256: 01,3722 13612 TCF IMEDIATE -3
056518,000257: 01,3723 13615 TCF IMEDIATE
056519,000258:
056520,000259: 01,3724 33767 LONGCLCL CA LGCLCADR # WE WILL GO TO LONGCALL
056521,000260: 01,3725 54704 TS GOLOC -1
056522,000261:
056523,000262: 01,3726 00006 EXTEND # PREPARE OUR ENTRY TO LONGCALL
056524,000263: 01,3727 31154 DCA LONGTIME
056525,000264: 01,3730 00704 TC GOLOC -1
056526,000265:
056527,000266: 01,3731 33771 ITSLNGCL CA WTLTCADR # ASSUME IT WILL GO TO WAITLIST
056528,000267: 01,3732 54704 TS GOLOC -1
056529,000268:
056530,000269: 01,3733 50155 NDX TEMP2G
056531,000270: 01,3734 41054 CS PHSPRDT1 # GET THE DELTA T ADDRESS
056532,000271:
056533,000272: 01,3735 15445 TCF ITSLGCL1 # NOW GET THE DELTA TIME
056534,000273:
056535,000274: 01,3736 40706 ITSWTLST CS GOLOC +1 # CORRECT THE BBCON INFORMATION
056536,000275: 01,3737 54706 TS GOLOC +1
056537,000276:
056538,000277: 01,3740 50156 NDX POINTER # GET THE DT AND FIND OUT IF IT WAS STORED
056539,000278: 01,3741 32000 CA PRDTTAB # DIRECTLY OR INDIRECTLY
056540,000279:
056541,000280: 01,3742 13571 TCF TIMETEST # FIND OUT HOW THE TIME IS STORED
056542,000281:
Page 1302 |
056544,000283: 01,3743 56705 ITSAJOB2 XCH GOLOC # STORE THE CADR
056545,000284:
056546,000285: 01,3744 50156 NDX POINTER # ADD THE PRIORITY AND LET:S GO
056547,000286: 01,3745 32000 CA PRDTTAB
056548,000287:
056549,000288: 01,3746 13634 TCF CHKNOVAC
056550,000289:
056551,000290: 01,3747 30157 ITSEVEN CA TEMPSWCH # SET UP FOR EITHER THE SECOND PART OF THE
056552,000291: 01,3750 54707 TS GOLOC +2 # TABLE, OR A RETURN FOR THE NEXT GROUP
056553,000292:
056554,000293: 01,3751 50155 NDX TEMP2G # SET UP POINTER FOR OUR LOCATION WITHIN
056555,000294: 01,3752 32002 CA SIZETAB # THE TABLE
056556,000295: 01,3753 60154 AD TEMPPHS # THIS MAY LOOK BAD BUT LET:S SEE YOU DO
056557,000296: 01,3754 60154 AD TEMPPHS # BETTER IN TIME OR NUMBERR OF LOCATIONS
056558,000297: 01,3755 60154 AD TEMPPHS
056559,000298: 01,3756 54156 TS POINTER
056560,000299:
056561,000300: 01,3757 13662 TCF CONTBL2 # NOW PROCESS WHAT IS IN THE TABLE
056562,000301:
056563,000302: 01,3760 36244 PHSPART2 CA THREE # SET THE POINTER FOR THE SECOND HALF OF
056564,000303: 01,3761 26156 ADS POINTER # THE TABLE
056565,000304:
056566,000305: 01,3762 33562 CA RTRNCADR # THIS WILL BE OUR LAST TIME THROUGH THE
056567,000306: 01,3763 54707 TS GOLOC +2 # EVEN TABLE, SO AFTER IT GET THE NEXT
056568,000307: # GROUP
056569,000308: 01,3764 13662 TCF CONTBL2 # SO LET:S GET THE SECOND ENTRY IN THE TBL
056570,000309:
056571,000310: 01,3765 0154 TEMPPHS EQUALS MPAC
056572,000311: 01,3765 0155 TEMP2G EQUALS MPAC +1
056573,000312: 01,3765 0156 POINTER EQUALS MPAC +2
056574,000313: 01,3765 0157 TEMPSWCH EQUALS MPAC +3
056575,000314: 01,3765 0705 GOLOC EQUALS VAC5 +20D
056576,000315: 01,3765 7745 MINUS2 EQUALS NEG2
056577,000316: 01,3765 6073 OCT177 EQUALS LOW7
056578,000317:
056579,000318: 01,3765 03760 PHS2CADR GENADR PHSPART2
056580,000319: 01,3766 03536 PRT2CADR GENADR GETPART2
056581,000320: 01,3767 05277 LGCLCADR GENADR LONGCALL
056582,000321: 01,3770 05105 FVACCADR GENADR FINDVAC
056583,000322: 01,3771 05203 WTLTCADR GENADR WAITLIST
056584,000323: 01,3772 05072 NOVACADR GENADR NOVAC
056585,000324:
056586,000325:
End of include-file RESTARTS_ROUTINE.agc. Parent file is MAIN.agc