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.

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

Page 360

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

Page 361

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

Page 362

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

Page 363

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

Page 364

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

Page 365

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

Page 366

015075,000242: 
015076,000243: 15,3707  E7,1403                                  EBANK=   DNCDUCNT                              
015077,000244: 
015078,000245: 15,3707           55403        15INSRT            TS       DNCDUCNT                              
015079,000246: 
015080,000247: 15,3710           35632                           CA       EBANK6                                
015081,000248: 15,3711           56003                           XCH      EBANK                                 
015082,000249: 15,3712           54001                           TS       L                                     
015083,000250: 
015084,000251: 15,3713  E6,1754                                  EBANK=   RGIMTIMR                              
015085,000252: 
015086,000253: 15,3713           43723                           CS       GMBLBITS                              
015087,000254: 15,3714           00006                           EXTEND                                         
015088,000255: 15,3715           03012                           WAND     12                                    
015089,000256: 
015090,000257: 15,3716           37745                           CA       NEGMAX                                
015091,000258: 15,3717           55754                           TS       RGIMTIMR                              
015092,000259: 15,3720           55753                           TS       QGIMTIMR                              
015093,000260: 
015094,000261: 15,3721           22003                           LXCH     EBANK                                 
015095,000262: 15,3722           12365                           TCF      DNCDUSGO                              
015096,000263: 
015097,000264: 15,3723           07400        GMBLBITS           OCT      7400                                  
015098,000265: 
015099,000266: 15,3724           37777        CHKSUM15           OCT      37777                                 
015100,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