Source Code

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

Notations on the program listing read, in part:

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

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

035110,000002:                                                                                                  ## Copyright:   Public domain.
035111,000003:                                                                                                  ## Filename:    PIPA_READER.agc
035112,000004:                                                                                                  ## Purpose:     A section of Sunburst revision 37, or Shepatin revision 0.
035113,000005:                                                                                                  ##              It is part of an early development version of the software
035114,000006:                                                                                                  ##              for Apollo Guidance Computer (AGC) on the unmanned Lunar
035115,000007:                                                                                                  ##              Module (LM) flight Apollo 5. Sunburst 37 was the program
035116,000008:                                                                                                  ##              upon which Don Eyles's offline development program Shepatin
035117,000009:                                                                                                  ##              was based; the listing herein transcribed was actually for
035118,000010:                                                                                                  ##              the equivalent revision 0 of Shepatin.
035119,000011:                                                                                                  ##              This file is intended to be a faithful transcription, except
035120,000012:                                                                                                  ##              that the code format has been changed to conform to the
035121,000013:                                                                                                  ##              requirements of the yaYUL assembler rather than the
035122,000014:                                                                                                  ##              original YUL assembler.
035123,000015:                                                                                                  ## Reference:   pp. 780-783
035124,000016:                                                                                                  ## Assembler:   yaYUL
035125,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
035126,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
035127,000019:                                                                                                  ## Mod history: 2017-05-24 MAS  Created from Sunburst 120.
035128,000020:                                                                                                  ##              2017-06-14 HG   Transcribed
035129,000021:                                                                                                  ##              2017-06-23 RSB  Proofed comment text with
035130,000022:                                                                                                  ##                              octopus/ProoferComments.
035131,000023: 

Page 780

035133,000025: 
035134,000026:                                                                                                  #     SUBROUTINE TO READ PIPA COUNTERS, TRYING TO BE VERY CAREFUL SO THAT IT WILL BE RESTARTABLE.
035135,000027:                                                                                                  #     PIPA READINGS ARE STORED IN THE VECTOR DELV. THE HIGH ORDER PART OF EACH COMPONENT CONTAINS THE PIPA READING,
035136,000028: 
035137,000029:                                                                                                  #  AND THE LOW ORDER PART HAS -0 AFTER THE PIPAS HAVE BEEN READ. RESTARTS BEGIN AT REPIPASR.
035138,000030: 
035139,000031: 
035140,000032:                                                                                                  #     AT THE END OF THE PIPA READER THE CDUS ARE READ AND STORED AS A
035141,000033:                                                                                                  #  VECTOR IN CDUTEMP.  THE HIGH ORDER PART OF EACH COMPONENT CONTAINS
035142,000034:                                                                                                  #  THE CDU READING IN 2S COMP IN THE ORDER CDUX,Y,Z.  THE THRUST
035143,000035:                                                                                                  #  VECTOR ESTIMATOR IN FINDCDUD REQUIRES THE CDUS BE READ AT PIPTIME.
035144,000036: 
035145,000037:                                                                                                  #  CALLING SEQUENCE AND EXIT
035146,000038: 
035147,000039:                                                                                                  #     THE CALLING SEQUENCE TO PIPASR IS
035148,000040: 
035149,000041:                                                                                                  #                                                   EXTEND
035150,000042:                                                                                                  #                                                   DCA    PIP2CADR
035151,000043:                                                                                                  #                                                   DXCH   Z
035152,000044: 
035153,000045:                                                                                                  #  THE RETURN ADDRESS,WHICH IS STORED IN (A,L),IS SAVED IN PIPRETRN. THE RETURN FROM PIPASR IS
035154,000046: 
035155,000047:                                                                                                  #                                                   EXTEND
035156,000048:                                                                                                  #                                                   DCA    PIPRETRN
035157,000049:                                                                                                  #                                                   DXCH   Z
035158,000050: 
035159,000051:                                                                                                  #  WHICH RETURNS TO THE LOCATION AFTER THE CALL. ON A RESTART,PIPASR IS CALLED BY REPIPASR.
035160,000052: 
035161,000053: 
035162,000054: 
035163,000055:                                                                                                  #  INPUT
035164,000056: 
035165,000057:                                                                                                  #     INPUT IS THROUGH THE COUNTERS PIPAX, PIPAY, PIPAZ, AND TIME2.
035166,000058: 
035167,000059: 
035168,000060:                                                                                                  #  OUTPUT
035169,000061: 
035170,000062:                                                                                                  #     THE PIPA READINGS ARE OUTPUT THROUGH THE VECTOR DELV. DELTAT, SCALED AT 2(+28)CS, IS COMPUTED FOR AVERAGEG.
035171,000063: 
035172,000064:                                                                                                  #  PIPTIME CONTAINS THE NEGATIVE OF THE CURRENT TIME.
035173,000065: 
035174,000066: 
035175,000067:                                                                                                  #  DEBRIS (ERASABLE LOCATIONS DESTROYED BY PROGRAM)
035176,000068: 
035177,000069:                                                                                                  #     TEMX  TEMY  TEMZ  TEMXY  PIPAGE  PIPTIME  PIPAX  PIPAY  PIPAZ
035178,000070: 
035179,000071:                                                                                                  #  (ARRIVE IN INTERRUPTED STATE OR INHIBITED AFTER RESTART. EXIT
035180,000072:                                                                                                  #  THRU ISWRETURN)
035181,000073: 
035182,000074: 30,2506                                           BANK     30                                    
035183,000075: 
035184,000076: 30,2506           53317        PIPASR             DXCH     PIPRETRN                              
035185,000077: 30,2507           47761                           CS       ZERO                                  #  PUT THESE INTO THE IMPOSSIBLE STATE
035186,000078: 30,2510           55154                           TS       TEMX                                  #  FOR THEIR INITIAL VALUES.
035187,000079: 

