DoPECC
back to Repair Info

Diagnostic Microcode

Fully microcode driven machines such as the Wang 700s present a troubleshooting problem because many (perhaps most) hardware faults have the same symptom - no display and no keyboard response. The underlying problem could be fundamental such as no system clock or more subtle such as failure of conditional branching only if bit 2 of the S register is interrogated.

Custom-written diagnostic mcirocode offers the opportunity to test and diagnose a machine in a sectional manner. Initial tests focus on a small part of the hardware and later tests build on to test more of the machine. A set of diagnostics have been written that build up from a minimal machine test to a full keyboard, ALU and memory test. These can be stored in some of the 16 image spaces available in the ROM emulator, to be available whenever wanted.

The video shows the mcirocode tests in action, the individual tests are described below.

Credit to Douglas Miller for his help and support in developing these diagnostics and for his help and support more generally in repair of Wang 600s and 700s.

Wang 720C Running Diagnostic Microcode

Detailed instructions for running and interpreting the diagnostics are in the Wang 700 Fault Finding document that is in the Data section. A brief description of each test is provided below.

SHOWDIGITS - Basic Function and Display

This uses a minimal and limited set of instructions to form a loop which accesses the top 16 RAM locations, this being the means by which the display is driven. By using the same instruction to access RAM that is used to increment the refresh counters we can increment the display. Thus we have a very simple test of basic ALU functions and RAM operation. Two versions of this simple code differ only by setting fixed or floating display. The 700s use a rather elaborate display decoder and it’s useful to demonstrate both modes of this hardware.

The second part of this test uses similar display code but transfers execution to higher order parts of the ROM address space. Successful completion of the full sequence provides some reassurance that all ROM address lines are functioning.

KBD-DISP - Keyboard and Button Test

This catches keypresses and displays the hardware keycode for each press. It also monitors and displays the status of all buttons, counts presses of the STEP key and reports which ROM restart key was used to launch the test. Thus, it tests all user input keys and buttons.

KBD-ALU - Test all ALU Operations

This tests the ALU by setting up an ALU operation code and a BC modifier. The KA and KB parts of subsequent keypresses are processed by the specified ALU operation using both binary and BCD logic. The results from each are displayed, together with their associated Zero, Carry and Saved_carry flags. The entire ALU instruction set can be exercised with results and flags displayed for checking.

RAMTEST - Test RAM

This tests the full range of installed RAM by filling with a computed value and then reading back to compare the stored value with the re-computed value. During the fill phase a test is made to ensure that each location can be cleared, with an error halt if not. In the test phase the RAM is compared with the data that is expected and an error halt if there is a mismatch.

If these test all pass then one can be fairly confident that the logic engine is OK. If none of these tests succeed then there are further diagnostic microcodes that can be used with test equipment to find the specific fault(s).