[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What Is The Difference Between 68000 Chip And 80x86 Chip?
In article <1f3x0ks.7ta1x6r3r2u8N%dempson@actrix.gen.nz>,
David Empson <dempson@actrix.gen.nz> wrote:
> Here are the main differences which occur to me:
>
> - The 6800 has two 8 bit accumulators (A and B) which can be used almost
> interchangably, while the 6502 only has one (A).
>
> - The 6800 has a single 16 bit index register (X), and the only indexing
> method supported is "constant 8 bit unsigned offset from X", which is
> implemented pretty uniformly on the core instructions; the 6502 has two
> 8 bit index registers (X and Y), with a mixture of addressing modes
> (zero page or absolute indexed, indirect with pre-indexing or
> post-indexing depending on the register) with the full set only being
> available on a limited group of instructions.
I've been programming both the 6800 and the 6502 in assembly, and I
found the single 16-bit index register of the 6800 more awkward than
the dual 8-bit index registers of the 6502: the latter were clearly
superior when you needed to move a block of data, less than 256 bytes
large, from one address to another address more than 256 bytes away,
which wasn't an uncommon situation.
> - The 6800 has a 16 bit stack pointer, while the 6502's one is 8 bits.
The 6502's stack pointer is sometimes called a "9-bit" pointer, however
the high bit is then always implicitly 1. The limited stack space
of the 256 could sometimes be a real problem.
> - The 6800 has a complete set of branch instructions (testing all useful
> combinations of the N, V and Z flags) while the 6502 only has the
> minimal set which deal with a single flag, making some types of branch
> operation require multiple instructions.
>
> - The 6800 has both "with carry" and "without carry" versions of the add
> and subtract instructions. The 6502 only has the "with carry" versions
> (requiring carry be cleared manually before doing an add, for example),
> and for some reason has an inverted sense of the carry flag when doing
> subtraction (probably to save gates in the ALU).
>
> - They have different methods of supporting BCD arithmetic (6800 has a
> decimal adjust instruction, 6502 has a decimal mode of operation which
> affects the behaviour of the add and subtract instructions).
The 6502 had a "decimal flag" in its flag register: when set, ADC and SBC
would work in BCD; when clear, they would work in binary.
> One final comment: the 6502 and 6800 are similar enough that if you
> already know how to program one it doesn't take much effort to learn the
> other.
That's quite true.
--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
e-mail: pausch at saaf dot se
WWW: http://home.tiscali.se/~pausch/