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.

036053,000002:                                                                                                  ## Copyright:    Public domain.
036054,000003:                                                                                                  ## Filename:     MASS_CALCULATOR.agc
036055,000004:                                                                                                  ## Purpose:      A module for revision 0 of BURST120 (Sunburst). It 
036056,000005:                                                                                                  ##               is part of the source code for the Lunar Module's
036057,000006:                                                                                                  ##               (LM) Apollo Guidance Computer (AGC) for Apollo 5.
036058,000007:                                                                                                  ## Assembler:    yaYUL
036059,000008:                                                                                                  ## Contact:      Ron Burkey <info@sandroid.org>.
036060,000009:                                                                                                  ## Website:      www.ibiblio.org/apollo/index.html
036061,000010:                                                                                                  ## Mod history:  2016-09-30 RSB  Created draft version.
036062,000011:                                                                                                  ##               2016-10-30 MAS  Transcribed.
036063,000012:                                                                                                  ##               2016-12-06 RSB  Comment-proofing via octopus/ProoferComments;
036064,000013:                                                                                                  ##                               changes were made.
036065,000014: 

Page 844

036067,000016: 30,3206                                           BANK     30                                    
036068,000017:                                                                                                  #  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
036069,000018: 
036070,000019:                                                                                                  #      THE MASS UPDATE ROUTINE EXTENDS FROM APPROXIMATELY HERE TO THE NEXT
036071,000020:                                                                                                  #  ROW OF ASTERISKS.   COMPUTATIONS ARE AS FOLLOWS:-
036072,000021:                                                                                                  #      (1) /AF/ = MAGNITUDE DV/DT, SCALED IN UNITS OF 2(-5) M/CS/CS.
036073,000022:                                                                                                  #      (2) PREFORCE = /AF/ MASS, APPROXIMATE PRESENT THRUST, SCALED AT
036074,000023:                                                                                                  #          SOME 3.3 POUNDS PER BIT; PREFORCE LATER BECOMES PREFORCE/2FMAX.
036075,000024:                                                                                                  #      (3) NOMINAL EXHAUST VELOCITY, VEXNOM = VEXSTEP + (PREFORCE-FSTEP)
036076,000025:                                                                                                  #          SLOPE, WHERE VEXSTEP, FSTEP, AND SLOPE ARE SELECTED FROM THE
036077,000026:                                                                                                  #          'VEXTABLE' BY THE ROUTINE BEGINNING AT VEXFINDD; THE FSTEPS
036078,000027:                                                                                                  #          AND VXSTEPS DEFINE CERTAIN DISCRETE POINTS ON THE CURVE OF
036079,000028:                                                                                                  #          EXHAUST VELOCITY VERSUS THRUST; THE ASSOCIATED SLOPE IS ALWAYS
036080,000029:                                                                                                  #          THAT FOR THE SEGMENT JUST PRECEEDING THOSE POINTS.   (UNITS
036081,000030:                                                                                                  #          FOR VEXNOM, AS FOR NEGVEX, ARE 2(6) M/CS.)
036082,000031:                                                                                                  #      (4) AREARATE, A MODERATELY ABSTRUSE (NOT TO SAY ABSURD) FUNCTION
036083,000032:                                                                                                  #          OF DELAREA (EROSION) AND PREFORCE.   (THE AREA IN QUESTION IS
036084,000033:                                                                                                  #          THAT OF THE THROAT OF THE ENGINE.)
036085,000034:                                                                                                  #      (5) DELAREA = DELAREA + AREARATE DELTAT, SCALED IN UNITS OF 2(7) %
036086,000035:                                                                                                  #      (6) NEGVEX = -(VEXNOM - CVEX5 DELAREA).
036087,000036:                                                                                                  #      (7) MASS = MASS + (/DELV//NEGVEX) MASS, SCALED IN UNITS OF 2(15)
036088,000037:                                                                                                  #          KILOGRAMS.
036089,000038: 
036090,000039:                                                                                                  #      THE FOLLOWING INITIALIZATIONS MUST BE MADE BEFORE LAUNCH:
036091,000040:                                                                                                  #  C(MASS) = 0, C(LEMMASS1) = SCALED MASS OF LEM CUM DPS, C(LEMMASS2) =
036092,000041:                                                                                                  #  SCALED MASS OF LEM WITHOUT DPS.   UPON LEM-SIVB SEPARATION MASS MUST
036093,000042:                                                                                                  #  BE REINITIALIZED USING LEMMASS1 AND DELAREA MUST BE SET TO DP ZERO.
036094,000043:                                                                                                  #  LATER, WHEN THE DPS PARTS COMPANY, MASS MUST BE INITIALIZED STILL
036095,000044:                                                                                                  #  AGAIN USING LEMMASS2.
036096,000045: 
036097,000046:                                                                                                  #      THE FOLLOWING IS AN INELEGANT SUPERFLUITY:-   INPUTS: MASS, DELAREA,
036098,000047:                                                                                                  #  DELV, DELTAT, EMANATIONS FROM THE VEXTABLE, A TABLESPOON OF SALT AND
036099,000048:                                                                                                  #  SEVEN BYZANTINE DODO EGGS.   OUTPUTS: /AF/ AND MASS.   DEBRIS: PREFORCE,
036100,000049:                                                                                                  #  NEGVEX, AND AREARATE (TO LEARN MORE ABOUT THESE GEMS, SEE ABOVE).
036101,000050:                                                                                                  #  SUBROUTINES CALLED: MASSMULT (A PART OF THROTTLE CONTROL) AND THE
036102,000051:                                                                                                  #  INTERPRETER.   ERASABLES: BANK 5 AT PRESENT.   EYLES WROTE THIS STUFF;
036103,000052:                                                                                                  #  HIS LAST MODIFICATION THEREOF (NUMBER N+2) WENT INTO AGC REVISION 20.
036104,000053: 
036105,000054: 30,3206           43145        MASSMON            DLOAD    BOFF                                  
036106,000055: 30,3207           01321                                    MASS                                  
036107,000056: 30,3210           00753                                    SIVBGONE                              
036108,000057: 30,3211           61373                                    NOMASS                                
036109,000058: 30,3212           74375                           VLOAD    VXSC                                  
036110,000059: 30,3213           00404                                    DELV                                  #  DV = DELV*KPIP SCALED AT 2(+4) M/CS
036111,000060: 30,3214           21163                                    KPIP                                  
036112,000061: 30,3215           51406                           PUSH     ABVAL                                 #  DV IN PDL
036113,000062: 30,3216           03624                           STORE    ABDVCONV                              
036114,000063: 30,3217           56206                           PUSH     DDV                                   
036115,000064: 30,3220           21400                                    2SEC(9)                               
036116,000065: 30,3221           01325                           STORE    /AF/                                  #  /AF/ = MAGNITUDE DV/DT
036117,000066: 

