Thanks BigEd.
I returned to my Game of Life program and decided to sink deeper into the tarpit. Only disallowing the X and Y registers allowed from more complexity than a machine like the PDP-8. To get a better feel for what it would be like to program an early discrete components machine, I needed to disallow even more instructions.
The PDP-8 had eight memory instructions, an I/O instruction, NOP, and eight accumulator bit manipulation instructions. Like the 6502 the PDP-8's accumulator wasn't wide enough to hold an address, so it used pages with addressing modes like page zero indirect. The link register (carry bit) was the only processor status bit, so no zero, negative, or overflow bits and associated branch instructions. But there was a test for zero in the accumulator and branch instruction.
So to increase the Turing Tarpit challenge difficulty I restrict myself to the following 65c02 instructions and addressing modes.
Code:
Accumulator operations: and, ora, eor, adc, clc, inc, ror, and rol
Memory operations: lda #, lda absolute, lda (), sta absolute, and sta ()
Flow control instructions: bcc, bcs, beq, bne, jmp absolute, jmp (), jsr absolute, rts, and nop
That's 16 instructions, which is a notable reduction from the 6502's 56, and matches the PDP-8. I'm allowing absolute addressing because the 6502 is a byte machine and one or two byte operands are intrinsic to such a design. I'm also allowing the zero control bit because the PDP-8 had skip on zero.
Notable missing instructions are CMP, DEC, PHA, PLA, and SBC. Subtraction is done by adding the two's complement, and precomputed negative quantities. CMP is a nondestructive subtract, so you have to subtract and test for zero. DEC is achieved by adding negative one. This was actually common on early machines with a discrete logic ALU. The PDP-8 didn't have a stack, so I won't allow its use for anything other than subroutine calls.
I rewrote my game of life using the rules, and it works, but is really slow. I imagine that's because comparison requires doing math twice. Once to subtract a negative, and again to return a result. In any case here's the 6502 calculating like it's 1965:
https://github.com/Martin-H1/6502/blob/master/FunStuff/life.asmUpdate: BigEd correctly pointed out that SEC is unnecessary without subtract, and ASL can be done via add. So that's sixteen instructions.