News for hackers. Stuff that matters.
Re:The 6502 microprocessor is 35 years old as of September 16th by jacquesm on Friday September 17, 2010 @05:26AM (#1700545)
I only remember 0x00 and 0xEA these days :)

All the rest of them have slid in to the swamp of time. The 6502 was a funny chip with it's zero page access and lack of a 'mul', to some extent not having a mul makes you a better programmer (you'll have to roll your own, and that will lead you to discover look up tables for nibble sized chunks pretty quickly because of a perceived lack of performance), and the 'zero page' was a good preparation for knowing how to deal with memory with different degrees of accessibility (think of caching and demand paging).

I worked a lot with the 6809 as well, and that was a much richer instruction set (and more orthogonal too), but I did not learn as much from that as I did from the 6502 because of the more restricted environment on the 6502.

I believe my first 6502 based computer had all of 1K of RAM :)

Single board job with a hex calculator keypad and 6 7 segment displays and an fsk based tape interface.

Re:The 6502 microprocessor is 35 years old as of September 16th by jws on Friday September 17, 2010 @08:34AM (#1700891)
BRK and NOP? Odd choice. 0x20 and 0x60 are still burned in my brain. (I couldn't afford the exotic "floppy disc drive" required to run the assembler, but the ROMs would disassemble what you entered so hand translating to machine code wasn't too bad.)
Re:The 6502 microprocessor is 35 years old as of September 16th by jacquesm on Friday September 17, 2010 @09:33AM (#1701065)
Nop to temporarily disable a call (nop, nop, nop that is), and BRK stop so I could have a look at what's going on. The reason I remember them is because those are the ones I would insert most often in binary rather than in code.
Re:The 6502 microprocessor is 35 years old as of September 16th by protomyth on Friday September 17, 2010 @12:22PM (#1701673)
In high school I learned 6502 (Apple II) which prepared me for the college course that was in 6809. I enjoyed the 6809 more, but I still have a soft spot in my heart for 6502. I also had a course on 8088 in college and really didn't like it at all.

Looking back, I had college courses on assemblers for 6809 (EE dept), 8088 (CSci), and IBM 370 (CSci - the banana book rocked). I wonder if that goes on anymore today.

Re:The 6502 microprocessor is 35 years old as of September 16th by jonsen on Friday September 17, 2010 @08:28AM (#1700869)
Perhaps the most satisfying hack I ever did was with the 6809. Making it handle high speed communications directly. It was done by decoupling its address bus during instruction fetch and then feeding it instructions from a separate ROM. The effect was to let external logic handle the control flow even if the 6809 did the data processing.
Re:The 6502 microprocessor is 35 years old as of September 16th by jacquesm on Friday September 17, 2010 @09:44AM (#1701101)
That sounds like a ROM driven bus master to me, how did you manage to get the 6809 to disenage? Using DMA/BREQ ?
Re:The 6502 microprocessor is 35 years old as of September 16th by jonsen on Friday September 17, 2010 @10:04AM (#1701153)
NMI to let the active process save its state. Then the busses were taken over during instruction fetch. Feeding NOPs when nothing to do and appropriate instructions when needed. No jumps nor branches. Just the essential processing. A normal interrupt routine couldn't have a tight loop fast enough, so control flow was handled in parallel externally in programmable logic.
Re:The 6502 microprocessor is 35 years old as of September 16th by jacquesm on Friday September 17, 2010 @10:20AM (#1701196)
Very cool, I highly doubt anybody will ever fully appreciate what a neat hack that is. So you basically divorced the busses from the CPU for a while making it run in a little parallel universe of it's own.

A total perspective vortex of a sort ;)

Re:The 6502 microprocessor is 35 years old as of September 16th by jonsen on Friday September 17, 2010 @10:34AM (#1701260)
I realize it would take some more to clearly explain the intricacies, but I see you got it :-)
Re:The 6502 microprocessor is 35 years old as of September 16th by mtkd on Friday September 17, 2010 @05:29AM (#1700549)
Did any peer chip have a mul in the late 70s/early 80s?
Re:The 6502 microprocessor is 35 years old as of September 16th by Someone on Friday September 17, 2010 @11:54AM (#1701555)
I vaguely remember that at least one version of the 6502 had half a mul instruction, that is, an attempt was made to add one, but it was buggy: it only worked for some multiplicands (ones without any neighboring one bits or something like that). That made for interesting programs, where, depending on the arguments one would compute a times b, b times a, a1 times b plus a2 times b for some a1 a2
Re:The 6502 microprocessor is 35 years old as of September 16th by jacquesm on Friday September 17, 2010 @05:33AM (#1700561)
6809 did 8x8 mul.
Re:The 6502 microprocessor is 35 years old as of September 16th by pietrofmaggi on Friday September 17, 2010 @05:43AM (#1700579)
6809 was one of the first to have a mul instruction, and was used in the initial development of the macintosh: http://www.folklore.org/StoryView.py?story=Good_Earth.txt
Re:The 6502 microprocessor is 35 years old as of September 16th by unwind on Friday September 17, 2010 @05:54AM (#1700594)
Awesome! In 11 clock cycle (not counting the set-up, i.e. loading the hardcoded source registers with the desired values).
Re:The 6502 microprocessor is 35 years old as of September 16th by mtkd on Friday September 17, 2010 @08:26AM (#1700864)
That's interesting, thanks, I remember writing my own on the Z80.