Source Code

005507,000001: # Copyright 2004 Ronald S. Burkey <info@sandroid.org> 005508,000002: # 005509,000003: # This file is part of yaAGC. 005510,000004: 005511,000005: # yaAGC is free software; you can redistribute it and/or modify 005512,000006: # it under the terms of the GNU General Public License as published by 005513,000007: # the Free Software Foundation; either version 2 of the License, or 005514,000008: # (at your option) any later version. 005515,000009: 005516,000010: # yaAGC is distributed in the hope that it will be useful, 005517,000011: # but WITHOUT ANY WARRANTY; without even the implied warranty of 005518,000012: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 005519,000013: # GNU General Public License for more details. 005520,000014: 005521,000015: # You should have received a copy of the GNU General Public License 005522,000016: # along with yaAGC; if not, write to the Free Software 005523,000017: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 005524,000018: 005525,000019: # Filename: Errordsp.agc 005526,000020: # Purpose: This is an error-display function for the validation 005527,000021: # suite. 005528,000022: # Mod history: 07/04/04 RSB. Began. 005529,000023: # 07/10/04 RSB. Added display of the error sub-code. 005530,000024: # 07/17/04 RSB. PRO key signal level inverted. 005531,000025: # 11/12/16 MAS. Added NEWJOB poking. 005532,000026: # 11/12/16 MAS. Clear the RESTART light upon PRO. 005533,000027: 005534,000028: # ------------------------------------------------------------------------- 005535,000029: # Display the error code. What this does is to clear the entire display, 005536,000030: # except for MODE (which contains the error code), and then lights the 005537,000031: # OPR ERR lamp and waits for the ENTR key to be hit. Then it unlights 005538,000032: # OPR ERR and continues. 005539,000033: 005540,000034: 7437 ERRORDSP 005541,000035: # Save return address in TEMPK 005542,000036: 7437 00006 EXTEND 005543,000037: 7440 22065 QXCH TEMPK 005544,000038: 005545,000039: # Blank out all DSKY fields except MODE. This means 005546,000040: # writing out 50000, 44000, ..., 04000. 005547,000041: 7441 37616 CA O50000 005548,000042: 7442 54001 TS L # L is the value we want to write to ch 10. 005549,000043: 7443 37642 CA TEN # A is the loop counter. 005550,000044: 7444 56001 ERRORLOO XCH L 005551,000045: 7445 07524 TC IODELAY 005552,000046: 7446 00006 EXTEND 005553,000047: 7447 01010 WRITE CH10 005554,000048: 7450 67623 AD O-4000 005555,000049: 7451 56001 XCH L 005556,000050: 7452 10000 CCS A 005557,000051: 7453 17444 TCF ERRORLOO 005558,000052: 005559,000053: # Output ERRNUM in MODE. 005560,000054: 7454 37615 CA O54000 005561,000055: 7455 54063 TS TEMPI 005562,000056: 7456 30061 CA ERRNUM 005563,000057: 7457 54064 TS TEMPJ 005564,000058: 7460 07524 TC IODELAY 005565,000059: 7461 07534 TC DIGPAIR 005566,000060: 005567,000061: # Output ERRSUB in NOUN. 005568,000062: 7462 37617 CA O44000 005569,000063: 7463 54063 TS TEMPI 005570,000064: 7464 30062 CA ERRSUB 005571,000065: 7465 54064 TS TEMPJ 005572,000066: 7466 07524 TC IODELAY 005573,000067: 7467 07534 TC DIGPAIR 005574,000068: 005575,000069: # Turn on the OPR ERR lamp. 005576,000070: 7470 37646 CA BIT7 005577,000071: 7471 07524 TC IODELAY 005578,000072: 7472 00006 EXTEND 005579,000073: 7473 01011 WRITE CH11 005580,000074: 005581,000075: # Wait for PRO key to be pressed. Please recall that 005582,000076: # the PRO key is a low-polarity signal: 0 when pressed, 005583,000077: # 1 when released. 005584,000078: 7474 40067 PRONWAIT CS NEWJOB 005585,000079: 7475 00006 EXTEND 005586,000080: 7476 00032 READ CH32 005587,000081: 7477 77650 MASK BIT14 005588,000082: 7500 10000 CCS A 005589,000083: 7501 17474 TCF PRONWAIT 005590,000084: 7502 PROPRESS 005591,000085: 005592,000086: # Turn off the OPR ERR lamp. 005593,000087: 7502 30007 CA ZEROES 005594,000088: 7503 07524 TC IODELAY 005595,000089: 7504 00006 EXTEND 005596,000090: 7505 01011 WRITE CH11 005597,000091: 005598,000092: # Wait for PRO key to be released. 005599,000093: 7506 40067 PROFWAIT CS NEWJOB 005600,000094: 7507 00006 EXTEND 005601,000095: 7510 00032 READ CH32 005602,000096: 7511 77650 MASK BIT14 005603,000097: 7512 10000 CCS A 005604,000098: 7513 17515 TCF +2 005605,000099: 7514 17506 TCF PROFWAIT 005606,000100: 005607,000101: # Turn off the RESTART lamp. 005608,000102: 7515 37647 CA BIT10 005609,000103: 7516 00006 EXTEND 005610,000104: 7517 05011 WOR CH11 005611,000105: 005612,000106: # Restore the return address. (Could actually just 005613,000107: # "TC TEMPK" here.) 005614,000108: 7520 00006 EXTEND 005615,000109: 7521 22065 QXCH TEMPK 005616,000110: 7522 00002 RETURN 005617,000111: 005618,000112: # ------------------------------------------------------------------------- 005619,000113: # Delay a little while. This is a workaround for some characteristics 005620,000114: # (as of 07/17/04, anyhow) of Webb's AGC-DSKY interaction. No registers 005621,000115: # are affected, except that any overflow in the accumulator will be lost. 005622,000116: 005623,000117: 7523 00764 IODELAYT DEC 500 B-14 005624,000118: 005625,000119: 7524 54064 IODELAY TS TEMPJ # Save accumulator. 005626,000120: 7525 17526 NOOP 005627,000121: 7526 37523 CA IODELAYT 005628,000122: 7527 54067 TS NEWJOB 005629,000123: 7530 10000 CCS A 005630,000124: 7531 17527 TCF -2 005631,000125: 7532 30064 CA TEMPJ # Restore accumulator. 005632,000126: 7533 00002 RETURN 005633,000127: 005634,000128: # ------------------------------------------------------------------------- 005635,000129: # Display a two-digit octal code. On entry, TEMPI should contain a 005636,000130: # code corresponding to the digit pair, as follows: 005637,000131: # 54000 MODE 005638,000132: # 50000 VERB 005639,000133: # 44000 NOUN 005640,000134: # 40000 Not used/1st digit of R1 005641,000135: # 34000 2nd/3rd digit of R1 005642,000136: # 30000 4th/5th digit of R1 005643,000137: # 24000 1st/2nd digit of R2 005644,000138: # 20000 3rd/4th digit of R2 005645,000139: # 14000 5th digit of R2/1st digit of R3 005646,000140: # 10000 2nd/3rd digit of R3 005647,000141: # 04000 4th/5th digit of R3 005648,000142: # On entry also, TEMPJ contains the number we want displayed. 005649,000143: 005650,000144: 7534 DIGPAIR # Shift the error code down by 3 places, so as to get 005651,000145: # the first octal digit. 005652,000146: 7534 30064 CA TEMPJ 005653,000147: 7535 54020 TS CYR 005654,000148: 7536 30020 CA CYR 005655,000149: 7537 30020 CA CYR 005656,000150: 7540 30020 CA CYR 005657,000151: 7541 77643 MASK SEVEN 005658,000152: # Convert to a pattern for output. 005659,000153: 7542 50000 INDEX A 005660,000154: 7543 37574 CA DSP0 005661,000155: 7544 54022 TS CYL 005662,000156: 7545 30022 CA CYL 005663,000157: 7546 30022 CA CYL 005664,000158: 7547 30022 CA CYL 005665,000159: 7550 30022 CA CYL 005666,000160: 7551 30022 CA CYL 005667,000161: 7552 60063 AD TEMPI 005668,000162: 7553 54063 TS TEMPI 005669,000163: # Now do the same for the second octal digit, except that 005670,000164: # all the shifting isn't needed. 005671,000165: 7554 30064 CA TEMPJ 005672,000166: 7555 77643 MASK SEVEN 005673,000167: 7556 50000 INDEX A 005674,000168: 7557 37574 CA DSP0 005675,000169: 7560 60063 AD TEMPI 005676,000170: 7561 54063 TS TEMPI 005677,000171: # Output it! 005678,000172: 7562 00006 EXTEND 005679,000173: 7563 01010 WRITE CH10 005680,000174: 005681,000175: 7564 00002 RETURN 005682,000176: End of include-file Errordsp.agc. Parent file is Validation.agc