Hacker News new | past | comments | ask | show | jobs | submit login
Q&A With Bill Mensch, co-creator of the 6502 (ieee.org)
122 points by systems_glitch 7 months ago | hide | past | favorite | 35 comments



I learned 6502 assembly as my second programming language after BASIC. I don't remember how I felt about it, because it was all I had, but I do remember two things:

1. 6502 assembly made a lot of sense to me, even its quirks kind of made sense

2. When I switched to the 80386 nothing made sense and I simply hated it.

I think it is fair to say that if I had to start with x86 I probably would have never gotten into programming.


Same here, Atari 400.

I did get to see some 6809 and 68000 assembly around the time of seeing x86 (and before I wrote any) that I accepted it--but still disliked it. Don't know what I disliked more: direction flag, all registers are special, segments.

The weird instruction/register usage is likely one reason why x86 was faster/cheaper than programmer-friendly processors like M68k--which also made the 6502 a success.


I learned 8080/8085 assembly before looking at x86, and while I can figure out x86 well enough it's still a mess! I don't know that prior experience necessarily makes x86 look any less ugly :P


I agree with both of those points.

I learned 6502 and 68000 assembly language. Then I bought an 80286 assembly language book, started reading it, become disgusted, and returned the book to the store.


So very true. I think basically x86 architecture was meant to be compiled from C, not assembled. It might as well have been COBOL for all I cared.

Atari 400/800 6502 asm were glory days for me.


Hi there, I'm the alternate timeline you, the one who did start learning assembly with an x86 (and a copy of Microsoft Macro assembler for my 12th birthday). My parents, specifically my father, clearly meant well by trying to get me into a computer that they perceived would be more relevant to career skills than the 8-Bit micros that a couple friends already had. But what I got was not an actual IBM PC or even a close match like a Compaq, but a relatively obscure clone (panasonic, iirc) which, unbeknownst to me at the time, had a slightly different method for switching between video modes than the default CGA adapter/BIOS combo that was presumed by the meagre and not-written-with-middle-schoolers-in-mind materials available in my rural environment. this a decade before the internet would become widely accessible. reaching a worthwhile BBS meant furtive and risky calls to long distance numbers at strange hours of the night, which would certainly be discovered when the next bill came, and have to be covered by whatever allowance I had coming.

Since the main motivating interest was trying to get usable sprite-like animation working for a game I wanted to create, not being able to switch out of character mode without hanging the machine and having to start all over again was a leaden and demotivating drag. Especially because the thing did not instantly reboot but rather, loaded MS-DOS two-point something from floppy at a couple minutes a pop, and then loading up masm with much disc swapping involved the whole time due to the machine having only 256k.

I felt very bad and didn't want to tell my parents about this because they had spent a great deal of their at the time squarely middle class disposable income to get me the machine, and on masm itself, which wasn't particularly easy to get ahold of in the middle of farmland nowhere. And because I knew they meant well, trying to get me on track with a machine that appeared to be the dominant platform at the time and thus worth the extra cash to give me a head start. almost crushed all interest I had in programming, the obscene frustration of having to trial and error calling an interrupt or something, guessing at what the parameter could be and having no idea which out of the 220 (or more) possibilities would be the one that worked. This is not even getting into the perplexing and arcane yak shaving involved in dealing with the stupid x86 segmented memory model ( which I tried to avoid as much as possible, and just fit everything inside a single segment). I didn't understand why it was set up the way it was, so it was purely mechanical "how" ritual memorization without any context or insight.

Even as a 12 year old with nothing to do all summer, I did not have enough time ro sit there cycling the power and to waiting 7 or 8 minutes between reboots. And God forbid the thing broke due to all the power cycling, or chewed up one of the expensive, (for a 12 year old), system disks.

I had no idea how much I was missing by having a supposedly higher end "real computer" . Other me, indeed be thankful you dodged that bullet.


For me it was:

BASIC→Z80→6502→6802→6805→68000→8086→Pascal→...

And honestly, 6502 was the odd one out that felt like programming in mud.


OK folks, here it is, the IEEE Spectrum article where Bill Mensch says, directly, that the 6502 was intended to compete with the Intel 4040 for low-cost embedded applications and says, again directly, that it was not intended to compete with the 8080 and 6800.


Thanks for sharing this - it's a great interview.

I do think there is a subtlety about the 'wasn't intended to compete with the 6800' line though.

Chuck Peddle recognised the market for a much cheaper version of the 6800 which Motorola refused to make, possibly because they couldn't make it that cheaply with the contact lithography process they were using.

So Peddle went off to MOS Technology (taking lots of Motorola engineers with him including Mensch) to make the cheaper version. To achieve that goal, they had to cut down on some of the 6800's features. Reducing the size of the stack pointer, only one accumulator, and so on.

As it turns out, the end result - the 6501/2 - was actually very competitive with the 6800. So whilst the original intention wasn't to compete with the 6800, in the end it did compete with it very successfully in some important markets.

