[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Applesoft I and II and floating-point performance
> JSR and RTS are 6 cycles. They are less complex than an integer multiply.
> Are you saying a JSR is microcode?
JSR is 6 cycles for this reason...
3 cycles to read the instruction ($20, $ED, $FD)
1 cycle to fix the return address
2 cycles to write the return address to the stack (a 16 bit value is 2
bytes)
Continue at the JSR address.
RTS is very slow.
1 cycle to get the instruction ($60)
2 cycles to get the return address (a 16 bit value of 2 bytes)
3 cycles to adjust the program counter
The 6502 is pure microcode done not in a rom but in hardware. The design
goal was to make a CPU that would be cheap to make. I.E. the fewest number
of transistors. In 1975 when the chip was first designed, silicon dies with
over 10,000 transistors was very expensive to make since the yields sucked.
So the goal of the 6502 was to get a chip at that transistor count. They did
it. And that is why the chip debut'd for $25 instead of $300 that the 8080
was selling for.
Today the 65816 is 40,000 transistors, but that pales in comparison with the
3 billion transistor count of modern cpus.
But the 65816 can run on a pair of AA batteries for a long long time. A
Athlon 700 would last about 30 seconds.
:)
Burger