Source Code
These source-code files are part of a reconstructed copy of Sunrise 45, the
penultimate release of the Block I Command Module (CM) Apollo Guidance Computer
(AGC) system test software.
They have been created via disassembly of binary dumps of original core rope memory modules, part numbers 1003133-18, 1003133-19, and 1003133-20. Corresponding portions of code have been copied from Solarium 55 where applicable. Extensive use was also made of the AGC Information Series documents, which were specifically written about the Sunrise software. Since only binary dumps (rather than listings) of Sunrise 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. |
006543,000002: ## Copyright: Public domain.
006544,000003: ## Filename: AGC_SELF-CHECK.agc
006545,000004: ## Purpose: A section of Sunrise 45.
006546,000005: ## It is part of the reconstructed source code for the penultimate
006547,000006: ## release of the Block I Command Module system test software. No
006548,000007: ## original listings of this program are available; instead, this
006549,000008: ## file was created via disassembly of dumps of Sunrise core rope
006550,000009: ## memory modules and comparison with the later Block I program
006551,000010: ## Solarium 55.
006552,000011: ## Assembler: yaYUL --block1
006553,000012: ## Contact: Ron Burkey <info@sandroid.org>.
006554,000013: ## Website: www.ibiblio.org/apollo/index.html
006555,000014: ## Mod history: 2022-12-09 MAS Initial reconstructed source.
006556,000015:
006557,000016:
006558,000017: 05,6676 SETLOC ENDEXTVS
006559,000018:
006560,000019: 05,6676 00001 SBIT1 OCTAL 00001
006561,000020: 05,6677 00002 SBIT2 OCTAL 00002
006562,000021: 05,6700 00004 SBIT3 OCTAL 00004
006563,000022: 05,6701 00010 SBIT4 OCTAL 00010
006564,000023: 05,6702 00020 SBIT5 OCTAL 00020
006565,000024: 05,6703 00040 SBIT6 OCTAL 00040
006566,000025: 05,6704 00100 SBIT7 OCTAL 00100
006567,000026: 05,6705 00200 SBIT8 OCTAL 00200
006568,000027: 05,6706 00400 SBIT9 OCTAL 00400
006569,000028: 05,6707 01000 SBIT10 OCTAL 01000
006570,000029: 05,6710 02000 SBIT11 OCTAL 02000
006571,000030: 05,6711 04000 SBIT12 OCTAL 04000
006572,000031: 05,6712 10000 SBIT13 OCTAL 10000
006573,000032: 05,6713 20000 SBIT14 OCTAL 20000
006574,000033: 05,6714 40000 SBIT15 OCTAL 40000
006575,000034:
006576,000035: # THE FOLLOWING CONSTANTS ARE USED THROUGHOUT SELF-CHECK
006577,000036: 05,6715 00000 SCON0 OCTAL +0
006578,000037: 05,6716 00001 SCON1 OCTAL +1
006579,000038: 05,6717 00002 SCON2 OCTAL +2
006580,000039: 05,6720 00004 SCON4 OCTAL +4
006581,000040: 05,6721 00100 SCON64 OCTAL 00100
006582,000041: 05,6722 10000 SCON1/4 OCTAL 10000
006583,000042: 05,6723 14000 SCON3/8 OCTAL 14000
006584,000043: 05,6724 20000 SCON1/2 OCTAL 20000
006585,000044: 05,6725 37775 SCONTS OCTAL 37775
006586,000045: 05,6726 37776 SCONSU OCTAL 37776
006587,000046: 05,6727 37777 SCON+MAX OCTAL 37777
006588,000047: 05,6730 63777 SCON-3/8 OCTAL 63777
006589,000048: 05,6731 67777 SCON-1/2 OCTAL 67777
006590,000049: 05,6732 77775 SCON-2 OCTAL 77775
006591,000050: 05,6733 77776 SCON-1 OCTAL 77776
006592,000051: 05,6734 77777 SCONMAX OCTAL 77777
006593,000052:
006594,000053: 05,6735 30001 ERRORS XCH Q # FAILURE DETECTED - ALARM.
006595,000054: 05,6736 51570 TS SFAIL # SAVE CALLING Q FOR POSSIBLE FAILURE LOC.
006596,000055: 05,6737 02605 TC ALARM
006597,000056: 05,6740 01102 OCT 01102
006598,000057: 05,6741 35500 CAF ZERO
006599,000058: 05,6742 51567 TS SMODE
006600,000059: 05,6743 07337 TC DUMMYJOB
006601,000060:
006602,000061: # CHECKS MOST CCS PULSES
006603,000062: 05,6744 51567 CCSCHK TS SMODE
006604,000063: 05,6745 46717 CS SCON2 # -2
006605,000064: 05,6746 10000 CCS A # C(A) = -2
006606,000065: 05,6747 06735 TC ERRORS
006607,000066: 05,6750 06735 TC ERRORS
006608,000067: 05,6751 06753 TC +2
006609,000068: 05,6752 06735 TC ERRORS
006610,000069: 05,6753 10000 CCS A # C(A) = +1, RESULT OF CCS -NUMBER
006611,000070: 05,6754 06760 TC +4
006612,000071: 05,6755 06735 TC ERRORS
006613,000072: 05,6756 06735 TC ERRORS
006614,000073: 05,6757 06735 TC ERRORS
006615,000074: 05,6760 10000 CCS A # C(A) = +0, RESULT OF CCS + NUMBER
006616,000075: 05,6761 06735 TC ERRORS
006617,000076: 05,6762 06765 TC +3
006618,000077: 05,6763 06735 TC ERRORS
006619,000078: 05,6764 06735 TC ERRORS
006620,000079: 05,6765 40000 CS A
006621,000080: 05,6766 10000 CCS A # C(A) = -0, RESULT OF CCS +0
006622,000081: 05,6767 06735 TC ERRORS
006623,000082: 05,6770 06735 TC ERRORS
006624,000083: 05,6771 06735 TC ERRORS
006625,000084: 05,6772 10000 CCS A # RESULT OF CCS -0
006626,000085: 05,6773 06735 TC ERRORS
006627,000086: 05,6774 06777 TC +3
006628,000087: 05,6775 06735 TC ERRORS
006629,000088: 05,6776 06735 TC ERRORS
006630,000089: # SPECIFICALLY CHECKS RSC PULSE OF TC INSTRUCTION (ALSO MOST OF TC
006631,000090: # PULSES)
006632,000091: 05,6777 07001 TC +2
006633,000092: 05,7000 07002 TC +2 # NEXT SUBROUTINE
006634,000093: 05,7001 00001 TC Q
006635,000094:
006636,000095: 05,7002 66676 AD SBIT1
006637,000096: 05,7003 51601 TS OKREG
006638,000097:
006639,000098: # CHECKS WP, GP, TP - WP2, RP2 - RG, WP, OF CCS1
006640,000099: # CHECKS RB, WG PULSES (READ BACK INTO ERASABLE)
006641,000100: 05,7004 35777 PTY+ERAS CAF 5777 # 47777
006642,000101: 05,7005 51573 TS SKEEP1
006643,000102: 05,7006 71573 MASK SKEEP1
006644,000103: 05,7007 31573 XCH SKEEP1
006645,000104: 05,7010 61573 AD SKEEP1
006646,000105: 05,7011 25777 INDEX 5777
006647,000106: 05,7012 41573 4 SKEEP1 # MP SKEEP1
006648,000107: 05,7013 25777 INDEX 5777
006649,000108: 05,7014 51573 5 SKEEP1 # DV SKEEP1
006650,000109: 05,7015 41573 CS SKEEP1
006651,000110: 05,7016 51574 TS SKEEP2 # 30000
006652,000111: 05,7017 21573 INDEX SKEEP1 # TROUBLE IF C(SKEEP1) NOT 47777
006653,000112: 05,7020 61574 6 SKEEP2 # SU SKEEP2, C(A) = -0
006654,000113: 05,7021 51574 TS SKEEP2 # -0
006655,000114: 05,7022 11574 CCS SKEEP2
006656,000115: 05,7023 06735 TC ERRORS
006657,000116: 05,7024 06735 TC ERRORS
006658,000117: 05,7025 06735 TC ERRORS
006659,000118: 05,7026 11574 CCS SKEEP2
006660,000119: 05,7027 06735 TC ERRORS
006661,000120: 05,7030 06735 TC ERRORS
006662,000121: 05,7031 06735 TC ERRORS
006663,000122: 05,7032 41601 CS OKREG
006664,000123: 05,7033 40000 CS A
006665,000124: 05,7034 66677 AD SBIT2
006666,000125: 05,7035 51601 TS OKREG
006667,000126: # START ERASABLE INSTRUCTION CHECK
006668,000127: 05,7036 37054 CAF EINST1
006669,000128: 05,7037 51573 TS SKEEP1
006670,000129: 05,7040 37055 CAF EINST2
006671,000130: 05,7041 51574 TS SKEEP2
006672,000131: 05,7042 37056 CAF EINST3
006673,000132: 05,7043 51575 TS SKEEP3
006674,000133: 05,7044 37057 CAF EINST4
006675,000134: 05,7045 51576 TS SKEEP4
006676,000135: 05,7046 37060 CAF EINST5
006677,000136: 05,7047 51577 TS SKEEP5
006678,000137: 05,7050 37061 CAF EINST6
006679,000138: 05,7051 51600 TS SKEEP6
006680,000139: 05,7052 36724 CAF SCON1/2
006681,000140: 05,7053 01573 TC SKEEP1
006682,000141: 05,7054 25777 EINST1 INDEX 5777
006683,000142: 05,7055 46717 EINST2 4 SCON2 # MP, C(A) = +1, THEN +0
006684,000143: 05,7056 60000 EINST3 AD A # CHECKS ST2 PARITY
006685,000144: 05,7057 10000 EINST4 CCS A
006686,000145: 05,7060 01573 EINST5 TC SKEEP1
006687,000146: 05,7061 07062 EINST6 TC +1 # NEXT SUBROUTINE
006688,000147:
006689,000148: 05,7062 41601 CS OKREG
006690,000149: 05,7063 40000 CS A
006691,000150: 05,7064 66700 AD SBIT3
006692,000151: 05,7065 51601 TS OKREG
006693,000152:
006694,000153: # CHECKS RSC, WSC PULSES
006695,000154: # NO WSC PULSE IN MASK INSTRUCTION
006696,000155: 05,7066 36721 SCCHK CAF SCON64 # 00100
006697,000156: 05,7067 30003 XCH LP # 00040
006698,000157: 05,7070 30003 XCH LP
006699,000158: 05,7071 50003 TS LP # 00020
006700,000159: 05,7072 60003 AD LP # 00010
006701,000160: 05,7073 20003 INDEX LP # 00004
006702,000161: 05,7074 25767 2 5767 # INDEX 5777
006703,000162: 05,7075 60003 6 0003 # SU LP, 00002
006704,000163: # NEXT 4 INSTRUCTIONS CHECK RSC PULSE IN MASK INSTRUCTION
006705,000164: 05,7076 40003 CS LP # C(A) = -2, C(LP) = +1
006706,000165: 05,7077 70003 MASK LP # C(A) = +1, C(LP) = +1
006707,000166: 05,7100 66733 AD SCON-1
006708,000167: 05,7101 10000 CCS A
006709,000168: 05,7102 06735 TC ERRORS
006710,000169: 05,7103 06735 TC ERRORS
006711,000170: 05,7104 06735 TC ERRORS
006712,000171: 05,7105 10003 CCS LP
006713,000172: 05,7106 07112 TC +4
006714,000173: 05,7107 06735 TC ERRORS
006715,000174: 05,7110 06735 TC ERRORS
006716,000175: 05,7111 06735 TC ERRORS
006717,000176: 05,7112 10003 CCS LP
006718,000177: 05,7113 06735 TC ERRORS
006719,000178: 05,7114 06735 TC ERRORS
006720,000179: 05,7115 07117 TC +2
006721,000180: 05,7116 06735 TC ERRORS
006722,000181: 05,7117 10003 CCS LP
006723,000182: 05,7120 06735 TC ERRORS
006724,000183: 05,7121 07124 TC +3 # NEXT SUBROUTINE
006725,000184: 05,7122 06735 TC ERRORS
006726,000185: 05,7123 06735 TC ERRORS
006727,000186: 05,7124 41601 CS OKREG
006728,000187: 05,7125 40000 CS A
006729,000188: 05,7126 66701 AD SBIT4
006730,000189: 05,7127 51601 TS OKREG
006731,000190: # CHECKS MOST OF MP PULSES
006732,000191: 05,7130 36720 MPCHK CAF SCON4
006733,000192: 05,7131 50003 TS LP
006734,000193: 05,7132 36727 MP++ CAF SCON+MAX
006735,000194: 05,7133 25777 INDEX 5777
006736,000195: 05,7134 40003 4 LP # C(A) = +1, CHECKS RSC PULSE
006737,000196: 05,7135 60003 AD LP # C(LP) = +37776
006738,000197: 05,7136 51573 TS SKEEP1 # 37777
006739,000198: 05,7137 36727 MP+- CAF SCON+MAX
006740,000199: 05,7140 25777 INDEX 5777
006741,000200: 05,7141 46732 4 SCON-2
006742,000201: 05,7142 60003 AD LP # C(LP) = -37776
006743,000202: 05,7143 61573 AD SKEEP1
006744,000203: 05,7144 10000 CCS A
006745,000204: 05,7145 06735 TC ERRORS
006746,000205: 05,7146 06735 TC ERRORS
006747,000206: 05,7147 06735 TC ERRORS
006748,000207: 05,7150 46727 MP-- CS SCON+MAX
006749,000208: 05,7151 25777 INDEX 5777
006750,000209: 05,7152 46732 4 SCON-2 # C(A) = +1
006751,000210: 05,7153 60003 AD LP # C(LP) = +37776
006752,000211: 05,7154 51573 TS SKEEP1 # 37777
006753,000212: 05,7155 46727 MP-+ CS SCON+MAX
006754,000213: 05,7156 25777 INDEX 5777
006755,000214: 05,7157 46717 4 SCON2 # C(A) = -1
006756,000215: 05,7160 60003 AD LP # C(LP) = -37776
006757,000216: 05,7161 61573 AD SKEEP1
006758,000217: 05,7162 10000 CCS A
006759,000218: 05,7163 06735 TC ERRORS
006760,000219: 05,7164 06735 TC ERRORS
006761,000220: 05,7165 06735 TC ERRORS
006762,000221:
006763,000222: 05,7166 41601 CS OKREG
006764,000223: 05,7167 40000 CS A
006765,000224: 05,7170 66702 AD SBIT5
006766,000225: 05,7171 51601 TS OKREG
006767,000226:
006768,000227: # CHECKS MOST OF SU PULSES
006769,000228: 05,7172 36727 SUCHK CAF SCON+MAX
006770,000229: 05,7173 25777 INDEX 5777
006771,000230: 05,7174 66726 6 SCONSU # SU 37776, C(A) = +1
006772,000231: 05,7175 40000 CS A
006773,000232: 05,7176 10000 CCS A
006774,000233: 05,7177 06735 TC ERRORS
006775,000234: 05,7200 06735 TC ERRORS
006776,000235: 05,7201 10000 CCS A
006777,000236: 05,7202 06735 TC ERRORS
006778,000237:
006779,000238: 05,7203 41601 CS OKREG
006780,000239: 05,7204 40000 CS A
006781,000240: 05,7205 66703 AD SBIT6
006782,000241: 05,7206 51601 TS OKREG
006783,000242:
006784,000243: # CHECKS MOST OF DV PULSES (ALL EXCEPT WP, GP, TP)
006785,000244: # DIVIDE USES ST2
006786,000245: # ++ AND --, C(A) = 25252, C(Q) = 67777, C(LP) = +1
006787,000246: # +- AND -+ , C(A) = 52525, C(Q) = 67777, C(LP) = 40000 AND 40001
006788,000247: 05,7207 36723 DVCHK CAF SCON3/8
006789,000248: 05,7210 50001 TS Q
006790,000249: 05,7211 36722 DV++ CAF SCON1/4
006791,000250: 05,7212 25777 INDEX 5777
006792,000251: 05,7213 50001 5 Q # C(A) = 25252, CHECKS RSC PULSE
006793,000252: 05,7214 51573 TS SKEEP1
006794,000253: 05,7215 30003 XCH LP
006795,000254: 05,7216 51574 TS SKEEP2
006796,000255: 05,7217 40001 DV+- CS Q # +1/4
006797,000256: 05,7220 25777 INDEX 5777
006798,000257: 05,7221 56730 5 SCON-3/8 # C(A) = 52525
006799,000258: 05,7222 61573 AD SKEEP1 # C(A) = -0
006800,000259: 05,7223 10000 CCS A
006801,000260: 05,7224 06735 TC ERRORS
006802,000261: 05,7225 06735 TC ERRORS
006803,000262: 05,7226 06735 TC ERRORS
006804,000263: 05,7227 30003 XCH LP
006805,000264: 05,7230 51575 TS SKEEP3
006806,000265: 05,7231 30001 DV-- XCH Q # -1/4
006807,000266: 05,7232 25777 INDEX 5777
006808,000267: 05,7233 56730 5 SCON-3/8 # C(A) = 25252
006809,000268: 05,7234 51573 TS SKEEP1
006810,000269: 05,7235 30003 XCH LP
006811,000270: 05,7236 51576 TS SKEEP4
006812,000271: 05,7237 30001 DV-+ XCH Q # -1/4
006813,000272: 05,7240 25777 INDEX 5777
006814,000273: 05,7241 56723 5 SCON3/8
006815,000274: 05,7242 61573 AD SKEEP1 # C(A) = -0
006816,000275: 05,7243 51573 TS SKEEP1
006817,000276: 05,7244 40003 CS LP # C(A) = 37776
006818,000277: 05,7245 61573 AD SKEEP1 # C(A) = 37776
006819,000278: 05,7246 61574 AD SKEEP2 # C(A) = 37777
006820,000279: 05,7247 61575 AD SKEEP3 # C(A) = -0
006821,000280: 05,7250 61576 AD SKEEP4 # C(A) = +1
006822,000281: 05,7251 40000 CS A
006823,000282: 05,7252 10000 CCS A
006824,000283: 05,7253 06735 TC ERRORS
006825,000284: 05,7254 06735 TC ERRORS
006826,000285: 05,7255 10000 CCS A
006827,000286: 05,7256 06735 TC ERRORS
006828,000287:
006829,000288: 05,7257 41601 CS OKREG
006830,000289: 05,7260 40000 CS A
006831,000290: 05,7261 66704 AD SBIT7
006832,000291: 05,7262 51601 TS OKREG
006833,000292:
006834,000293: # CHECKS MOST TS PULSES
006835,000294: # CHECKS ALL OF PINC AND MINC PULSES EXCEPT WOVR
006836,000295: 05,7263 36716 TS+-CHK CAF SCON1
006837,000296: 05,7264 50034 TS OVCTR
006838,000297: 05,7265 66727 AD SCON+MAX # C(A) = + WITH OVERFLOW
006839,000298: 05,7266 51573 TS SKEEP1
006840,000299: 05,7267 06735 TC ERRORS
006841,000300: 05,7270 61573 AD SKEEP1 # C(A) = +1
006842,000301: 05,7271 60034 AD OVCTR # C(A) = +3
006843,000302: 05,7272 50034 TS OVCTR
006844,000303: 05,7273 40000 CS A # C(A) = 77774
006845,000304: 05,7274 25777 INDEX 5777
006846,000305: 05,7275 66725 6 SCONTS # C(A) = -0 WITH UNDERFLOW
006847,000306: 05,7276 51573 TS SKEEP1
006848,000307: 05,7277 06735 TC ERRORS
006849,000308: 05,7300 61573 AD SKEEP1 # C(A) = -1
006850,000309: 05,7301 60034 AD OVCTR # C(A) = -1+2
006851,000310: 05,7302 40000 CS A
006852,000311: 05,7303 10000 CCS A
006853,000312: 05,7304 06735 TC ERRORS
006854,000313: 05,7305 06735 TC ERRORS
006855,000314: 05,7306 10000 CCS A
006856,000315: 05,7307 06735 TC ERRORS
006857,000316:
006858,000317: 05,7310 41601 CS OKREG
006859,000318: 05,7311 40000 CS A
006860,000319: 05,7312 66705 AD SBIT8
006861,000320: 05,7313 51601 TS OKREG
006862,000321:
006863,000322: 05,7314 31572 XCH SCOUNT +1
006864,000323: 05,7315 64516 AD ONE
006865,000324: 05,7316 51572 TS SCOUNT +1
006866,000325: 05,7317 07322 TC SMODECHK
006867,000326: 05,7320 61571 AD SCOUNT
006868,000327: 05,7321 31571 XCH SCOUNT
006869,000328:
006870,000329: # COMPUTER ACTIVITY LIGHT (GREEN LIGHT) MAINTENANCE.
006871,000330:
006872,000331: 05,7322 10550 SMODECHK CCS NEWJOB # SEE IF ITS TIME FOR A CHANGE.
006873,000332: 05,7323 07331 TC DUMEXIT
006874,000333:
006875,000334: 05,7324 11567 ADVAN CCS SMODE # SEE IF SELF-CHECK IS WANTED
006876,000335: 05,7325 06744 TC CCSCHK # YES PULSES ONLY
006877,000336: 05,7326 07322 TC SMODECHK
006878,000337: 05,7327 06745 TC CCSCHK +1 # YES PULSES + SC + ERASABLE
006879,000338: 05,7330 07322 TC SMODECHK
006880,000339:
006881,000340: 05,7331 45502 DUMEXIT CS TWO # TURN ON GREEN LIGHT (COMP ACT) AND
006882,000341: 05,7332 20017 INHINT
006883,000342: 05,7333 70011 MASK OUT1 # GO TO CHANG1.
006884,000343: 05,7334 65502 AD TWO
006885,000344: 05,7335 50011 TS OUT1
006886,000345: 05,7336 02072 TC CHANG1
006887,000346:
006888,000347: 05,7337 45502 DUMMYJOB CS TWO # IDLING AGAIN- TURN OFF ACTIVITY LIGHT
006889,000348: 05,7340 20017 INHINT
006890,000349: 05,7341 70011 MASK OUT1 # LIGHT.
006891,000350: 05,7342 50011 TS OUT1
006892,000351: 05,7343 20016 RELINT
006893,000352: 05,7344 07322 TC SMODECHK # BACK TO CHECKING COMPUTER
006894,000353:
006895,000354: 05,7345 ENDSELFC EQUALS
End of include-file AGC_SELF-CHECK.agc. Parent file is MAIN.agc