orac wrote:
Code:
6502 at 1MHz
8085 at 4MHz
6502 8085 Notes
ADD immediate 4 1.75 extra instr. to clear carry (6502)
AND immediate 2 1.75
SUB immediate 4 1.75 extra instr to set carry (6502)
BRANCH COND. 2/3 1.75/2.5 not-taken/taken
CALL immediate 6 4.5
RET 6 2.6
PUSH ACC 3 3
POP ACC 4 2.5
Yes, and when the 6502 is also running at 4MHz, divide those 6502 instruction execution times by four. So again, we see that the 4MHz 6502 is faster than the 4MHz 8085. I *REALLY* don't see the problem here, or why you keep insisting that the 8085 is a faster processor. Which brings us back to our original argument: the 6502 makes more efficient use of the bus. Clock for clock, the 6502 can move more data than the 8085. I'm sorry, that's just the way it goes.
BTW:
JSR takes 6 cycles on the 6502, which at 1MHz, takes 6us. A RET also takes 6 cycles, and thus another 6us, for a total subroutine overhead time of 12us. But at 4MHz, we divide this result by 4, giving us only 3us. The 8085, on the other hand, has a total of 7.1us (4.5 for the CALL + 2.6 for the RET). OUCH! The 6502 is more than twice as good at making subroutine calls as the 8085. Perhaps this is why 6502s are the processors of choice for implementations of Forth, which is heavily dependent on subroutine calls.
So much for your assertion that the 8085 has faster subroutine response time than the 6502.
I'll leave the remainder of the instruction timings as an exercise to the reader. You'll find that the 6502's performance is pretty consistent across the board.
Now, I will concede that passing parameters to subroutines in registers is considerably faster than using memory (this is why, for example, the 68000 was able to get the seive done in 0.49 seconds instead of 0.8 or more). But the last I checked, the 8085 wasn't exactly register rich, which means there's going to be a HIGH probability that the parameters you pass in registers will be PUSHed/POPed later, or stored in temporary holding buffers *anyway*. The 6502 avoids all this completely with judicious use of zero-page memory. Thus, while in the local case there might be more data shuffling going on in memory, GLOBALLY there is less. I won't say that the 6502 is faster because of this though, but I will be bold enough to say it'll break even with the 8085. The benchmarks posted above even seem to support this.
Moreover, *EVERY* high-level language I'm aware of for the 8085 uses the stack to pass parameters. The 6502 can treat its zero-page like a stack using the dp,X and (dp,X) addressing modes quite effectively (Forth makes great advantage of this). The 65816 does one better by introducing an explicit stack-relative addressing mode, which the 8085 doesn't have.
The simple fact of the matter is this: if you're going to compare processors, compare them at speed. It is absolutely, mind-numbingly dumb to even consider a 64MHz 8085 when a 16MHz 6502 is available and will do the same job in half the time. Likewise, anyone with basic elementary school mathematics can see that the 6502, clocked at one quarter the speed of the 8085, is running at half the speed of the 8085. A 6502 running at 2MHz, therefore, is competitive with the 8085 across the board, and at 4MHz, demolishes it. You'll note the benchmarks posted above also support this observation.