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.

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

Page 780

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

Page 781

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

Page 782

035237,000136: 30,2563           00006                           EXTEND                                         
035238,000137: 
035239,000138: 30,2564           31317                           DCA      PIPRETRN                              #  RETURN TO LOCATION AFTER CALL
035240,000139: 30,2565           52006                           DXCH     Z                                     
035241,000140: 

Page 783

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

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