The
Mitsubishi 740 had the LDM instruction, "load memory with immediate". It also had a T flag, which allowed the X register to point to a ZP "accumulator" for some instructions.
Thanks, Mike. This latter feature -- the T flag -- creates a significant boost in functionality. Even more remarkable, IMO, is that it manages to do so without requiring dozens of new opcodes or otherwise turning the existing ISA on its head!
ZP memory at X "becomes" the accumulator. One good example to illustrate would be multi-precision addition/subtraction:
Code: Select all
CLC ; T flag not in use
LDA ZPOperand, X
ADC OtherOperand,X ; byte0 of the multiprecision operation
STA ZPOperand, X
INX
LDA ZPOperand, X
ADC OtherOperand,X ; byte1 of the multiprecision operation
STA ZPOperand, X
INX
[...] ; and so on for byte 2, byte 3 etc
Code: Select all
CLC ; with the T flag set
ADC OtherOperand,X ; byte0 of the multiprecision operation (2 cycle penalty)
INX
ADC OtherOperand,X ; byte1 of the multiprecision operation (2 cycle penalty)
INX
[...] ; and so on for byte 2, byte 3 etc
The
Hudson Soft HuC6280 also features the T flag, but IIRC Hudson Soft's arrangement differs slightly from Mitsubishi's wrt how T gets set & reset. In one case T gets set by a "Set-T" instruction then automatically turns itself off after the
following instruction completes. In the other case, T is sticky, and remains set until a "Clear T" instruction explicitly turns it off. (Corrections welcome if I'm misremembering any of this.)
adding external logic to fool the processor to implement new registers and instructions.
Here again the challenge is to come up with something that's reasonably straight-forward to code for -- something that fits in with the existing ISA.
My
KK Computer is a rather extreme example. Unable to resist the golden opportunities presented by the 'C02, I gave KK a shed-load of extra capabilities!

Despite all this indulgence, the warts are pretty minor (IMO). One example pertains to the point mentioned about being able to pull from stack. As with the macro Garth proposed, KK's register Y gets fruitlessly written as a side effect when you pull to register K1, K2, K3, IPL or IPH. (With an FPGA implementation this could have been avoided.)
The '816 also offers opportunities for functional enhancements, but with the 'C02 there's just so much
low hanging fruit!
It's ridiculously easy to add new functionality to the 'C02, (even without resorting to KK's microcoded complexity).
-- Jeff