Best A2 Usenet Post for Friday the 13th :) Subject: 6800, 6502, and Apple I in BYTE (was: Halt and Catch Fire, was: virus/rubble) From: "Richard S. Shuford" Newsgroups: alt.folklore.computers,comp.terminals,comp.sys.apple2.programmer, alt.comp.virus,comp.security.misc,comp.sys.ibm.pc.hardware.misc Date: Fri, 13 Oct 2000 23:20:20 -0400 Organization: University of Tennessee, Dept. of Computer Science, Knoxville Lines: 169 Message-ID: References: <8q1g2s$6vi$1@taliesin.netcom.net.uk> <39C4A6A4.C9243260@patriot.net> <39e2e13e.1341763@news.clara.net> <39dcce62.10742286@news.mindspring.com> <8s2fu2$qth$1@morgoth.sfu.ca> <8rmr50$sgr$1@plutonium.btinternet.com> NNTP-Posting-Host: kenner.cs.utk.edu Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: penn.dii.utk.edu 971493870 14691 128.169.92.70 (14 Oct 2000 03:24:30 GMT) X-Complaints-To: abuse@utk.edu NNTP-Posting-Date: 14 Oct 2000 03:24:30 GMT Xref: lobby alt.folklore.computers:192362 comp.terminals: 11682 comp.sys.apple2.programmer: 11553 alt.comp.virus: 206794 comp.security.misc: 62240 comp.sys. ibm.pc.hardware.misc:167583 I (Richard) had written: > > Being an ambitious startup, MOS Technology actively promoted its new > 6502 chip to working-level engineers. At one trade fair, where free > samples were being given out to interested designers, a shaggy guy > named Steve Wozniak wandered past... Then Allen J. Baum added this personal recollection: > > Bzzzt. Wrong. Wescon, Brooks Hall/Civic Center circa 1975, I think. > The 6502 cost $20; the 6501 cost $25 (or vice versa, I forget) > I was there with Steve. He paid $20 - which was way less than > any other uP around, needless to say. And Charles Stephens wondered: | | So did Woz discover the 6502 after he did the design of the Apple I? | The few times I have examined the board I have noticed definite signs | of having your choice between the 6800 and the 6502. Since Peter Van Epp and Eric Smith were recalling articles from BYTE magazine on these matters, I did some digging in my archive. In the December 1984 BYTE, in the supplemental section "Guide to the Apple PCs," Gregg Williams and Rob Moore interviewed Steve Wozniak, who explained it this way: I had designed a simple 6800-based computer, but the actual choice of processors was dictated by what I could afford. At the time, most microprocessors cost hundreds of dollars, but you could buy a 6501 over the counter for $20, and a 6502 for $25. So I bought a 6502, built the computer, and soldered one of my small TV terminals right onto the same board. In that interview Woz gave credit to "Alan Baum" (which I guess is really a reference to "Allen J. Baum", as above) for helping to finance the production of the first production run of Apple I computers and with assisting in the design of the I/O slots of the Apple II. See "The Apple Story, Part 1: Early History--An Interview with Steve Wozniak" by Gregg Williams and Rob Moore. December 1984 BYTE, Volume 9, Number 13, pages A67-A71. ........................................................................ Then, a little further back in the archives, I unearthed another article "Son of Motorola (or, the $20 CPU Chip)" by Daniel Fylstra. (November 1975 BYTE, volume 1, number 3, pages 56-62). Noting that the Motorola 6800 cost $150 and the MOS Technologies 6501 cost $20, this article compared the chip architectures in detail. There are several charts of op codes, showing many similarities of the two processors, but no mention of the HCF instruction. Dan concluded, "At the time that this is being written (late August [1975]), the MOS Technology chip is just a promise: The chip should be available for purchase at the Western Electronics Conference (Wescon) in San Francisco, September 16-19. By the time you read this, the chip itself should be in the hands of a least a few hobbyists." I guess his prediction was right on the money. Shortly afterward, Dan Fylstra cut back on his writing for BYTE so that he could start a company called Personal Software. He thought he might be able to make some money selling a new program called VisiCalc... But that's a story for another day. Then, after further archival digging, I came upon the article that Peter Van Epp must have been trying to remember, of which I reproduce a few pertinent excerpts here: ........................................................................ "Undocumented M6800 Instructions" by Gerry Wheeler, Computer Communications Network Group University of Waterloo Waterloo, Ontario, Canada December 1977 BYTE, Volume 2, Number 12, pages 46-47. According to Motorola, there are 197 valid operation codes for the M6800 microprocessor. This means that, of the 256 possible 8-bit combinations, 59 are called invalid instructions. .. Let me tell you about a couple of the interesting ones. See table 1 for descriptions of six instructions that Motorola didn't tell us about. The mnemonics are, of course, assigned by me. .. Now for the big surprise. This one has been dubbed HCF for "Halt and Catch Fire". Well, almost. When this instruction is run, the only way to see what it is doing is with an oscilloscope. From the user's point of view, the machine halts and defies most attempts to get it restarted. Those persons with indicator lamps on the address bus will see that the processor begins to read all of memory, sequentially, very quickly. In effect, the address bus turns into a 16-bit counter. However, the processor takes no notice of what it is reading....it just reads. The only way out of this race is with the RESET line. The machine ignores the IRQ, NMI, and HALT lines. For all intents and purposes, the processor has halted and caught fire! It is quite possible that the HCF instructions are put into the 6800 design intentionally in the interest of production testing of newly fabricated processor chips. This one instruction might provide the automatic test equipment with a quick initial indication of whether the particular processor chip is a total dud, or a prospect for more detailed automatic testing and verification of defect-free operation. -------------- Table 1: A list of six undocumented M6800 instructions and their definitions. The operations and operation codes which invoke them are defined in the column labelled "Result", and the next instruction address is given in each case. Halt and Catch Fire (HCF) does not have a "next instruction" address, because the processor hangs up. Hexadecimal Next Name Mnemonic Op Code Result Instruction At ------------------ -------- ------- ------------------- -------------- AND accumulators NBA 14 A.B->A PC+1 store ACCA, immed STAA 87 A->PC+2 PC+3 store ACCB, immed STAB C7 B->PC+2 PC+3 store SP, immediate STS 8F SPh->PC+2;SPl->PC+3 PC+4 store IX, immediate STX CF IXh->PC+2;IXl->PC+3 PC+4 Halt and Catch Fire HCF 9D,DD see text N/A ........................................................................ Since it has now been more than 20 years, I admit that it may possibly have been this article from which I learned of the HCF instruction in the 6800, rather than by reading the documentation lying around the office of BYTE's Editor-in-Chief Carl Helmers. Nevertheless, it is a fact that Carl designed and built his own 6800-based home computer, which he used for synthesizing electronic music. That December 1977 issue of BYTE was graced by a Robert Tinney cover illustration which depicted a hypothetical visit by Captain Kirk, Mr. Spock, and other USS Enterprise crewmembers to the Spaceport Gamma 6 Holographic Museum of Ancient Technology; they are shown inspecting an exhibit of a circa-1977 programmer hunched over a DEC LA36 hardcopy terminal, studying a book entitled, "Understanding BASIC". Robert Tinney's artistry has become integral to the cultural heritage of the computer industry. Some of his other works may be sampled on the Web: http://www.tinney.net/index.htm ........................................................................ -- ...Richard S. Shuford | "If a person in authority listens to lies, all ...shuford*cs.utk.edu | his subordinates become wicked." Proverbs 29:12