Of course, in addition MOS Technology didn't have the resources of Motorola and so also couldn't compete with them in terms of support, peripherals and so on.

Note: I wrote the original post on the 6800 that led to the discussion [1] and I'm now deep in the writing of Part 2 of the 6800 story. (So I've now provided spoilers for Part 2!)

[1] https://news.ycombinator.com/item?id=38616591


> As it turns out, the end result - the 6501/2 - was actually very competitive with the 6800. So whilst the original intention wasn't to compete with the 6800, in the end it did compete with it very successfully in some important markets.

Another subtlety: the ecosystem.

Obviously a cheaper cpu encourages usage in more places. Read: more users & more designers working with it.

Over time, that means more tools (including better ones), more OSes to run on it, more application software, more code examples, more existing systems that can be used to kick-start a new design, more knowledge in the field to work around quirks, etc.

Often that ecosystem weighs heavier than cpu features, price or performance. Yeah a 'nicer' cpu will drop in price. But by then it's late to the party.


That is true, but the 6800 came with a massive ecosystem, all available directly from Motorola! They had reams of useful documentation, including complete, tested implementation guides for things like POS terminals, early simple ECUs, smart disk subsystems, etc. You could build all of those things with chips bought directly from Motorola, engineered to be 100% compatible and easy to interface. For many small systems, you didn't need any non-Motorola parts other than passives.

I guess the flip side was, Motorola had to create all that in-house, and the price of the ecosystem reflected that. MOS dumped cheap chips into the world at just the right time and got hobbyists to do the work for free, sometimes with superior results. Probably no one could've seen that coming in 1975.


TFA says the 4040 ~ $29 and 6502 target ~ $20.

In a ~ $1300 computer (Apple II, ca. 1977) how price sensitive was that CPU market to $9?

The 6800 was ~ $175 in 1974 - that does seem like a clear gulf to the other two. https://en.wikipedia.org/wiki/Motorola_6800


Not 100% sure I understand your question but if you're asking about 4040 vs 6502 as contenders for Apple II in 1977 - the 4040 was a much more limited design than the 6502 and would not have been viable as the Apple's CPU.


The Apple 1 could run either the 6502 or 6800! Probably experience with that dictated that people wanted the 6502. Apple also gained enough pull with MOS that at some point they got some say in the feature set of the 6522 VIA.


> Another subtlety: the ecosystem.

See also: The Raspberry Pi.


