The MOS 6502 and the Best Layout Guy in the World
research.swtch.com
research.swtch.com
In some ways (and I'm speaking in a general sense) situations like that actually make me more nervous than when I know there's a problem. I get this uneasy "there's no way it really went that smoothly" feeling that can be hard to shake.
Then again, my personality is to approach most things in life iteratively, so that probably plays a part as well. Great read either way.
And, BTW, the 6502 was a work of art. Simple, elegant and fast (even at 1 MHz), it ran rings around the Z-80's you found in more expensive computers of the time. Plus, it was delightful to program.
Right, I was hoping someone might remember specifics. I don't think this is really true, in general.
The 6800 is very close to the 6502
Not really.
This translates to 2x the speed at the same clock rate.
For example the instructions NOP(or CLI, STI, INX etc), 1 byte, 2 cycles. 1 cycle for fetching the instruction and one for executing the fetched instruction.
LDA addr,x seems to be pipelined a bit though. It's "AD lo hi" in memory and takes 4 cycles unless lo+x > 255, then it takes 5 cycles. The lo+x calculation seems to occur while hi is being read.
I am restoring a 65c02-based //e clone, so, I may be able to properly measure instruction timings, but I won't hold my breath.
Sounds like a fun project.
To somewhat counter that, the 6502 could read and write to the first 256 bytes of memory with shorter instructions. The 65816 expanded that idea to allow you to do that to any place in memory.
Simple maybe, but not delightful to program. I don't know of any assembly language that is delightful to program.
BTW, I knew someone from junior high & high school who could write code for the 6502 using a hex dump with amazing speed. You might have heard of him: Randy Linden.
These days I'm writing a lot of code in Ruby and JavaScript on the JVM, and find myself considering Java my current equivalent of assembly. It's sad really, being so far away from what the CPU is actually executing.
you have to love programming to really appreciate assembly, the succinctness, the satisfaction of being so close to the metal, none of this high level peek and poke nonsense of high level languages :)
you don't write code using a hex dump???
You write assembly code using either hand assembly or more efficiently using a tool called an assembler which makes the tedious task of mapping instructions by name to their hex values easier. After a while you get to remember the common ones though, C9 for example.
And I haven't heard of your school buddy, sorry.
http://research.swtch.com/2008/04/computing-history-at-bell-...
When you're a poor college student as I was, entering opcodes in a monitor/debugger you wrote in BASIC because you couldn't afford an assembler, then yes, assembly was fun.
Fun, that is, until you had to hand-calculate negative jump offsets. Don't remember why, but for some reason I seem to think that the MC6809 I was running on made it difficult to do so.
I remember that when I had to do floating-point math or calculate a screen address (something convoluted on an Apple II) I would simply call a subroutine in ROM and pick up the results.
Typing shit in to the hex monitor for a few years will do that :)
Make that A9 xx; The 6502 accumulator is 8 bits.
I wasn't saying that the accumulator was 16 bit though, rather that the load is from an absolute 16 bit address.
I imagine this is similar to how someone who likes to tinker with engines might prefer an old motorcycle they can take apart and put back together themselves even though there are many advantages in terms of reliability, efficiency, comfort, and so on to driving a Prius.
The PDP 10 had a delightful instruction set. While I didn't use the 7094 instruction set, many seemed to feel that it was a good set, and felt let down by the 360 instruction set when it came out.
The motorolla 6809 was nice, and it seemed to have a flavor of the pdp-11 (which itself was a delightfully simple and elegant set).
> We chatted for an hour about peripherally related topics. Broderbund, corporate America, the rat race, capitalism, freedom. I was seducing him.
At the critical psychological moment, I remarked: "You know, all my clipping is done on the byte boundaries."
There was a pause
http://jordanmechner.com/old-journals/page/33/
April 3, 1989
Clickable links to the 6 parts:
http://www.youtube.com/watch?v=HW9AWBFH1sA
http://www.youtube.com/watch?v=bBE4KHKzhKc
http://www.youtube.com/watch?v=tRBo7O_blVo
http://www.youtube.com/watch?v=H_15RtVbqGU
MOS 6502, Number of Transistors: 3510
So in theory, a chip with 65536 MOS 6502 cores each with 64K of internal RAM (4Mb cache) could be made.
My crowning achievement was a multi-threaded kernel for a CNC punch. Since the stack was at a fixed memory address and there was no PUSHA, I had to change threads (in response to an IRQ) by sequentially pushing the registers on to the stack and then swapping the stack with a block copy. It worked! Crazy :/
I loved reading this article - thanks for posting. Awesome stuff! Makes me want to code my own circuit emulator :)