Page 845

036119,000068: 30,3222           77776                           EXIT                                           
036120,000069: 
036121,000070: 30,3223           33444                           CA       ETHROTL                               
036122,000071: 30,3224           54003                           TS       EBANK                                 #  JUST TO INSURE HAVING THE PROPER EBANK
036123,000072: 30,3225  E5,1565                                  EBANK=   ETHROT                                
036124,000073: 
036125,000074: 30,3225           00006                           EXTEND                                         
036126,000075: 30,3226           31325                           DCA      /AF/                                  
036127,000076: 30,3227           03445                           TC       MASSMULT                              #  WHICH PRODUCES DP FORCE IN A AND L
036128,000077: 30,3230           53546                           DXCH     PREFORCE                              
036129,000078: 
036130,000079: 30,3231           41545        CHOICE1            CS       PREFORCE                              #  TEST PREFORCE TO SEE IF
036131,000080: 30,3232           63401                           AD       LOWFCRIT                              #    EITHER BIG ENGINE IS ON
036132,000081: 30,3233           00006                           EXTEND                                         
036133,000082: 30,3234           63241                           BZMF     CHOICE2                               #  BRANCH IF PREFORCE > LOWFCRIT = 720 LBS.
036134,000083: 
036135,000084: 30,3235           00006        VEXFINDR           EXTEND                                         #  OTHERWISE, USE RCSVEX
036136,000085: 30,3236           43404                           DCS      RCSVEX                                
036137,000086: 30,3237           53556                           DXCH     NEGVEX                                
036138,000087: 30,3240           13252                           TCF      MININIT                               
036139,000088: 30,3241           00006        CHOICE2            EXTEND                                         
036140,000089: 30,3242           00030                           READ     30                                    
036141,000090: 30,3243           40000                           COM                                            
036142,000091: 30,3244           77762                           MASK     BIT2                                  
036143,000092: 30,3245           00006                           EXTEND                                         
036144,000093: 30,3246           13256                           BZF      VEXFINDD                              
036145,000094: 30,3247           00006        VEXFINDA           EXTEND                                         #  OTHERWISE, USE APSVEX
036146,000095: 30,3250           43406                           DCS      APSVEX                                
036147,000096: 30,3251           53556                           DXCH     NEGVEX                                
036148,000097: 30,3252           00006        MININIT            EXTEND                                         
036149,000098: 30,3253           33415                           DCA      MINMASSA                              
036150,000099: 30,3254           53564                           DXCH     MINIMASS                              
036151,000100: 30,3255           13351                           TCF      ENDVEX                                
036152,000101: 
036153,000102: 30,3256           00006        VEXFINDD           EXTEND                                         
036154,000103: 30,3257           33417                           DCA      MINMASSD                              
036155,000104: 30,3260           53564                           DXCH     MINIMASS                              
036156,000105: 
036157,000106: 30,3261           37767                           CA       ZERO                                  
036158,000107: 30,3262           55544                           TS       VEXDEX                                
036159,000108: 30,3263           37761        VEXLOOP            CA       FOUR                                  
036160,000109: 30,3264           27544                           ADS      VEXDEX                                #  INCREMENTING VEXDEX BY FOUR
036161,000110: 30,3265           41545                           CS       PREFORCE                              
036162,000111: 30,3266           51544                           INDEX    VEXDEX                                
036163,000112: 30,3267           63414                           AD       FSTEP                                 #  FSTEP - PREFORCE IN A AND L
036164,000113: 30,3270           00006                           EXTEND                                         
036165,000114: 30,3271           63263                           BZMF     VEXLOOP                               #  BRANCH IF PREFORCE > OR = FSTEP.  EMERGE
036166,000115:                                                                                                  #    FROM LOOP WITH INDEX PROPERLY SET AS
036167,000116:                                                                                                  #    SOON AS FSTEP > PREFORCE.
036168,000117: 30,3272           40000                           COM                                            #  PREFORCE-FSTEP (ALWAYS MINUS) IN A AND L
036169,000118: 

