8SA1Sim/js/isa/phx.js
2021-04-12 00:07:34 -07:00

563 lines
19 KiB
JavaScript

/*
PUSH x Instructions
OPCODE Range: 0x280:0x29F
*/
class IS_PHA extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x280;
this.Mnemonic = "PHA";
this.LongName = "PUSH Register A to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHA = new IS_PHA;
Instructions.push(is_PHA);
class IS_PHB extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x281;
this.Mnemonic = "PHB";
this.LongName = "PUSH Register B to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_BL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHB = new IS_PHB;
Instructions.push(is_PHB);
class IS_PHC extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x282;
this.Mnemonic = "PHC";
this.LongName = "PUSH Register C to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_CL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHC = new IS_PHC;
Instructions.push(is_PHC);
class IS_PHD extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x283;
this.Mnemonic = "PHD";
this.LongName = "PUSH Register D to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_DL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHD = new IS_PHD;
Instructions.push(is_PHD);
class IS_PHAB extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x284;
this.Mnemonic = "PHAB";
this.LongName = "PUSH Register A and B to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_AB | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHAB = new IS_PHAB;
Instructions.push(is_PHAB);
class IS_PHAC extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x285;
this.Mnemonic = "PHAC";
this.LongName = "PUSH Register A and C to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_AC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHAC = new IS_PHAC;
Instructions.push(is_PHAC);
class IS_PHAD extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x286;
this.Mnemonic = "PHAD";
this.LongName = "PUSH Register A and D to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_AD | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHAD = new IS_PHAD;
Instructions.push(is_PHAD);
class IS_PHBA extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x287;
this.Mnemonic = "PHBA";
this.LongName = "PUSH Register B and A to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_BA | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHBA = new IS_PHBA;
Instructions.push(is_PHBA);
class IS_PHBC extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x288;
this.Mnemonic = "PHBC";
this.LongName = "PUSH Register B and C to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_BC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHBC = new IS_PHBC;
Instructions.push(is_PHBC);
class IS_PHBD extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x289;
this.Mnemonic = "PHBD";
this.LongName = "PUSH Register B and D to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_BD | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHBD = new IS_PHBD;
Instructions.push(is_PHBD);
class IS_PHCA extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x28A;
this.Mnemonic = "PHCA";
this.LongName = "PUSH Register C and A to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_CA | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHCA = new IS_PHCA;
Instructions.push(is_PHCA);
class IS_PHCB extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x28B;
this.Mnemonic = "PHCB";
this.LongName = "PUSH Register C and B to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_CB | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHCB = new IS_PHCB;
Instructions.push(is_PHCB);
class IS_PHCD extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x28C;
this.Mnemonic = "PHCD";
this.LongName = "PUSH Register C and D to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_CD | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHCD = new IS_PHCD;
Instructions.push(is_PHCD);
class IS_PHDA extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x28D;
this.Mnemonic = "PHDA";
this.LongName = "PUSH Register D and A to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_DA | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHDA = new IS_PHDA;
Instructions.push(is_PHDA);
class IS_PHDB extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x28E;
this.Mnemonic = "PHDB";
this.LongName = "PUSH Register D and B to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_DB | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHDB = new IS_PHDB;
Instructions.push(is_PHDB);
class IS_PHDC extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x28F;
this.Mnemonic = "PHDC";
this.LongName = "PUSH Register D and C to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_DC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHDC = new IS_PHDC;
Instructions.push(is_PHDC);
class IS_PHPC extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x290;
this.Mnemonic = "PHPC";
this.LongName = "PUSH Register Program Counter to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHPC = new IS_PHPC;
Instructions.push(is_PHPC);
class IS_PHHR extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x291;
this.Mnemonic = "PHHR";
this.LongName = "PUSH Register High RAM Page to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHHR = new IS_PHHR;
Instructions.push(is_PHHR);
class IS_PHSP extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x292;
this.Mnemonic = "PHSP";
this.LongName = "PUSH Register Stack Pointer to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHSP = new IS_PHSP;
Instructions.push(is_PHSP);
class IS_PHSR extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x293;
this.Mnemonic = "PHSR";
this.LongName = "PUSH Register Status Register to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 4;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_SR | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHSR = new IS_PHSR;
Instructions.push(is_PHSR);
class IS_PUSH_imm16 extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x294;
this.Mnemonic = "PUSH";
this.LongName = "PUSH value to STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Immediate16;
this.Operands = new Array({Operand: "$", Bitwidth: 16});
this.Words = 2;
this.Cycles = 6;
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_I2 | CONTROL_PCC;
this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[5] = CONTROL_OUT_2O | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PUSH_i = new IS_PUSH_imm16;
Instructions.push(is_PUSH_i);
class IS_PUSH_abs16 extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x295;
this.Mnemonic = "PUSH";
this.LongName = "PUSH value to STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Absolute16;
this.Operands = new Array({Operand: "", Bitwidth: 16});
this.Words = 2;
this.Cycles = 7;
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
this.Microcode[4] = CONTROL_OUT_I2;
this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[6] = CONTROL_OUT_2O | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PUSH_a = new IS_PUSH_abs16;
Instructions.push(is_PUSH_a);
class IS_PUSH_abs24 extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x296;
this.Mnemonic = "PUSH";
this.LongName = "PUSH value to STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Absolute24;
this.Operands = new Array({Operand: "", Bitwidth: 24});
this.Words = 3;
this.Cycles = 15;
this.Microcode[2] = CONTROL_SPD | CONTROL_SPC;
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[4] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC;
this.Microcode[5] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[6] = CONTROL_OUT_I2 | CONTROL_PCC;
this.Microcode[7] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
this.Microcode[9] = CONTROL_OUT_2O | CONTROL_RHI;
this.Microcode[10] = CONTROL_OUT_I2;
this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[12] = CONTROL_OUT_2O | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[13] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[14] = CONTROL_OUT_RO | CONTROL_RHI;
}
}
is_PUSH_a24 = new IS_PUSH_abs24;
Instructions.push(is_PUSH_a24);
class IS_PUSH_ind16 extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x297;
this.Mnemonic = "PUSH";
this.LongName = "PUSH value to STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Indirect16;
this.Operands = new Array({Operand: "#", Bitwidth: 16});
this.Words = 2;
this.Cycles = 8;
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI;
this.Microcode[5] = CONTROL_OUT_I2;
this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[7] = CONTROL_OUT_2O | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PUSH_in = new IS_PUSH_ind16;
Instructions.push(is_PUSH_in);
class IS_PUSH_ind24 extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x298;
this.Mnemonic = "PUSH";
this.LongName = "PUSH value to STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Indirect24;
this.Operands = new Array({Operand: "#", Bitwidth: 24});
this.Words = 3;
this.Cycles = 16;
this.Microcode[2] = CONTROL_SPD | CONTROL_SPC;
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[4] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC;
this.Microcode[5] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[6] = CONTROL_OUT_I2 | CONTROL_PCC;
this.Microcode[7] = CONTROL_OUT_PC | CONTROL_RRI;
this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
this.Microcode[9] = CONTROL_OUT_2O | CONTROL_RHI;
this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RRI;
this.Microcode[11] = CONTROL_OUT_I2;
this.Microcode[12] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[13] = CONTROL_OUT_2O | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[14] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[15] = CONTROL_OUT_RO | CONTROL_RHI;
}
}
is_PUSH_in24 = new IS_PUSH_ind24;
Instructions.push(is_PUSH_in24);
class IS_PHGP extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x29E;
this.Mnemonic = "PHGP";
this.LongName = "PUSH ALL General Purpose Registers to the STACK";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 6;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_AB | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[5] = CONTROL_OUT_CD | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHGP = new IS_PHGP;
Instructions.push(is_PHGP);
class IS_PHALL extends Microcode_Instruction {
constructor(props) {
super(props);
this.Bytecode = 0x29F;
this.Mnemonic = "PHALL";
this.LongName = "PUSH ALL Registers to the STACK (AB,CD,SR,PC,HR)";
this.Aliases = new Array();
this.Type = InstructionTypes.Register;
this.Operands = new Array();
this.Words = 1;
this.Cycles = 12;
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[3] = CONTROL_OUT_AB | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[5] = CONTROL_OUT_CD | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[7] = CONTROL_OUT_SR | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[9] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI;
this.Microcode[11] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
}
}
is_PHALL = new IS_PHALL;
Instructions.push(is_PHALL);