Browse Source

Finished coding all opcodes.

master
Bryan Miller 5 years ago
parent
commit
e92b54db8a
1 changed files with 18 additions and 3 deletions
  1. +18
    -3
      src/chip/MOS6502/cpu.js

+ 18
- 3
src/chip/MOS6502/cpu.js View File

} }


function STA(cpu){ function STA(cpu){

let pmode = [null, 0x85, 0x95, null, 0x8D, 0x9D, 0x99, 0x81, 0x91, null].indexOf(cpu.__op);
if (ProcessOp(cpu, pmode) === true){
cpu.__op = -1;
cpu.__mem.address = cpu.__opv;
cpu.__mem.byte = cpu.__AR;
}
} }


function STACK(cpu){ function STACK(cpu){
} }


function STX(cpu){ function STX(cpu){

let pmode = [null, 0x86, null, 0x96, 0x8E, null, null, null, null, null].indexOf(cpu.__op);
if (ProcessOp(cpu, pmode) === true){
cpu.__op = -1;
cpu.__mem.address = cpu.__opv;
cpu.__mem.byte = cpu.__XR;
}
} }


function STY(cpu){ function STY(cpu){

let pmode = [null, 0x84, 0x94, null, 0x8C, null, null, null, null, null].indexOf(cpu.__op);
if (ProcessOp(cpu, pmode) === true){
cpu.__op = -1;
cpu.__mem.address = cpu.__opv;
cpu.__mem.byte = cpu.__YR;
}
} }





Loading…
Cancel
Save