Page 846

036171,000120: 30,3273           00006                           EXTEND                                         
036172,000121: 30,3274           51544                           INDEX    VEXDEX                                
036173,000122: 30,3275           73415                           MP       SLOPE                                 
036174,000123: 30,3276           53550                           DXCH     VEXNOM                                
036175,000124: 30,3277           00006                           EXTEND                                         
036176,000125: 30,3300           51544                           INDEX    VEXDEX                                
036177,000126: 30,3301           33417                           DCA      VEXSTEP                               
036178,000127: 30,3302           21550                           DAS      VEXNOM                                #  VEXNOM = VEXSTEP + (PREFORCE-FSTEP)SLOPE
036179,000128: 
036180,000129: 30,3303           43700                           CS       -FMAX                                 
036181,000130: 30,3304           60000                           DOUBLE                                         
036182,000131: 30,3305           56002                           XCH      Q                                     
036183,000132: 30,3306           00006                           EXTEND                                         
036184,000133: 30,3307           31546                           DCA      PREFORCE                              
036185,000134: 30,3310           00006                           EXTEND                                         
036186,000135: 30,3311           10002                           DV       Q                                     
036187,000136: 30,3312           55545                           TS       PREFORCE                              #  PREFORCE = PREFORCE/2FMAX
036188,000137: 
036189,000138: 30,3313           33412                           CA       CVEX4                                 
036190,000139: 30,3314           00006                           EXTEND                                         
036191,000140: 30,3315           71551                           MP       DELAREA                               
036192,000141: 30,3316           63411                           AD       CVEX3                                 
036193,000142: 30,3317           00006                           EXTEND                                         
036194,000143: 30,3320           71545                           MP       PREFORCE                              
036195,000144: 30,3321           00006                           EXTEND                                         #                MUMBO
036196,000145: 30,3322           71545                           MP       PREFORCE                              #                JUMBO
036197,000146: 30,3323           53554                           DXCH     AREARATE                              
036198,000147: 30,3324           33410                           CA       CVEX2                                 
036199,000148: 30,3325           00006                           EXTEND                                         
036200,000149: 30,3326           71551                           MP       DELAREA                               
036201,000150: 30,3327           63407                           AD       CVEX1                                 
036202,000151: 30,3330           00006                           EXTEND                                         
036203,000152: 30,3331           71545                           MP       PREFORCE                              
036204,000153: 30,3332           21554                           DAS      AREARATE                              #  NOW SCALED IN UNITS OF 2(-2) PERCENT/CS
036205,000154: 30,3333           31553                           CA       AREARATE                              
036206,000155: 30,3334           00006                           EXTEND                                         
036207,000156: 30,3335           73377                           MP       2SEC(9)                               
036208,000157: 30,3336           53560                           DXCH     DAREATMP                              
036209,000158: 30,3337           00006                           EXTEND                                         
036210,000159: 30,3340           31552                           DCA      DELAREA                               
036211,000160: 30,3341           21560                           DAS      DAREATMP                              #  DAREATMP NOW CONTAINS NEW DELAREA
036212,000161: 30,3342           31557                           CA       DAREATMP                              
036213,000162: 30,3343           00006                           EXTEND                                         
036214,000163: 30,3344           73413                           MP       CVEX5                                 
036215,000164: 30,3345           53556                           DXCH     NEGVEX                                #  RESULT IS SCALED IN UNITS OF 2(6) M/CS
036216,000165: 30,3346           00006                           EXTEND                                         
036217,000166: 30,3347           41550                           DCS      VEXNOM                                
036218,000167: 30,3350           21556                           DAS      NEGVEX                                #  NEGVEX NOW HOLDS THE GENUINE ARTICLE
036219,000168: 
036220,000169: 30,3351           37767        ENDVEX             CA       ZERO                                  #  PRECAUTIONARY
036221,000170: 

