Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Peter McDermott. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: NEW PROGRAM SHEPATIN BY EYLES
	DEC 13, 1966

	THIS PROGRAM WAS ASSEMBLED AS A VERSION OF REVISION 37 
        OF PROGRAM SUNBURST BY LEM GROUP
Note that the date is the date of the printout, not the date of the program revision.

014855,000002:                                                                                                  ## Copyright:   Public domain.
014856,000003:                                                                                                  ## Filename:    LEM_FLIGHT_CONTROL_SYSTEM_TEST.agc
014857,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
014858,000005:                                                                                                  ##              It is part of an early development version of the software
014859,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
014860,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
014861,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
014862,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
014863,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
014864,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
014865,000012:                                                                                                  ##              that the code format has been changed to conform to the
014866,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
014867,000014:                                                                                                  ##              original YUL assembler.
014868,000015:                                                                                                  ## Reference:   pp. 348-360
014869,000016:                                                                                                  ## Assembler:   yaYUL
014870,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014871,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014872,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
014873,000020:                                                                                                  ##              2017-06-05 MAS  Transcribed.
014874,000021:                                                                                                  ##              2017-06-22 RSB  Proofed comment text with
014875,000022:                                                                                                  ##                              octopus/ProoferComments.
014876,000023:                                                                                                  ##              2021-05-30 ABS  Added missing EBANK= statement.
014877,000024: 

Page 348

014879,000026: 06,2467                                           BANK     6                                     
014880,000027: 06,2467  E4,1407                                  EBANK=   JETSTEP                               
014881,000028: 
014882,000029: 
014883,000030: 
014884,000031:                                                                                                  #  LEM FCS TEST  ENTRY AND INITIALIZATION JOB.
014885,000032: 
014886,000033:                                                                                                  #        THIS JOB INITIALIZES THE ERASABLE TABLES FOR THE FCS TEST AND PUTS THE FOLLOWING PROGRAMS UNDER
014887,000034:                                                                                                  #  WAITLIST CONTROL.
014888,000035:                                                                                                  #             (1) RCS JET SET TASK
014889,000036:                                                                                                  #             (2) ENGINE ON - OFF TASK
014890,000037:                                                                                                  #             (3) DESCENT ENGINE GIMBAL TRIM TASK
014891,000038:                                                                                                  #             (4) DESCENT ENGINE THROTTLE TASK
014892,000039:                                                                                                  #             (5) INTERFACE CHANNEL LOOK TASK
014893,000040: 
014894,000041: 
014895,000042: 
014896,000043: 06,2467           04633        FCSSTART           TC       GRABWAIT                              #  SO NOTHING DISRUPTS THE LOAD.
014897,000044: 06,2470           32543                           CAF      JSTEPADR                              #  THE START OF THE LIST.
014898,000045: 06,2471           10000        FCS3               CCS      A                                     
014899,000046: 06,2472           54146                           TS       MPAC       +2                         
014900,000047: 06,2473           32546        FCS2               CAF      V04N01K                               #  DISPLAY PRESENT CONTENTS IN R2.
014901,000048: 06,2474           04646                           TC       NVSBWAIT                              
014902,000049: 06,2475           24146                           INCR     MPAC       +2                         
014903,000050: 06,2476           32544                           CAF      V21N02K                               
014904,000051: 
014905,000052: 06,2477           04646                           TC       NVSBWAIT                              #  IN CASE IT,S BUSY BUT IT SHOULDN,T BE.
014906,000053: 06,2500           04464                           TC       ENDIDLE                               #  WHILE LOADING.
014907,000054: 06,2501           02504                           TC       +3                                    #  V34E. TERMINATE LOAD OF THIS LIST
014908,000055:                                                                                                  #  SECTION, GO TO NEW SECTION OR TO TEST.
014909,000056: 06,2502           02503                           TC       +1                                    #  V33E. PRESENT CONTENTS OK, PROCEED TO
014910,000057:                                                                                                  #  NEXT LOCATION IN LIST.
014911,000058: 06,2503           02473                           TC       FCS2                                  
014912,000059: 06,2504           32545                           CAF      V21N30K                               
014913,000060: 06,2505           04646                           TC       NVSBWAIT                              
014914,000061: 06,2506           04464                           TC       ENDIDLE                               
014915,000062: 06,2507           05604                           TC       EJFREE                                
014916,000063: 06,2510           02513                           TC       FCSTEST1                              #  PROCEED TO TEST.
014917,000064: 06,2511           30337                           CAE      DSPTEM1                               #  NEW ADDRESS.
014918,000065: 06,2512           02471                           TC       FCS3                                  
014919,000066: 06,2513           32547        FCSTEST1           CAF      V47K                                  
014920,000067: 06,2514           04646                           TC       NVSBWAIT                              #  OUR VERB IN THE LIGHTS.
014921,000068: 06,2515           00004        FCSTEST            INHINT                                         
014922,000069: 06,2516           37754                           CAF      TWO                                   #  20MS.
014923,000070: 06,2517           05701                           TC       WAITLIST                              
014924,000071: 06,2520  E4,1407                                  EBANK=   JETSTEP                               
014925,000072: 06,2520           02554 14004                     2CADR    JETSTART                              
014926,000073: 
014927,000074: 06,2522           37755                           CAF      BIT1                                  #  10MS.
014928,000075: 
014929,000076: 06,2523           05701                           TC       WAITLIST                              
014930,000077: 06,2524  E4,1407                                  EBANK=   JETSTEP                               

Page 349

