Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

061966,000002:                                                                                                  ## Copyright:   Public domain.
061967,000003:                                                                                                  ## Filename:    KEYRUPT,_UPRUPT.agc
061968,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
061969,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM)
061970,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for
061971,000007:                                                                                                  ##              Apollo 15-17.
061972,000008:                                                                                                  ## Assembler:   yaYUL
061973,000009:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
061974,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
061975,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
061976,000012:                                                                                                  ## Mod history: 2009-08-18 JL   Adapted from corresponding Comanche 055 file.
061977,000013:                                                                                                  ##              2009-09-03 JL   Fixed error in conversion.
061978,000014:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
061979,000015:                                                                                                  ##              2017-02-05 RSB  Proofed comment text by diff'ing vs Comanche 55
061980,000016:                                                                                                  ##                              and corrected errors found.
061981,000017: 

Page 1445

061983,000019: 
061984,000020: 07,2000                                           SETLOC   KEYRUPT                               
061985,000021: 07,2000                                           BANK                                           
061986,000022: 07,3666                                           COUNT*   $$/KEYUP                              
061987,000023: 
061988,000024: 07,3666           54016        KEYRUPT1           TS       BANKRUPT                              
061989,000025: 07,3667           56002                           XCH      Q                                     
061990,000026: 07,3670           54012                           TS       QRUPT                                 
061991,000027: 07,3671           04366                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
061992,000028: 07,3672           34342                           CAF      LOW5                                  
061993,000029: 07,3673           00006                           EXTEND                                         
061994,000030: 07,3674           02015                           RAND     MNKEYIN                               #  CHECK IF KEYS 5M-1M ON
061995,000031: 07,3675           54073        KEYCOM             TS       RUPTREG4                              
061996,000032: 07,3676           40101                           CS       FLAGWRD5                              
061997,000033: 07,3677           74752                           MASK     DSKYBIT                               
061998,000034: 07,3700           26101                           ADS      FLAGWRD5                              
061999,000035: 
062000,000036: 07,3701           05120        ACCEPTUP           TC       NOVAC30                               #  (NOTE: RUPTREG4 = KEYTEMP1)
062001,000037: 07,3702     1202                                  EBANK=   DSPCOUNT                              
062002,000038: 07,3702           02000 60102                     2CADR    CHARIN                                
062003,000039: 
062004,000040: 07,3704           30073                           CA       RUPTREG4                              
062005,000041: 07,3705           50064                           INDEX    LOCCTR                                
062006,000042: 07,3706           54154                           TS       MPAC                                  #  LEAVE 5 BIT KEY CDE IN MPAC FOR CHARIN
062007,000043: 07,3707           05323                           TC       RESUME                                
062008,000044: 

Page 1446

