Father of 6502 microcontroller passes away.  - Page 1
Forum section: electronics / general

author: schmitt trigger
author_rank: Super Contributor
timestamp: December 26, 2019, 08:01:54 pm
content: Chuck Peedle, one of the great unsung PC pioneers,https://www.nytimes.com/2019/12/24/technology/chuck-peddle-dead.html?nl=todaysheadlines&emc=edit_th_191226?campaign_id=2&instance_id=14779&segment_id=19878&user_id=10ca517e806ee8b2b6c2d219d309c7d0&regi_id=371077491226

author: brucehoult
author_rank: Super Contributor
timestamp: December 26, 2019, 09:36:57 pm
content: Quibble: microprocessor, not microcontroller, as it definitely requires something attached to the external bus to work. And it has no I/O other than memory-mapped (and a couple of interrupt lines).I learned programming on the 6502 as a 17 yr old, when my high school got one for evaluation and the math HoD quickly turned it over to me to take home and brief him on what I'd learned. I hit the limits of BASIC quickly, and within days was teaching myself 6502 machine code programming (not even asm, I didn't have an assembler) from the rather cryptic instruction set description and ROM listing in the back of the manual (which I have a copy of to this day)If there's ever been a better use of 3500 transistors, I don't know what it is.The thing looks absolutely minimal, but does a great job of leveraging the fact that RAM was relatively cheap and just as fast as the CPU, so you could pretty much pretend that the first 256 bytes of RAM were the actual registers (a *huge* number of them)The 6502 code was pretty bulky, especially if you were working with 16 bit or 32 bit values doing everything inline. I wrote little utility functions such as ...Code:add16:clclda $0000,yadc $00,xsta $00,xlda $0001,yadc $01,xsta $01,xrts... and called them like ...Code:ldx #dstLldy #srcLjsr add16So that let me do a 16 bit add "dst += src" on any of effectively 128 16 bit registers using 7 bytes of code (instead of 13 bytes to do it inline), in 42 clock cycles instead of 20 for inline code. You could get more compact code using bytecode, or address threading, but they were much much slower. Trade-offs!

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: December 26, 2019, 09:52:59 pm
content: @bruce: Mine came with the red book. I still remember to F666G (that was before the autostart ROM) :-) What you did there is a sort of sweet 16.

author: BrianHG
author_rank: Super Contributor
timestamp: December 26, 2019, 09:53:26 pm
content: The Atari 800 used to be my life, all thanks to the 6502...(This topic should have been placed in 'General' chat...)

author: brucehoult
author_rank: Super Contributor
timestamp: December 26, 2019, 10:41:02 pm
content: Quote from: GeorgeOfTheJungle on December 26, 2019, 09:52:59 pmSweet16 is a kind of bytecode, with 4 bits for the operation and 4 bits for a register number in each 1 byte opcode. So the above add could be done in 3 bytes of Sweet16 code: "move Rsrc to acc; add Rdst to acc; move acc to Rdst" (where acc is R0) -- but it will be a lot slower as each instruction needs 40+ cycles of overhead, plus you're doing two 16 bit moves as well as the add. I haven't counted, but overall it would be at least 160 cycles and maybe closer to 180. So about twice again the code density of mine, but 4x slower.Plus while you could mix 6502 and Sweet16 code, there was quite a bit of overhead in entering and leaving Sweet16, which you *had* to do pretty frequently. Mine is pure 6502 code.The thing of course is that in most programs the vast majority of code is completely non-critical for performance, so it might as well be in the most compact for possible, even if it is 100x slower than native code, and then the other usually very small parts should be in the fastest code possible, with everything inlined.An amazing thing about Sweet16 is the interpreter is only 371 bytes.

author: rsjsouza
author_rank: Super Contributor
timestamp: December 26, 2019, 10:47:00 pm
content: Truly sad to hear about the passing of a pioneer of the personal computing era.Mandatory reading of Brian Bagnall's first chapter of Commodore's book:https://web.archive.org/web/20120721114927/http://www.variantpress.com/view.php?content=ch001I love how he mentioned in this chapter how many bad things could be said about Jobs and how many good things could be said about Gates (in a time where Gates was truly considered as the Darth Vader of the world).

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: December 26, 2019, 11:05:29 pm
content: Those missing 16 bit registers that the 6800 had... even Woz was green with envy => Sweet16.Quote from: brucehoult on December 26, 2019, 09:36:57 pmSorry but if you never had the chance to do a F666G you were late to the party(they removed the mini assembler with the autostart ROM "upgrade").

author: schmitt trigger
author_rank: Super Contributor
timestamp: December 27, 2019, 01:34:06 am
content: Quote from: brucehoult on December 26, 2019, 09:36:57 pmAbsolutely correct!Nowadays one is so used to ubiquitous microcontrollers, that one forgets that once upon a time, bare microprocessors were the norm.

author: DBecker
author_rank: Frequent Contributor
timestamp: December 27, 2019, 08:38:49 pm
content: I probably spent over 1000 hours in my youth programming a 6502-based Ohio Scientific Superboard II, purchased with a whole summer's lawn-mowing income in the late 1970s. It was in "assembly", but it really was writing hex opcodes on quadrille paper and entering it by hand. You quickly learned every detail of the one-sheet instruction set, and how to use Page 0 as a large set of registers.

author: chris_leyson
author_rank: Super Contributor
timestamp: December 27, 2019, 11:24:02 pm
content: The Amp Hour interview with Chuck Peddle was great, thanks Chris and Dave. It was a wonderful insight into what was going on at the time. Link below.My first "PC" was a the Compukit UK101 SBC with 8k Microsoft Basic and 4k of RAM.Nearly 30 years later I had a stab at writing a version of the 6502 for a Xilinx FPGA. Decided to make it cycle accurate for some unknown reason and used the Rockwell R6500 Progrmming Manual as a reference. When 80% of the instructions were done and tested the CLB count was less than 400. After that it got difficult, I had to add a lot more decoding logic for the remaining 20% of instructions and at that point I gave up.The two cycle clock used in the 6502 and 6800, together with piplining and minimal decoding logic is what made the 6502 smaller, cheaper and faster than it's competitors, which used 4 or 6 cycles.Anp Hour interviewhttps://theamphour.com/241-an-interview-with-chuck-peddle-charismatic-chipmaking-coryphaeus/