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.

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

Page 844

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

Page 845

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

Page 846

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

Page 847

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

Page 848

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

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