[net.micro] HCF instruction

jwp (11/16/82)

I think the "HCF" (Halt and Catch Fire) instruction people are refering to
is an abberation of the 6800, not the 6502.  There was an article in Byte
a few years ago that presented an Opcode chart for the 6800, and in
developing the chart, the author stumbled across the HCF instruction.  The
instruction, when executed, caused the processor to endlessly loop and cycle
the address buss, and the machine had to have a "hard reset" to regain 
control.  (The theory was that Motorola used this for testing the chip).
jp
PS- any 6800 hackers out there have the Byte article handy?

cdh@Bbn-Unix@sri-unix (11/19/82)

From: Carl Howe <cdh@Bbn-Unix>
HCF reminds me of an instruction that used to exist in IBM 360/370 series computers.
It was called DIAGNOSE (op code 83 hex) and caused a jump into the microcode
at an address computed by dispatching off the argument.  It was well known that
one particular argument (when executed from supervisor mode) would cause a jump
to the power down routine.  It was a favorite trick of computer hackers to
slip a program containing the power down DIAGNOSE instruction (and a routine to
bypass the DOS protection mechanisms and get into supervisor mode) into the job
stream and walk away.  Minutes later, when the machine got around to executing
the job, CLUNK, the machine would power itself off.

Ah, history . . . .

Carl

minow (11/20/82)

Halt and Catch Fire has an ancient and honorable history.  One of
the logic circuits on the IBM 650 was incorrectly fused and some clown
wrote a short program that looped through one instruction.  After about
40 seconds or so, a fuse blew, effectively halting the machine.

According to rumor, the program was distributed through the 650 library
(SHARE? GUIDE?).

Martin MInow
decvax!minow

GALLAHER@Rutgers@sri-unix (11/20/82)

There was an article in BYTE a few years back about undocumented 6800
instructions, one of which was also dubbed HCF (Halt and Catch Fire).
This instruction caused the processor to stop fetching instructions,
ignore all external signals (including RESET, I think),and start
reading the entire address space one byte at a time.  It apparently
took no notice of what it was reading.  Presumably this was for some
test procedure (or maybe the instruction just sent the microcode off
into the woods).
-------

leichter (11/21/82)

RE:  Using DIAGNOSE to power down a 360:  The really nasty thing to do is to
slip the "power down" sequence into the startup code...

Speaking of HCF instructions:  The following story made the rounds years ago;
I don't know if it's true.  The 360/91 was a super-fast piplined machine with
a look-ahead/look-behind instruction cache and pipelined individual instruc-
tion units.  Theory was, you could build a tight loop consisting of n register-
to-register floating divide instructions and a branch.  n was the maximum number
such that the whole thing fit in the cache.  Once the loop got started (ignoring
interrupts, which would kill this on a busy machine) you would be issuing a
floating divide essentially every cycle.  The floating divide box would thus
be continuously busy.  It was claimed that the box was designed based on some
duty-cycle assumptions - this loop would burn circuitry pretty quickly.

Nice story, whether true or not.
							-- Jerry
						decvax!yale-comix!leichter
							leichter@yale

wagner (11/21/82)

Re: Powering down 370s via the Diagnose instruction
The diagnose instruction is hardware-specific; it does 
different things on each model of the processor.
The things I remember being able to do on a 165 (I already
worked for the computer centre at that time, so I did it
during test time rather than crashing the system) were
turning on all the test and error lights in various patterns
without the error conditions actually being true.  There also
was a (very undocumented) diagnose for loading the micro-store
from main memory.  We were never very successful at getting
anything to work afterwards, though.  Too bad.  Speculation
was that IBM wanted to be able to customise 165s for various
customers in an easy way, and that was why the instruction
was there.  Turned into an embarrasing integrity exposure,
so they never documented the handy sounding feature, and never
used it for anything.

Michael Wagner, UTCS