Path: utzoo!utgpu!attcan!uunet!husc6!cmcl2!rutgers!ucsd!ucbvax!hplabs!pyramid!athertn!ericb From: ericb@athertn.Atherton.COM (Eric Black) Newsgroups: comp.arch Subject: Re: amusing opcodes Message-ID: <217@mango.athertn.Atherton.COM> Date: 15 Aug 88 16:12:12 GMT References: <5458@ecsvax.uncecs.edu> <1876@looking.UUCP> <753@applix.UUCP> <3884@sequent.UUCP> <719@mcrware.UUCP> <5440@june.cs.washington.edu> <1988Aug7.013526.7798@utzoo.uucp> Reply-To: ericb@mango.UUCP (Eric Black) Organization: Atherton Technology, Sunnyvale, CA Lines: 40 In article <1988Aug7.013526.7798@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >As is now moderately well-known, some of the Motorola 8-bit chips actually >have such an instruction, sort of: there is a test opcode which makes the >CPU just sit there endlessly incrementing its address lines. Nothing short >of powerdown will shake it out of this. Some third-party opcode charts >show this as HCF. The Motorola spec sheet that I remember doesn't give it >a name, but does have a footnote warning you about it. Actually, it's better called WTD -- "Walk The Dog". On the 6800 it caused the chip to do nothing but read cycles, incrementing the address by one each time. Quite useful for bootstrapping the testing a new system; just force the opcode onto the data bus at chip reset time (never mind that the first two fetches are to get the reset vector, it'll get the opcode on the third fetch), and away we go. You can observe toggling address lines, test memory, and so on. Makes a handy address generator. I think its opcode was $AD, but it's been a bunch of years. It could be terminated by the chip reset, but ignored IRQ and NMI. In our systems we put in a two-stage watchdog timer. If it fell, it would NMI the chip, and the NMI handler would try to sort things out. However, if we were out walking the dog, this wouldn't work, and the second knock of the wolf at the door caused RESET. One neat thing about it was that we had a PROM at $AD00, with lots of vectors into itself at the beginning; hence, we had lots of occurences of $AD in there. It was pretty easy to go from executing data (bug, of course) right out onto the street and go walking the dog. >MSDOS is not dead, it just | Henry Spencer at U of Toronto Zoology >smells that way. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu [Sniff, sniff] Hey, mutt! Get away from that! -- Eric Black "Garbage in, Gospel out" Atherton Technology, 1333 Bordeaux Dr., Sunnyvale, CA, 94089 UUCP: {sun,decwrl,hpda,pyramid}!athertn!ericb Domainist: ericb@Atherton.COM