def STY(cpu, value): memory.write(value, cpu.Y)
def condWrite(cpu, addr, value): if addr is -1: cpu.A = value else: memory.write(addr, value)
def STX(cpu, value): memory.write(value, cpu.X)
def STA(cpu, value): memory.write(value, cpu.A)
def modMemory(cpu, address, dVal): value = memory.read(address) value += dVal memory.write(address, value) cpu.setNZ(value)
def pushToStack(cpu, value): memory.write(0x100 | (cpu.S & 0xFF), value) cpu.S -= 1
def SAX(cpu, value): memory.write(value, cpu.A & cpu.X)