Source Code
These source-code files are part of a reconstructed copy of Corona 261, the
final, flown release of the Block I Command Module (CM) Apollo Guidance Computer
(AGC) software for the AS-202 mission.
They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on the mission, part numbers 1003733-171, 1003733-241, 1003733-191, 1003733-211, 1003733-221, and 1003733-241. The source code for the Apollo 4 and 6 software, Solarium 55, was used as a starting point, since it was directly derived from Corona and (at least in theory) only minimally modified. Since only binary dumps (rather than listings) of Corona 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. |
010889,000002: ## Copyright: Public domain.
010890,000003: ## Filename: INTER-BANK_COMMUNICATION.agc
010891,000004: ## Purpose: A section of Corona revision 261.
010892,000005: ## It is part of the source code for the Apollo Guidance Computer
010893,000006: ## (AGC) for AS-202. No original listings of this software are
010894,000007: ## available; instead, this file was created via disassembly of
010895,000008: ## the core rope modules actually flown on the mission.
010896,000009: ## Assembler: yaYUL
010897,000010: ## Contact: Ron Burkey <info@sandroid.org>.
010898,000011: ## Website: www.ibiblio.org/apollo/index.html
010899,000012: ## Mod history: 2023-05-27 MAS Created from Solarium 55.
010900,000013:
010901,000014:
010902,000015: # THE FOLLOWING SUBROUTINES ARE INTENDED TO FACILITATE INTER-BANK COMMUNICATION. ROUTINES ARE PROVIDED
010903,000016: # FOR JUMPING TO A LOCATION IN ANOTHER BANK, CALLING A SUBROUTINE IN ANOTHER BANK, AND OBTAINING DATA FROM ANOTHER
010904,000017: # BANK. IN ADDITION, A ROUTINE IS PROVIDED FOR MAKING UP A RETURN_ADDRESS CADR FOR USE BY THE CALLED SUBROUTINE.
010905,000018:
010906,000019: 5654 BANK 2
010907,000020: 5654 50062 BANKCALL TS ADDRWD # SUBROUTINE CALL WITH TRANSMISSION BOTH
010908,000021: 5655 30001 XCH Q # WAYS IN A. THE CADR OF THE CALLED
010909,000022: 5656 64516 AD ONE # ROUTINE SHOULD IMMEDIATELY FOLLOW THE
010910,000023: 5657 50001 TS Q # TC BANKCALL.
010911,000024: 5660 20000 INDEX A
010912,000025: 5661 27777 CAF 0 -1 # PICK UP CADR AND FALL INTO SWCALL.
010913,000026:
010914,000027: 5662 50071 SWCALL TS TEMQS # SWCALL IS ALOS USED TO CALL SUBROUTINES
010915,000028: 5663 30015 XCH BANKREG # IN OTHER BANKS, BUT THE CADR ARRIVES IN
010916,000029: 5664 50072 TS BANKTEM # A. DATA MAY BE TRANSMITTED BACK TO THE
010917,000030: 5665 30001 XCH Q # CALLING PROGRAM IN A, HOWEVER.
010918,000031: 5666 30071 XCH TEMQS # RETURN INFORMATION NOW COMPLETE.
010919,000032: 5667 50114 TS ESCAPE
010920,000033: 5670 72665 MASK 70K # PROVISION FOR CALLING A ROUTINE IN
010921,000034: 5671 10000 CCS A # FIXED-FIXED (OF QUESTIONABLE VALUE).
010922,000035: 5672 05674 TC +2 # SPECIAL TREATMENT REQUIRED IF NON-ZERO.
010923,000036: 5673 05676 TC +3 # INPUT CADR OK AS IS.
010924,000037:
010925,000038: 5674 40015 CS BANKREG # FORM PROPER 12 BIT ADDRESS.
010926,000039: 5675 64373 AD 6K
010927,000040: 5676 60114 +3 AD ESCAPE # PROPER CADRS COME HERE WITH C(A) = 0.
010928,000041: 5677 30062 XCH ADDRWD # SO A CAN TRANSMIT WITH BANKCALL.
010929,000042: 5700 20062 INDEX ADDRWD
010930,000043: 5701 00000 TC 0 # SETTING Q TO SWRETURN.
010931,000044:
010932,000045: 5702 30072 SWRETURN XCH BANKTEM # RETURN TO CALLER, TRANSMITTING THROUGH A
010933,000046: 5703 50015 TS BANKREG
010934,000047: 5704 30072 XCH BANKTEM # RESTORE A AS UPON ARRIVAL TO SWRETURN.
010935,000048: 5705 00071 TC TEMQS # RETURN.
010936,000049:
010937,000050:
010938,000051: 5706 35501 MAKECADR CAF ZERO # LEAVES RETURN-ADDRESS CADR (AS SET BY
010939,000052: 5707 60071 AD TEMQS # SWCALL OR BANKCALL) IN ADDRWD.
010940,000053: 5710 50062 TS ADDRWD
010941,000054: 5711 62165 AD 32K # SEE IF BANK INFORMATION NEEDED (USUAL).
010942,000055: 5712 50034 TS OVCTR
010943,000056: 5713 00001 TC Q # ADDRWD SET OK IF NO OVERFLOW (IN FF).
010944,000057:
010945,000058: 5714 30034 XCH OVCTR # CONTAINS LOW 10 BITS ONLY.
010946,000059: 5715 60072 AD BANKTEM
010947,000060: 5716 50062 TS ADDRWD # RETURN CADR NOW COMPLETE.
010948,000061: 5717 00001 TC Q
010949,000062:
010950,000063: 5720 2165 32K EQUALS PRIO32
010951,000064: 5720 30001 POSTJUMP XCH Q # ONE-WAY BANK TO BANK JUMP, WITH NO
010952,000065: 5721 20000 INDEX A # RETURN ADDRESS. THIS VERSION TRANSMITS
010953,000066: 5722 30000 CAF 0 # THROUGH A IF DESIRED.
010954,000067:
010955,000068: 5723 50015 BANKJUMP TS BANKREG # SAME AS ABOVE ONLY ADDRESS ARRIVES IN A.
010956,000069: 5724 74606 MASK LOW10 # BANKJUMP AND POSTJUMP MAY BE USED IN
010957,000070: 5725 30001 XCH Q # INTERRUPT OR UNDER EXEC, BUT BANKCALL
010958,000071: 5726 20001 INDEX Q # AND SWCALL MAY BE USED ONLY UNDER EXEC.
010959,000072: 5727 06000 TC 6000
010960,000073:
010961,000074:
010962,000075: 5730 50114 DATACALL TS ESCAPE # SUBROUTINE TO RETRIEVE DATA IN ANOTHER
010963,000076: 5731 30015 XCH BANKREG # BANK. THE CADR OF THE LOCATION OF INTER-
010964,000077: 5732 30114 XCH ESCAPE # EST ARRIVES IN A AND ITS CONTENTS ARE IN
010965,000078: 5733 74606 MASK LOW10 # A ON EXIT. THIS MAY BE USED ONLY UNDER
010966,000079: 5734 20000 INDEX A # EXECUTIVE.
010967,000080: 5735 36000 CAF 6000 # REQUESTED DATA NOW ACQUIRED.
010968,000081:
010969,000082: 5736 30114 XCH ESCAPE
010970,000083: 5737 50015 TS BANKREG
010971,000084: 5740 30114 XCH ESCAPE
010972,000085: 5741 00001 TC Q
010973,000086:
010974,000087:
010975,000088: # THE FOLLOWING ROUTINES ARE INTERRUPT ANALOGS OF BANKCALL AND SWCALL. BANK-TO-BANK ONLY.
010976,000089:
010977,000090: 5742 50637 IBNKCALL TS RUPTREG1
010978,000091: 5743 30001 XCH Q
010979,000092: 5744 64516 AD ONE
010980,000093: 5745 50001 TS Q
010981,000094: 5746 20000 INDEX A
010982,000095: 5747 27777 CAF 0 -1
010983,000096:
010984,000097: 5750 50641 ISWCALL TS RUPTREG3
010985,000098: 5751 30015 XCH BANKREG
010986,000099: 5752 50640 TS RUPTREG2
010987,000100: 5753 30001 XCH Q
010988,000101: 5754 30641 XCH RUPTREG3
010989,000102: 5755 74606 MASK LOW10
010990,000103: 5756 30637 XCH RUPTREG1
010991,000104: 5757 20637 INDEX RUPTREG1
010992,000105: 5760 06000 TC 6000
010993,000106:
010994,000107: 5761 30640 ISWRETRN XCH RUPTREG2
010995,000108: 5762 50015 TS BANKREG
010996,000109: 5763 30640 XCH RUPTREG2
010997,000110: 5764 00641 TC RUPTREG3
End of include-file INTER-BANK_COMMUNICATION.agc. Parent file is MAIN.agc