014932,000079: 06,2524           02707 14004                     2CADR    ENGSTART                              
014933,000080: 
014934,000081: 06,2526           36301                           CAF      THREE                                 #  30MS.
014935,000082: 06,2527           05701                           TC       WAITLIST                              
014936,000083: 06,2530  E4,1407                                  EBANK=   JETSTEP                               
014937,000084: 06,2530           03004 14004                     2CADR    TRIMTOP                               
014938,000085: 
014939,000086: 06,2532           37753                           CAF      FOUR                                  #  40MS.
014940,000087: 
014941,000088: 06,2533           05701                           TC       WAITLIST                              
014942,000089: 06,2534  E4,1407                                  EBANK=   JETSTEP                               
014943,000090: 06,2534           03124 14004                     2CADR    THRSTART                              
014944,000091: 
014945,000092: 06,2536           37760                           CAF      FIVE                                  #  50MS.
014946,000093: 06,2537           05701                           TC       WAITLIST                              
014947,000094: 06,2540  E4,1407                                  EBANK=   JETSTEP                               
014948,000095: 06,2540           03212 14004                     2CADR    LOOKTOP                               
014949,000096: 
014950,000097: 06,2542           05604                           TC       EJFREE                                #  NOW THEY START.
014951,000098: 
014952,000099: 06,2543           02007        JSTEPADR           ECADR    JETSTEP                               
014953,000100: 06,2544           02102        V21N02K            OCT      02102                                 
014954,000101: 06,2545           02130        V21N30K            OCT      02130                                 
014955,000102: 06,2546           00401        V04N01K            OCT      00401                                 
014956,000103: 06,2547           04700        V47K               OCT      04700                                 
014957,000104: 

Page 350

014959,000106:                                                                                                  #  LEM FCS TEST   RCS JETSET TASK
014960,000107:                                                                                                  #      THIS JOB ISSUES A PROFILE OF  JET ON-OFF SIGNALS AS DETERMINED BY THE CONSTANTS IN A SET OF SIX REGISTERS.
014961,000108:                                                                                                  #  THE SIX REGISTERS ARE, (1) NTIMES, THE NUMBER OF TIMES A PARTICULAR STEP WILL BE PERFORMED. (2) NEXTTIME, THE
014962,000109:                                                                                                  #  TIME BETWEEN STEPS, A MAXIMUM OF 2 MINUTES, (3) JETONTM, THE TIME TO TURN THE JETS ON, SCALED FOR T3, (4) JET-
014963,000110:                                                                                                  #  OFFTM, THE TIME AFTER ONTM TO TURN THE JETS OFF, (5) XJETS, THE PARTICULAR X JETS TO BE TURNED ON AND OFF
014964,000111:                                                                                                  #  DURING EACH REPEAT OF A STEP, AND (6) YZJETS,, THE Y AND Z JETS TO BE TURNED ON AND OFF DURING EACH REPEAT OF A
014965,000112:                                                                                                  #  STEP.  XJETS AND YZJETS MUST BE IN THE SAME FORMAT AS CHANNELS 5 AND6 RESPECTIVELY.  THERE ARE EIGHT SETS OF
014966,000113:                                                                                                  #  THESE SIX REGISTERS.
014967,000114:                                                                                                  #      THE REGISTER JETSTEP IS USED TO INDEX THE 8 SETS OF REGISTERS, THE ALLOWABLE VALUES OF JETSTEP ARE +0 THRU 7
014968,000115:                                                                                                  #      THIS JOB WILL BE ENTERED BUT IMMEDIATELY ENDED IF THE INITIAL VALUES OF JETSTEP AND NTIMES ARE +0.
014969,000116: 
014970,000117: 
014971,000118: 
014972,000119: 06,2550           11407        NEXTSET            CCS      JETSTEP                               #  IT MAY BE ZERO.
014973,000120: 
014974,000121: 06,2551           02553                           TC       +2                                    #  NOPE
014975,000122: 06,2552           05745                           TC       TASKOVER                              #  IT IS SO WE ARE DONE WITH THIS TASK.
014976,000123: 06,2553           55407                           TS       JETSTEP                               
014977,000124: 
014978,000125: 06,2554           51407        JETSTART           NDX      JETSTEP                               #  ENTER HERE.
014979,000126: 06,2555           11410                           CCS      NTIMES                                #  SEE IF THIS STEP IS FINISHED.
014980,000127: 06,2556           02560                           TC       +2                                    #  NO
014981,000128: 06,2557           02550                           TC       NEXTSET                               #  YES
014982,000129: 06,2560           51407                           NDX      JETSTEP                               
014983,000130: 06,2561           31420                           CAE      NEXTTIME                              #  MUST BE SCALED FOR T3.  REMEMBER TO BIAS
014984,000131:                                                                                                  #  THIS FOR ON TIME.
014985,000132: 06,2562           05701                           TC       WAITLIST                              
014986,000133: 06,2563  E4,1407                                  EBANK=   JETSTEP                               
014987,000134: 06,2563           02577 14004                     2CADR    JTOP                                  
014988,000135: 
014989,000136: 06,2565           05745                           TC       TASKOVER                              
014990,000137: 
014991,000138: 06,2566           37761        JETOFF             CAF      ZERO                                  
014992,000139: 06,2567           00006                           EXTEND                                         
014993,000140: 06,2570           01005                           WRITE    5                                     
014994,000141: 06,2571           00006                           EXTEND                                         
014995,000142: 06,2572           01006                           WRITE    6                                     
014996,000143: 06,2573           51407                           NDX      JETSTEP                               
014997,000144: 
014998,000145: 06,2574           11410                           CCS      NTIMES                                
014999,000146: 06,2575           51407                           NDX      JETSTEP                               
015000,000147: 06,2576           55410                           TS       NTIMES                                #  ONE LESS TIME.
015001,000148: 06,2577           51407        JTOP               NDX      JETSTEP                               
015002,000149: 06,2600           11410                           CCS      NTIMES                                #  FOR LOOPING.
015003,000150: 06,2601           02603                           TC       +2                                    
015004,000151: 06,2602           02550                           TC       NEXTSET                               
015005,000152: 06,2603           51407                           NDX      JETSTEP                               
015006,000153: 06,2604           31430                           CAE      JETONTM                               #  SCALED FOR T3.  TIME FOR JETS ON.
015007,000154: 06,2605           05701                           TC       WAITLIST                              
015008,000155: 06,2606  E4,1407                                  EBANK=   JETSTEP                               
015009,000156: 06,2606           02611 14004                     2CADR    JETON                                 
015010,000157: 

Page 351

015012,000159: 06,2610           05745                           TC       TASKOVER                              
015013,000160: 
015014,000161: 06,2611           51407        JETON              NDX      JETSTEP                               
015015,000162: 06,2612           31440                           CAE      XJETS                                 #  MUST BE IN CHANNEL 5 FORMAT.
015016,000163: 06,2613           55401                           TS       XJBUF                                 
015017,000164: 06,2614           51407                           NDX      JETSTEP                               
015018,000165: 06,2615           31450                           CAE      YZJETS                                #  MUST BE IN CHANNEL 6 FORMAT.
015019,000166: 06,2616           55402                           TS       YZJBUF                                
015020,000167: 06,2617           00006        JFAILCK            EXTEND                                         #  THIS ROUTINE EXAMINES EACH JETFAIL BIT
015021,000168: 06,2620           00032                           READ     32                                    #  AND IF A FAILURE IS INDICATED THE CORRES
015022,000169: 06,2621           40000                           COM                                            #  PONDING COMMANDS ARE MASKED OUT .
015023,000170: 06,2622           55403                           TS       JFBUF                                 #  SAVE 32 REINVERTED.
015024,000171: 06,2623           37757                           CAF      SEVEN                                 
015025,000172: 06,2624           55404        JF3                TS       FCNTR                                 
015026,000173: 06,2625           31403                           CAE      JFBUF                                 
015027,000174: 06,2626           51404                           NDX      FCNTR                                 
015028,000175: 06,2627           77746                           MASK     BIT8                                  
015029,000176: 06,2630           10000                           CCS      A                                     
015030,000177: 06,2631           02650                           TC       JFAIL                                 
015031,000178: 
015032,000179: 06,2632           11404        JFAIL1             CCS      FCNTR                                 
015033,000180: 06,2633           02624                           TC       JF3                                   
015034,000181: 06,2634           31401                           CAE      XJBUF                                 
015035,000182: 06,2635           00006                           EXTEND                                         
015036,000183: 06,2636           01005                           WRITE    5                                     #  XJETS GO ON.
015037,000184: 06,2637           31402                           CAE      YZJBUF                                
015038,000185: 06,2640           00006                           EXTEND                                         
015039,000186: 06,2641           01006                           WRITE    6                                     #  YZJETS GO ON.
015040,000187: 06,2642           51407                           NDX      JETSTEP                               
015041,000188: 06,2643           31460                           CAE      JETOFFTM                              #  JET OFF TIME SCALED FOR T3.
015042,000189: 06,2644           05701                           TC       WAITLIST                              
015043,000190: 06,2645  E4,1407                                  EBANK=   JETSTEP                               
015044,000191: 06,2645           02566 14004                     2CADR    JETOFF                                
015045,000192: 
015046,000193: 06,2647           05745                           TC       TASKOVER                              
015047,000194: 
015048,000195: 06,2650           51404        JFAIL              NDX      FCNTR                                 
015049,000196: 06,2651           42673                           CS       XJETMASK                              
015050,000197: 06,2652           71401                           MASK     XJBUF                                 
015051,000198: 06,2653           55401                           TS       XJBUF                                 
015052,000199: 06,2654           51404                           NDX      FCNTR                                 
015053,000200: 06,2655           42663                           CS       YZJETMSK                              
015054,000201: 06,2656           71402                           MASK     YZJBUF                                
015055,000202: 
015056,000203: 06,2657           55402                           TS       YZJBUF                                
015057,000204: 06,2660           04744                           TC       ALARM                                 
015058,000205: 06,2661           01410                           OCT      01410                                 #  TEMPORARY JET FAIL ALARM CODE.
015059,000206: 06,2662           02632                           TC       JFAIL1                                
015060,000207: 

Page 352

015062,000209: 06,2663           00010        YZJETMSK           OCT      00010                                 #  JET 11
015063,000210: 06,2664           00020                           OCT      00020                                 #  JET 12
015064,000211: 
015065,000212: 06,2665           00004                           OCT      00004                                 #  JET 15
015066,000213: 06,2666           00200                           OCT      00200                                 #  JET 16
015067,000214: 06,2667           00001                           OCT      00001                                 #  JET 7
015068,000215: 06,2670           00002                           OCT      00002                                 #  JET 3
015069,000216: 06,2671           00040                           OCT      00040                                 #  JET 8
015070,000217: 06,2672           00100                           OCT      00100                                 #  JET 4
015071,000218: 
015072,000219: 06,2673           00040        XJETMASK           OCT      00040                                 #  JET 10
015073,000220: 06,2674           00020                           OCT      00020                                 #  JET 9
015074,000221: 06,2675           00100                           OCT      00100                                 #  JET 13
015075,000222: 06,2676           00200                           OCT      00200                                 #  JET 14
015076,000223: 06,2677           00010                           OCT      00010                                 #  JET 6
015077,000224: 06,2700           00001                           OCT      00001                                 #  JET 1
015078,000225: 06,2701           00004                           OCT      00004                                 #  JET 5
015079,000226: 06,2702           00002                           OCT      00002                                 #  JET 2
015080,000227: 

Page 353

015082,000229:                                                                                                  #  LEM FCS TEST  ENGINE ON - OFF TASK
015083,000230:                                                                                                  #  THIS TASK TURNS THE LEM ASCENT OR DESCENT ENGINE ON AND OFF ACCORDING TOTHE CONSTANTS STORED IN THE FIVE SETS OF
015084,000231:                                                                                                  #  REGISTERS, (1) CYLTIMES, WHICH CONTAINS THE NUMBER OF TIMES A PARTICULARSTEP WILL BE REPEATED, (2) NEXTCYLT,
015085,000232:                                                                                                  #   WHICH CONTAINS THE TIME BETWEEN STEPS SCALED FOR T3, (3) ONTIME, WHICH CONTAINS THE TIME TO TURN THE ENGINE ON
015086,000233:                                                                                                  #  WHICH ALSO DETERMINES THE LENGTH OF TIME THE ENGIME WILL BE OFF WITHIN A SERIES OF ON:OFF CYCLES, (4) OFFTIME,
015087,000234:                                                                                                  #   WHICH CONTAINS THE NUMBER OF 2 MINUTES BEFORE THE ENGINE WILL BE TURNED OFF, AND (5) OFFTIMER, WHICH
015088,000235:                                                                                                  #  CONTAINS THE RESIDUAL TIME BEFORE THE ENGINE WILL BE TURNED OFF.  OFFTIME AND OFFTIMER DETERMINE THE LENGTH
015089,000236:                                                                                                  #  OF TIME THE ENGINE WILL BE ON IN ANY ONE CYCLE. THERE ARE THREE SETS OF THESE REGISTERS.
015090,000237: 
015091,000238:                                                                                                  #      THE ENGSTEP REGISTER IS USED AS AN INDEX TO PICK UP A PARTICULAR SET  OF THE ABOVE 5 REGISTERS.  THIS TASK
015092,000239:                                                                                                  #  WILL BE ENTERED BUT IMMEDIATELY ENDED IF ENGSTEP AND CYLTIMES = +0.     THE ALLOWABLE VALUES OF ENGSTEP ARE +0,
015093,000240:                                                                                                  #  1 AND 2.
015094,000241: 
015095,000242: 
015096,000243: 
015097,000244: 06,2703           11470        NXTONOFF           CCS      ENGSTEP                               
015098,000245: 06,2704           02706                           TC       +2                                    
015099,000246: 06,2705           05745                           TC       TASKOVER                              #  EXIT HERE WHEN STEP AND CYL ARE +0.
015100,000247: 06,2706           55470                           TS       ENGSTEP                               #  ONE LESS.
015101,000248: 
015102,000249: 06,2707           51470        ENGSTART           NDX      ENGSTEP                               #  ENTER HERE.
015103,000250: 06,2710           11471                           CCS      CYLTIMES                              #  NUM OF EACH  ON/OFF SET
015104,000251: 06,2711           02713                           TC       +2                                    
015105,000252: 06,2712           02703                           TC       NXTONOFF                              #  NO MORE OF THIS SET
015106,000253: 06,2713           51470                           NDX      ENGSTEP                               
015107,000254: 06,2714           31474                           CAE      NEXTCYLT                              #  START OF NEXT CYCLE.
015108,000255: 06,2715           05701                           TC       WAITLIST                              
015109,000256: 06,2716  E4,1470                                  EBANK=   ENGSTEP                               
015110,000257: 06,2716           02737 14004                     2CADR    ENGONTM                               
015111,000258: 
015112,000259: 06,2720           05745                           TC       TASKOVER                              
015113,000260: 
015114,000261: 06,2721           45226        ENGRESET           CS       PRIO30                                #  BITS 13 AND 14.
015115,000262: 06,2722           00006                           EXTEND                                         
015116,000263: 06,2723           02011                           RAND     11                                    
015117,000264: 06,2724           67740                           AD       BIT14                                 
015118,000265: 06,2725           00006                           EXTEND                                         
015119,000266: 06,2726           01011                           WRITE    11                                    #  ENG ON = 0, ENG OFF = 1.
015120,000267: 06,2727           51470                           NDX      ENGSTEP                               
015121,000268: 06,2730           11471                           CCS      CYLTIMES                              
015122,000269: 06,2731           10000                           CCS      A                                     
015123,000270: 06,2732           02734                           TC       +2                                    
015124,000271: 06,2733           02703                           TC       NXTONOFF                              #  WAS ONE.
015125,000272: 06,2734           67755                           AD       ONE                                   #  WAS MORE THAN ONE.
015126,000273: 06,2735           51470                           NDX      ENGSTEP                               
015127,000274: 06,2736           55471                           TS       CYLTIMES                              
015128,000275: 
015129,000276: 06,2737           51470        ENGONTM            NDX      ENGSTEP                               
015130,000277: 06,2740           31502                           CAE      OFFTIME                               
015131,000278: 06,2741           55406                           TS       OFFTMBUF                              
015132,000279: 06,2742           51470                           NDX      ENGSTEP                               

Page 354

015134,000281: 06,2743           31477                           CAE      ONTIME                                
015135,000282: 06,2744           05701                           TC       WAITLIST                              
015136,000283: 06,2745  E4,1470                                  EBANK=   ENGSTEP                               
015137,000284: 06,2745           02750 14004                     2CADR    ENGSET                                
015138,000285: 
015139,000286: 06,2747           05745                           TC       TASKOVER                              
015140,000287: 
015141,000288: 06,2750           45226        ENGSET             CS       PRIO30                                
015142,000289: 06,2751           00006                           EXTEND                                         
015143,000290: 06,2752           02011                           RAND     11                                    
015144,000291: 06,2753           67741                           AD       BIT13                                 
015145,000292: 06,2754           00006                           EXTEND                                         
015146,000293: 06,2755           01011                           WRITE    11                                    #  ENG ON = 1, ENG OFF = 0.
015147,000294: 06,2756           11406        ENGRST             CCS      OFFTMBUF                              
015148,000295: 
015149,000296: 06,2757           02766                           TC       LTIMEON                               #  AT LEAST 2MIN. BEFORE ENGINE OFF.
015150,000297: 06,2760           51470                           NDX      ENGSTEP                               
015151,000298: 06,2761           31505                           CAE      OFFTIMER                              #  LESS THAN 2MIN. TO ENGINE OFF.
015152,000299: 06,2762           05701                           TC       WAITLIST                              
015153,000300: 06,2763  E4,1470                                  EBANK=   ENGSTEP                               
015154,000301: 06,2763           02721 14004                     2CADR    ENGRESET                              
015155,000302: 
015156,000303: 06,2765           05745                           TC       TASKOVER                              
015157,000304: 
015158,000305: 06,2766           11406        LTIMEON            CCS      OFFTMBUF                              #  IS THERE ANY MORE.
015159,000306: 06,2767           02771                           TC       +2                                    #  YES.
015160,000307: 06,2770           02756                           TC       ENGRST                                #  NO.
015161,000308: 06,2771           55406                           TS       OFFTMBUF                              #  ONE LESS.
015162,000309: 06,2772           32777                           CAF      2MIN                                  
015163,000310: 06,2773           05701                           TC       WAITLIST                              
015164,000311: 06,2774  E4,1470                                  EBANK=   ENGSTEP                               
015165,000312: 06,2774           02766 14004                     2CADR    LTIMEON                               
015166,000313: 
015167,000314: 06,2776           05745                           TC       TASKOVER                              
015168,000315: 
015169,000316: 06,2777           27340        2MIN               DEC      12000      B-14                       
015170,000317: 

Page 355

015172,000319:                                                                                                  #  LEM FCS TEST  TRIM TASK
015173,000320:                                                                                                  #  THIS PROGRAM ISSUES A PROFILE OF PITCH AND ROLL TRIM COMMANDS TO THE LEM DESCENT ENGINE GIMBAL IN ACCORDANCEWITH
015174,000321:                                                                                                  #  THE VALUE S IN THE TRIMSTEP REGISTER AND THE 12 SETS OF 5 REGISTERS CALLED NUMTIMES, STEPDLYT, TRIMONT, TRIMOFFT
015175,000322:                                                                                                  #  AND TRIMIND.  TRIMSTEP IS USED TO PICK UP A PARTICULAR SET OF THE 5 REGISTERS AND HAS ALLOWABLE VALUES FROM +0
015176,000323:                                                                                                  #  THROUGH +11 DECIMAL.  THE 5 REGISTERS IN EACH SET ARE DEFINED AS FOLLOWS
015177,000324:                                                                                                  #      (1) NUMTIMES DETERMINES THE NUMBER OF TIMES THE COMMAND IN TRIMIND  WILL BE ISSUED.  VALUES FROM +0 TO
015178,000325:                                                                                                  #  OCT 37777 ARE PERMITTED.
015179,000326:                                                                                                  #      (2) STEPDLYT DETERMINES THE TIME BETWEEN THE START OF A STEP AND THE BEGINNING OF TRIMONT.  STEPDLYT MUST BE
015180,000327:                                                                                                  #  FORMATTED FOR T3, ITS MAXIMUM VALUE IS 2 MINUTES.
015181,000328:                                                                                                  #      (3) TRIMONT DETERMINES THE TIME BETWEEN THE END OF STEPDLYT OR TRIMOFFT AND THE TIME THE TRIM COMMANDS ARE
015182,000329:                                                                                                  #  ISSUED.  IT MUST BE FORMATTED FOR T3.
015183,000330:                                                                                                  #      (4) TRIMOFFT DETERMINES THE LENGTH OF TIME THE TRIM COMMAND WILL BE ON, FORMATTED FOR T3.
015184,000331:                                                                                                  #      (5) TRIMIND DETERMINES THE PITCH AND ROLL COMMAND TO BE ISSUED.  THE FORMAT IS, BIT9=1=+ PITCH COMMAND,
015185,000332:                                                                                                  #  BIT10=1=-PITCH, BIT11=1= +ROLL, BIT12=1= -ROLL.  A BIT=0 INDICATES NO COMMAND.  ANY COMBINATION OF COMMANDS IS
015186,000333:                                                                                                  #  PERMITTED.
015187,000334:                                                                                                  #     THIS TASK WILL BE ENTERED BUT IMMEDIATELY ENDED IF TRIMSTEP AND NUMTIMES = +0.
015188,000335: 
015189,000336: 
015190,000337: 
015191,000338: 06,3000           11510        NEXTTRIM           CCS      TRIMSTEP                              
015192,000339: 
015193,000340: 06,3001           03003                           TC       +2                                    
015194,000341: 06,3002           05745                           TC       TASKOVER                              #  EXIT HERE.
015195,000342: 06,3003           55510                           TS       TRIMSTEP                              #  LESS ONE.
015196,000343: 
015197,000344: 06,3004           51510        TRIMTOP            NDX      TRIMSTEP                              #  ENTER HERE.
015198,000345: 06,3005           11511                           CCS      NUMTIMES                              
015199,000346: 06,3006           03010                           TC       +2                                    
015200,000347: 06,3007           03000                           TC       NEXTTRIM                              
015201,000348: 06,3010           51510                           NDX      TRIMSTEP                              
015202,000349: 06,3011           31525                           CAE      STEPDLYT                              
015203,000350: 06,3012           05701                           TC       WAITLIST                              
015204,000351: 06,3013  E4,1510                                  EBANK=   TRIMSTEP                              
015205,000352: 06,3013           03031 14004                     2CADR    TRIMSET                               
015206,000353: 
015207,000354: 06,3015           05745                           TC       TASKOVER                              
015208,000355: 
015209,000356: 06,3016           43115        TRIMOFF            CS       TRIMMASK                              
015210,000357: 06,3017           00006                           EXTEND                                         
015211,000358: 06,3020           03012                           WAND     12                                    #  TRIM GOES OFF.
015212,000359: 06,3021           51510        NUMSTEP            NDX      TRIMSTEP                              
015213,000360: 06,3022           11511                           CCS      NUMTIMES                              
015214,000361: 06,3023           10000                           CCS      A                                     
015215,000362: 06,3024           03026                           TC       +2                                    
015216,000363: 
015217,000364: 06,3025           03000                           TC       NEXTTRIM                              #  WAS ONE.
015218,000365: 06,3026           67755                           AD       ONE                                   
015219,000366: 06,3027           51510                           NDX      TRIMSTEP                              
015220,000367: 06,3030           55511                           TS       NUMTIMES                              
015221,000368: 06,3031           51510        TRIMSET            NDX      TRIMSTEP                              
015222,000369: 06,3032           31541                           CAE      TRIMONT                               
015223,000370: 06,3033           05701                           TC       WAITLIST                              

Page 356

015225,000372: 06,3034  E4,1510                                  EBANK=   TRIMSTEP                              
015226,000373: 06,3034           03037 14004                     2CADR    TRIMON                                
015227,000374: 
015228,000375: 
015229,000376: 06,3036           05745                           TC       TASKOVER                              
015230,000377: 
015231,000378: 06,3037           33114        TRIMON             CAF      BITS9,10                              #  CHECK PITCH AND ROLL TRIM FAIL BITS.
015232,000379: 06,3040           00006                           EXTEND                                         
015233,000380: 06,3041           06032                           RXOR     32                                    
015234,000381: 06,3042           73114                           MASK     BITS9,10                              
015235,000382: 06,3043           00006                           EXTEND                                         
015236,000383: 06,3044           13052                           BZF      TRIMON1                               
015237,000384: 06,3045           35674                           CAF      PRIO35                                #  FAIL IS ON. FLASH FAIL CODE (01400) AND
015238,000385: 06,3046           05523                           TC       NOVAC                                 #  IDLE UNTIL SOMEONE RESETS IT, TERMINATES
015239,000386: 06,3047  E4,1407                                  EBANK=   JETSTEP                               
015240,000387: 06,3047           03065 14004                     2CADR    PERFORM                               #  THE TASK, OR DECIDES TO PROCEED WITH IT.
015241,000388: 
015242,000389: 06,3051           05745                           TC       TASKOVER                              
015243,000390: 
015244,000391: 06,3052           51510        TRIMON1            NDX      TRIMSTEP                              
015245,000392: 06,3053           31571                           CAE      TRIMIND                               
015246,000393: 06,3054           73115                           MASK     TRIMMASK                              #  SAFETY PLAY
015247,000394: 06,3055           00006                           EXTEND                                         
015248,000395: 06,3056           05012                           WOR      12                                    #  TRIM STARTS.
015249,000396: 06,3057           51510                           NDX      TRIMSTEP                              
015250,000397: 06,3060           31555                           CAE      TRIMOFFT                              
015251,000398: 
015252,000399: 06,3061           05701                           TC       WAITLIST                              
015253,000400: 06,3062  E4,1510                                  EBANK=   TRIMSTEP                              
015254,000401: 06,3062           03016 14004                     2CADR    TRIMOFF                               
015255,000402: 
015256,000403: 06,3064           05745                           TC       TASKOVER                              
015257,000404: 
015258,000405: 06,3065           04633        PERFORM            TC       GRABWAIT                              #  KEY RELEASE MAY COME ON.
015259,000406: 06,3066           33114                           CAF      TRIMCODE                              #  01400
015260,000407: 06,3067           54337                           TS       DSPTEM1                               
015261,000408: 06,3070           33116                           CAF      V01N25K                               
015262,000409: 06,3071           04646                           TC       NVSBWAIT                              
015263,000410: 06,3072           33117                           CAF      V50K                                  #  PLEASE PERFORM.
015264,000411: 06,3073           04646                           TC       NVSBWAIT                              
015265,000412: 06,3074           04611                           TC       FLASHON                               #  ANY RESPONSE TURNS IT OFF.
015266,000413: 06,3075           04464                           TC       ENDIDLE                               #  WAIT FOR SOMEONE TO DO SOMETHING.
015267,000414: 06,3076           05604                           TC       EJFREE                                #  V34E. TERMINATE THE TASK.
015268,000415: 06,3077           03106                           TC       TR1                                   #  V33E. PROCEED WITH THE FAIL ON.
015269,000416: 06,3100           00004                           INHINT                                         #  ENTER. THE FAIL HAS BEEN RESET.
015270,000417: 06,3101           37754                           CAF      BIT2                                  #  20MS.
015271,000418: 06,3102           05701                           TC       WAITLIST                              
015272,000419: 06,3103  E4,1407                                  EBANK=   JETSTEP                               
015273,000420: 06,3103           03037 14004                     2CADR    TRIMON                                #  CHECK AGAIN TO BE SURE. THEN PROCEED..
015274,000421: 
015275,000422: 
015276,000423: 06,3105           05604                           TC       EJFREE                                
015277,000424: 

Page 357

015279,000426: 06,3106           00004        TR1                INHINT                                         #  PROCEED WITH THE FAIL.
015280,000427: 06,3107           37754                           CAF      BIT2                                  #  20MS.
015281,000428: 06,3110           05701                           TC       WAITLIST                              
015282,000429: 06,3111  E4,1407                                  EBANK=   JETSTEP                               
015283,000430: 06,3111           03052 14004                     2CADR    TRIMON1                               #  BYPASS THE RECHECK.
015284,000431: 
015285,000432: 06,3113           05604                           TC       EJFREE                                
015286,000433: 
015287,000434: 06,3114           01400        BITS9,10           OCT      01400                                 
015288,000435: 06,3115  06,3114               TRIMCODE           EQUALS   BITS9,10                              
015289,000436: 06,3115           07400        TRIMMASK           OCT      07400                                 
015290,000437: 06,3116           00125        V01N25K            OCT      00125                                 
015291,000438: 06,3117           05000        V50K               OCT      05000                                 
015292,000439: 

Page 358

