Source Code

These source-code files are part of a reconstructed copy of Artemis 071, the first release of the Apollo 15 through 17 Command Module (CM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Artemis 072 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes between the two versions. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021154-. Note that page numbers in the reconstructed code match those on the Artemis 072 printout, although the changed code would likely have changed page numbers for a real Artemis 071 listing.

Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

045403,000002:                                                                                                  ## Copyright:   Public domain.
045404,000003:                                                                                                  ## Filename:    RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
045405,000004:                                                                                                  ## Purpose:     A section of Artemis revision 071.
045406,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
045407,000006:                                                                                                  ##              release of the flight software for the Command Module's
045408,000007:                                                                                                  ##              (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
045409,000008:                                                                                                  ##              17. The code has been recreated from a copy of Artemis 072.
045410,000009:                                                                                                  ##              It has been adapted such that the resulting bugger words
045411,000010:                                                                                                  ##              exactly match those specified for Artemis 071 in NASA
045412,000011:                                                                                                  ##              drawing 2021154-, which gives relatively high confidence
045413,000012:                                                                                                  ##              that the reconstruction is correct.
045414,000013:                                                                                                  ## Reference:   1036
045415,000014:                                                                                                  ## Assembler:   yaYUL
045416,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
045417,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
045418,000017:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Artemis 072.
045419,000018: 

Page 1036

045421,000020:                                                                                                  #  CALCULATION OF  AMGB, AMBG     ONCE EVERY SECOND
045422,000021: 
045423,000022:                                                                                                  #   AMGB =  1    SIN(PSI)                0
045424,000023:                                                                                                  #           0    COS(PSI)COS(PHI)        SIN(PHI)
045425,000024:                                                                                                  #           0    -COS(PSI)SIN(PHI)       COS(PHI)
045426,000025: 
045427,000026:                                                                                                  #   AMBG =  1    -TAN(PSI)COS(PHI)       TAN(PSI)SIN(PHI)
045428,000027:                                                                                                  #           0    COS(PHI)/COS(PSI)       -SIN(PHI)/COS(PSI)
045429,000028:                                                                                                  #           0    SIN(PHI)                COS(PHI)
045430,000029: 
045431,000030:                                                                                                  #   WHERE PHI AND PSI ARE CDU ANGLES
045432,000031: 
045433,000032: 22,2000                                           SETLOC   DAPS8                                 
045434,000033: 22,2000                                           BANK                                           
045435,000034: 
045436,000035: 22,3560                                           COUNT*   $$/DAPEX                              
045437,000036: 22,3560  E6,1510                                  EBANK=   KMPAC                                 
045438,000037: 22,3560           30102        AMBGUPDT           CA       FLAGWRD6                              #  CHECK FOR RCS AUTOPILOT
045439,000038: 22,3561           74076                           MASK     DPCONFIG                              
045440,000039: 22,3562           00006                           EXTEND                                         
045441,000040: 22,3563           65205                           BZMF     ENDOFJOB                              #  BIT15 = 0, BIT14 = 1
045442,000041: 22,3564           74753                           MASK     DAP2BIT                               #  IF NOT RCS, EXIT
045443,000042: 22,3565           00006                           EXTEND                                         
045444,000043: 22,3566           15205                           BZF      ENDOFJOB                              #  TO PROTECT TVC DAP ON SWITCHOVER
045445,000044: 
045446,000045: 22,3567           30034                           CA       CDUZ                                  
045447,000046: 22,3570           05061                           TC       SPSIN2                                
045448,000047: 22,3571           55640                           TS       AMGB1                                 #  CALCULATE AMGB
045449,000048: 22,3572           30034                           CA       CDUZ                                  
045450,000049: 22,3573           05060                           TC       SPCOS2                                
045451,000050: 22,3574           55645                           TS       CAPSI                                 #  MUST CHECK FOR GIMBAL LOCK
045452,000051: 22,3575           34620                           CAF      QUADANGL                              #  = 7.25  DEGREES JET QUAD ANGULAR OFFSET
045453,000052: 22,3576           00006                           EXTEND                                         
045454,000053: 22,3577           20032                           MSU      CDUX                                  
045455,000054: 22,3600           40000                           COM                                            #  CDUX - 7.25 DEG
045456,000055: 22,3601           05060                           TC       SPCOS1                                
045457,000056: 22,3602           55644                           TS       AMGB8                                 
045458,000057: 22,3603           00006                           EXTEND                                         
045459,000058: 22,3604           71645                           MP       CAPSI                                 
045460,000059: 22,3605           55641                           TS       AMGB4                                 
045461,000060: 22,3606           34620                           CAF      QUADANGL                              
045462,000061: 22,3607           00006                           EXTEND                                         
045463,000062: 22,3610           20032                           MSU      CDUX                                  
045464,000063: 22,3611           40000                           COM                                            #  CDUX - 7.25 DEG
045465,000064: 22,3612           05061                           TC       SPSIN1                                
045466,000065: 22,3613           55642                           TS       AMGB5                                 
045467,000066: 22,3614           00006                           EXTEND                                         
045468,000067: 22,3615           71645                           MP       CAPSI                                 
045469,000068: 22,3616           40000                           COM                                            

Page 1037

045471,000070: 22,3617           55643                           TS       AMGB7                                 
045472,000071: 22,3620           15205                           TCF      ENDOFJOB                              
045473,000072:    4000                                           SETLOC   FFTAG12                               
045474,000073:    4000                                           BANK                                           
045475,000074: 
045476,000075:    4620                                           COUNT*   $$/DAPEX                              
045477,000076:    4620           01224        QUADANGL           DEC      660        B-14                       #  = 7.25 DEGREES

End of include-file RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc.  Parent file is MAIN.agc