The 6502 absolutely did evolve to compete (and overtake, in some fields) the 6800, no doubt about it! The motivation of competing on the embedded market (whether you see that in Bill Mensch's IEEE interview quote, or Chuck Peddle's lamenting that customers didn't like the $300 tag on the 6800) explains a lot of the design choices though, especially when considering support chips like the 6530 mask-programmed RRIOT.

Thanks for a great 6800 writeup, and I look forward to the follow-up! I feel like the 6800 does not get the love it deserves from the current generation of hackers.


Thanks so much! There is so much to cover in Part 2 so it might take a little while.

Completely agree that the 6800 needs more love. It was a really important design.

PS I'd not seen Mensch's comment that Peddle's intention was to raid Motorola for engineers before - that's an interesting angle!!


Yeah I'm sure the corporate raid had something to do with Motorola dropping the hammer on them over the 6501 pinout. Bill Mensch has said really it was just so they didn't need to design a development system right out the gate, and that they figured other engineers would appreciate that. Seems like it alone wouldn't have been enough to get Motorola mad, especially since they must've known they were just bogging MOS down, and that the pinout wasn't legally defensible reasoning to stop production (MOS and second sources later continued with the 6512, which is effectively 6800 pinout with very, very minor changes).


>not intended to compete with the 8080 and 6800

Clearly, as evidenced by 6501 drop in pin compatibility followed by Motorola lawsuit settled for $200K and pin configuration change.


Supposedly the drop-in compatibility was so they didn't have to also design a development board right out the gate. I don't know what one could want for a more direct, firsthand account of what it was or wasn't designed to compete with -- Bill Mensch is the guy who did the silicon tape-up for the thing!


My favorite part of the 6502 is that you can write the instruction set as 4 columns by 8 rows, and see the really simple pattern.

https://pastebin.com/rCN932a0

When you see it in rows and columns, you can see how you have these addressing modes that correspond to the row number most of the time:

0: X,indirect

1: zeropage

2: immediate

3: absolute

4: indirect,Y

5: zeropage,X

6: absolute,Y

7: absolute,X

Then you can see that Column 2 is the arithmetic instructions: ORA, AND, EOR, ADC, STA, LDA, CMP, SBC

And column 3 is the Read-Modify-Write instructions: ASL, ROL, LSR, ROR, STX, LDX, DEC, INC.

And that fourth column of invalid instructions turns out to be a combination of the second and third column, effectively doing an arithmetic operation and a RMW operation at the same time, even for addressing modes normally not supported.


x86 has a similar regular instruction pattern except that it's in octal:

https://gist.github.com/seanjensengrey/f971c20d05d4d0efc0781...


Yup, that inherits from the 8080. The RST instructions made so much more sense after reading that in one of the Intel handbooks!


Should be noted that the 6510 was used in the C64, and while it's a superset of the features of the 02, you can't simply put a 02 in a system that makes use of the additional features of the 10. However, it's sufficiently similar that an adapter with the extra logic implemented in discrete gates and transistors has been achieved (the 10 has an IO port and can tristate, which the 02 cannot).


AIUI, the main difference is that memory locations $0000 and $0001 are used for the 6510 i/o port. So dropping a 6510 in a system that makes use of those perfectly valid memory locations won't work either.


Same issues with e.g. the Rockwell R6500 single-chip microcomputer family -- the actual microcontrollers, not their second-source MOS 6500 family chips. Rockwell put I/O stuff and stack both in zero page to make more efficient use of limited ROM space, and allow operation with only the tiny amount of on-chip RAM! A lot of stuff can be restructured to live with it, but almost nothing "just works."


indeed, the ports at 00 and 01 and that pin 5 could be pullsed low by external logic to have the 6510 tristate it's bus pins so external logic could control the bus, this was used by the VIC2 chip in the C64.


Yeah there's a bunch of 6500 series CPUs with various changes! I'm hacking on a SBC that uses the 6507 at the moment, this particular SBC was a replacement for some industrial control board using random logic sequencing (no CPU). The cut down 6507 saved space and let the designer get everything into the allotted space on a two-layer board.


Actually the 6502 equipped the VIC-20. IIRC the C64 mounted is successor called 6510.


So the WDC MyMENSCH is named after him?


"BM:Rod Orgill and I had completed the designs of a few microprocessors before the 6501/6502. In other words, Rod and I already knew what was successful in an instruction set. And lower cost was key. So we looked at what instructions we really needed."

If only this minimalism mindset were more commonplace!

Many products today seem like the result of an endless race to include everything & the kitchen sink, to one-up a competitor with yet another feature. Especially on the software side of things.

Yes there's a (relentless) drive to minimize manufacturing costs, logistics, or money spent on support. But rarely on minimizing / simplifying products themselves. If carmaker puts a cup holder in their car & customers like it, competitors' next cars 'must' include a cup holder too. Rinse & repeat ad nauseum.

In contrast, taking something out and still have the product be useful, seems like a Zen mastery black art that few designers practice. Let alone companies they work for.

One example: occasionally I take broken electronics apart. Sometimes to see if there's parts worth scavenging. Often out of curiosity, to have a look at design details. And have grown some appreciation of Chinese' manufacturers tendency to snip parts from products (aka Muntzing).

Use a thinned pcb trace as fuse. Or: use a single diode instead of a bridge rectifier. Yes, it only uses half of the AC cycle. Electricity producers might frown at that. All else being equal, requires 2x capacitance.

But.. for small capacitor values, diode + bigger capacitor is likely cheaper. And saves 1 diode voltage drop (+ associated losses).

Crude, but brilliant in a way. Simplified design that still does the job.


> If carmaker puts a cup holder in their car & customers like it, competitors' next cars 'must' include a cup holder too. Rinse & repeat ad nauseum.

I think this doesn't reinforce your argument in the way you intended. A car manufacturer isn't going to look at a competitor and see what items need to be removed to lower cost when that item, as you've stated was a success since customers like it, it would be dumb to not include it. You don't want to not include liked items. You want to not include the items the customers do not like.


> as you've stated was a success since customers like it, it would be dumb to not include it.

So... carmaker includes (successful) feature x, y or z in their new car. And not willing to seem dumb, for competitors the tendency is to include x, y or z as well?

That turns x/y/z into checkbox items. And every new car model will feature them. Exactly what I complained about, right?

As opposed to going your own way. Or choosing a select subset of features & stick to that. Even if some % of your customers disapprove.

Do all cars need motorized windows? Hand cranks used to do the job. But good luck finding a modern car whose designers think so. Clearly not a design choice that varies between brands, but one of those 'checkbox items' for modern cars.


Well, to start, you chose cup holders which means to me you weren't being very serious.

Let's take a better example of touch screen units. One company did it, and others followed. Now, the trendsetters will be the ones removing them. What was the first company to remove the cigarette lighter and ashtrays? Who was the first to add motorized mirrors so they could be adjusted from the driver's seat?

Have you actually ever used hand cranked windows? Nobody wants to go back to them. If a company releases a car with hand cranked windows and motorized windows but they see that everyone prefers the motorized windows, why would they continue to offer the hand cranked?

I think you're trying to lump a lot of decisions into a category that they don't belong. The manufactures see the numbers and trends. They make decisions. When touch screens came out, everyone thought they were the shiznit. It wasn't until lots of use did people start realizing that the tactile buttons were actually a good thing. There are some misses to be sure, but you act like there's zero research into it. Which just seems immature.


Ultimately these decisions come down to value judgements. Which is better, more simplicity and lower cost, or more robustness and longer service life? Because often it's one or the other.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: