Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

014831,000002:                                                                                                  ## Copyright:   Public domain.
014832,000003:                                                                                                  ## Filename:    RTB_OP_CODES.agc
014833,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst). It 
014834,000005:                                                                                                  ##              is part of the source code for the Lunar Module's
014835,000006:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 5.
014836,000007:                                                                                                  ## Assembler:   yaYUL
014837,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014838,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014839,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
014840,000011:                                                                                                  ##              2016-10-16 RSB  Transcribed.
014841,000012:                                                                                                  ##              2016-10-31 RSB  Typos.
014842,000013:                                                                                                  ##              2016-12-05 RSB  Comment-proofing pass with octopus/ProoferComments completed;
014843,000014:                                                                                                  ##                              changes made.
014844,000015: 

Page 360

014846,000017: 15,3454                                           BANK     15                                    
014847,000018:                                                                                                  #  LOAD TIME2, TIME1 INTO MPAC:
014848,000019: 
014849,000020: 15,3454           00006        LOADTIME           EXTEND                                         
014850,000021: 15,3455           30025                           DCA      TIME2                                 
014851,000022: 15,3456           16542                           TCF      SLOAD2                                
014852,000023: 
014853,000024:                                                                                                  #           CONVERT THE SINGLE PRECISION 2'S COMPLEMENT NUMBER ARRIVING IN MPAC (SCALED IN HALF-REVOLUTIONS) TO A
014854,000025:                                                                                                  #  DP 1'S COMPLEMENT NUMBER SCALED IN REVOLUTIONS.
014855,000026: 
014856,000027: 15,3457           10144        CDULOGIC           CCS      MPAC                                  
014857,000028: 15,3460           37767                           CAF      ZERO                                  
014858,000029: 15,3461           13464                           TCF      +3                                    
014859,000030: 15,3462           13463                           NOOP                                           
014860,000031: 15,3463           47746                           CS       HALF                                  
014861,000032: 
014862,000033: 15,3464           54145                           TS       MPAC       +1                         
014863,000034: 15,3465           37767                           CAF      ZERO                                  
014864,000035: 15,3466           56144                           XCH      MPAC                                  
014865,000036: 15,3467           00006                           EXTEND                                         
014866,000037: 15,3470           77746                           MP       HALF                                  
014867,000038: 15,3471           20145                           DAS      MPAC                                  
014868,000039: 15,3472           16544                           TCF      SLOAD2     +2                         #  C(A) = +0.
014869,000040: 
014870,000041:                                                                                                  #           READ IMU CDUS INTO MPAC AS A VECTOR. ESPECIALLY USEFUL IN CONNECTION WITH SMNB, ETC.
014871,000042: 
014872,000043: 15,3473           00004        READCDUS           INHINT                                         
014873,000044: 15,3474           30033                           CA       CDUY                                  #  IN ORDER Y Z X
014874,000045: 15,3475           54144                           TS       MPAC                                  
014875,000046: 15,3476           30034                           CA       CDUZ                                  
014876,000047: 15,3477           54147                           TS       MPAC       +3                         
014877,000048: 15,3500           30032                           CA       CDUX                                  
014878,000049: 15,3501           13510                           TCF      READPIPS   +6                         #  COMMON CODING.
014879,000050: 
014880,000051:                                                                                                  #           READ THE PIPS INTO MPAC WITHOUT CHANGING THEM:
014881,000052: 
014882,000053: 15,3502           00004        READPIPS           INHINT                                         
014883,000054: 15,3503           30037                           CA       PIPAX                                 
014884,000055: 15,3504           54144                           TS       MPAC                                  
014885,000056: 15,3505           30040                           CA       PIPAY                                 
014886,000057: 15,3506           54147                           TS       MPAC       +3                         
014887,000058: 15,3507           30041                           CA       PIPAZ                                 
014888,000059: 15,3510           00003                           RELINT                                         
014889,000060: 15,3511           54151                           TS       MPAC       +5                         
014890,000061: 
014891,000062: 15,3512           37767                           CAF      ZERO                                  
014892,000063: 15,3513           54145                           TS       MPAC       +1                         
014893,000064: 15,3514           54150                           TS       MPAC       +4                         
014894,000065: 15,3515           54152                           TS       MPAC       +6                         
014895,000066: 

Page 361

014897,000068: 15,3516           47763        VECMODE            CS       ONE                                   
014898,000069: 15,3517           16124                           TCF      NEWMODE                               
014899,000070: 
014900,000071:                                                                                                  #           FORCE TP SIGN AGREEMENT IN MPAC:
014901,000072: 
014902,000073: 15,3520           07327        SGNAGREE           TC       TPAGREE                               
014903,000074: 15,3521           16125                           TCF      DANZIG                                
014904,000075: 
014905,000076:                                                                                                  #           CONVERT THE DP 1'S COMPLEMENT ANGLE SCALED IN REVOLUTIONS TO A SINGLE PRECISION 2'S COMPLEMENT ANGLE
014906,000077:                                                                                                  #  SCALED IN HALF-REVOLUTIONS.
014907,000078: 
014908,000079: 15,3522           03552        1STO2S             TC       1TO2SUB                               
014909,000080: 15,3523           37767                           CAF      ZERO                                  
014910,000081: 15,3524           54145                           TS       MPAC       +1                         
014911,000082: 15,3525           16124                           TCF      NEWMODE                               
014912,000083: 
014913,000084:                                                                                                  #           DO 1STO2S ON A VECTOR OF ANGLES:
014914,000085: 
014915,000086: 15,3526           03552        V1STO2S            TC       1TO2SUB                               #  ANSWER ARRIVES IN A AND MPAC.
014916,000087: 
014917,000088: 15,3527           52152                           DXCH     MPAC       +5                         
014918,000089: 15,3530           52145                           DXCH     MPAC                                  
014919,000090: 15,3531           03552                           TC       1TO2SUB                               
014920,000091: 15,3532           54146                           TS       MPAC       +2                         
014921,000092: 
014922,000093: 15,3533           52150                           DXCH     MPAC       +3                         
014923,000094: 15,3534           52145                           DXCH     MPAC                                  
014924,000095: 15,3535           03552                           TC       1TO2SUB                               
014925,000096: 15,3536           54145                           TS       MPAC       +1                         
014926,000097: 
014927,000098: 15,3537           30151                           CA       MPAC       +5                         
014928,000099: 15,3540           54144                           TS       MPAC                                  
014929,000100: 
014930,000101: 15,3541           37763        TPMODE             CAF      ONE                                   #  MODE IS TP.
014931,000102: 15,3542           16124                           TCF      NEWMODE                               
014932,000103: 
014933,000104:                                                                                                  #           V1STO2S FOR 2 COMPONENT VECTOR, USED BY RR.
014934,000105: 
014935,000106: 15,3543           03552        2V1STO2S           TC       1TO2SUB                               
014936,000107: 15,3544           52150                           DXCH     MPAC       +3                         
014937,000108: 15,3545           52145                           DXCH     MPAC                                  
014938,000109: 15,3546           03552                           TC       1TO2SUB                               
014939,000110: 15,3547           54001                           TS       L                                     
014940,000111: 15,3550           30147                           CA       MPAC       +3                         
014941,000112: 15,3551           16542                           TCF      SLOAD2                                
014942,000113: 
014943,000114:                                                                                                  #           SUBROUTINE TO DO DOUBLING AND 1'S TO 2'S COMVERSION:
014944,000115: 
014945,000116: 15,3552           52145        1TO2SUB            DXCH     MPAC                                  #  FINAL MPAC +1 UNSPECIFIED.
014946,000117: 15,3553           20001                           DDOUBL                                         

Page 362

014948,000119: 15,3554           10000                           CCS      A                                     
014949,000120: 15,3555           67763                           AD       ONE                                   
014950,000121: 15,3556           13560                           TCF      +2                                    
014951,000122: 15,3557           40000                           COM                                            #  THIS WAS REVERSE OF MSU.
014952,000123: 
014953,000124: 15,3560           54144                           TS       MPAC                                  #  AND SKIP ON OVERFLOW.
014954,000125: 15,3561           00002                           TC       Q                                     
014955,000126: 
014956,000127: 15,3562           50000                           INDEX    A                                     #  OVERFLOW UNCORRECT AND IN MSU.
014957,000128: 15,3563           37744                           CAF      LIMITS                                
014958,000129: 15,3564           26144                           ADS      MPAC                                  
014959,000130: 15,3565           00002                           TC       Q                                     
014960,000131: 

Page 363

014962,000133:                                                                                                  #           SUBROUTINE TO INCREMENT CDUS
014963,000134: 15,3566           33601        INCRCDUS           CAF      LOCTHETA                              
014964,000135: 15,3567           54120                           TS       BUF                                   #  PLACE ADRES(THETA) IN BUF.
014965,000136: 15,3570           30144                           CAE      MPAC                                  #  INCREMENT IN 1S COMPL.
014966,000137: 15,3571           03602                           TC       CDUINC                                
014967,000138: 
014968,000139: 15,3572           24120                           INCR     BUF                                   
014969,000140: 15,3573           30147                           CAE      MPAC       +3                         
014970,000141: 15,3574           03602                           TC       CDUINC                                
014971,000142: 
014972,000143: 15,3575           24120                           INCR     BUF                                   
014973,000144: 15,3576           30151                           CAE      MPAC       +5                         
014974,000145: 15,3577           03602                           TC       CDUINC                                
014975,000146: 
014976,000147: 15,3600           13516                           TCF      VECMODE                               
014977,000148: 
014978,000149: 15,3601           00400        LOCTHETA           ADRES    THETAD                                
014979,000150: 
014980,000151:                                                                                                  #           THE FOLLOWING ROUTINE INCREMENTS IN 2S COMPLEMENT THE REGISTER WHOSE ADDRESS IS IN BUF BY THE 1S COMPL.
014981,000152:                                                                                                  #  QUANTITY FOUND IN TEM2. THIS MAY BE USED TO INCREMENT DESIRED IMU AND OPTICS CDU ANGLES OR ANY OTHER 2S COMPL.
014982,000153:                                                                                                  #  (+0 UNEQUAL TO -0) QUANTITY. MAY BE CALLED BY BANKCALL/SWCALL.
014983,000154: 
014984,000155: 15,3602           54132        CDUINC             TS       TEM2                                  #  1S COMPL.QUANT. ARRIVES IN ACC. STORE IT
014985,000156: 15,3603           50120                           INDEX    BUF                                   
014986,000157: 15,3604           10000                           CCS      0                                     #  CHANGE 2S COMPL. ANGLE(IN BUF)INTO 1S
014987,000158: 15,3605           67763                           AD       ONE                                   
014988,000159: 15,3606           13612                           TCF      +4                                    
014989,000160: 15,3607           67763                           AD       ONE                                   
014990,000161: 15,3610           67763                           AD       ONE                                   #  OVERFLOW HERE IF 2S COMPL. IS 180 DEG.
014991,000162: 15,3611           40000                           COM                                            
014992,000163: 
014993,000164: 15,3612           60132                           AD       TEM2                                  #  ADD IN INCREMENT. WILL OVERFLOW IF RE-
014994,000165:                                                                                                  #  SULT MOVES FROM 2ND TO 3D QUAD.(OR BACK)
014995,000166: 15,3613           10000                           CCS      A                                     #  BACK TO 2S COMPL.
014996,000167: 15,3614           67763                           AD       ONE                                   
014997,000168: 15,3615           13617                           TCF      +2                                    
014998,000169: 15,3616           40000                           COM                                            
014999,000170: 15,3617           54132                           TS       TEM2                                  #  STORE 14BIT QUANTITY WITH PRESENT SIGN
015000,000171: 15,3620           13624                           TCF      +4                                    
015001,000172: 15,3621           50000                           INDEX    A                                     #  OVERFLOW MEANS CORRECT 14BIT VALUE,WRONG
015002,000173:                                                                                                  #   SIGN.
015003,000174: 15,3622           37744                           CAF      LIMITS                                #  FIX IT,BY ADDING IN 37777 OR 40000
015004,000175: 15,3623           60132                           AD       TEM2                                  
015005,000176: 
015006,000177: 15,3624           50120                           INDEX    BUF                                   
015007,000178: 15,3625           54000                           TS       0                                     #  STORE NEW ANGLE IN 2S COMPLEMENT.
015008,000179: 15,3626           00002                           TC       Q                                     
015009,000180: 

Page 364

015011,000182:                                                                                                  #           RTB TO TORQUE GYROS, EXCEPT FOR THE CALL TO IMUSTALL. ECADR OF COMMANDS ARRIVES IN X1.
015012,000183: 
015013,000184: 15,3627           50110        PULSEIMU           INDEX    FIXLOC                                #  ADDRESS OF GYRO COMMANDS SHOULD BE IN X1
015014,000185: 15,3630           30046                           CA       X1                                    
015015,000186: 15,3631           05206                           TC       BANKCALL                              
015016,000187: 15,3632           26362                           CADR     IMUPULSE                              
015017,000188: 15,3633           16125                           TCF      DANZIG                                
015018,000189: 

Page 365

015020,000191:                                                                                                  #           THE FOLLOWING ROUTINE IS USED ONLY IN BENCH TESTING THE RR.
015021,000192: 
015022,000193: 15,3634           05701        RRSIM              TC       FIXDELAY                              
015023,000194: 15,3635           00062                           DEC      50         B-14                       
015024,000195: 
015025,000196: 15,3636           37762        RRSIM2             CAF      BIT2                                  #  SEE IF RR ECTR ENABLED.
015026,000197: 15,3637           00006                           EXTEND                                         
015027,000198: 15,3640           02012                           RAND     12                                    
015028,000199: 15,3641           00006                           EXTEND                                         
015029,000200: 15,3642           13634                           BZF      RRSIM                                 
015030,000201: 
015031,000202: 15,3643           30132                           CA       TEM2                                  #  SAVE EXEC TEMPS SINCE IN RUPT.
015032,000203: 15,3644           54070                           TS       RUPTREG1                              
015033,000204: 15,3645           33705                           CAF      LOPTY                                 
015034,000205: 15,3646           56120                           XCH      BUF                                   
015035,000206: 15,3647           54071                           TS       RUPTREG2                              
015036,000207: 15,3650           30361                           CA       LASTYCMD                              #  ECTR.
015037,000208: 15,3651           60000                           DOUBLE                                         
015038,000209: 15,3652           00006                           EXTEND                                         
015039,000210: 15,3653           73706                           MP       RRSIMG                                
015040,000211: 15,3654           03602                           TC       CDUINC                                
015041,000212: 15,3655           24120                           INCR     BUF                                   
015042,000213: 15,3656           30035                           CA       OPTY                                  #  SHAFT CMD IS DIVIDED BY THE ABS VALUE OF
015043,000214: 15,3657           00006                           EXTEND                                         #  THE COS OF THE TRUNNION ANGLE.
015044,000215: 15,3660           20007                           MSU      7                                     #  TO 1S COMPLEMENT.
015045,000216: 15,3661           05354                           TC       SPCOS                                 #                                  *
015046,000217: 15,3662           00006                           EXTEND                                         #  SPCOS NOW GIVES COS SCALED AT 1 *
015047,000218: 15,3663           77746                           MP       BIT14                                 #      (A DAP GROUP FIX)           *
015048,000219: 15,3664           10000                           CCS      A                                     
015049,000220: 15,3665           13670                           TCF      +3                                    
015050,000221: 15,3666           13670                           TCF      +2                                    
015051,000222: 15,3667           13670                           TCF      +1                                    
015052,000223: 15,3670           67763                           AD       ONE                                   
015053,000224: 15,3671           54061                           TS       ITEMP1                                
015054,000225: 
015055,000226: 15,3672           30362                           CA       LASTXCMD                              #  SHAFT RATE DEPENDS ON TRUNNION.
015056,000227: 15,3673           00006                           EXTEND                                         
015057,000228: 15,3674           73706                           MP       RRSIMG                                
015058,000229: 15,3675           00006                           EXTEND                                         
015059,000230: 15,3676           10061                           DV       ITEMP1                                
015060,000231: 15,3677           03602                           TC       CDUINC                                
015061,000232: 15,3700           30070                           CA       RUPTREG1                              
015062,000233: 15,3701           54132                           TS       TEM2                                  
015063,000234: 15,3702           30071                           CA       RUPTREG2                              
015064,000235: 15,3703           54120                           TS       BUF                                   
015065,000236: 15,3704           13634                           TCF      RRSIM                                 
015066,000237: 
015067,000238: 15,3705           00035        LOPTY              ADRES    OPTY                                  
015068,000239: 15,3706           22755        RRSIMG             DEC      .59259                                
015069,000240:                                                                                                  #  START CODING FOR MODULE 3 REMAKE, AUGUST 1967***START CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************

Page 366

015071,000242: 
015072,000243: 15,3707  E7,1403                                  EBANK=   DNCDUCNT                              
015073,000244: 
015074,000245: 15,3707           55403        15INSRT            TS       DNCDUCNT                              
015075,000246: 
015076,000247: 15,3710           35632                           CA       EBANK6                                
015077,000248: 15,3711           56003                           XCH      EBANK                                 
015078,000249: 15,3712           54001                           TS       L                                     
015079,000250: 
015080,000251: 15,3713  E6,1754                                  EBANK=   RGIMTIMR                              
015081,000252: 
015082,000253: 15,3713           43723                           CS       GMBLBITS                              
015083,000254: 15,3714           00006                           EXTEND                                         
015084,000255: 15,3715           03012                           WAND     12                                    
015085,000256: 
015086,000257: 15,3716           37745                           CA       NEGMAX                                
015087,000258: 15,3717           55754                           TS       RGIMTIMR                              
015088,000259: 15,3720           55753                           TS       QGIMTIMR                              
015089,000260: 
015090,000261: 15,3721           22003                           LXCH     EBANK                                 
015091,000262: 15,3722           12365                           TCF      DNCDUSGO                              
015092,000263: 
015093,000264: 15,3723           07400        GMBLBITS           OCT      7400                                  
015094,000265: 
015095,000266: 15,3724           37777        CHKSUM15           OCT      37777                                 
015096,000267:                                                                                                  #  **END CODING FOR MODULE 3 REMAKE, AUGUST 1967*****END CODING FOR MODULE 3 REMAKE, AUGUST 1967*******************

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