Source Code
These source-code files are part of a reconstructed copy of Skylark 048, the
Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the
Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to. The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction. Since only binary dumps (rather than listings) of Skylark are available as source material, all comments and labels are approximate. They have been taken from the Programmed Guidance Equations or other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
057926,000002: ## Copyright: Public domain.
057927,000003: ## Filename: KEYRUPT,_UPRUPT.agc
057928,000004: ## Purpose: A section of Skylark revision 048.
057929,000005: ## It is part of the source code for the Apollo Guidance Computer (AGC)
057930,000006: ## for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
057931,000007: ## this software are available; instead, this file was created via
057932,000008: ## disassembly of dumps of the core rope modules actually flown on
057933,000009: ## Skylab-2. Access to these modules was provided by the New Mexico
057934,000010: ## Museum of Space History.
057935,000011: ## Assembler: yaYUL
057936,000012: ## Contact: Ron Burkey <info@sandroid.org>.
057937,000013: ## Website: www.ibiblio.org/apollo/index.html
057938,000014: ## Mod history: 2023-09-04 MAS Created from Artemis 072.
057939,000015:
057940,000016:
057941,000017: 07,2000 SETLOC KEYRUPT
057942,000018: 07,2000 BANK
057943,000019: 07,3617 COUNT* $$/KEYUP
057944,000020:
057945,000021: 07,3617 54016 KEYRUPT1 TS BANKRUPT
057946,000022: 07,3620 56002 XCH Q
057947,000023: 07,3621 54012 TS QRUPT
057948,000024: 07,3622 04366 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
057949,000025: 07,3623 34342 CAF LOW5
057950,000026: 07,3624 00006 EXTEND
057951,000027: 07,3625 02015 RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
057952,000028: 07,3626 54073 KEYCOM TS RUPTREG4
057953,000029: 07,3627 40101 CS FLAGWRD5
057954,000030: 07,3630 74763 MASK DSKYBIT
057955,000031: 07,3631 26101 ADS FLAGWRD5
057956,000032:
057957,000033: 07,3632 05133 ACCEPTUP TC NOVAC30 # (NOTE: RUPTREG4 = KEYTEMP1)
057958,000034: 07,3633 1172 EBANK= DSPCOUNT
057959,000035: 07,3633 02000 60102 2CADR CHARIN
057960,000036:
057961,000037: 07,3635 30073 CA RUPTREG4
057962,000038: 07,3636 50064 INDEX LOCCTR
057963,000039: 07,3637 54154 TS MPAC # LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
057964,000040: 07,3640 05336 TC RESUME
057965,000041:
057966,000042:
057967,000043: # UPRUPT PROGRAM
057968,000044:
057969,000045: 07,3641 54016 UPRUPT TS BANKRUPT
057970,000046: 07,3642 56002 XCH Q
057971,000047: 07,3643 54012 TS QRUPT
057972,000048: 07,3644 04366 TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
057973,000049: 07,3645 35003 CAF ZERO
057974,000050: 07,3646 56045 XCH INLINK
057975,000051: 07,3647 54073 TS KEYTEMP1
057976,000052: 07,3650 30075 CA FLAGWRD1
057977,000053: 07,3651 74766 MASK NOP01BIT # IF = , MISSION IS IN
057978,000054: 07,3652 10000 CCS A # PRELAUNCH AND UPLINK DATA SUM IS ENABLED
057979,000055: 07,3653 13657 TCF +4 # IF FLAGWORD1 BIT 12 =1, IT IS NOT
057980,000056: 07,3654 30073 CA KEYTEMP1 # ALLOWED.
057981,000057: 07,3655 27110 ADS UPSUM
057982,000058: 07,3656 25111 INCR UPSUM +1
057983,000059: 07,3657 34777 CAF BIT3 # TURN ON UPACT LIGHT
057984,000060: 07,3660 00006 EXTEND # (BIT 3 OF CHANNEL 11)
057985,000061: 07,3661 05011 WOR DSALMOUT
057986,000062: 07,3662 34342 UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
057987,000063: 07,3663 70073 MASK KEYTEMP1 # LOW5 OF WORD
057988,000064: 07,3664 56073 XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
057989,000065: 07,3665 00006 EXTEND
057990,000066: 07,3666 74770 MP BIT10 # SHIFT RIGHT 5
057991,000067: 07,3667 55127 TS KEYTEMP2
057992,000068: 07,3670 74342 MASK LOW5 # MID 5
057993,000069: 07,3671 63725 AD HI10
057994,000070: 07,3672 03722 TC UPTEST
057995,000071: 07,3673 34770 CAF BIT10
057996,000072: 07,3674 00006 EXTEND
057997,000073: 07,3675 71127 MP KEYTEMP2 # SHIFT RIGHT 5
057998,000074: 07,3676 74342 MASK LOW5 # HIGH 5
057999,000075: 07,3677 40000 COM
058000,000076: 07,3700 03722 TC UPTEST
058001,000077:
058002,000078: 07,3701 45011 UPOK CS ELRCODE # CODE IS GOOD. IF CODE = 'ERROR RESET',
058003,000079: 07,3702 60073 AD KEYTEMP1 # CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
058004,000080: 07,3703 00006 EXTEND # IF CODE DOES NOT = 'ERROR RESET', ACCEPT
058005,000081: 07,3704 13712 BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
058006,000082:
058007,000083: 07,3705 34776 CAF UPLOCBIT # TEST UPLOCKFL FOR 0 OR 1
058008,000084: 07,3706 70103 MASK FLAGWRD7
058009,000085: 07,3707 10000 CCS A
058010,000086: 07,3710 05336 TC RESUME # UPLOCKFL = 1
058011,000087: 07,3711 03632 TC ACCEPTUP # UPLOCKFL = 0
058012,000088:
058013,000089: 07,3712 44776 CLUPLOCK CS UPLOCBIT # CLEAR UPLOCKFL (I.E., SET BIT 4 OF
058014,000090: 07,3713 70103 MASK FLAGWRD7 # FLAGWRD7 = 0)
058015,000091: 07,3714 54103 TS FLAGWRD7
058016,000092: 07,3715 03632 TC ACCEPTUP
058017,000093: # CODE IS BAD
058018,000094: 07,3716 40103 TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
058019,000095: 07,3717 74776 MASK UPLOCBIT # (BY SETTING UPLOCKFL = 1) UNTIL
058020,000096: 07,3720 26103 ADS FLAGWRD7 # 'ERROR RESET' IS SENT VIA UPLINK.
058021,000097: 07,3721 05336 TC RESUME
058022,000098: 07,3722 60073 UPTEST AD KEYTEMP1
058023,000099: 07,3723 10000 CCS A
058024,000100: 07,3724 03716 TC TMFAIL2
058025,000101: 07,3725 77740 HI10 OCT 77740
058026,000102: 07,3726 03716 TC TMFAIL2
058027,000103: 07,3727 00002 TC Q
058028,000104:
058029,000105: 07,3730 5011 ELRCODE EQUALS OCT22
058030,000106:
058031,000107: # 'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
058032,000108: # 1. VBRELDSP
058033,000109: # 2. ERROR RESET
058034,000110: # 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
058035,000111:
058036,000112: # -
058037,000113: # THE RECEPTION OF A BAD CODE (I.E CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
058038,000114: # THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
058039,000115: # WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
058040,000116: # (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
058041,000117: # BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
058042,000118: # FAILURE)
058043,000119:
058044,000120: # UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.
End of include-file KEYRUPT,_UPRUPT.agc. Parent file is MAIN.agc