added JMP absolute

This commit is contained in:
Preston Skupinski 2011-05-02 16:29:09 -04:00
parent a5d690e9cb
commit 952b6ba840

11
cpu.js
View File

@ -74,7 +74,7 @@ function CPU_65816() {
0x9e : STZ_absolute_indexed_x,
0x74 : STZ_direct_page_indexed_x, 0x9b : TXY,
0xbb : TYX, 0xaa : TAX, 0xa8 : TAY, 0x8a : TXA,
0x98 : TYA };
0x98 : TYA, 0x4c : JMP_absolute };
}
var MMU = {
@ -114,6 +114,15 @@ var MMU = {
}
};
var JMP_absolute = {
bytes_required:function() {
return 3;
},
execute:function(cpu, bytes) {
cpu.r.pc = (bytes[1]<<8)|bytes[0];
}
};
var TYA = {
bytes_required:function() {
return 1;