Page 781

035189,000081: 30,2511           55155                           TS       TEMY                                  
035190,000082: 30,2512           55156                           TS       TEMZ                                  
035191,000083: 30,2513           37761                           CA       ZERO                                  
035192,000084: 30,2514           54404                           TS       DELVX      +1                         
035193,000085: 30,2515           54406                           TS       DELVY      +1                         #  PIP COUNTERS MAY NOT HAVE POS ZERO IN
035194,000086: 30,2516           54410                           TS       DELVZ      +1                         
035195,000087: 30,2517           55160                           TS       PIPAGE                                #  ZERO THIS TO INDICATE IN PIPA READING.
035196,000088: 
035197,000089: 
035198,000090:                                                                                                  #  COMPUTE DELTAT FOR AVERAGEG, SAVING -(CURRENT TIME) IN PIPTIME.
035199,000091: 
035200,000092: 30,2520           00006        REPIP1             EXTEND                                         
035201,000093: 30,2521           30025                           DCA      TIME2                                 #  CURRENT TIME
035202,000094: 30,2522           53321                           DXCH     PIPTIME                               
035203,000095: 
035204,000096: 30,2523           40037                           CS       PIPAX                                 
035205,000097: 30,2524           55157                           TS       TEMXY                                 
035206,000098: 30,2525           57154                           XCH      TEMX                                  #  PUT NEGZERO INTO PIPACTRS AS READ
035207,000099: 30,2526           56037                           XCH      PIPAX                                 
035208,000100: 
035209,000101: 30,2527           54403        REPIP1B            TS       DELVX                                 
035210,000102: 30,2530           54404                           TS       DELVX      +1                         #  DOUBLE SAVE
035211,000103: 
035212,000104: 30,2531           40040        REPIP2             CS       PIPAY                                 
035213,000105: 30,2532           55157                           TS       TEMXY                                 
035214,000106: 30,2533           57155                           XCH      TEMY                                  
035215,000107: 30,2534           56040                           XCH      PIPAY                                 
035216,000108: 30,2535           54405        REPIP2B            TS       DELVY                                 
035217,000109: 30,2536           54406                           TS       DELVY      +1                         
035218,000110: 
035219,000111: 30,2537           40041        REPIP3             CS       PIPAZ                                 #  REPEAT PROCESS FOR Z PIPA.
035220,000112: 30,2540           55157                           TS       TEMXY                                 #  SAVE NEG OF PIPA READ
035221,000113: 
035222,000114: 30,2541           57156                           XCH      TEMZ                                  #  SAVE HERE AS PICK UP NEGZERO
035223,000115: 30,2542           56041                           XCH      PIPAZ                                 #  RESETTING PIPA AS READ OUT
035224,000116: 30,2543           54407        REPIP3B            TS       DELVZ                                 #  AND STORE IN Z.
035225,000117: 30,2544           54410                           TS       DELVZ      +1                         #  SHOWS THAT IT REALLY MADE IT.
035226,000118: 
035227,000119: 30,2545           47761        REPIP4             CS       ZERO                                  
035228,000120: 30,2546           54404                           TS       DELVX      +1                         #  LEAVE THESE AT NEGZERO
035229,000121: 30,2547           54406                           TS       DELVY      +1                         
035230,000122: 30,2550           54410                           TS       DELVZ      +1                         
035231,000123: 30,2551           30032                           CA       CDUX                                  #  READ CDUS INTO CDUTEMP AS A VECTOR
035232,000124: 
035233,000125: 30,2552           55342                           TS       CDUTEMP                               
035234,000126: 30,2553           30033                           CA       CDUY                                  #  THE THRUST ESTIMATION FILTER IN FINDCDUD
035235,000127: 30,2554           55344                           TS       CDUTEMP    +2                         #  REQUIRES THAT THE CDUS BE READ AT THE
035236,000128: 30,2555           30034                           CA       CDUZ                                  #  TIME THE PIPAS ARE READ
035237,000129: 30,2556           55346                           TS       CDUTEMP    +4                         
035238,000130: 30,2557           37761                           CAF      ZERO                                  
035239,000131: 30,2560           55343                           TS       CDUTEMP    +1                         
035240,000132: 30,2561           55345                           TS       CDUTEMP    +3                         
035241,000133: 30,2562           55347                           TS       CDUTEMP    +5                         
035242,000134: 

