Source Code

003493,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 003494,000002: # 003495,000003: # This file is part of yaAGC. 003496,000004: 003497,000005: # yaAGC is free software; you can redistribute it and/or modify 003498,000006: # it under the terms of the GNU General Public License as published by 003499,000007: # the Free Software Foundation; either version 2 of the License, or 003500,000008: # (at your option) any later version. 003501,000009: 003502,000010: # yaAGC is distributed in the hope that it will be useful, 003503,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 003504,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 003505,000013: # GNU General Public License for more details. 003506,000014: 003507,000015: # You should have received a copy of the GNU General Public License 003508,000016: # along with yaAGC; if not, write to the Free Software 003509,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 003510,000018: 003511,000019: # Filename: SmallyRESTORE1.agc 003512,000020: # Purpose: This is code written from the flowchart on p. 35 of 003513,000021: # E-2065, which is a document titled "Block II AGC 003514,000022: # Self-Check and Show-Banksum", by Edwin D. Smally. 003515,000023: # Mod history: 07/07/04 RSB. Began. 003516,000024: # 08/08/04 RSB. Finished. 003517,000025: 003518,000026: # Similar code was apparently originally in Luminary and/or Colossus, 003519,000027: # but much of it was removed over the course of time to make more room. 003520,000028: # I don't know what the original code was like, but the flowcharts still 003521,000029: # exist, so I've rewritten the code from the flowcharts. 003522,000030: 003523,000031: # P. 35 of Smally 003524,000032: 003525,000033: # Realize that to put 177 into SR with TS, we must actually 003526,000034: # use 377 since the value will be shifted. (I'm unable to 003527,000035: # find a way to insert a value into an editing register 003528,000036: # without performing editing.) 003529,000037: 04,2122 37607 CA O377 003530,000038: 04,2123 54021 TS SR 003531,000039: 003532,000040: 04,2124 24062 INCR ERRSUB # 15 003533,000041: # Smally's flowchart is a bit confusing about what happens 003534,000042: # at this step. But it looks as though we execute a 003535,000043: # bunch of instructions (like CCS) that re-edit the 003536,000044: # registers, without bothering to use the results, and 003537,000045: # finally fetch the value with MASK, which does not. 003538,000046: 04,2125 10021 CCS SR 003539,000047: 04,2126 12127 NOOP 003540,000048: 04,2127 12130 NOOP 003541,000049: 04,2130 12131 NOOP 003542,000050: 04,2131 12132 NOOP 003543,000051: 04,2132 40021 CS SR 003544,000052: 04,2133 60021 AD SR 003545,000053: 04,2134 00006 EXTEND 003546,000054: 04,2135 20021 MSU SR 003547,000055: 04,2136 00006 EXTEND 003548,000056: 04,2137 60021 SU SR 003549,000057: 04,2140 30021 CA SR 003550,000058: 04,2141 70021 MASK SR 003551,000059: 04,2142 67631 AD NEGONE 003552,000060: 04,2143 00006 EXTEND 003553,000061: 04,2144 12146 BZF +2 003554,000062: 04,2145 12161 TCF R1ERROR 003555,000063: 003556,000064: 04,2146 24062 INCR ERRSUB # 16 003557,000065: 04,2147 00006 EXTEND 003558,000066: 04,2150 70021 MP SR 003559,000067: 04,2151 00006 EXTEND 003560,000068: 04,2152 10021 DV SR 003561,000069: 04,2153 30021 CA SR 003562,000070: 04,2154 67631 AD NEGONE 003563,000071: 04,2155 00006 EXTEND 003564,000072: 04,2156 12160 BZF +2 003565,000073: 04,2157 12161 TCF R1ERROR 003566,000074: 003567,000075: 04,2160 12162 TCF +2 003568,000076: 04,2161 07437 R1ERROR TC ERRORDSP 003569,000077: End of include-file SmallyRESTORE1.agc. Parent file is ValidateSmally.agc