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. |
005086,000002: ## Copyright: Public domain.
005087,000003: ## Filename: PHASE_TABLE_MAINTENANCE.agc
005088,000004: ## Purpose: A section of Sundial E.
005089,000005: ## It is part of the reconstructed source code for the final
005090,000006: ## release of the Block II Command Module system test software. No
005091,000007: ## original listings of this program are available; instead, this
005092,000008: ## file was created via disassembly of dumps of Sundial core rope
005093,000009: ## modules and comparison with other AGC programs.
005094,000010: ## Assembler: yaYUL
005095,000011: ## Contact: Ron Burkey <info@sandroid.org>.
005096,000012: ## Website: www.ibiblio.org/apollo/index.html
005097,000013: ## Mod history: 2023-06-22 MAS Created from Aurora 12.
005098,000014: ## 2023-06-30 MAS Updated for Sundial E.
005099,000015:
005100,000016: # THE FOLLOWING ROUTINES ARE PROVIDED TO MAINTAIN THE PHASE TABLE. TWO ROUTINES ARE AVAILABLE:
005101,000017:
005102,000018: # TC PHASCHNG SLOWER BUT LESS STORAGE.
005103,000019: # OCT PPPGG CHANGE RESTART GROUP GG TO PHASE PPP
005104,000020: # (PPP IS A SIGNED 8 BIT NUMBER).
005105,000021:
005106,000022: # CA PPPPP NEW PHASE ARRIVES IN A.
005107,000023: # TC NEWPHASE
005108,000024: # OCT 000GG UPDATES GG.
005109,000025:
005110,000026: # IN ALL CASES THE OLD PHASE RETURNS IN A. IF THE OLD PHASE WAS NEGATIVE, CALL A ROUTINE USING THE
005111,000027: # CORRESPONDING TERMCADR.
005112,000028:
005113,000029: 4517 SETLOC ENDWAITF
005114,000030:
005115,000031: 4517 00004 PHASCHNG INHINT
005116,000032: 4520 50002 INDEX Q
005117,000033: 4521 30000 CAF 0 # GET PARAMETER WORD.
005118,000034: 4522 54077 TS RUPTREG4
005119,000035: 4523 75455 MASK LOW5 # GROUP NUMBER 0 - 37.
005120,000036: 4524 60000 DOUBLE
005121,000037: 4525 56077 XCH RUPTREG4
005122,000038: 4526 00006 EXTEND
005123,000039: 4527 77642 MP BIT9 # SIGNED NEW PHASE.
005124,000040: 4530 14537 TCF PHASCH2
005125,000041:
005126,000042: 4531 00004 NEWPHASE INHINT # NEW PHASE ARRIVES IN A.
005127,000043: 4532 54077 TS RUPTREG4
005128,000044: 4533 50002 INDEX Q
005129,000045: 4534 30000 CAF 0 # GROUP NUMBER.
005130,000046: 4535 60000 DOUBLE
005131,000047: 4536 56077 XCH RUPTREG4
005132,000048:
005133,000049: 4537 54001 PHASCH2 TS L # DIRECT VERSION.
005134,000050: 4540 40000 COM # COMPLEMENTED VERSION IMMEDIATELY PRE-
005135,000051: 4541 50077 INDEX RUPTREG4 # CEDES THE DIRECT ONE.
005136,000052: 4542 53073 DXCH -PHASE0 # COPIES DISAGREE FOR MINIMUM TIME.
005137,000053: 4543 00006 EXTEND
005138,000054: 4544 64560 BZMF PHASEXIT # IF NO DERAIL.
005139,000055:
005140,000056: 4545 54074 TS RUPTREG1 # IF NEGATIVE, SAVE ABSOLUTE VALUE OF
005141,000057: 4546 00006 EXTEND # OLD PHASE AND RETURN Q.
005142,000058: 4547 22075 QXCH RUPTREG2
005143,000059: 4550 30077 CA RUPTREG4 # GET BACK GROUP NUMBER.
005144,000060: 4551 00006 EXTEND
005145,000061: 4552 77635 MP HALF
005146,000062: 4553 50000 INDEX A # SELECT TERMCADR.
005147,000063: 4554 34564 CAF TERMCADR
005148,000064: 4555 04136 TC ISWCALL
005149,000065:
005150,000066: 4556 52075 DXCH RUPTREG1 # -OLD PHASE BITS TO A - RETURN -1 TO L.
005151,000067: 4557 22002 LXCH Q
005152,000068:
005153,000069: 4560 40000 PHASEXIT COM # RETURN OLD PHASE IN A.
005154,000070: 4561 00003 RELINT
005155,000071: 4562 50002 INDEX Q
005156,000072: 4563 00001 TC 1
005157,000073:
005158,000074: 4564 00000 TERMCADR CADR 10000 # FILLED IN AS NEEDED.
005159,000075: 4565 00000 CADR 10000
005160,000076: 4566 00000 CADR 10000
005161,000077: 4567 00000 CADR 10000
005162,000078: 4570 00000 CADR 10000
005163,000079: 4571 00000 CADR 10000
005164,000080:
005165,000081: # SUBROUTINE TO UPDATE THE PROGRAM NUMBER DISPLAY ON THE DSKY.
005166,000082:
005167,000083: 4572 50002 NEWMODEX INDEX Q # UPDATE MODREG.
005168,000084: 4573 30000 CAF 0
005169,000085: 4574 24002 INCR Q
005170,000086: 4575 56276 XCH MODREG
005171,000087: 4576 40000 COM # IF NO CHANGE IN MODE, RETURN IMMEDIATELY
005172,000088: 4577 60276 AD MODREG
005173,000089: 4600 00006 EXTEND
005174,000090: 4601 14615 BZF TCQ
005175,000091:
005176,000092: 4602 34604 CAF +2 # CALL PINBALL SUBROUTINE.
005177,000093: 4603 14070 TCF SWCALL # WITH Q SET TO CALLERS RETURN.
005178,000094:
005179,000095: 4604 12001 CADR DSPMM
005180,000096:
005181,000097: # RETURN TO CALLER +3 IF MODE = THAT AT CALLER +1. OTHERWISE RETURN TO CALLER +2.
005182,000098:
005183,000099: 4605 50002 CHECKMM INDEX Q
005184,000100: 4606 40000 CS 0
005185,000101: 4607 60276 AD MODREG
005186,000102: 4610 00006 EXTEND
005187,000103: 4611 14614 BZF +3
005188,000104:
005189,000105: 4612 50002 INDEX Q
005190,000106: 4613 00001 TC 1 # NO MATCH.
005191,000107:
005192,000108: 4614 50002 INDEX Q
005193,000109: 4615 00002 TCQ TC 2 # (ALWAYS AVAILABLE TO BZF & BZMF)
005194,000110:
005195,000111: 4616 ENDPHMNF EQUALS
End of include-file PHASE_TABLE_MAINTENANCE.agc. Parent file is MAIN.agc