Page 782

035244,000136: 30,2563           00006                           EXTEND                                         
035245,000137: 
035246,000138: 30,2564           31317                           DCA      PIPRETRN                              #  RETURN TO LOCATION AFTER CALL
035247,000139: 30,2565           52006                           DXCH     Z                                     
035248,000140: 

Page 783

035250,000142: 
035251,000143: 30,2566           00006        REREADAC           EXTEND                                         
035252,000144: 30,2567           32636                           DCA      DONECAD                               
035253,000145: 30,2570           53317                           DXCH     PIPRETRN                              
035254,000146: 
035255,000147: 30,2571           11160        REPIPASR           CCS      PIPAGE                                #  WAS I READING PIPS.
035256,000148: 
035257,000149: 30,2572           12507                           TCF      PIPASR     +1                         
035258,000150: 30,2573           10410                           CCS      DELVZ      +1                         #  PIPAGE = 0  (I WAS READING PIPS.)
035259,000151: 30,2574           12545                           TCF      REPIP4                                #  Z WAS READ OK
035260,000152: 30,2575           12600                           TCF      +3                                    #  Z NOT DONE, CHECK Y.
035261,000153: 30,2576           12545                           TCF      REPIP4                                
035262,000154: 30,2577           12545                           TCF      REPIP4                                
035263,000155: 
035264,000156: 30,2600           10406                           CCS      DELVY      +1                         #  HAS IT CHANGED FROM ITS +ZERO INIT VALU
035265,000157: 30,2601           12604                           TCF      +3                                    #  YES, Y DONE.  TRY TO REDO Z.
035266,000158: 30,2602           12613                           TCF      CHKDELVX                              #  NO, GO LOOK AT X.
035267,000159: 30,2603           12604                           TCF      +1                                    #  YES
035268,000160: 
035269,000161: 30,2604           11156                           CCS      TEMZ                                  #  DOES TEMZ STILL = -0.
035270,000162: 30,2605           12611                           TCF      +4                                    #  NO-TRY TO RESTORE
035271,000163: 30,2606           12611                           TCF      +3                                    
035272,000164: 30,2607           12611                           TCF      +2                                    
035273,000165: 30,2610           12537                           TCF      REPIP3                                #  YES, GO BACK AND READ Z AGAIN.
035274,000166: 
035275,000167: 30,2611           41157                           CS       TEMXY                                 #  MUCH MORE LOGIC COULD BE INCORPORATED
035276,000168: 30,2612           12543                           TCF      REPIP3B                               #  TO CHECK PIPA CTR FOR SIZE
035277,000169: 
035278,000170: 30,2613           10404        CHKDELVX           CCS      DELVX      +1                         #  HAS THIS CHANGED.
035279,000171: 
035280,000172: 30,2614           12617                           TCF      +3                                    #  YES
035281,000173: 30,2615           12626                           TCF      CHKTEMX                               #  NO
035282,000174: 30,2616           12617                           TCF      +1                                    #  YES
035283,000175: 30,2617           11155                           CCS      TEMY                                  
035284,000176: 30,2620           12624                           TCF      +4                                    
035285,000177: 30,2621           12624                           TCF      +3                                    
035286,000178: 30,2622           12624                           TCF      +2                                    
035287,000179: 30,2623           12531                           TCF      REPIP2                                
035288,000180: 30,2624           41157                           CS       TEMXY                                 
035289,000181: 30,2625           12535                           TCF      REPIP2B                               
035290,000182: 
035291,000183: 30,2626           11154        CHKTEMX            CCS      TEMX                                  #  HAS THIS CHANGED.
035292,000184: 
035293,000185: 30,2627           12633                           TCF      +4                                    #  YES
035294,000186: 30,2630           12633                           TCF      +3                                    #  YES
035295,000187: 30,2631           12633                           TCF      +2                                    #  YES
035296,000188: 30,2632           12520                           TCF      REPIP1                                #  NO
035297,000189: 30,2633           41157                           CS       TEMXY                                 
035298,000190: 30,2634           12527                           TCF      REPIP1B                               
035299,000191: 
035300,000192: 30,2635  E5,1511                                  EBANK=   DVCNTR                                
035301,000193: 30,2635           02061 60065  DONECAD            2CADR    PIPSDONE                              

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