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.

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

Page 1445

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

Page 1446

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

Page 1447

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