Re: Oh why did Apple dump IBM....



In article <1i8vpgf.mb2egwjc72jjN%real-address-in-sig@xxxxxxxxxxxxxxx>,
Rowland McDonnell <real-address-in-sig@xxxxxxxxxxxxxxx> wrote:

"Load A; Store A; Load A; Store A" is not elegant.

Oh yes it is - in the context of primitive 8 bit microprocessors. The
6502 used a very efficient design that didn't have any fancy
instructions and was missing some that you'd've expected to see - LSR,
but no LSL, for example (I hope - I could check, but I've decided to see
if my memory's working the more dangerous way) - and it turned out that
it could get jobs done rather a lot quicker than a Z-80 at the same
clock speed.

Certainly, if they'd used microcode as the competition did, they could
have written a `memory location to memory location' command - but all
that would have done would have been a microcode equivalent of `Load A;
Store A', perhaps with a dedicated register for such operations to avoid
clobbering the main ALU register. But that would have added cost and
slowed things down - not the 6502 philosophy.

My objection was not really to the lack of memory-to-memory
instructions, but to the fact that more or less everything had to go
through one register, or use a particular register for, say, indexing.
If it had had 8 registers that could be used for all instructions and
addressing modes, it would have been a lot less tedious.

-- Richard
--
:wq
.



Relevant Pages

  • Re: Optimization Questions
    ... cycles you'd save would be more than offset by the cycles you'd burn ... instructions go through port 0 and port 1. ... a 16-bit register, writing one afterwards will be fast. ... Pre-read the value in EAX ...
    (comp.lang.asm.x86)
  • Re: Kind of new: function implementation questions, MASM
    ... >sub esp, varsize ... >select which of the local variables to copy into the working register, ... If you have 512kB of 8-way associative cache, ... You probably shouldn't use the prefetch instructions at all. ...
    (comp.lang.asm.x86)
  • Re: Process Register Directly Is Slow?
    ... storing data into memory is always slow. ... into register from memory before process data in register directly may ... I would claim to use only 2-3 x86 instructions like below. ... the assembly code you give does not do what you say it does above ...
    (comp.lang.asm.x86)
  • Re: The coming death of all RISC chips.
    ... anton@xxxxxxxxxxxxxxxxxxxxxxxxxx wrote: ... the number of write ports in the register file. ... (with instructions only accessing one accumulator ...
    (comp.arch)
  • Re: 8-Bit Register on Pentium 4
    ... MOV AH, BYTE PTR ... Intel's instructions such as CBW instruction, MOVZX instruction, and/or ... can only modify in the memory rather than register. ...
    (comp.lang.asm.x86)