Source Code

042979,000001: # Copyright: Public domain. 042980,000002: # Filename: MYSUBS.agc 042981,000003: # Purpose: Part of the source code for Colossus, build 249. 042982,000004: # It is part of the source code for the Command Module's (CM) 042983,000005: # Apollo Guidance Computer (AGC), possibly for Apollo 8 and 9. 042984,000006: # Assembler: yaYUL 042985,000007: # Reference: Begins on p. 974 of 1701.pdf. 042986,000008: # Contact: Ron Burkey <info@sandroid.org>. 042987,000009: # Website: www.ibiblio.org/apollo. 042988,000010: # Mod history: 08/25/04 RSB. Began transcribing. 042989,000011: 042990,000012: # The contents of the "Colossus249" files, in general, are transcribed 042991,000013: # from a scanned document obtained from MIT's website, 042992,000014: # http://hrst.mit.edu/hrs/apollo/public/archive/1701.pdf. Notations on this 042993,000015: # document read, in part: 042994,000016: 042995,000017: # Assemble revision 249 of AGC program Colossus by NASA 042996,000018: # 2021111-041. October 28, 1968. 042997,000019: 042998,000020: # This AGC program shall also be referred to as 042999,000021: # Colossus 1A 043000,000022: 043001,000023: # Prepared by 043002,000024: # Massachusetts Institute of Technology 043003,000025: # 75 Cambridge Parkway 043004,000026: # Cambridge, Massachusetts 043005,000027: # under NASA contract NAS 9-4065. 043006,000028: 043007,000029: # Refer directly to the online document mentioned above for further information. 043008,000030: # Please report any errors (relative to 1701.pdf) to info@sandroid.org. 043009,000031: 043010,000032: # In some cases, where the source code for Luminary 131 overlaps that of 043011,000033: # Colossus 249, this code is instead copied from the corresponding Luminary 131 043012,000034: # source file, and then is proofed to incorporate any changes. 043013,000035: 043014,000036: # Page 974 043015,000037: 20,3565 BANK 20 043016,000038: 21,2000 SETLOC MYSUBS 043017,000039: 21,2000 BANK 043018,000040: 043019,000041: 21,2026 0154 EBANK= MPAC 043020,000042: 21,2026 4767 SPCOS1 EQUALS SPCOS 043021,000043: 21,2026 4770 SPSIN1 EQUALS SPSIN 043022,000044: 21,2026 4767 SPCOS2 EQUALS SPCOS 043023,000045: 21,2026 4770 SPSIN2 EQUALS SPSIN 043024,000046: 21,2026 COUNT 21/DAPMS 043025,000047: 043026,000048: # ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE 043027,000049: 043028,000050: 21,2026 55512 SMALLMP TS KMPTEMP # A(X+Y) 043029,000051: 21,2027 00006 EXTEND 043030,000052: 21,2030 71511 MP KMPAC +1 043031,000053: 21,2031 55511 TS KMPAC +1 # AY 043032,000054: 21,2032 34714 CAF ZERO 043033,000055: 21,2033 57510 XCH KMPAC 043034,000056: 21,2034 00006 EXTEND 043035,000057: 21,2035 71512 MP KMPTEMP # AX 043036,000058: 21,2036 21511 DAS KMPAC # AX+AY 043037,000059: 21,2037 00002 TC Q 043038,000060: 043039,000061: # SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES 043040,000062: # A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC. 043041,000063: # RESULT IS PLACED IN KMPAC. TIMING = 6 MCT (22 MCT ON OVERFLOW) 043042,000064: 043043,000065: 21,2040 21511 DPADD DAS KMPAC 043044,000066: 21,2041 00006 EXTEND 043045,000067: 21,2042 12057 BZF TSK +1 # NO OVERFLOW 043046,000068: 21,2043 11510 CCS KMPAC 043047,000069: 21,2044 12060 TCF DPADD+ # + OVERFLOW 043048,000070: 21,2045 12047 TCF +2 043049,000071: 21,2046 12062 TCF DPADD- # - OVERFLOW 043050,000072: 21,2047 11511 CCS KMPAC +1 043051,000073: 21,2050 12065 TCF DPADD2+ # UPPER = 0, LOWER + 043052,000074: 21,2051 12053 TCF +2 043053,000075: 21,2052 40000 COM # UPPER = 0, LOWER - 043054,000076: 21,2053 64672 AD POSMAX # LOWER = 0, A = 0 043055,000077: 21,2054 55511 TS KMPAC +1 # CAN NOT OVERFLOW 043056,000078: 21,2055 34672 CA POSMAX # UPPER WAS = 0 043057,000079: 21,2056 55510 TSK TS KMPAC 043058,000080: 21,2057 00002 TC Q 043059,000081: 043060,000082: 21,2060 64674 DPADD+ AD NEGMAX # KMPAC GREATER THAN 0 043061,000083: 21,2061 12056 TCF TSK 043062,000084: 043063,000085: # Page 975 043064,000086: 21,2062 40000 DPADD- COM 043065,000087: 21,2063 64672 AD POSMAX # KMPAC LESS THAN 0 043066,000088: 21,2064 12056 TCF TSK 043067,000089: 043068,000090: 21,2065 64674 DPADD2+ AD NEGMAX # CAN NOT OVERFLOW 043069,000091: 21,2066 55511 TS KMPAC +1 043070,000092: 21,2067 34674 CA NEGMAX # UPPER WAS = 0 043071,000093: 21,2070 12056 TCF TSK 043072,000094: 043073,000095: # Page 976 043074,000096: # This page is empty ... woo-hoo!! -- RSB 2004 043075,000097: End of include-file MYSUBS.agc. Parent file is MAIN.agc