015294,000441:                                                                                                  #  LEM FCS TEST  THROTTLE TASK
015295,000442:                                                                                                  #     THIS PROGRAM ISSUES A PROFILE OF THROTTLE COMMANDS TO THE LEM DESCENT ENGINE.  THE PROFILE IS DETERMINED BY
015296,000443:                                                                                                  #  THE VALUES IN THE THRTSTEP REGISTER AND THE 6  SETS OF REGISTERS, 5 PER SET, CALLED  DOTIMES, DELAY, THR1TIME,
015297,000444:                                                                                                  #  THCOMM1 AND THCOMM2.  THE THRTSTEP REGISTER VALUE IS USED TO INDEX THE  6  SETS OF 5 REGISTERS AND HAS ALLOWABLE
015298,000445:                                                                                                  #  VALUES OF +0 THROUGH +5.  THE 5 REGISTERS PER SET ARE DEFINED AS FOLLOWS
015299,000446:                                                                                                  #      (1) DOTIMES DETERMINES THE NUMBER OF TIMES THE THROTTLE WILL BE EXERCISED AS PER THE VALUES OF THR1TIME,
015300,000447:                                                                                                  #  THCOMM1 AND THCOMM2 OF THE CURRENT STEP.  IT HAS ALLOWABLE VALUES OF +0 THROUGH 37777 OCT.
015301,000448:                                                                                                  #      (2) DELAY DETERMINES THE TIME BETWEEN THE START OF A STEP AND THE BE GINNING OF THR1TIME. ITIS CALLED ONLY
015302,000449:                                                                                                  #  ONCE PER STEP,I.E., REPEATS OF THE SAME THCOMM1 AND THCOMM2 START AT THR1TIME.  DELAY MUST BE FORMATTED FOR T3
015303,000450:                                                                                                  #  AND HENCE HAS A MAXIMUM VALUE OF 2 MINUTES.
015304,000451:                                                                                                  #      (3) THR1TIME DETERMINES THE TIME BETWEEN THE END OF DELAY OR THE END   OF THCOMM2 AND THE START OF
015305,000452:                                                                                                  #  THCOMM1.  IT MUST BE FORMATTED FOR T3.
015306,000453:                                                                                                  #      (4) THCOMM1 AND (5) THCOMM2 DETERMINE THE NUMBER OF THRUST INCREASE  OR DECREASE PULSES TOBE ISSUED AT A
015307,000454:                                                                                                  #  3.2KPPS RATE.  THE RANGE OF POSSIBLE VALUES OF EITHER IS FROM POSMAX (OCT 37777) TO NEGMAX (OCT 40000) ALTHOUGH
015308,000455: 
015309,000456:                                                                                                  #  THE ACTUAL THROTTLE RANGE IS FROM OCT 6116 TO OCT 71661 (+,- 3150 DEC).
015310,000457:                                                                                                  #     THIS TASK WILL BE ENTERED BUT IMMEDIATELY ENDED IF THE INITIAL VALUES OF THRTSTEP AND DOTIMES ARE +0.
015311,000458: 
015312,000459: 
015313,000460: 
015314,000461: 06,3120           11605        NEXTTHRT           CCS      THRTSTEP                              
015315,000462: 06,3121           03123                           TC       +2                                    
015316,000463: 06,3122           05745                           TC       TASKOVER                              #  EXIT HERE.
015317,000464: 06,3123           55605                           TS       THRTSTEP                              
015318,000465: 
015319,000466: 06,3124           51605        THRSTART           NDX      THRTSTEP                              #  ENTER HERE.
015320,000467: 06,3125           11606                           CCS      DOTIMES                               #  NUMBER OF TIMES COMMANDS 1 AND 2 DONE.
015321,000468: 06,3126           03130                           TC       +2                                    
015322,000469: 06,3127           03120                           TC       NEXTTHRT                              
015323,000470: 06,3130           51605                           NDX      THRTSTEP                              
015324,000471: 06,3131           31614                           CAE      DELAY                                 #  TIME BETWEEN STEPS.  BIAS FOR THR1TIME.
015325,000472:                                                                                                  #  MUST BE SCALED FOR T3.
015326,000473: 06,3132           05701                           TC       WAITLIST                              
015327,000474: 06,3133  E4,1605                                  EBANK=   THRTSTEP                              
015328,000475: 06,3133           03156 14004                     2CADR    THROTON1                              
015329,000476: 
015330,000477: 06,3135           05745                           TC       TASKOVER                              
015331,000478: 
015332,000479: 06,3136           51605        THR2COMM           NDX      THRTSTEP                              
015333,000480: 06,3137           31636                           CAE      THCOMM2                               #  SAME REMARKS AS FOR THCOMM1.
015334,000481: 06,3140           03174                           TC       THROTON                               
015335,000482: 06,3141           67755                           AD       BIT1                                  #  10MS IN CASE OF NO THCOMM2.
015336,000483: 06,3142           05701                           TC       WAITLIST                              
015337,000484: 06,3143  E4,1605                                  EBANK=   THRTSTEP                              
015338,000485: 06,3143           03146 14004                     2CADR    CKDOTIME                              
015339,000486: 
015340,000487: 06,3145           05745                           TC       TASKOVER                              
015341,000488: 
015342,000489: 06,3146           51605        CKDOTIME           NDX      THRTSTEP                              
015343,000490: 06,3147           11606                           CCS      DOTIMES                               
015344,000491: 06,3150           10000                           CCS      A                                     

Page 359

015346,000493: 06,3151           03153                           TC       +2                                    
015347,000494: 06,3152           03120                           TC       NEXTTHRT                              #  WAS ONE.
015348,000495: 06,3153           67755                           AD       ONE                                   
015349,000496: 06,3154           51605                           NDX      THRTSTEP                              
015350,000497: 06,3155           55606                           TS       DOTIMES                               
015351,000498: 06,3156           51605        THROTON1           NDX      THRTSTEP                              
015352,000499: 06,3157           31622                           CAE      THR1TIME                              #  TIME BETWEEN DOTIMES.  SCALED FOR T3.
015353,000500: 06,3160           05701                           TC       WAITLIST                              
015354,000501: 06,3161  E4,1605                                  EBANK=   THRTSTEP                              
015355,000502: 06,3161           03164 14004                     2CADR    THR1COMM                              
015356,000503: 
015357,000504: 06,3163           05745                           TC       TASKOVER                              
015358,000505: 
015359,000506: 06,3164           51605        THR1COMM           NDX      THRTSTEP                              
015360,000507: 06,3165           31630                           CAE      THCOMM1                               #  SHOULD BE NO LARGER THAN 3150DEC.
015361,000508: 06,3166           03174                           TC       THROTON                               
015362,000509: 06,3167           63211                           AD       250MS                                 #  SO ACE CAN SAMPLE.
015363,000510: 06,3170           05701                           TC       WAITLIST                              
015364,000511: 06,3171  E4,1605                                  EBANK=   THRTSTEP                              
015365,000512: 
015366,000513: 06,3171           03136 14004                     2CADR    THR2COMM                              
015367,000514: 
015368,000515: 06,3173           05745                           TC       TASKOVER                              
015369,000516: 
015370,000517: 06,3174           54055        THROTON            TS       THRUST                                #  THROTTLE OUTPUT COUNTER.
015371,000518: 06,3175           55405                           TS       THBUF                                 #  SAVE FOR BZMF.
015372,000519: 06,3176           37752                           CAF      BIT4                                  
015373,000520: 06,3177           00006                           EXTEND                                         
015374,000521: 06,3200           05014                           WOR      14                                    #  ENABLE THRUST DRIVE.  COMMAND STARTS NOW
015375,000522: 06,3201           31405                           CAE      THBUF                                 
015376,000523: 06,3202           00006                           EXTEND                                         
015377,000524: 06,3203           63205                           BZMF     +2                                    
015378,000525: 06,3204           40000                           COM                                            
015379,000526: 06,3205           40000                           COM                                            
015380,000527: 06,3206           00006                           EXTEND                                         
015381,000528: 06,3207           77744                           MP       BIT10                                 #  SCALES FOR T3.
015382,000529: 06,3210           00002                           TC       Q                                     
015383,000530: 
015384,000531: 06,3211           00031        250MS              OCT      00031                                 
015385,000532: 