062010,000046: 
062011,000047:                                                                                                  #  UPRUPT PROGRAM
062012,000048: 
062013,000049: 07,3710           54016        UPRUPT             TS       BANKRUPT                              
062014,000050: 07,3711           56002                           XCH      Q                                     
062015,000051: 07,3712           54012                           TS       QRUPT                                 
062016,000052: 07,3713           04366                           TC       LODSAMPT                              #  TIME IS SNATCHED IN RUPT FOR NOUN 65.
062017,000053: 07,3714           34772                           CAF      ZERO                                  
062018,000054: 07,3715           56045                           XCH      INLINK                                
062019,000055: 07,3716           54073                           TS       KEYTEMP1                              
062020,000056: 07,3717           30075                           CA       FLAGWRD1                              
062021,000057: 07,3720           74755                           MASK     NOP01BIT                              #  IF = , MISSION IS IN
062022,000058: 07,3721           10000                           CCS      A                                     #  PRELAUNCH AND UPLINK DATA SUM IS ENABLED
062023,000059: 07,3722           13726                           TCF      +4                                    #  IF FLAGWORD1 BIT 12 =1, IT IS NOT
062024,000060: 07,3723           30073                           CA       KEYTEMP1                              #  ALLOWED.
062025,000061: 07,3724           27116                           ADS      UPSUM                                 
062026,000062: 07,3725           25117                           INCR     UPSUM      +1                         
062027,000063: 07,3726           34766                           CAF      BIT3                                  #  TURN ON UPACT LIGHT
062028,000064: 07,3727           00006                           EXTEND                                         #  (BIT 3 OF CHANNEL 11)
062029,000065: 07,3730           05011                           WOR      DSALMOUT                              
062030,000066: 07,3731           34342        UPRPT1             CAF      LOW5                                  #  TEST FOR TRIPLE CHAR REDUNDANCY
062031,000067: 07,3732           70073                           MASK     KEYTEMP1                              #  LOW5 OF WORD
062032,000068: 07,3733           56073                           XCH      KEYTEMP1                              #  LOW5 INTO KEYTEMP1
062033,000069: 07,3734           00006                           EXTEND                                         
062034,000070: 07,3735           74757                           MP       BIT10                                 #  SHIFT RIGHT 5
062035,000071: 07,3736           55137                           TS       KEYTEMP2                              
062036,000072: 07,3737           74342                           MASK     LOW5                                  #  MID 5
062037,000073: 07,3740           63774                           AD       HI10                                  
062038,000074: 07,3741           03771                           TC       UPTEST                                
062039,000075: 07,3742           34757                           CAF      BIT10                                 
062040,000076: 07,3743           00006                           EXTEND                                         
062041,000077: 07,3744           71137                           MP       KEYTEMP2                              #  SHIFT RIGHT 5
062042,000078: 07,3745           74342                           MASK     LOW5                                  #  HIGH 5
062043,000079: 07,3746           40000                           COM                                            
062044,000080: 07,3747           03771                           TC       UPTEST                                
062045,000081: 
062046,000082: 07,3750           45000        UPOK               CS       ELRCODE                               #  CODE IS GOOD. IF CODE = 'ERROR RESET',
062047,000083: 07,3751           60073                           AD       KEYTEMP1                              #  CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
062048,000084: 07,3752           00006                           EXTEND                                         #  IF CODE DOES NOT = 'ERROR RESET', ACCEPT
062049,000085: 07,3753           13761                           BZF      CLUPLOCK                              #  CODE ONLY IF UPLOCKFL IS CLEAR (=0).
062050,000086: 
062051,000087: 07,3754           34765                           CAF      UPLOCBIT                              #  TEST UPLOCKFL FOR 0 OR 1
062052,000088: 07,3755           70103                           MASK     FLAGWRD7                              
062053,000089: 07,3756           10000                           CCS      A                                     
062054,000090: 07,3757           05323                           TC       RESUME                                #  UPLOCKFL = 1
062055,000091: 07,3760           03701                           TC       ACCEPTUP                              #  UPLOCKFL = 0
062056,000092: 
062057,000093: 07,3761           44765        CLUPLOCK           CS       UPLOCBIT                              #  CLEAR UPLOCKFL (I.E., SET BIT 4 OF
062058,000094: 07,3762           70103                           MASK     FLAGWRD7                              #  FLAGWRD7 = 0)
062059,000095: 07,3763           54103                           TS       FLAGWRD7                              
062060,000096: 07,3764           03701                           TC       ACCEPTUP                              

Page 1447

062062,000098:                                                                                                  #  CODE IS BAD
062063,000099: 07,3765           40103        TMFAIL2            CS       FLAGWRD7                              #  LOCK OUT FURTHER UPLINK ACTIVITY
062064,000100: 07,3766           74765                           MASK     UPLOCBIT                              #  (BY SETTING UPLOCKFL = 1) UNTIL
062065,000101: 07,3767           26103                           ADS      FLAGWRD7                              #  'ERROR RESET' IS SENT VIA UPLINK.
062066,000102: 07,3770           05323                           TC       RESUME                                
062067,000103: 07,3771           60073        UPTEST             AD       KEYTEMP1                              
062068,000104: 07,3772           10000                           CCS      A                                     
062069,000105: 07,3773           03765                           TC       TMFAIL2                               
062070,000106: 07,3774           77740        HI10               OCT      77740                                 
062071,000107: 07,3775           03765                           TC       TMFAIL2                               
062072,000108: 07,3776           00002                           TC       Q                                     
062073,000109: 
062074,000110: 07,3777     5000               ELRCODE            EQUALS   OCT22                                 
062075,000111: 
062076,000112:                                                                                                  #  'UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
062077,000113:                                                                                                  #        1.      VBRELDSP
062078,000114:                                                                                                  #        2.      ERROR RESET
062079,000115:                                                                                                  #        3.      UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
062080,000116: 
062081,000117:                                                                                                  #                                      -
062082,000118:                                                                                                  #  THE RECEPTION OF A BAD CODE (I.E   CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
062083,000119:                                                                                                  #  THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
062084,000120:                                                                                                  #  WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND 'ERROR RESET' CODE.
062085,000121:                                                                                                  #  (IT IS RECOMMENDED THAT THE 'ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
062086,000122:                                                                                                  #  BY 15 ZEROES. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
062087,000123:                                                                                                  #  FAILURE)
062088,000124: 
062089,000125:                                                                                                  #  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