Page 847

036223,000172: 30,3352           54153                           TS       MODE                                  
036224,000173: 30,3353           54111                           TS       OVFIND                                
036225,000174: 
036226,000175: 30,3354           06112                           TC       INTPRET                               
036227,000176: 30,3355           60545                           DLOAD    SR2                                   #  RESCALING /DELV/ TO 2(6) M/CS
036228,000177: 30,3356           41271                           DDV      DMP                                   
036229,000178: 30,3357           02556                                    NEGVEX                                
036230,000179: 30,3360           01321                                    MASS                                  
036231,000180: 30,3361           77615                           DAD                                            
036232,000181: 30,3362           01321                                    MASS                                  
036233,000182: 30,3363           02562                           STORE    MASSTEMP                              
036234,000183: 30,3364           51025                           DSU      BPL                                   #  RETURN NOW IF MASS > MINIMASS
036235,000184: 30,3365           02564                                    MINIMASS                              
036236,000185: 30,3366           00052                                    QPRET                                 
036237,000186: 30,3367           77745                           DLOAD                                          #  OTHERWISE SET MASS = MINIMASS
036238,000187: 30,3370           02564                                    MINIMASS                              
036239,000188: 30,3371           02562                           STORE    MASSTEMP                              
036240,000189: 30,3372           77616                           RVQ                                            
036241,000190: 
036242,000191: 30,3373           16562        NOMASS             STODL    MASSTEMP                              
036243,000192: 30,3374           26643                                    DP0                                   
036244,000193: 30,3375           02560                           STORE    DAREATMP                              #  DELAREA INITIALIZED UNTIL SIVB SEPARATES
036245,000194: 30,3376           77616                           RVQ                                            
036246,000195: 
036247,000196:                                                                                                  #  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
036248,000197:                                                                                                  #  * * * * * * * * * * * * * * * * * * * *
036249,000198: 
036250,000199:                                                                                                  #  CONSTANTS FOR VEXFIND1
036251,000200: 
036252,000201: 30,3377           14400 00000  2SEC(9)            2DEC     200        B-9                        #  CONSTANT GUIDANCE PERIOD, SUP70S5DLY
036253,000202: 
036254,000203: 
036255,000204: 
036256,000205: 30,3401           00411        LOWFCRIT           OCT      411                                   #  ABOUT 720 POUNDS, SCALED
036257,000206: 30,3402           05423        MASSCRIT           DEC      .173031964                            #  MASS OF LEM WITH DPS > MASSCRIT > MASS
036258,000207:                                                                                                  #    OF LEM WITHOUT DPS
036259,000208: 
036260,000209: 30,3403           15165 30244  RCSVEX             2DEC     .4134375                              #  EXHAUST VELOCITY FOR RCS JETS
036261,000210: 
036262,000211: 30,3405           17114 33562  APSVEX             2DEC     .473441550                            #  EXHAUST VELOCITY FOR ASCENT ENGINE
036263,000212: 
036264,000213: 30,3407           00316        CVEX1              DEC      +.012558840                            
036265,000214: 30,3410           76221        CVEX2              DEC      -.053575066                            
036266,000215: 30,3411           77312        CVEX3              DEC      -.018875329                            
036267,000216: 30,3412           02447        CVEX4              DEC      +.080517427                            
036268,000217: 30,3413           01503        CVEX5              DEC      +.05099460                            
036269,000218: 

