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.

041289,000002:                                                                                                  ## Copyright:   Public domain.
041290,000003:                                                                                                  ## Filename:    S-BAND_ANTENNA_FOR_CM.agc
041291,000004:                                                                                                  ## Purpose:     A section of Artemis revision 071.
041292,000005:                                                                                                  ##              It is part of the reconstructed source code for the first
041293,000006:                                                                                                  ##              release of the flight software for the Command Module's
041294,000007:                                                                                                  ##              (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
041295,000008:                                                                                                  ##              17. The code has been recreated from a copy of Artemis 072.
041296,000009:                                                                                                  ##              It has been adapted such that the resulting bugger words
041297,000010:                                                                                                  ##              exactly match those specified for Artemis 071 in NASA
041298,000011:                                                                                                  ##              drawing 2021154-, which gives relatively high confidence
041299,000012:                                                                                                  ##              that the reconstruction is correct.
041300,000013:                                                                                                  ## Reference:   940
041301,000014:                                                                                                  ## Assembler:   yaYUL
041302,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
041303,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
041304,000017:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Artemis 072.
041305,000018: 

Page 940

041307,000020: 42,2000                                           SETLOC   SBAND                                 
041308,000021: 42,2000                                           BANK                                           
041309,000022: 
041310,000023: 42,3504                                           COUNT*   $$/R05                                
041311,000024: 42,3504  E4,1417                                  EBANK=   EMSALT                                
041312,000025: 
041313,000026: 42,3504           06006        SBANDANT           TC       INTPRET                               
041314,000027: 42,3505           45034                           RTB      CALL                                  
041315,000028: 42,3506           51751                                    LOADTIME                              #  PICKUP CURRENT TIME SCALED B-28
041316,000029: 42,3507           47530                                    CDUTRIG                               #  COMPUTE SINES AND COSINES OF CDU ANGLES
041317,000030: 42,3510           34041                           STCALL   TDEC1                                 #  ADVANCE INTEGRATION TO TIME IN TDEC1
041318,000031: 42,3511           27170                                    CSMCONIC                              #  USING CONIC INTEGRATION
041319,000032: 42,3512           46135                           SLOAD    BHIZ                                  #  ORIGIN OF REFERENCE INERTIAL SYSTEM IS
041320,000033: 42,3513           00050                                    X2                                    #  EARTH = 0, MOON = 2
041321,000034: 42,3514           65527                                    EISOI                                 
041322,000035: 42,3515           77775                           VLOAD                                          
041323,000036: 42,3516           00001                                    RATT                                  
041324,000037: 42,3517           00003                           STORE    RCM                                   #  MOVE RATT TO PREVENT WIPEOUT
041325,000038: 42,3520           45145                           DLOAD    CALL                                  #  MOON, PUSH ON
041326,000039: 42,3521           00015                                    TAT                                   #  GET ORIGINAL TIME
041327,000040: 42,3522           54141                                    LUNPOS                                #  COMPUTE POSITION VECTOR OF MOON
041328,000041: 42,3523           57455                           VAD      VCOMP                                 #  R= -(REM+RCM) = NEG. OF S/C POS. VEC
041329,000042: 42,3524           00003                                    RCM                                   
041330,000043: 42,3525           77650                           GOTO                                           
041331,000044: 42,3526           65531                                    EISOI      +2                         
041332,000045: 42,3527           57575        EISOI              VLOAD    VCOMP                                 #  EARTH, R= -RCM
041333,000046: 42,3530           00001                                    RATT                                  
041334,000047: 42,3531           64201                           SETPD    MXV                                   #  RCS TO STABLE MEMBER- B-1X B-29X B+1
041335,000048: 42,3532           00003                                    2D                                    #  2D
041336,000049: 42,3533           01734                                    REFSMMAT                              #  STABLE MEMBER.  B-1X B-29X B+1= B-29
041337,000050: 42,3534           65372                           VSL1     PDDL                                  #  8D
041338,000051: 42,3535           15336                                    HI6ZEROS                              
041339,000052: 42,3536           24025                           STOVL    YAWANG                                #  ZERO OUT YAWANG, SET UP FOR SMNB
041340,000053: 42,3537           00003                                    RCM                                   #  TRANSFORMATION. SM COORD. SCALED B-29
041341,000054: 42,3540           77624                           CALL                                           
041342,000055: 42,3541           47633                                    *SMNB*                                
041343,000056: 42,3542           00003                           STORE    R                                     #  SAVE NAV. BASE COORDINATES
041344,000057: 42,3543           63256                           UNIT     PDVL                                  #  14D
041345,000058: 42,3544           00003                                    R                                     
041346,000059: 42,3545           72431                           VPROJ    VSL2                                  #  COMPUTE PROJECTION OF VECTOR INTO CM
041347,000060: 42,3546           15330                                    HIUNITZ                               #  XY-PLANE, R-(R.UZ)UZ
041348,000061: 42,3547           40045                           BVSU     BOV                                   #  CLEAR OVERFLOW INDICATOR IF SET
041349,000062: 42,3550           00003                                    R                                     
041350,000063: 42,3551           65552                                    COVCNV                                
041351,000064: 42,3552           40056        COVCNV             UNIT     BOV                                   #  TEST OVERFLOW FOR INDICATION OF NULL
041352,000065: 42,3553           65567                                    NOADJUST                              #  VECTOR
041353,000066: 42,3554           50206                           PUSH     DOT                                   #  20D
041354,000067: 42,3555           15334                                    HIUNITX                               #  COMPUTE YAW ANGLE = ACOS (URP.UX)
041355,000068: 42,3556           65552                           SL1      ACOS                                  #  REVOLUTIONS SCALED B0
041356,000069: 42,3557           50315                           PDVL     DOT                                   #  22D YAWANG

