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.

043850,000002:                                                                                                  ## Copyright:   Public domain.
043851,000003:                                                                                                  ## Filename:    MYSUBS.agc
043852,000004:                                                                                                  ## Purpose:     A section of Artemis revision 071.
043853,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
043854,000006:                                                                                                  ##              release of the flight software for the Command Module's
043855,000007:                                                                                                  ##              (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
043856,000008:                                                                                                  ##              17. The code has been recreated from a copy of Artemis 072.
043857,000009:                                                                                                  ##              It has been adapted such that the resulting bugger words
043858,000010:                                                                                                  ##              exactly match those specified for Artemis 071 in NASA
043859,000011:                                                                                                  ##              drawing 2021154-, which gives relatively high confidence
043860,000012:                                                                                                  ##              that the reconstruction is correct.
043861,000013:                                                                                                  ## Reference:   997
043862,000014:                                                                                                  ## Assembler:   yaYUL
043863,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
043864,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
043865,000017:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Artemis 072.
043866,000018: 

Page 997

043868,000020: 
043869,000021: 21,2000                                           SETLOC   MYSUBS                                
043870,000022: 21,2000                                           BANK                                           
043871,000023: 
043872,000024: 21,2060  E6,1510                                  EBANK=   KMPAC                                 
043873,000025: 21,2060     5060               SPCOS1             EQUALS   SPCOS                                 
043874,000026: 21,2060     5061               SPSIN1             EQUALS   SPSIN                                 
043875,000027: 21,2060     5060               SPCOS2             EQUALS   SPCOS                                 
043876,000028: 21,2060     5061               SPSIN2             EQUALS   SPSIN                                 
043877,000029: 
043878,000030: 21,2060                                           COUNT*   $$/DAPMS                              
043879,000031: 
043880,000032:                                                                                                  #  ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE
043881,000033: 
043882,000034: 21,2060           55512        SMALLMP            TS       KMPTEMP                               #  A(X+Y)
043883,000035: 21,2061           00006                           EXTEND                                         
043884,000036: 21,2062           71511                           MP       KMPAC      +1                         
043885,000037: 21,2063           55511                           TS       KMPAC      +1                         #  AY
043886,000038: 21,2064           34772                           CAF      ZERO                                  
043887,000039: 21,2065           57510                           XCH      KMPAC                                 
043888,000040: 21,2066           00006                           EXTEND                                         
043889,000041: 21,2067           71512                           MP       KMPTEMP                               #  AX
043890,000042: 21,2070           21511                           DAS      KMPAC                                 #  AX+AY
043891,000043: 21,2071           00002                           TC       Q                                     
043892,000044: 
043893,000045:                                                                                                  #  SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES
043894,000046:                                                                                                  #  A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC.
043895,000047:                                                                                                  #  RESULT IS PLACED IN KMPAC.  TIMING = 6 MCT (22 MCT ON OVERFLOW)
043896,000048: 
043897,000049: 21,2072           21511        DPADD              DAS      KMPAC                                 
043898,000050: 21,2073           00006                           EXTEND                                         
043899,000051: 21,2074           12111                           BZF      TSK        +1                         #  NO OVERFLOW
043900,000052: 21,2075           11510                           CCS      KMPAC                                 
043901,000053: 21,2076           12112                           TCF      DPADD+                                #  + OVERFLOW
043902,000054: 21,2077           12101                           TCF      +2                                    
043903,000055: 21,2100           12114                           TCF      DPADD-                                #  - OVERFLOW
043904,000056: 21,2101           11511                           CCS      KMPAC      +1                         
043905,000057: 21,2102           12117                           TCF      DPADD2+                               #  UPPER = 0, LOWER +
043906,000058: 21,2103           12105                           TCF      +2                                    
043907,000059: 21,2104           40000                           COM                                            #  UPPER = 0, LOWER -
043908,000060: 21,2105           64750                           AD       POSMAX                                #  LOWER = 0, A=0
043909,000061: 21,2106           55511                           TS       KMPAC      +1                         #  CAN NOT OVERFLOW
043910,000062: 21,2107           34750                           CA       POSMAX                                #  UPPER WAS = 0
043911,000063: 21,2110           55510        TSK                TS       KMPAC                                 
043912,000064: 21,2111           00002                 +1        TC       Q                                     
043913,000065: 21,2112           64752        DPADD+             AD       NEGMAX                                #  KMPAC GREATER THAN 0
043914,000066: 21,2113           12110                           TCF      TSK                                   
043915,000067: 
043916,000068: 21,2114           40000        DPADD-             COM                                            
043917,000069: 21,2115           64750                           AD       POSMAX                                #  KMPAC LESS THAN 0

Page 998

043919,000071: 21,2116           12110                           TCF      TSK                                   
043920,000072: 
043921,000073: 21,2117           64752        DPADD2+            AD       NEGMAX                                #  CAN NOT OVERFLOW
043922,000074: 21,2120           55511                           TS       KMPAC      +1                         
043923,000075: 21,2121           34752                           CA       NEGMAX                                #  UPPER WAS = 0
043924,000076: 21,2122           12110                           TCF      TSK                                   
043925,000077: 

Page 999 Empty page


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