Page 848

036271,000220: 30,3414           02035 07567  MINMASSA           2DEC     2106.4833  B-15                       #  MASS OF APS EMPTY
036272,000221: 
036273,000222: 30,3416           06062 20000  MINMASSD           2DEC     6245       B-15                       #  DESCENT WITH NO DPS FUEL AND 405 RCS
036274,000223: 
036275,000224: 
036276,000225:                                                                                                  #  ADDRESSES FOR ACCESSING VEXTABLE
036277,000226: 
036278,000227: 30,3420  30,3414               FSTEP              =        FSTEP1     -4                         
036279,000228: 30,3420  30,3415               SLOPE              =        SLOPE1     -4                         
036280,000229: 30,3420  30,3416               VEXSTEP            =        VXSTEP1    -4                         
036281,000230: 
036282,000231:                                                                                                  #  THE VEXTABLE
036283,000232: 
036284,000233: 30,3420           01713        FSTEP1             DEC      +.0592346907                            #   25%
036285,000234: 30,3421           11736        SLOPE1             DEC      +.3104172317                            
036286,000235: 30,3422           16445 06644  VXSTEP1            2DEC     +.4553963093                            #  ABOUT 2914.53 M/S
036287,000236: 
036288,000237: 
036289,000238: 
036290,000239: 30,3424           03625        FSTEP2             DEC      +.1184693815                            #   50%
036291,000240: 30,3425           76531        SLOPE2             DEC      -.0413889642                            
036292,000241: 30,3426           16375 01343  VXSTEP2            2DEC     +.4529446468                            #  ABOUT 2898.84 M/S
036293,000242: 
036294,000243: 
036295,000244: 
036296,000245: 30,3430           06275        FSTEP3             DEC      +.1990285610                            #   84%
036297,000246: 30,3431           06741        SLOPE3             DEC      +.2168355662                            
036298,000247: 30,3432           17033 07603  VXSTEP3            2DEC     +.4704127421                            #  ABOUT 3010.64 M/S
036299,000248: 
036300,000249: 
036301,000250: 
036302,000251: 30,3434           07100        FSTEP4             DEC      +.2226276618                            #   93%
036303,000252: 30,3435           76601        SLOPE4             DEC      -.0389579859                            
036304,000253: 30,3436           17014 05573  VXSTEP4            2DEC     +.4694933687                            #  ABOUT 3004.75 M/S
036305,000254: 
036306,000255: 
036307,000256: 
036308,000257: 30,3440           37777        HIFSTEP            DEC      +.9999999999                            #  JUST IN CASE, ANOMALOUSLY,
036309,000258: 30,3441           00000        HISLOPE            DEC      +.0000000000                            #    PREFORCE APPEARS TO
036310,000259: 30,3442           17014 05573  HIVXSTEP           2DEC     +.4694933687                            #    EXCEED 100%.
036311,000260:                                                                                                  #  * * * * * * * * * * * * * * * * * * * * *
036312,000261: 
036313,000262: 30,3444           02565        ETHROTL            ECADR    ETHROT                                

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