Source Code

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