Page 941

041358,000071: 42,3560           00017                                    URP                                   
041359,000072: 42,3561           15332                                    HIUNITY                               #  COMPUTE FOLLOWING- URP.UY
041360,000073: 42,3562           51152                           SL1      BPL                                   #  POSITIVE
041361,000074: 42,3563           65567                                    NOADJUST                              #  YES, 0- 180 DEGREES
041362,000075: 42,3564           45345                           DLOAD    DSU                                   #  NO, 181-360 DEGREES 20D
041363,000076: 42,3565           15344                                    DPPOSMAX                              #  COMPUTE 2 PI MINUS YAW ANGLE
041364,000077: 42,3566           77606                           PUSH                                           #  22D YAWANG
041365,000078: 42,3567           50375        NOADJUST           VLOAD    DOT                                   #  COMPUTE PITCH ANGLE
041366,000079: 42,3570           00011                                    UR                                    #  ACOS (UR.UZ) - PI/2
041367,000080: 42,3571           15330                                    HIUNITZ                               
041368,000081: 42,3572           65552                           SL1      ACOS                                  #  REVOLUTIONS B0
041369,000082: 42,3573           77625                           DSU                                            
041370,000083: 42,3574           15326                                    HIDP1/4                               
041371,000084: 42,3575           16312                           STODL    RHOSB                                 
041372,000085: 42,3576           00025                                    YAWANG                                
041373,000086: 42,3577           02314                           STORE    GAMMASB                               #  PATCH FOR CHECKOUT
041374,000087: 42,3600           77776                           EXIT                                           
041375,000088: 42,3601           35047                           CAF      PRIO5                                 
041376,000089: 42,3602           05176                           TC       PRIOCHNG                              
041377,000090: 
041378,000091: 42,3603           31247                           CA       EXTVBACT                              #  IS BIT 5 STILL ON
041379,000092: 42,3604           74764                           MASK     BIT5                                  
041380,000093: 42,3605           00006                           EXTEND                                         
041381,000094: 42,3606           15524                           BZF      ENDEXT                                #  NO, WE HAVE BEEN ANSWERED
041382,000095: 42,3607           33625                           CAF      V06N51                                #  DISPLAY ANGLES
041383,000096: 42,3610           04636                           TC       BANKCALL                              
041384,000097: 42,3611           20607                           CADR     GOMARKFR                              
041385,000098: 42,3612           05626                           TC       B5OFF                                 #  TERMINATE
041386,000099: 42,3613           05626                           TC       B5OFF                                 
041387,000100: 42,3614           05205                           TC       ENDOFJOB                              #  RECYCLE
041388,000101: 42,3615           34766                           CAF      BIT3                                  #  IMMEDIATE RETURN
041389,000102: 42,3616           05516                           TC       BLANKET                               #  BLANK R3
041390,000103: 42,3617           34755                           CAF      PRIO4                                 
041391,000104: 42,3620           05176                           TC       PRIOCHNG                              
041392,000105: 
041393,000106: 42,3621           34770                           CAF      BIT1                                  #  DELAY MINIMUM TIME TO ALLOW DISPLAY IN
041394,000107: 42,3622           04636                           TC       BANKCALL                              
041395,000108: 42,3623           01731                           CADR     DELAYJOB                              
041396,000109: 42,3624           13504                           TCF      SBANDANT                              
041397,000110: 42,3625           01463        V06N51             VN       0651                                  
041398,000111: 42,3626                        RCM                EQUALS   2D                                    
041399,000112: 42,3626                        UR                 EQUALS   8D                                    
041400,000113: 42,3626                        URP                EQUALS   14D                                   
041401,000114: 42,3626                        YAWANG             EQUALS   20D                                   
041402,000115: 42,3626                        PITCHANG           EQUALS   22D                                   
041403,000116: 42,3626  0000002               R                  EQUALS   RCM                                   
041404,000117: 42,3626  30,2000                                  SBANK=   LOWSUPER                              
041405,000118: 

Page 942 This page contains only assembler-generated messages.

041408,000121: 
041409,000122: 

End of include-file S-BAND_ANTENNA_FOR_CM.agc.  Parent file is MAIN.agc