Page 360

015387,000534:                                                                                                  #  LEM FCS TEST  INTERFACE LOOK TASK.
015388,000535: 
015389,000536:                                                                                                  #      THIS PROGRAM KEEPS A RUNNING HISTORY OF THE STATE OF ALL THE BITS IN INPUT CHANNELS 30, 31, 32 AND 33.
015390,000537:                                                                                                  #  IT DOES THIS BY DETECTING A CHANGE OF AN INPUT BIT FROM AN INITIAL ONE STATE TO A ZERO STATE OR FROM AN INITIAL
015391,000538:                                                                                                  #  ZERO TO A ONE.  THE HISTORY IS MAINTAINED IN TWO BUFFER REGISTERS FOR EACH CHANNEL, ONE FOR STORING ONE TO ZERO
015392,000539:                                                                                                  #  CHANGES (30BUF1, +1, +2, AND +3) AND ONE FOR ZERO TO ONE CHANGES (30BUF0, +1 +2 AND +3).  THE OPERATOR MUST
015393,000540:                                                                                                  #  LOAD THE INITIAL STATES OF THE INPUT CHANNELS INTO THEIR RESPECTIVE BUFFER REGISTERS BEFORE THIS PROGRAM IS IN-
015394,000541:                                                                                                  #  ITIATED.
015395,000542:                                                                                                  #      TO ALLOW THIS PROGRAM TO RUN C(QUITLOOK) MUST BE SET GREATER THAN +0 BEFORE IT IS STARTED.  IF THE OPERATOR
015396,000543:                                                                                                  #  DOES NOT DESIRE THIS PROGRAM TO RUN HE SHOULD SET C(QUITLOOK)=+0 BEFORE STARTING THE FCS TEST.  AFTER THIS TASK
015397,000544:                                                                                                  #  IS RUNNING THE OPERATOR CAN STOP IT BY SETTING C(QUITLOOK) = +0.
015398,000545:                                                                                                  #      NO DISPLAYS OF EITHER THE BUFFER REGISTERS OR CHANNELS ARE INCORPORATED INTO THIS PROGRAM.  THIS WAS DONE TO
015399,000546:                                                                                                  #  ALLOW THE TEST OPERATOR MONITORING FLEXIBILITY.  FOR REAL TIME MONITORING IT IS SUGGESTED THAT THE BUFFER
015400,000547: 
015401,000548:                                                                                                  #  REGISTERS BE DISPLAYED WITH THE MONITOR VERBS (11 THROUGH 15).  ON THE OTHER HAND, THE OPERATOR MAY ELECT TO
015402,000549:                                                                                                  #  PERFORM NO REAL TIME MONITORING UNTIL THE TEST IS COMPLETED, WHEN THE BUFFER REGISTERS WOULD BE CALLED FOR
015403,000550:                                                                                                  #  DISPLAY (VERB 01) AND RECORDED.
015404,000551:                                                                                                  #      THIS PROGRAM IS PRIMARILY INTENDED FOR INTERFACE MONITORING DURING THE LEM VIBRATION TEST AT BETHPAGE, N.Y.,
015405,000552:                                                                                                  #  ALTHOUGH IT MAY ALSO BE USEFUL DURING VEHICAL LEVEL EMI TESTS.
015406,000553: 
015407,000554: 06,3212           11654        LOOKTOP            CCS      QUITLOOK                              #  IS THIS TASK WANTED.
015408,000555: 06,3213           03215                           TC       +2                                    #  YES.
015409,000556: 06,3214           05745                           TC       TASKOVER                              #  NO.
015410,000557: 06,3215           36301                           CAF      THREE                                 #  START SCAN OF CHANNELS.
015411,000558: 06,3216           55655        LOOKLOOP           TS       CHCNTR                                #  3, 2, 1, 0.
015412,000559: 06,3217           51655                           NDX      CHCNTR                                
015413,000560: 
015414,000561: 06,3220           31644                           CAE      30BUF1                                
015415,000562: 06,3221           00006                           EXTEND                                         
015416,000563: 06,3222           51655                           NDX      CHCNTR                                
015417,000564: 06,3223           02030                           RAND     30                                    #  DETECTS CHANGES FROM 1 TO 0.
015418,000565: 06,3224           51655                           NDX      CHCNTR                                
015419,000566: 06,3225           57644                           XCH      30BUF1                                #  STORE NEW ZEROS.
015420,000567: 06,3226           51655                           NDX      CHCNTR                                
015421,000568: 06,3227           31650                           CAE      30BUF0                                
015422,000569: 06,3230           00006                           EXTEND                                         
015423,000570: 06,3231           51655                           NDX      CHCNTR                                
015424,000571: 06,3232           04030                           ROR      30                                    #  DETECTS CHANGES FROM 0 TO 1.
015425,000572: 06,3233           51655                           NDX      CHCNTR                                
015426,000573: 06,3234           57650                           XCH      30BUF0                                #  STORE NEW ONES.
015427,000574: 06,3235           11655                           CCS      CHCNTR                                #  IS THIS SCAN DONE.
015428,000575: 06,3236           03216                           TC       LOOKLOOP                              #  NO.
015429,000576: 06,3237           34557                           CAF      TEN                                   #  YES.  100MS RECALL.
015430,000577: 06,3240           05701                           TC       WAITLIST                              
015431,000578: 06,3241  E4,1654                                  EBANK=   QUITLOOK                              
015432,000579: 06,3241           03212 14004                     2CADR    LOOKTOP                               
015433,000580: 
015434,000581: 06,3243           05745                           TC       TASKOVER                              
015435,000582: 

End of include-file LEM_FLIGHT_CONTROL_SYSTEM_TEST.agc.  Parent file is MAIN.agc