Source Code
These source-code files are part of a reconstructed copy of Sundial E, the
final release of the Block II 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 2003053-121, 2003053-151, and 2003972-211, belonging to the MIT Museum. Since only binary dumps (rather than listings) of Sundial 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. |
001152,000002: ## Copyright: Public domain.
001153,000003: ## Filename: INTER-BANK_COMMUNICATION.agc
001154,000004: ## Purpose: A section of Sundial E.
001155,000005: ## It is part of the reconstructed source code for the final
001156,000006: ## release of the Block II Command Module system test software. No
001157,000007: ## original listings of this program are available; instead, this
001158,000008: ## file was created via disassembly of dumps of Sundial core rope
001159,000009: ## modules and comparison with other AGC programs.
001160,000010: ## Assembler: yaYUL
001161,000011: ## Contact: Ron Burkey <info@sandroid.org>.
001162,000012: ## Website: www.ibiblio.org/apollo/index.html
001163,000013: ## Mod history: 2023-06-22 MAS Created from Aurora 12.
001164,000014: ## 2023-06-30 MAS Updated for Sundial E.
001165,000015:
001166,000016: # THE FOLLOWING ROUTINE CAN BE USED TO CALL A SUBROUTINE IN ANOTHER BANK. IN THE BANKCALL VERSION, THE
001167,000017: # CADR OF THE SUBROUTINE IMMEDIATELY FOLLOWS THE TC BANKCALL INSTRUCTION, WITH C(A) AND C(L) PRESERVED.
001168,000018:
001169,000019: 4064 SETLOC ENDINTFF
001170,000020: 4064 52120 BANKCALL DXCH BUF2 # SAVE INCOMING A,L.
001171,000021: 4065 50002 INDEX Q # PICK UP CADR.
001172,000022: 4066 30000 CA 0
001173,000023: 4067 24002 INCR Q # SO WE RETURN TO THE LOC. AFTER THE CADR.
001174,000024:
001175,000025: # SWCALL IS IDENTICAL TO BANKCALL, EXCEPT THAT THE CADR ARRIVES IN A.
001176,000026:
001177,000027: 4070 54001 SWCALL TS L
001178,000028: 4071 22004 LXCH FBANK # SWITCH BANKS, SAVING RETURN.
001179,000029: 4072 76426 MASK LOW10 # GET SUB-ADDRESS OF CADR.
001180,000030: 4073 56002 XCH Q # A,L NOW CONTAINS DP RETURN.
001181,000031: 4074 52120 DXCH BUF2 # RESTORING INPUTS IF THIS IS A BANKCALL.
001182,000032: 4075 50002 INDEX Q
001183,000033: 4076 02000 TC 10000 # SETTING Q TO SWRETURN.
001184,000034:
001185,000035: 4077 56120 SWRETURN XCH BUF2 +1 # COMES HERE TO RETURN TO CALLER. C(A,L)
001186,000036: 4100 56004 XCH FBANK # ARE PRESERVED FOR RETURN.
001187,000037: 4101 56120 XCH BUF2 +1
001188,000038: 4102 00117 TC BUF2
001189,000039:
001190,000040: # THE FOLLOWING ROUTINE CAN BE USED AS A UNILATERAL JUMP WITH C(A,L) PRESERVED AND THE CADR IMMEDIATELY
001191,000041: # FOLLOWING THE TC POSTJUMP INSTRUCTION.
001192,000042:
001193,000043: 4103 56002 POSTJUMP XCH Q # SAVE INCOMING C(A).
001194,000044: 4104 50000 INDEX A # GET CADR.
001195,000045: 4105 30000 CA 0
001196,000046:
001197,000047: # BANKJUMP IS THE SAME AS POSTJUMP, EXCEPT THAT THE CADR ARRIVES IN A.
001198,000048:
001199,000049: 4106 54004 BANKJUMP TS FBANK
001200,000050: 4107 76426 MASK LOW10
001201,000051: 4110 56002 XCH Q # RESTORING INPUT C(A) IF THIS WAS A
001202,000052: 4111 50002 INDEX Q # POSTJUMP.
001203,000053: 4112 12000 TCF 10000
001204,000054:
001205,000055: # THE FOLLOWING ROUTINE GETS THE RETURN CADR SAVED BY SWCALL OR BANKCALL AND LEAVES IT IN A.
001206,000056:
001207,000057: 4113 36426 MAKECADR CAF LOW10
001208,000058: 4114 70117 MASK BUF2
001209,000059: 4115 60120 AD BUF2 +1
001210,000060: 4116 00002 TC Q
001211,000061:
001212,000062: # THE FOLLOWING ROUTINE OBTAINS THE TWO WORDS BEGINNING AT THE ADDRESS ARRIVING IN A, AND LEAVES THEM IN
001213,000063: # A,L.
001214,000064:
001215,000065: 4117 54001 DATACALL TS L
001216,000066: 4120 22004 LXCH FBANK
001217,000067: 4121 22121 LXCH MPTEMP # SAVE FORMER BANK.
001218,000068: 4122 76426 MASK LOW10
001219,000069: 4123 00006 EXTEND
001220,000070: 4124 50000 INDEX A
001221,000071: 4125 32001 DCA 10000
001222,000072:
001223,000073: 4126 56121 XCH MPTEMP
001224,000074: 4127 54004 TS FBANK # RESTORE FBANK.
001225,000075: 4130 30121 CA MPTEMP
001226,000076: 4131 00002 TC Q
001227,000077:
001228,000078: # THE FOLLOWING ROUTINES ARE IDENTICAL TO BANKCALL AND SWCALL EXCEPT THAT THEY ARE USED IN INTERRUPT.
001229,000079:
001230,000080: 4132 52077 IBNKCALL DXCH RUPTREG3 # USES RUPTREG3,4 FOR DP RETURN ADDRESS.
001231,000081: 4133 50002 INDEX Q
001232,000082: 4134 30000 CAF 0
001233,000083: 4135 24002 INCR Q
001234,000084:
001235,000085: 4136 54001 ISWCALL TS L
001236,000086: 4137 22004 LXCH FBANK
001237,000087: 4140 76426 MASK LOW10
001238,000088: 4141 56002 XCH Q
001239,000089: 4142 52077 DXCH RUPTREG3
001240,000090: 4143 50002 INDEX Q
001241,000091: 4144 02000 TC 10000
001242,000092:
001243,000093: 4145 56077 ISWRETRN XCH RUPTREG4
001244,000094: 4146 56004 XCH FBANK
001245,000095: 4147 56077 XCH RUPTREG4
001246,000096: 4150 00076 TC RUPTREG3
001247,000097:
001248,000098: 4151 ENDIBNKF EQUALS
End of include-file INTER-BANK_COMMUNICATION.agc. Parent file is MAIN.agc