Source Code

These source-code files are part of a reconstructed copy of Skylark 048, the Block II Command Module (CM) Apollo Guidance Computer (AGC) software for the Skylab-2, Skylab-3, Skylab-4, and Apollo-Soyuz Test Project missions.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on Skylab-2, part numbers 2010802-541, 2010802-551, 2010802-561, 2010802-571, 2010802-581, and 2010802-591. Access to these modules was provided by the New Mexico Museum of Space History, who we are much indebted to.

The source code for the Apollo 15, 16, and 17 software, Artemis 072, was used as a starting point. Heavy use was made of TRW 4900.5-244, Programmed Guidance Equations for Skylark Command Module Earth Orbital Program, dated 14 February 1972. This document contains pseudocode of essentially all of Skylark, using original program labels which have been copied for this source reconstruction.

Since only binary dumps (rather than listings) of Skylark are available as source material, all comments and labels are approximate. They have been taken from the Programmed Guidance Equations or other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

020007,000002:                                                                                                  ## Copyright:   Public domain.
020008,000003:                                                                                                  ## Filename:    P76.agc
020009,000004:                                                                                                  ## Purpose:     A section of Skylark revision 048.
020010,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer (AGC)
020011,000006:                                                                                                  ##              for Skylab-2, Skylab-3, Skylab-4, and ASTP. No original listings of
020012,000007:                                                                                                  ##              this software are available; instead, this file was created via
020013,000008:                                                                                                  ##              disassembly of dumps of the core rope modules actually flown on
020014,000009:                                                                                                  ##              Skylab-2. Access to these modules was provided by the New Mexico
020015,000010:                                                                                                  ##              Museum of Space History.
020016,000011:                                                                                                  ## Assembler:   yaYUL
020017,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
020018,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
020019,000014:                                                                                                  ## Mod history: 2024-02-20 MAS  Created from Artemis 072.
020020,000015:                                                                                                  ##              2024-03-05 MAS  Updated for Skylark 48.
020021,000016: 
020022,000017:                                                                                                  #  1) PROGRAM NAME - TARGET DELTA V PROGRAM (P76).
020023,000018:                                                                                                  #  2) FUNCTIONAL DESCRIPTION - UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
020024,000019:                                                                                                  #        TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
020025,000020:                                                                                                  #        TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY  EXECUTION OF A THRUSTING MANEUVER. THE
020026,000021:                                                                                                  #        OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
020027,000022:                                                                                                  #        BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
020028,000023:                                                                                                  #        VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
020029,000024:                                                                                                  #        STATES CORRESPOND TO THE SAME TIME.
020030,000025:                                                                                                  #  3) ERASABLE INITIALIZATION REQUIRED - NONE.
020031,000026:                                                                                                  #  4) CALLING SEQUENCES AND EXIT MODES - CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76 E.
020032,000027:                                                                                                  #        EXITS BY TCF ENDOFJOB.
020033,000028:                                                                                                  #  5) OUTPUT - OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
020034,000029:                                                                                                  #        THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
020035,000030:                                                                                                  #        TO REF COSYS.
020036,000031:                                                                                                  #  6) DEBRIS - OTHER VEHICLE STATE VECTOR.
020037,000032:                                                                                                  #  7) SUBROUTINES CALLED - BANKCALL,GOXDSPF,CSMPREC (OR LEMPREC),ATOPCSM (OR ATOPLEM),INTSTALL,INTWAKE, PHASCHNG
020038,000033:                                                                                                  #        INTPRET, INTEGRVS, AND MINIRECT.
020039,000034:                                                                                                  #  8) FLAG USE - MOONFLAG,CMOONFLAG,INTYPFLG,RASFLAG, AND MARKCTR.
020040,000035: 
020041,000036: 05,2000                                           SETLOC   P76LOC                                
020042,000037: 05,2000                                           BANK                                           
020043,000038: 
020044,000039: 05,3172                                           COUNT*   $$/P7677                              
020045,000040: 05,3172  E7,1412                                  EBANK=   TIG                                   
020046,000041: 
020047,000042: 05,3172           00006        P77                EXTEND                                         
020048,000043: 05,3173           31450                           DCA      NOMTIG                                
020049,000044: 05,3174           53413                           DXCH     TIG                                   
020050,000045: 
020051,000046: 05,3175           35041                           CAF      V06N33                                
020052,000047: 05,3176           04647                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION
020053,000048: 05,3177           20623                           CADR     GOFLASH                               
020054,000049: 05,3200           13306                           TCF      ENDP76                                
020055,000050: 05,3201           03203                           TC       +2                                    #  PROCEED
020056,000051: 05,3202           03175                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
020057,000052: 05,3203           34603                           CAF      V06N81                                #  FLASH V06 N81
020058,000053: 05,3204           04647                           TC       BANKCALL                              #  AND WAIT FOR KEYBOARD ACTION.
020059,000054: 05,3205           20623                           CADR     GOFLASH                               
020060,000055: 05,3206           13306                           TCF      ENDP76                                
020061,000056: 05,3207           03211                           TC       +2                                    
020062,000057: 05,3210           03203                           TC       -5                                    #  STORE DATA AND REPEAT FLASHING
020063,000058: 05,3211           06006                           TC       INTPRET                               #  RETURN TO INTERPRETIVE CODE
020064,000059: 05,3212           43145                           DLOAD    SET                                   #  SET D(MPAC)=TIG IN CSEC B28
020065,000060: 05,3213           03413                                    TIG                                   
020066,000061: 05,3214           01076                                    NODOFLAG                              #  DISALLOW V37
020067,000062: 05,3215           34041                           STCALL   TDEC1                                 
020068,000063: 05,3216           11400                                    CSMPREC                               
020069,000064: 05,3217           53575        COMPMAT            VLOAD    UNIT                                  
020070,000065: 05,3220           00001                                    RATT                                  
020071,000066: 05,3221           77676                           VCOMP                                          #  U(-R)
020072,000067: 05,3222           00031                           STORE    24D                                   #  U(-R) TO 24D
020073,000068: 05,3223           53435                           VXV      UNIT                                  #  U(-R)XV = U(VXR)
020074,000069: 05,3224           00007                                    VATT                                  
020075,000070: 05,3225           00023                           STORE    18D                                   
020076,000071: 05,3226           53435                           VXV      UNIT                                  #  U(VXR)XU(-R) = U((RXV)XR)
020077,000072: 05,3227           00031                                    24D                                   
020078,000073: 05,3230           24015                           STOVL    12D                                   
020079,000074: 05,3231           03405                                    DELVLVC                               #  FROM CSM
020080,000075: 05,3232           76505        DVTRANS            VXM      VSL1                                  #  V(MPAC)=DELTA-V IN REFCOSYS
020081,000076: 05,3233           00015                                    12D                                   
020082,000077: 05,3234           77655                           VAD                                            
020083,000078: 05,3235           00007                                    VATT                                  
020084,000079: 05,3236           00007                           STORE    6                                     #  V(PD6)=VATT + DELTA V
020085,000080: 05,3237           77624                           CALL                                           #  PREVENT WOULD-BE USER OF ORBITAL
020086,000081: 05,3240           11720                                    INTSTALL                              #  INTEG FROM INTERFERING WITH UPDATING
020087,000082: 05,3241           77775                           VLOAD                                          
020088,000083: 05,3242           00007                                    6                                     
020089,000084: 05,3243           25543                           STOVL    VCV                                   
020090,000085: 05,3244           00001                                    RATT                                  
020091,000086: 05,3245           15535                           STODL    RCV                                   
020092,000087: 05,3246           03413                                    TIG                                   
020093,000088: 05,3247           01517                           STORE    TET                                   
020094,000089: 05,3250           71214                           CLEAR    DLOAD                                 
020095,000090: 05,3251           01673                                    INTYPFLG                              
020096,000091: 05,3252           01571                                    TETTHIS                               
020097,000092: 05,3253           34041        INTOTHIS           STCALL   TDEC1                                 
020098,000093: 05,3254           11444                                    INTEGRVS                              
020099,000094: 05,3255           77624                           CALL                                           
020100,000095: 05,3256           11720                                    INTSTALL                              
020101,000096: 05,3257           77775                           VLOAD                                          
020102,000097: 05,3260           00017                                    RATT1                                 
020103,000098: 05,3261           01503                           STORE    RRECT                                 
020104,000099: 05,3262           15535                           STODL    RCV                                   
020105,000100: 05,3263           00015                                    TAT                                   
020106,000101: 05,3264           25517                           STOVL    TET                                   
020107,000102: 05,3265           00025                                    VATT1                                 
020108,000103: 05,3266           77624                           CALL                                           
020109,000104: 05,3267           23452                                    MINIRECT                              
020110,000105: 05,3270           77776                           EXIT                                           
020111,000106: 05,3271           05415                           TC       PHASCHNG                              
020112,000107: 05,3272           04024                           OCT      04024                                 
020113,000108: 
020114,000109: 05,3273           06006                           TC       INTPRET                               
020115,000110: 05,3274           45014                           SET      CALL                                  
020116,000111: 05,3275           05062                                    REINTFLG                              
020117,000112: 05,3276           11305                                    ATOPCSM                               
020118,000113: 05,3277           77624                           CALL                                           
020119,000114: 05,3300           11727                                    INTWAKE0                              #  PERMIT USE OF ORBITAL INTEGRATION
020120,000115: 05,3301           77414        OUT                CLEAR    EXIT                                  #  ALLOW V37, NO NEED TO CLEAR NODOFLAG AT
020121,000116: 05,3302           01276                                    NODOFLAG                              #   ENDP76 SINCE FLAG NOT SET WHEN DISPLAY
020122,000117:                                                                                                  #   RESPONSES TRANSFER THERE FROM P76+.
020123,000118: 05,3303           37702                           CAF      NEGONE                                
020124,000119: 05,3304           55702                           TS       MRKBUF1                               
020125,000120: 05,3305           14105                           TCF      MNKGOPOO                              
020126,000121: 
020127,000122: 05,3306           37702        ENDP76             CAF      NEGONE                                
020128,000123: 05,3307           55702                           TS       MRKBUF1                               #  INVALIDATE MARK BUFFER
020129,000124: 
020130,000125: 05,3310           14103                           TCF      GOTOPOOH                              

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