Source Code

005297,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 005298,000002: # 005299,000003: # This file is part of yaAGC. 005300,000004: 005301,000005: # yaAGC is free software; you can redistribute it and/or modify 005302,000006: # it under the terms of the GNU General Public License as published by 005303,000007: # the Free Software Foundation; either version 2 of the License, or 005304,000008: # (at your option) any later version. 005305,000009: 005306,000010: # yaAGC is distributed in the hope that it will be useful, 005307,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 005308,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 005309,000013: # GNU General Public License for more details. 005310,000014: 005311,000015: # You should have received a copy of the GNU General Public License 005312,000016: # along with yaAGC; if not, write to the Free Software 005313,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 005314,000018: 005315,000019: # Filename: Errordsp.agc 005316,000020: # Purpose: This is an error-display function for the validation 005317,000021: # suite. 005318,000022: # Mod history: 07/04/04 RSB. Began. 005319,000023: # 07/10/04 RSB. Added display of the error sub-code. 005320,000024: # 07/17/04 RSB. PRO key signal level inverted. 005321,000025: 005322,000026: # ------------------------------------------------------------------------- 005323,000027: # Display the error code. What this does is to clear the entire display, 005324,000028: # except for MODE (which contains the error code), and then lights the 005325,000029: # OPR ERR lamp and waits for the ENTR key to be hit. Then it unlights 005326,000030: # OPR ERR and continues. 005327,000031: 005328,000032: 7240 ERRORDSP 005329,000033: # Save return address in TEMPK 005330,000034: 7240 00006 EXTEND 005331,000035: 7241 22065 QXCH TEMPK 005332,000036: 005333,000037: # Blank out all DSKY fields except MODE. This means 005334,000038: # writing out 50000, 44000, ..., 04000. 005335,000039: 7242 37411 CA O50000 005336,000040: 7243 54001 TS L # L is the value we want to write to ch 10. 005337,000041: 7244 37435 CA TEN # A is the loop counter. 005338,000042: 7245 56001 ERRORLOO XCH L 005339,000043: 7246 07320 TC IODELAY 005340,000044: 7247 00006 EXTEND 005341,000045: 7250 01010 WRITE CH10 005342,000046: 7251 67416 AD O-4000 005343,000047: 7252 56001 XCH L 005344,000048: 7253 10000 CCS A 005345,000049: 7254 17245 TCF ERRORLOO 005346,000050: 005347,000051: # Output ERRNUM in MODE. 005348,000052: 7255 37410 CA O54000 005349,000053: 7256 54063 TS TEMPI 005350,000054: 7257 30061 CA ERRNUM 005351,000055: 7260 54064 TS TEMPJ 005352,000056: 7261 07320 TC IODELAY 005353,000057: 7262 07327 TC DIGPAIR 005354,000058: 005355,000059: # Output ERRSUB in NOUN. 005356,000060: 7263 37412 CA O44000 005357,000061: 7264 54063 TS TEMPI 005358,000062: 7265 30062 CA ERRSUB 005359,000063: 7266 54064 TS TEMPJ 005360,000064: 7267 07320 TC IODELAY 005361,000065: 7270 07327 TC DIGPAIR 005362,000066: 005363,000067: # Turn on the OPR ERR lamp. 005364,000068: 7271 37441 CA BIT7 005365,000069: 7272 07320 TC IODELAY 005366,000070: 7273 00006 EXTEND 005367,000071: 7274 01011 WRITE CH11 005368,000072: 005369,000073: # Wait for PRO key to be pressed. Please recall that 005370,000074: # the PRO key is a low-polarity signal: 0 when pressed, 005371,000075: # 1 when released. 005372,000076: 7275 00006 PRONWAIT EXTEND 005373,000077: 7276 00032 READ CH32 005374,000078: 7277 77442 MASK BIT14 005375,000079: 7300 10000 CCS A 005376,000080: 7301 17275 TCF PRONWAIT 005377,000081: 7302 PROPRESS 005378,000082: 005379,000083: # Turn off the OPR ERR lamp. 005380,000084: 7302 30007 CA ZEROES 005381,000085: 7303 07320 TC IODELAY 005382,000086: 7304 00006 EXTEND 005383,000087: 7305 01011 WRITE CH11 005384,000088: 005385,000089: # Wait for PRO key to be released. 005386,000090: 7306 00006 PROFWAIT EXTEND 005387,000091: 7307 00032 READ CH32 005388,000092: 7310 77442 MASK BIT14 005389,000093: 7311 10000 CCS A 005390,000094: 7312 17314 TCF +2 005391,000095: 7313 17306 TCF PROFWAIT 005392,000096: 005393,000097: # Restore the return address. (Could actually just 005394,000098: # "TC TEMPK" here.) 005395,000099: 7314 00006 EXTEND 005396,000100: 7315 22065 QXCH TEMPK 005397,000101: 7316 00002 RETURN 005398,000102: 005399,000103: # ------------------------------------------------------------------------- 005400,000104: # Delay a little while. This is a workaround for some characteristics 005401,000105: # (as of 07/17/04, anyhow) of Webb's AGC-DSKY interaction. No registers 005402,000106: # are affected, except that any overflow in the accumulator will be lost. 005403,000107: 005404,000108: 7317 00764 IODELAYT DEC 500 B-14 005405,000109: 005406,000110: 7320 54064 IODELAY TS TEMPJ # Save accumulator. 005407,000111: 7321 17322 NOOP 005408,000112: 7322 37317 CA IODELAYT 005409,000113: 7323 10000 CCS A 005410,000114: 7324 17323 TCF -1 005411,000115: 7325 30064 CA TEMPJ # Restore accumulator. 005412,000116: 7326 00002 RETURN 005413,000117: 005414,000118: # ------------------------------------------------------------------------- 005415,000119: # Display a two-digit octal code. On entry, TEMPI should contain a 005416,000120: # code corresponding to the digit pair, as follows: 005417,000121: # 54000 MODE 005418,000122: # 50000 VERB 005419,000123: # 44000 NOUN 005420,000124: # 40000 Not used/1st digit of R1 005421,000125: # 34000 2nd/3rd digit of R1 005422,000126: # 30000 4th/5th digit of R1 005423,000127: # 24000 1st/2nd digit of R2 005424,000128: # 20000 3rd/4th digit of R2 005425,000129: # 14000 5th digit of R2/1st digit of R3 005426,000130: # 10000 2nd/3rd digit of R3 005427,000131: # 04000 4th/5th digit of R3 005428,000132: # On entry also, TEMPJ contains the number we want displayed. 005429,000133: 005430,000134: 7327 DIGPAIR # Shift the error code down by 3 places, so as to get 005431,000135: # the first octal digit. 005432,000136: 7327 30064 CA TEMPJ 005433,000137: 7330 54020 TS CYR 005434,000138: 7331 30020 CA CYR 005435,000139: 7332 30020 CA CYR 005436,000140: 7333 30020 CA CYR 005437,000141: 7334 77436 MASK SEVEN 005438,000142: # Convert to a pattern for output. 005439,000143: 7335 50000 INDEX A 005440,000144: 7336 37367 CA DSP0 005441,000145: 7337 54022 TS CYL 005442,000146: 7340 30022 CA CYL 005443,000147: 7341 30022 CA CYL 005444,000148: 7342 30022 CA CYL 005445,000149: 7343 30022 CA CYL 005446,000150: 7344 30022 CA CYL 005447,000151: 7345 60063 AD TEMPI 005448,000152: 7346 54063 TS TEMPI 005449,000153: # Now do the same for the second octal digit, except that 005450,000154: # all the shifting isn't neeeded. 005451,000155: 7347 30064 CA TEMPJ 005452,000156: 7350 77436 MASK SEVEN 005453,000157: 7351 50000 INDEX A 005454,000158: 7352 37367 CA DSP0 005455,000159: 7353 60063 AD TEMPI 005456,000160: 7354 54063 TS TEMPI 005457,000161: # Output it! 005458,000162: 7355 00006 EXTEND 005459,000163: 7356 01010 WRITE CH10 005460,000164: 005461,000165: 7357 00002 RETURN 005462,000166: End of include-file Errordsp.agc. Parent file is Validation.agc