Stormtrooper of Death, on Mon May 7, 2012 2:08 AM, said:
Is the 6809 better as the 65816 ? Because there already are some programs/games/demos for the 65816.
What are the advantages of the 6809 above the 65816 ? Which one is better ?
It's been a while since I looked at my books on the 65816 and I haven't spent any time programming it but if I remember correctly:
The 65816 does add a lot of 6809 like features, but for the most part it falls short.
The 65816 depends on mode switching where the the 6809 switches back and forth between 8 and 16 bit instructions at will with separate opcodes for each.
The 65816 adds a B accumulator but you can't directly load or save its content without going through A, making many neat optimizations used on the 6809 worthless on the 65816.
The 6809 can index off of more registers.
The 6809 can PUSH/POP multiple registers on/off the stack with single instructions.
The 65816 does have the built in addressing for a larger memory map, but most using most instructions to access it requires setting up modes for specific pages. A former CoCo game programmer that went on to program the Super NES said it was easier to program the 6809+MMU than to use the 65816's addressing.
The 65816 does fix some major shortcomings in the 6502/65c02. You can use 64K for the stack instead of just 256 bytes.
It also added stack relative addressing. Those are a biggie for compilers, no more need to manage the C stack through page 0 with extra instructions.
That also makes relocatable, re-entrant code easy to write.
The one major thing the 65816 has going for it is that it runs most 6502 software, the 6809 doesn't run any 6502 code.