Source Code
These source-code files are part of a reconstructed copy of Comanche 72, the
first release of the Apollo Guidance Computer (AGC) Command Module (CM) software
for Apollo 13.
They have been adapted from sources files created from a listing of Comanche 55. These source files were updated to match binary dumps of a set of Comanche 67 rope modules. They were then further modified by applying known changes between Comanche 67 and Comanche 72. A binary dump of module B2 of Comanche 72, part number 2010802-021, was also used to validate changes made to banks 05-13. The resulting code assembles to have identical memory-bank checksums as those specified in NASA drawing 2021153G; this gives reasonably high confidence that the changes that have been made are correct. In places where ambiguity exists, this ambiguity is discussed in "## Reconstruction:" comments. Since no contemporary listings of Comanche 72 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing. |
040114,000002: ## Copyright: Public domain.
040115,000003: ## Filename: S-BAND_ANTENNA_FOR_CM.agc
040116,000004: ## Purpose: A section of Comanche revision 072.
040117,000005: ## It is part of the reconstructed source code for the first
040118,000006: ## release of the software for the Command Module's (CM) Apollo
040119,000007: ## Guidance Computer (AGC) for Apollo 13. No original listings
040120,000008: ## of this program are available; instead, this file was recreated
040121,000009: ## from a printout of Comanche 055, binary dumps of a set of
040122,000010: ## Comanche 067 rope modules, and changelogs between Comanche 067
040123,000011: ## and 072. It has been adapted such that the resulting bugger words
040124,000012: ## exactly match those specified for Comanche 072 in NASA drawing
040125,000013: ## 2021153G, which gives relatively high confidence that the
040126,000014: ## reconstruction is correct.
040127,000015: ## Assembler: yaYUL
040128,000016: ## Contact: Ron Burkey <info@sandroid.org>.
040129,000017: ## Website: www.ibiblio.org/apollo/index.html
040130,000018: ## Mod history: 2024-05-13 MAS Created from Comanche 067.
040131,000019:
040132,000020: 23,3207 BANK 23
040133,000021: 42,2000 SETLOC SBAND
040134,000022: 42,2000 BANK
040135,000023:
040136,000024: 42,3651 COUNT* $$/R05
040137,000025: 42,3651 E4,1417 EBANK= EMSALT
040138,000026:
040139,000027: 42,3651 06006 SBANDANT TC INTPRET
040140,000028: 42,3652 45034 RTB CALL
040141,000029: 42,3653 45510 LOADTIME # PICKUP CURRENT TIME SCALED B-28
040142,000030: 42,3654 47501 CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
040143,000031: 42,3655 34041 STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
040144,000032: 42,3656 27123 CSMCONIC # USING CONIC INTEGRATION
040145,000033: 42,3657 46135 SLOAD BHIZ # ORIGIN OF REFERENCE INERTIAL SYSTEM IS
040146,000034: 42,3660 00050 X2 # EARTH = 0, MOON = 2
040147,000035: 42,3661 65674 EISOI
040148,000036: 42,3662 77775 VLOAD
040149,000037: 42,3663 00001 RATT
040150,000038: 42,3664 00003 STORE RCM # MOVE RATT TO PREVENT WIPEOUT
040151,000039: 42,3665 45145 DLOAD CALL # MOON, PUSH ON
040152,000040: 42,3666 00015 TAT # GET ORIGINAL TIME
040153,000041: 42,3667 54115 LUNPOS # COMPUTE POSITION VECTOR OF MOON
040154,000042: 42,3670 57455 VAD VCOMP # R= -(REM+RCM) = NEG. OF S/C POS. VEC
040155,000043: 42,3671 00003 RCM
040156,000044: 42,3672 77650 GOTO
040157,000045: 42,3673 65676 EISOI +2
040158,000046: 42,3674 57575 EISOI VLOAD VCOMP # EARTH, R= -RCM
040159,000047: 42,3675 00001 RATT
040160,000048: 42,3676 64201 SETPD MXV # RCS TO STABLE MEMBER- B-1X B-29X B+1
040161,000049: 42,3677 00003 2D # 2D
040162,000050: 42,3700 01736 REFSMMAT # STABLE MEMBER. B-1X B-29X B+1= B-29
040163,000051: 42,3701 65372 VSL1 PDDL # 8D
040164,000052: 42,3702 15334 HI6ZEROS
040165,000053: 42,3703 24025 STOVL YAWANG # ZERO OUT YAWANG, SET UP FOR SMNB
040166,000054: 42,3704 00003 RCM # TRANSFORMATION. SM COORD. SCALED B-29
040167,000055: 42,3705 77624 CALL
040168,000056: 42,3706 47646 *SMNB*
040169,000057: 42,3707 00003 STORE R # SAVE NAV. BASE COORDINATES
040170,000058: 42,3710 63256 UNIT PDVL # 14D
040171,000059: 42,3711 00003 R
040172,000060: 42,3712 72431 VPROJ VSL2 # COMPUTE PROJECTION OF VECTOR INTO CM
040173,000061: 42,3713 15326 HIUNITZ # XY-PLANE, R-(R.UZ)UZ
040174,000062: 42,3714 40045 BVSU BOV # CLEAR OVERFLOW INDICATOR IF SET
040175,000063: 42,3715 00003 R
040176,000064: 42,3716 65717 COVCNV
040177,000065: 42,3717 40056 COVCNV UNIT BOV # TEST OVERFLOW FOR INDICATION OF NULL
040178,000066: 42,3720 65734 NOADJUST # VECTOR
040179,000067: 42,3721 50206 PUSH DOT # 20D
040180,000068: 42,3722 15332 HIUNITX # COMPUTE YAW ANGLE = ACOS (URP.UX)
040181,000069: 42,3723 65552 SL1 ACOS # REVOLUTIONS SCALED B0
040182,000070: 42,3724 50315 PDVL DOT # 22D YAWANG
040183,000071: 42,3725 00017 URP
040184,000072: 42,3726 15330 HIUNITY # COMPUTE FOLLOWING- URP.UY
040185,000073: 42,3727 51152 SL1 BPL # POSITIVE
040186,000074: 42,3730 65734 NOADJUST # YES, 0-180 DEGREES
040187,000075: 42,3731 45345 DLOAD DSU # NO, 181-360 DEGREES 20D
040188,000076: 42,3732 15342 DPPOSMAX # COMPUTE 2 PI MINUS YAW ANGLE
040189,000077: 42,3733 77606 PUSH # 22D YAWANG
040190,000078: 42,3734 50375 NOADJUST VLOAD DOT # COMPUTE PITCH ANGLE
040191,000079: 42,3735 00011 UR # ACOS (UR.UZ) - PI/2
040192,000080: 42,3736 15326 HIUNITZ
040193,000081: 42,3737 65552 SL1 ACOS # REVOLUTIONS B0
040194,000082: 42,3740 77625 DSU
040195,000083: 42,3741 15324 HIDP1/4
040196,000084: 42,3742 16321 STODL RHOSB
040197,000085: 42,3743 00025 YAWANG
040198,000086: 42,3744 02323 STORE GAMMASB # PATCH FOR CHECKOUT
040199,000087: 42,3745 77776 EXIT
040200,000088: 42,3746 31044 CA EXTVBACT # IS BIT 5 STILL ON
040201,000089: 42,3747 75027 MASK BIT5
040202,000090: 42,3750 00006 EXTEND
040203,000091: 42,3751 15550 BZF ENDEXT # NO, WE HAVE BEEN ANSWERED
040204,000092: 42,3752 33766 CAF V06N51 # DISPLAY ANGLES
040205,000093: 42,3753 04676 TC BANKCALL
040206,000094: 42,3754 20600 CADR GOMARKFR
040207,000095: 42,3755 05641 TC B5OFF # TERMINATE
040208,000096: 42,3756 05641 TC B5OFF
040209,000097: 42,3757 05233 TC ENDOFJOB # RECYCLE
040210,000098: 42,3760 35031 CAF BIT3 # IMMEDIATE RETURN
040211,000099: 42,3761 05542 TC BLANKET # BLANK R3
040212,000100: 42,3762 35033 CAF BIT1 # DELAY MINIMUM TIME TO ALLOW DISPLAY IN
040213,000101: 42,3763 04676 TC BANKCALL
040214,000102: 42,3764 01732 CADR DELAYJOB
040215,000103: 42,3765 13651 TCF SBANDANT
040216,000104: 42,3766 01463 V06N51 VN 0651
040217,000105: 42,3767 RCM EQUALS 2D
040218,000106: 42,3767 UR EQUALS 8D
040219,000107: 42,3767 URP EQUALS 14D
040220,000108: 42,3767 YAWANG EQUALS 20D
040221,000109: 42,3767 PITCHANG EQUALS 22D
040222,000110: 42,3767 0000002 R EQUALS RCM
040223,000111: 42,3767 30,2000 SBANK= LOWSUPER
040224,000112:
End of include-file S-BAND_ANTENNA_FOR_CM.agc. Parent file is MAIN.agc