From 55cfeb3c15518cbc9926d8e3e41a1a754831a602 Mon Sep 17 00:00:00 2001 From: MatCat Date: Sat, 10 Apr 2021 15:33:40 -0700 Subject: [PATCH] Refacotred isa file formats, added more instructions --- index.html | 8 + isa.html | 8 + js/isa/alu.js | 351 +++++++ js/isa/branching.js | 247 +++++ js/isa/ldx.js | 1940 ++++++++++++++++++++++++++++++++++ js/isa/misc.js | 33 + js/isa/phx.js | 113 ++ js/isa/plx.js | 119 +++ js/isa/stx.js | 270 +++++ js/isa/tx.js | 227 ++++ js/main.js | 2 +- js/microcode_compiler.js | 2142 -------------------------------------- 12 files changed, 3317 insertions(+), 2143 deletions(-) create mode 100644 js/isa/alu.js create mode 100644 js/isa/branching.js create mode 100644 js/isa/ldx.js create mode 100644 js/isa/misc.js create mode 100644 js/isa/phx.js create mode 100644 js/isa/plx.js create mode 100644 js/isa/stx.js create mode 100644 js/isa/tx.js diff --git a/index.html b/index.html index e816597..7cb021d 100644 --- a/index.html +++ b/index.html @@ -69,6 +69,14 @@ + + + + + + + + diff --git a/isa.html b/isa.html index c78e546..b97a358 100644 --- a/isa.html +++ b/isa.html @@ -29,6 +29,14 @@ + + + + + + + + diff --git a/js/isa/alu.js b/js/isa/alu.js new file mode 100644 index 0000000..5c0bcec --- /dev/null +++ b/js/isa/alu.js @@ -0,0 +1,351 @@ +// This is a simple ADD command which will ADD GPA and GPB putting the sum in GPA +class IS_ADD extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x300; + this.Mnemonic = "ADD"; + this.LongName = "Addition"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_ADD | CONTROL_OUT_AB; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO; + } +} +is_ADD = new IS_ADD; +Instructions.push(is_ADD); + +class IS_SUB extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x301; + this.Mnemonic = "SUB"; + this.LongName = "Subtraction"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_SUB; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO; + } +} +is_SUB = new IS_SUB; +Instructions.push(is_SUB); + +class IS_NOT extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x302; + this.Mnemonic = "NOT"; + this.LongName = "Logical NOT"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 9; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_RAIL; + this.Microcode[5] = CONTROL_ALU_NOT; + this.Microcode[6] = CONTROL_OUT_AO | CONTROL_RBIL | CONTROL_SPC; + this.Microcode[7] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RAIL; + } +} +is_NOT = new IS_NOT; +Instructions.push(is_NOT); + +class IS_FNOT extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x303; + this.Mnemonic = "FNOT"; + this.LongName = "Logical FAST NOT"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_NOT; + this.Microcode[3] = CONTROL_RBIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_FNOT = new IS_FNOT; +Instructions.push(is_FNOT); + +class IS_AND extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x304; + this.Mnemonic = "AND"; + this.LongName = "Logical AND"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_AND; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_AND = new IS_AND; +Instructions.push(is_AND); + +class IS_NAND extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x305; + this.Mnemonic = "NAND"; + this.LongName = "Logical NAND"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_NAND; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_NAND = new IS_NAND; +Instructions.push(is_NAND); + +class IS_OR extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x306; + this.Mnemonic = "OR"; + this.LongName = "Logical OR"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_OR; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_OR = new IS_OR; +Instructions.push(is_OR); + +class IS_NOR extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x307; + this.Mnemonic = "NOR"; + this.LongName = "Logical NOR"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_NOR; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_NOR = new IS_NOR; +Instructions.push(is_NOR); + +class IS_XOR extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x308; + this.Mnemonic = "XOR"; + this.LongName = "Logical XOR"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_XOR; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_XOR = new IS_XOR; +Instructions.push(is_XOR); + +class IS_XNOR extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x309; + this.Mnemonic = "XNOR"; + this.LongName = "Logical XNOR"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_ALU_XNOR; + this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; + } +} +is_XNOR = new IS_XNOR; +Instructions.push(is_XNOR); + +class IS_CMP extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x30A; + this.Mnemonic = "CMP"; + this.LongName = "Logical COMPARE"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_AB | CONTROL_ALU_ADD; + } +} +is_CMP = new IS_CMP; +Instructions.push(is_CMP); + +class IS_CMP_gpcd_abs extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x30B; + this.Mnemonic = "CMP"; + this.LongName = "Logical COMPARE"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "CD", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_CD | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_ALU_ADD; + } +} +is_CMP_cda = new IS_CMP_gpcd_abs(); +Instructions.push(is_CMP_cda); + +class IS_CMP_gpc_gpd extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x30C; + this.Mnemonic = "CMP"; + this.LongName = "Logical COMPARE"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "C", Bitwidth: 8},{Operand: "D", Bitwidth: 8}); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_CD | CONTROL_ALU_ADD; + } +} +is_CMP_c_d = new IS_CMP_gpc_gpd(); +Instructions.push(is_CMP_c_d); + +class IS_ADD_gpa_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x30D; + this.Mnemonic = "ADD"; + this.LongName = "Addition"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 10; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_BL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_AB | CONTROL_ALU_ADD; + this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RAIL | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL; + } +} +is_ADD_gpai = new IS_ADD_gpa_imm; +Instructions.push(is_ADD_gpai); + +class IS_ADD_gpb_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x30E; + this.Mnemonic = "ADD"; + this.LongName = "Addition"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "B", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 10; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_AB | CONTROL_ALU_ADD; + this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RBIL | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL; + } +} +is_ADD_gpbi = new IS_ADD_gpb_imm; +Instructions.push(is_ADD_gpbi); + +class IS_ADD_gpc_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x30F; + this.Mnemonic = "ADD"; + this.LongName = "Addition"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "C", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 10; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_CA | CONTROL_ALU_ADD; + this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RCIL | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL; + } +} +is_ADD_gpci = new IS_ADD_gpc_imm; +Instructions.push(is_ADD_gpci); + + +class IS_ADD_gpd_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x310; + this.Mnemonic = "ADD"; + this.LongName = "Addition"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array({Operand: "D", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 10; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_DA | CONTROL_ALU_ADD; + this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RDIL | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL; + } +} +is_ADD_gpdi = new IS_ADD_gpd_imm; +Instructions.push(is_ADD_gpdi); diff --git a/js/isa/branching.js b/js/isa/branching.js new file mode 100644 index 0000000..0dacfb2 --- /dev/null +++ b/js/isa/branching.js @@ -0,0 +1,247 @@ +class IS_JMP_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2C0; + this.Mnemonic = "JMP"; + this.LongName = "JUMP to address"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; + } +} +is_JMP_i = new IS_JMP_imm16; +Instructions.push(is_JMP_i); + +class IS_JMP_imm24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2C1; + this.Mnemonic = "JMP"; + this.LongName = "JUMP to address"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate24; + this.Operands = new Array({Operand: "$", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 7; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_PCI; + this.Microcode[6] = CONTROL_OUT_2O | CONTROL_RHI; + } +} +is_JMP_i24 = new IS_JMP_imm24; +Instructions.push(is_JMP_i24); + + +class IS_BCC_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.UsesCarry = true; + this.Bytecode = 0x2C2; + this.Mnemonic = "BCC"; + this.LongName = "Branch if Carry Clear"; + this.Aliases = new Array("JNC"); + + this.Type = InstructionTypes.Immediate; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.CarryWords = 2; + this.CarryCycles = 3; + this.MicrocodeCarry = new Array(16); + for (let a = 0; a < 16; a++) { + this.MicrocodeCarry[a] = this.Microcode[a]; + } + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; + this.MicrocodeCarry[2] = CONTROL_PCC; // Step over the immediate value + } +} + +is_BCC_i = new IS_BCC_imm; +Instructions.push(is_BCC_i); + +class IS_BCS_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.UsesCarry = true; + this.Bytecode = 0x2C3; + this.Mnemonic = "BCS"; + this.LongName = "Branch if Carry Set"; + this.Aliases = new Array("JC"); + + this.Type = InstructionTypes.Immediate; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 3; + this.CarryWords = 2; + this.CarryCycles = 4; + this.MicrocodeCarry = new Array(16); + for (let a = 0; a < 16; a++) { + this.MicrocodeCarry[a] = this.Microcode[a]; + } + this.Microcode[2] = CONTROL_PCC; // Step over the immediate value + this.MicrocodeCarry[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.MicrocodeCarry[3] = CONTROL_OUT_RO | CONTROL_PCI; + } +} + +is_BCS_i = new IS_BCS_imm; +Instructions.push(is_BCS_i); + +class IS_BEQ_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.UsesZero = true; + this.Bytecode = 0x2C4; + this.Mnemonic = "BEQ"; + this.LongName = "Branch if Equal"; + this.Aliases = new Array("JE","JZ"); + + this.Type = InstructionTypes.Immediate; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 3; + this.ZeroWords = 2; + this.ZeroCycles = 4; + this.MicrocodeZero = new Array(16); + for (let a = 0; a < 16; a++) { + this.MicrocodeZero[a] = this.Microcode[a]; + } + this.Microcode[2] = CONTROL_PCC; // Step over the immediate value + this.MicrocodeZero[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.MicrocodeZero[3] = CONTROL_OUT_RO | CONTROL_PCI; + } +} + +is_BEQ_i = new IS_BEQ_imm; +Instructions.push(is_BEQ_i); + +class IS_BNE_imm extends Microcode_Instruction { + constructor(props) { + super(props); + this.UsesZero = true; + this.Bytecode = 0x2C5; + this.Mnemonic = "BNE"; + this.LongName = "Branch if NOT Equal"; + this.Aliases = new Array("JNE","JNZ"); + + this.Type = InstructionTypes.Immediate; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.ZeroWords = 2; + this.ZeroCycles = 3; + this.MicrocodeZero = new Array(16); + for (let a = 0; a < 16; a++) { + this.MicrocodeZero[a] = this.Microcode[a]; + } + this.MicrocodeZero[2] = CONTROL_PCC; // Step over the immediate value + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; + } +} + +is_BNE_i = new IS_BNE_imm; +Instructions.push(is_BNE_i); + +class IS_JSR_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2FC; + this.Mnemonic = "JSR"; + this.LongName = "JUMP to Subroutine"; + 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_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_PCI; + + } +} +is_JSR_i = new IS_JSR_imm16; +Instructions.push(is_JSR_i); + +class IS_RTS_paged extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2FD; + this.Mnemonic = "RTS"; + this.LongName = "RETURN from Subroutine (called with 16 bit immediate)"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RTS16; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 6; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_PCI; + this.Microcode[5] = CONTROL_PCC; + } +} +is_RTS_paged = new IS_RTS_paged(); +Instructions.push(is_RTS_paged); + + +class IS_JSR_imm24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2FE; + this.Mnemonic = "JSR"; + this.LongName = "JUMP to Subroutine"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate24; + this.Operands = new Array({Operand: "$", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 11; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_PCI; + this.Microcode[10] = CONTROL_OUT_2O | CONTROL_RHI; + } +} +is_JSR_i24 = new IS_JSR_imm24; +Instructions.push(is_JSR_i24); + +class IS_RTS extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2FF; + this.Mnemonic = "RTS"; + this.LongName = "RETURN from Subroutine (called with 24 bit immediate)"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RTS24; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 9; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[6] = CONTROL_OUT_RO | CONTROL_PCI; + this.Microcode[7] = CONTROL_OUT_2O | CONTROL_RHI | CONTROL_PCC; + this.Microcode[8] = CONTROL_PCC; + } +} +is_RTS = new IS_RTS; +Instructions.push(is_RTS); diff --git a/js/isa/ldx.js b/js/isa/ldx.js new file mode 100644 index 0000000..f043b1a --- /dev/null +++ b/js/isa/ldx.js @@ -0,0 +1,1940 @@ +/* + LOAD x Instructions + + OPCODE Range: 0x000:0x0FF + + Addressing follows the following bit table: + + 0b000XXXXX Immediate load (8 bit for A-D, 16 bit for paired registers) + 0b001XXXXX 16 bit Absolute + 16 bit Immediate Offset (signed) + 0b010XXXXX 16 bit Absolute + 0b011XXXXX 24 bit Absolute + 0b100XXXXX 16 bit Indirect + 0b101XXXXX 24 bit Indirect + 0b110XXXXX 24 bit Indirect + 16 bit immediate offset (signed) + 0b111XXXXX 24 bit Absolute + 16 bit Absolute offset (signed) + + Register TO follows the following bit table: + + 0bXXX00000 [0x00] ABCD + 0bXXX00001 [0x01] CDAB + 0bXXX00010 [0x02] AL + 0bXXX00011 [0x03] AH + 0bXXX00100 [0x04] BL + 0bXXX00101 [0x05] BH + 0bXXX00110 [0x06] CL + 0bXXX00111 [0x07] CH + 0bXXX01000 [0x08] DL + 0bXXX01001 [0x09] DH + 0bXXX01010 [0x0A] AB + 0bXXX01011 [0x0B] AC + 0bXXX01100 [0x0C] AD + 0bXXX01101 [0x0D] BA + 0bXXX01110 [0x0E] BC + 0bXXX01111 [0x0F] BD + 0bXXX10000 [0x10] CA + 0bXXX10001 [0x11] CB + 0bXXX10010 [0x12] CD + 0bXXX10011 [0x13] DA + 0bXXX10100 [0x14] DB + 0bXXX10101 [0x15] DC + 0bXXX10110 [0x16] ABSP + 0bXXX10111 [0x17] CDSP + 0bXXX11000 [0x18] ALSP + 0bXXX11001 [0x19] AHSP + 0bXXX11010 [0x1A] BLSP + 0bXXX11011 [0x1B] BHSP + 0bXXX11100 [0x1C] + 0bXXX11101 [0x1D] + 0bXXX11110 [0x1E] SP + 0bXXX11111 [0x1F] SPP + + + Examples: + 24 bit indirect LDAB [SP] -> 0x0D6 [0b10110110] (Stack is pushed with LSW of address first, followed by MSW of address.) + 16 bit absolute LDAL 0x0420 -> 0x042 [0b01000010] + */ +//--------------------------- General Purpose Registers LDx Immediates --------------------------- +// 0x000:0x001 not used in this section +// 0x016:0x017 not used in this section +// 0x01C:0x01D not used in this section + +class IS_LDA_imm8 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x002; + this.Mnemonic = "LDA"; + this.LongName = "LOAD Register A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate8; + this.Operands = new Array({Operand: "$", Bitwidth: 8}); + + this.Words = 2; + this.Cycles = 4; + + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + } +} +is_LDA_i = new IS_LDA_imm8; +Instructions.push(is_LDA_i); + +class IS_LDB_imm8 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x004; + this.Mnemonic = "LDB"; + this.LongName = "LOAD Register B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate8; + this.Operands = new Array({Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; + } +} +is_LDB_i = new IS_LDB_imm8; +Instructions.push(is_LDB_i); + +class IS_LDC_imm8 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x006; + this.Mnemonic = "LDC"; + this.LongName = "LOAD Register C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate8; + this.Operands = new Array({Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; + } +} +is_LDC_i = new IS_LDC_imm8; +Instructions.push(is_LDC_i); + +class IS_LDD_imm8 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x008; + this.Mnemonic = "LDD"; + this.LongName = "LOAD Register D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate8; + this.Operands = new Array({Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; + } +} +is_LDD_i = new IS_LDD_imm8; +Instructions.push(is_LDD_i); + +class IS_LDAB_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x00A; + this.Mnemonic = "LDAB"; + this.LongName = "LOAD Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDAB_i = new IS_LDAB_imm16; +Instructions.push(is_LDAB_i); + +class IS_LDAC_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x00B; + this.Mnemonic = "LDAC"; + this.LongName = "LOAD Register A and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDAC_i = new IS_LDAC_imm16; +Instructions.push(is_LDAC_i); + +class IS_LDAD_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x00C; + this.Mnemonic = "LDAD"; + this.LongName = "LOAD Register A and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDAD_i = new IS_LDAD_imm16; +Instructions.push(is_LDAD_i); + +class IS_LDBA_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x00D; + this.Mnemonic = "LDBA"; + this.LongName = "LOAD Register B and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDBA_i = new IS_LDBA_imm16; +Instructions.push(is_LDBA_i); + +class IS_LDBC_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x00E; + this.Mnemonic = "LDBC"; + this.LongName = "LOAD Register B and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDBC_i = new IS_LDBC_imm16; +Instructions.push(is_LDBC_i); + +class IS_LDBD_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x00F; + this.Mnemonic = "LDBD"; + this.LongName = "LOAD Register B and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDBD_i = new IS_LDBD_imm16; +Instructions.push(is_LDBD_i); + +class IS_LDCA_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x010; + this.Mnemonic = "LDCA"; + this.LongName = "LOAD Register C and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDCA_i = new IS_LDCA_imm16; +Instructions.push(is_LDCA_i); + +class IS_LDCB_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x011; + this.Mnemonic = "LDCB"; + this.LongName = "LOAD Register C and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDCB_i = new IS_LDCB_imm16; +Instructions.push(is_LDCB_i); + +class IS_LDCD_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x012; + this.Mnemonic = "LDCD"; + this.LongName = "LOAD Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDCD_i = new IS_LDCD_imm16; +Instructions.push(is_LDCD_i); + +class IS_LDDA_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x013; + this.Mnemonic = "LDDA"; + this.LongName = "LOAD Register D and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDDA_i = new IS_LDDA_imm16; +Instructions.push(is_LDDA_i); + +class IS_LDDB_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x014; + this.Mnemonic = "LDDB"; + this.LongName = "LOAD Register D and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDDB_i = new IS_LDDB_imm16; +Instructions.push(is_LDDB_i); + +class IS_LDDC_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x015; + this.Mnemonic = "LDDC"; + this.LongName = "LOAD Register D and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDDC_i = new IS_LDDC_imm16; +Instructions.push(is_LDDC_i); + +class IS_LDSP_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x01E; + this.Mnemonic = "LDSP"; + this.LongName = "LOAD Stack Pointer"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_SPI; + } +} +is_LDSP_i = new IS_LDSP_imm16; +Instructions.push(is_LDSP_i); + +class IS_LDSPP_imm8 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x01F; + this.Mnemonic = "LDSPP"; + this.LongName = "LOAD Stack Pointer Page"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate8; + this.Operands = new Array({Operand: "$", Bitwidth: 8}); + this.Words = 2; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HS | CONTROL_PCC; + } +} +is_LDSPP_i = new IS_LDSPP_imm8; +Instructions.push(is_LDSPP_i); + + +//--------------------------- General Purpose Registers LDx Absolutes --------------------------- +// 0x01C:0x01D not used in this section + +class IS_LDAB_CDabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x040; + this.Mnemonic = "LDAB"; + this.LongName = "LOAD Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "CD", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_CD | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH; + } +} +is_LDAB_cda = new IS_LDAB_CDabs16(); +Instructions.push(is_LDAB_cda); + +class IS_LDCD_ABabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x041; + this.Mnemonic = "LDCD"; + this.LongName = "LOAD Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "AB", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_AB | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH; + } +} +is_LDCD_aba = new IS_LDCD_ABabs16(); +Instructions.push(is_LDCD_aba); + +class IS_LDAL_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x042; + this.Mnemonic = "LDAL"; + this.LongName = "LOAD Register A from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + } +} +is_LDAL_a = new IS_LDAL_abs16; +Instructions.push(is_LDAL_a); + +class IS_LDAH_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x043; + this.Mnemonic = "LDAH"; + this.LongName = "LOAD Register A from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDAH_a = new IS_LDAH_abs16; +Instructions.push(is_LDAH_a); + + +class IS_LDBL_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x044; + this.Mnemonic = "LDBL"; + this.LongName = "LOAD Register B from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; + } +} +is_LDBL_a = new IS_LDBL_abs16; +Instructions.push(is_LDBL_a); + +class IS_LDBH_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x045; + this.Mnemonic = "LDBH"; + this.LongName = "LOAD Register B from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDBH_a = new IS_LDBH_abs16; +Instructions.push(is_LDBH_a); + +class IS_LDCL_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x046; + this.Mnemonic = "LDCL"; + this.LongName = "LOAD Register C from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; + } +} +is_LDCL_a = new IS_LDCL_abs16; +Instructions.push(is_LDCL_a); + +class IS_LDCH_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x047; + this.Mnemonic = "LDCH"; + this.LongName = "LOAD Register C from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDCH_a = new IS_LDCH_abs16; +Instructions.push(is_LDCH_a); + +class IS_LDDL_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x048; + this.Mnemonic = "LDDL"; + this.LongName = "LOAD Register D from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; + } +} +is_LDDL_a = new IS_LDDL_abs16; +Instructions.push(is_LDDL_a); + +class IS_LDDH_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x049; + this.Mnemonic = "LDDH"; + this.LongName = "LOAD Register D from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDDH_a = new IS_LDDH_abs16; +Instructions.push(is_LDDH_a); + +class IS_LDAB_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x04A; + this.Mnemonic = "LDAB"; + this.LongName = "LOAD Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDAB_a = new IS_LDAB_abs16; +Instructions.push(is_LDAB_a); + +class IS_LDAC_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x04B; + this.Mnemonic = "LDAC"; + this.LongName = "LOAD Register A and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDAC_a = new IS_LDAC_abs16; +Instructions.push(is_LDAC_a); + +class IS_LDAD_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x04C; + this.Mnemonic = "LDAD"; + this.LongName = "LOAD Register A and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDAD_a = new IS_LDAD_abs16; +Instructions.push(is_LDAD_a); + +class IS_LDBA_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x04D; + this.Mnemonic = "LDBA"; + this.LongName = "LOAD Register B and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDBA_a = new IS_LDBA_abs16; +Instructions.push(is_LDBA_a); + +class IS_LDBC_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x04E; + this.Mnemonic = "LDBC"; + this.LongName = "LOAD Register B and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDBC_a = new IS_LDBC_abs16; +Instructions.push(is_LDBC_a); + +class IS_LDBD_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x04F; + this.Mnemonic = "LDBD"; + this.LongName = "LOAD Register B and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDBD_a = new IS_LDBD_abs16; +Instructions.push(is_LDBD_a); + +class IS_LDCA_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x050; + this.Mnemonic = "LDCA"; + this.LongName = "LOAD Register C and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDCA_a = new IS_LDCA_abs16; +Instructions.push(is_LDCA_a); + +class IS_LDCB_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x051; + this.Mnemonic = "LDCB"; + this.LongName = "LOAD Register C and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDCB_a = new IS_LDCB_abs16; +Instructions.push(is_LDCB_a); + +class IS_LDCD_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x052; + this.Mnemonic = "LDCD"; + this.LongName = "LOAD Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH | CONTROL_PCC; + } +} +is_LDCD_a = new IS_LDCD_abs16; +Instructions.push(is_LDCD_a); + +class IS_LDDA_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x053; + this.Mnemonic = "LDDA"; + this.LongName = "LOAD Register D and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDDA_a = new IS_LDDA_abs16; +Instructions.push(is_LDDA_a); + +class IS_LDDB_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x054; + this.Mnemonic = "LDDB"; + this.LongName = "LOAD Register D and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RBIH | CONTROL_PCC; + } +} +is_LDDB_a = new IS_LDDB_abs16; +Instructions.push(is_LDDB_a); + +class IS_LDDC_abs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x055; + this.Mnemonic = "LDDC"; + this.LongName = "LOAD Register D and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute16; + this.Operands = new Array({Operand: "", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RCIH | CONTROL_PCC; + } +} +is_LDDC_a = new IS_LDDC_abs16; +Instructions.push(is_LDDC_a); + +class IS_LDAB_SPabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x056; + this.Mnemonic = "LDAB"; + this.LongName = "LOAD Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH; + } +} +is_LDAB_spa = new IS_LDAB_SPabs16(); +Instructions.push(is_LDAB_spa); + +class IS_LDCD_SPabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x057; + this.Mnemonic = "LDCD"; + this.LongName = "LOAD Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH; + } +} +is_LDCD_spa = new IS_LDCD_SPabs16(); +Instructions.push(is_LDCD_spa); + +class IS_LDAL_SPabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x058; + this.Mnemonic = "LDAL"; + this.LongName = "LOAD Register A from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL; + } +} +is_LDAL_spa = new IS_LDAL_SPabs16(); +Instructions.push(is_LDAL_spa); + +class IS_LDAH_SPabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x059; + this.Mnemonic = "LDAH"; + this.LongName = "LOAD Register A from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIH; + } +} +is_LDAH_spa = new IS_LDAH_SPabs16(); +Instructions.push(is_LDAH_spa); + +class IS_LDBL_SPabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x05A; + this.Mnemonic = "LDBL"; + this.LongName = "LOAD Register B from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL; + } +} +is_LDBL_spa = new IS_LDBL_SPabs16(); +Instructions.push(is_LDBL_spa); + +class IS_LDBH_SPabs16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x05B; + this.Mnemonic = "LDBH"; + this.LongName = "LOAD Register B from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIH; + } +} +is_LDBH_spa = new IS_LDBH_SPabs16(); +Instructions.push(is_LDBH_spa); + +class IS_LDAL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x062; + this.Mnemonic = "LDAL"; + this.LongName = "LOAD Register A from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAL_a24 = new IS_LDAL_abs24; +Instructions.push(is_LDAL_a24); + +class IS_LDAH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x063; + this.Mnemonic = "LDAH"; + this.LongName = "LOAD Register A from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAH_a24 = new IS_LDAH_abs24; +Instructions.push(is_LDAH_a24); + +class IS_LDBL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x064; + this.Mnemonic = "LDBL"; + this.LongName = "LOAD Register B from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBL_a24 = new IS_LDBL_abs24; +Instructions.push(is_LDBL_a24); + +class IS_LDBH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x065; + this.Mnemonic = "LDBH"; + this.LongName = "LOAD Register B from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBH_a24 = new IS_LDBH_abs24; +Instructions.push(is_LDBH_a24); + +class IS_LDCL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x066; + this.Mnemonic = "LDCL"; + this.LongName = "LOAD Register C from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCL_a24 = new IS_LDCL_abs24; +Instructions.push(is_LDCL_a24); + +class IS_LDCH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x067; + this.Mnemonic = "LDCH"; + this.LongName = "LOAD Register C from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RCIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCH_a24 = new IS_LDCH_abs24; +Instructions.push(is_LDCH_a24); + +class IS_LDDL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x068; + this.Mnemonic = "LDDL"; + this.LongName = "LOAD Register D from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDL_a24 = new IS_LDDL_abs24; +Instructions.push(is_LDDL_a24); + +class IS_LDDH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x069; + this.Mnemonic = "LDDH"; + this.LongName = "LOAD Register D from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RDIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDH_a24 = new IS_LDDH_abs24; +Instructions.push(is_LDDH_a24); + +class IS_LDAB_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x06A; + this.Mnemonic = "LDAB"; + this.LongName = "LOAD Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAB_a24 = new IS_LDAB_abs24; +Instructions.push(is_LDAB_a24); + +class IS_LDAC_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x06B; + this.Mnemonic = "LDAC"; + this.LongName = "LOAD Register A and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RCIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAC_a24 = new IS_LDAC_abs24; +Instructions.push(is_LDAC_a24); + +class IS_LDAD_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x06C; + this.Mnemonic = "LDAD"; + this.LongName = "LOAD Register A and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RDIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAD_a24 = new IS_LDAD_abs24; +Instructions.push(is_LDAD_a24); + +class IS_LDBA_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x06D; + this.Mnemonic = "LDBA"; + this.LongName = "LOAD Register B and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RAIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBA_a24 = new IS_LDBA_abs24; +Instructions.push(is_LDBA_a24); + +class IS_LDBC_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x06E; + this.Mnemonic = "LDBC"; + this.LongName = "LOAD Register B and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RCIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBC_a24 = new IS_LDBC_abs24; +Instructions.push(is_LDBC_a24); + +class IS_LDBD_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x06F; + this.Mnemonic = "LDBD"; + this.LongName = "LOAD Register B and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RDIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBD_a24 = new IS_LDBD_abs24; +Instructions.push(is_LDBD_a24); + +class IS_LDCA_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x070; + this.Mnemonic = "LDCA"; + this.LongName = "LOAD Register C and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RAIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCA_a24 = new IS_LDCA_abs24; +Instructions.push(is_LDCA_a24); + +class IS_LDCB_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x071; + this.Mnemonic = "LDCB"; + this.LongName = "LOAD Register C and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RBIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCB_a24 = new IS_LDCB_abs24; +Instructions.push(is_LDCB_a24); + +class IS_LDCD_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x072; + this.Mnemonic = "LDCD"; + this.LongName = "LOAD Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCD_a24 = new IS_LDCD_abs24; +Instructions.push(is_LDCD_a24); + +class IS_LDDA_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x073; + this.Mnemonic = "LDDA"; + this.LongName = "LOAD Register D and A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RAIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDA_a24 = new IS_LDDA_abs24; +Instructions.push(is_LDDA_a24); + +class IS_LDDB_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x074; + this.Mnemonic = "LDDB"; + this.LongName = "LOAD Register D and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RBIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDB_a24 = new IS_LDDB_abs24; +Instructions.push(is_LDDB_a24); + +class IS_LDDC_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x075; + this.Mnemonic = "LDDC"; + this.LongName = "LOAD Register D and C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + this.Operands = new Array({Operand: "", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 12; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RCIH | CONTROL_PCC; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDC_a24 = new IS_LDDC_abs24; +Instructions.push(is_LDDC_a24); + + +//--------------------------- General Purpose Registers LDx Indirect --------------------------- + +class IS_LDAL_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x082; + this.Mnemonic = "LDAL"; + this.LongName = "LOAD Register A from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect16; + 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_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + } +} +is_LDAL_in = new IS_LDAL_ind16; +Instructions.push(is_LDAL_in); + +class IS_LDAH_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x083; + this.Mnemonic = "LDAH"; + this.LongName = "LOAD Register A from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect16; + 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_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIH | CONTROL_PCC; + } +} +is_LDAH_in = new IS_LDAH_ind16; +Instructions.push(is_LDAH_in); + +class IS_LDBL_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x084; + this.Mnemonic = "LDBL"; + this.LongName = "LOAD Register B from LOW Byte"; + this.Aliases = new Array(); + this.Words = 2; + this.Cycles = 6; + + this.Type = InstructionTypes.Indirect16; + this.Operands = new Array({Operand: "#", Bitwidth: 16}); + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; + } +} + +is_LDBL_in = new IS_LDBL_ind16; +Instructions.push(is_LDBL_in); + +class IS_LDBH_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x085; + this.Mnemonic = "LDBH"; + this.LongName = "LOAD Register B from HIGH Byte"; + this.Aliases = new Array(); + this.Words = 2; + this.Cycles = 6; + + this.Type = InstructionTypes.Indirect16; + this.Operands = new Array({Operand: "#", Bitwidth: 16}); + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RBIH | CONTROL_PCC; + } +} + +is_LDBH_in = new IS_LDBH_ind16; +Instructions.push(is_LDBH_in); + + +class IS_LDCL_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x086; + this.Mnemonic = "LDCL"; + this.LongName = "LOAD Register C from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect16; + 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_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; + } +} + +is_LDCL_in = new IS_LDCL_ind16; +Instructions.push(is_LDCL_in); + +class IS_LDCH_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x087; + this.Mnemonic = "LDCH"; + this.LongName = "LOAD Register C from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect16; + 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_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RCIH | CONTROL_PCC; + } +} + +is_LDCH_in = new IS_LDCH_ind16; +Instructions.push(is_LDCH_in); + +class IS_LDDL_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x088; + this.Mnemonic = "LDDL"; + this.LongName = "LOAD Register D from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect16; + 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_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; + } +} + +is_LDDL_in = new IS_LDDL_ind16; +Instructions.push(is_LDDL_in); + +class IS_LDDH_ind16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x089; + this.Mnemonic = "LDDH"; + this.LongName = "LOAD Register D from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect16; + 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_RO | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RDIH | CONTROL_PCC; + } +} + +is_LDDH_in = new IS_LDDH_ind16; +Instructions.push(is_LDDH_in); + +class IS_LDAL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C2; + this.Mnemonic = "LDAL"; + this.LongName = "LOAD Register A from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAL_in24 = new IS_LDAL_ind24; +Instructions.push(is_LDAL_in24); + +class IS_LDAH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C3; + this.Mnemonic = "LDAH"; + this.LongName = "LOAD Register A from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RAIH | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDAH_in24 = new IS_LDAH_ind24; +Instructions.push(is_LDAH_in24); + +class IS_LDBL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C4; + this.Mnemonic = "LDBL"; + this.LongName = "LOAD Register B from LOW Byte"; + this.Aliases = new Array(); + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBL_in24 = new IS_LDBL_ind24; +Instructions.push(is_LDBL_in24); + +class IS_LDBH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C5; + this.Mnemonic = "LDBH"; + this.LongName = "LOAD Register B from HIGH Byte"; + this.Aliases = new Array(); + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RBIH | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDBH_in24 = new IS_LDBH_ind24; +Instructions.push(is_LDBH_in24); + +class IS_LDCL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C6; + this.Mnemonic = "LDCL"; + this.LongName = "LOAD Register C from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCL_in24 = new IS_LDCL_ind24; +Instructions.push(is_LDCL_in24); + +class IS_LDCH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C7; + this.Mnemonic = "LDCH"; + this.LongName = "LOAD Register C from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RCIH | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDCH_in24 = new IS_LDCH_ind24; +Instructions.push(is_LDCH_in24); + +class IS_LDDL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C8; + this.Mnemonic = "LDDL"; + this.LongName = "LOAD Register D from LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDL_in24 = new IS_LDDL_ind24; +Instructions.push(is_LDDL_in24); + +class IS_LDDH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0C9; + this.Mnemonic = "LDDH"; + this.LongName = "LOAD Register D from HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "#", Bitwidth: 24}); + this.Words = 3; + this.Cycles = 13; + + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; + this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; + this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RDIH | CONTROL_PCC; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_LDDH_in24 = new IS_LDDH_ind24; +Instructions.push(is_LDDH_in24); + diff --git a/js/isa/misc.js b/js/isa/misc.js new file mode 100644 index 0000000..da525ff --- /dev/null +++ b/js/isa/misc.js @@ -0,0 +1,33 @@ +class IS_NOP extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x3ff; + this.Mnemonic = "NOP"; + this.LongName = "NO OPERATION"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.SingleWord; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 2; + } +} +is_NOP = new IS_NOP; +Instructions.push(is_NOP); + +class IS_NOP0 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x0; + this.Mnemonic = "NOP"; + this.LongName = "NO OPERATION"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.SingleWord; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 2; + } +} +is_NOP0 = new IS_NOP0; +Instructions.push(is_NOP0); diff --git a/js/isa/phx.js b/js/isa/phx.js new file mode 100644 index 0000000..aa9fceb --- /dev/null +++ b/js/isa/phx.js @@ -0,0 +1,113 @@ +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_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); diff --git a/js/isa/plx.js b/js/isa/plx.js new file mode 100644 index 0000000..ce813b9 --- /dev/null +++ b/js/isa/plx.js @@ -0,0 +1,119 @@ +class IS_PLA extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2A0; + this.Mnemonic = "PLA"; + this.LongName = "PULL Stack and place in Register A (Low BYTE)"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL; + } +} +is_PLA = new IS_PLA; +Instructions.push(is_PLA); + +class IS_PLB extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2A1; + this.Mnemonic = "PLB"; + this.LongName = "PULL Stack and place in Register B (Low BYTE)"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Words = 1; + this.Cycles = 5; + this.Operands = new Array(); + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL; + } +} +is_PLB = new IS_PLB; +Instructions.push(is_PLB); + +class IS_PLC extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2A2; + this.Mnemonic = "PLC"; + this.LongName = "PULL Stack and place in Register C (Low BYTE)"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL; + } +} +is_PLC = new IS_PLC; +Instructions.push(is_PLC); + +class IS_PLD extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2A3; + this.Mnemonic = "PLD"; + this.LongName = "PULL Stack and place in Register D (Low BYTE)"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL; + } +} +is_PLD = new IS_PLD; +Instructions.push(is_PLD); + +class IS_PLAB extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2A4; + this.Mnemonic = "PLAB"; + this.LongName = "PULL Stack and place in Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH; + } +} +is_PLAB = new IS_PLAB; +Instructions.push(is_PLAB); + +class IS_PLCD extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x2AC; + this.Mnemonic = "PLCD"; + this.LongName = "PULL Stack and place in Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 5; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH; + } +} +is_PLCD = new IS_PLCD; +Instructions.push(is_PLCD); diff --git a/js/isa/stx.js b/js/isa/stx.js new file mode 100644 index 0000000..4aca19e --- /dev/null +++ b/js/isa/stx.js @@ -0,0 +1,270 @@ +class IS_STAL_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x102; + this.Mnemonic = "STAL"; + this.LongName = "STORE Register A to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI; + + } +} +is_STAL_i = new IS_STAL_imm16; +Instructions.push(is_STAL_i); + +class IS_STAH_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x103; + this.Mnemonic = "STAH"; + this.LongName = "STORE Register A to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_AH | CONTROL_RI; + } +} +is_STAH_i = new IS_STAH_imm16; +Instructions.push(is_STAH_i); + +class IS_STBL_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x104; + this.Mnemonic = "STBL"; + this.LongName = "STORE Register B to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_BL | CONTROL_RI; + } +} +is_STBL_i = new IS_STBL_imm16; +Instructions.push(is_STBL_i); + +class IS_STBH_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x105; + this.Mnemonic = "STBH"; + this.LongName = "STORE Register B to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_BH | CONTROL_RI; + } +} +is_STBH_i = new IS_STBH_imm16; +Instructions.push(is_STBH_i); + +class IS_STCL_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x106; + this.Mnemonic = "STCL"; + this.LongName = "STORE Register C to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_CL | CONTROL_RI; + } +} +is_STCL_i = new IS_STCL_imm16; +Instructions.push(is_STCL_i); + +class IS_STCH_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x107; + this.Mnemonic = "STCH"; + this.LongName = "STORE Register C to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_CH | CONTROL_RI; + } +} +is_STCH_i = new IS_STCH_imm16; +Instructions.push(is_STCH_i); + +class IS_STDL_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x108; + this.Mnemonic = "STDL"; + this.LongName = "STORE Register D to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_DL | CONTROL_RI; + } +} +is_STDL_i = new IS_STDL_imm16; +Instructions.push(is_STDL_i); + +class IS_STDH_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x109; + this.Mnemonic = "STDH"; + this.LongName = "STORE Register D to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_DH | CONTROL_RI; + } +} +is_STDH_i = new IS_STDH_imm16; +Instructions.push(is_STDH_i); + +class IS_STAB_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x10A; + this.Mnemonic = "STAB"; + this.LongName = "STORE Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_AB | CONTROL_RI; + } +} +is_STAB_i = new IS_STAB_imm16; +Instructions.push(is_STAB_i); + +class IS_STAB_sp extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x156; + this.Mnemonic = "STAB"; + this.LongName = "STORE Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterAbsolute; + this.Operands = new Array({Operand: "SP", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 6; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[5] = CONTROL_OUT_AB | CONTROL_RI; + } +} +is_STAB_sp = new IS_STAB_sp; +Instructions.push(is_STAB_sp); + +class IS_PSTAL_sp_ind extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x198; + this.Mnemonic = "PSTAL"; + this.LongName = "Page STORE Register A to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterIndirect; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 6; + this.Microcode[2] = CONTROL_SPC; + this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[5] = CONTROL_OUT_AL | CONTROL_RI; + } +} +is_PSTAL_spin = new IS_PSTAL_sp_ind; +Instructions.push(is_PSTAL_spin); + +class IS_PSTAL_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x102; + this.Mnemonic = "PSTAL"; + this.LongName = "Page STORE Register A to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 2; + this.Cycles = 5; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI; + } +} +is_PSTAL_i = new IS_PSTAL_imm16; +Instructions.push(is_PSTAL_i); + +class IS_STAL_sp_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D8; + this.Mnemonic = "STAL"; + this.LongName = "STORE Register A to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.RegisterIndirect; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); + this.Words = 1; + this.Cycles = 12; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; + this.Microcode[4] = CONTROL_SPC; + this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[6] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[7] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_AL | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + //this.Microcode[12] = 0; + } +} +is_STAL_spin = new IS_STAL_sp_ind24; +Instructions.push(is_STAL_spin); diff --git a/js/isa/tx.js b/js/isa/tx.js new file mode 100644 index 0000000..47951aa --- /dev/null +++ b/js/isa/tx.js @@ -0,0 +1,227 @@ +class IS_TAB extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x200; + this.Mnemonic = "TAB"; + this.LongName = "TRANSFER Register A to B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RBIL; + } +} + +is_TAB = new IS_TAB; +Instructions.push(is_TAB); + +class IS_TAC extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x201; + this.Mnemonic = "TAC"; + this.LongName = "TRANSFER Register A to C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RCIL; + } +} + +is_TAC = new IS_TAC; +Instructions.push(is_TAC); + +class IS_TAD extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x202; + this.Mnemonic = "TAD"; + this.LongName = "TRANSFER Register A to D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RDIL; + } +} + +is_TAD = new IS_TAD; +Instructions.push(is_TAD); + +class IS_TBA extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x203; + this.Mnemonic = "TBA"; + this.LongName = "TRANSFER Register B to A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RAIL; + } +} + +is_TBA = new IS_TBA; +Instructions.push(is_TBA); + +class IS_TBC extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x204; + this.Mnemonic = "TBC"; + this.LongName = "TRANSFER Register B to C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RCIL; + } +} + +is_TBC = new IS_TBC; +Instructions.push(is_TBC); + +class IS_TBD extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x205; + this.Mnemonic = "TBD"; + this.LongName = "TRANSFER Register B to D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RDIL; + } +} + +is_TBD = new IS_TBD; +Instructions.push(is_TBD); + +class IS_TCA extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x206; + this.Mnemonic = "TCA"; + this.LongName = "TRANSFER Register C to A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RAIL; + } +} + +is_TCA = new IS_TCA; +Instructions.push(is_TCA); + +class IS_TCB extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x207; + this.Mnemonic = "TCB"; + this.LongName = "TRANSFER Register C to B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RBIL; + } +} + +is_TCB = new IS_TCB; +Instructions.push(is_TCB); + +class IS_TCD extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x208; + this.Mnemonic = "TCD"; + this.LongName = "TRANSFER Register C to D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RDIL; + } +} + +is_TCD = new IS_TCD; +Instructions.push(is_TCD); + +class IS_TDA extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x209; + this.Mnemonic = "TDA"; + this.LongName = "TRANSFER Register D to A"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RAIL; + } +} + +is_TDA = new IS_TDA; +Instructions.push(is_TDA); + +class IS_TDB extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x20A; + this.Mnemonic = "TDB"; + this.LongName = "TRANSFER Register D to B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RBIL; + } +} + +is_TDB = new IS_TDB; +Instructions.push(is_TDB); + +class IS_TDC extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x20B; + this.Mnemonic = "TDC"; + this.LongName = "TRANSFER Register D to C"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Register; + this.Operands = new Array(); + this.Words = 1; + this.Cycles = 3; + this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RCIL; + } +} + +is_TDC = new IS_TDC; +Instructions.push(is_TDC); diff --git a/js/main.js b/js/main.js index 9297131..87c8952 100644 --- a/js/main.js +++ b/js/main.js @@ -24,7 +24,7 @@ cpu.RAM[0xD5] = is_PHA.Bytecode; cpu.RAM[0xD6] = is_LDAB_i.Bytecode; cpu.RAM[0xD7] = v_displayl; cpu.RAM[0xD8] = is_PHAB.Bytecode; -cpu.RAM[0xD9] = is_LDAB_GPCD.Bytecode; // printloop +cpu.RAM[0xD9] = is_LDAB_cda.Bytecode; // printloop cpu.RAM[0xDA] = is_CMP.Bytecode; cpu.RAM[0xDB] = is_BEQ_i.Bytecode; cpu.RAM[0xDC] = v_return; diff --git a/js/microcode_compiler.js b/js/microcode_compiler.js index 87ebabc..84bac8e 100644 --- a/js/microcode_compiler.js +++ b/js/microcode_compiler.js @@ -242,2146 +242,4 @@ class Microcode_Instruction { } } -//--------------------------- General Purpose Registers LDx Immediates --------------------------- - -class IS_LDA_imm8 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x002; - this.Mnemonic = "LDA"; - this.LongName = "LOAD Register A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate8; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); - - this.Words = 2; - this.Cycles = 4; - - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - } -} -is_LDA_i = new IS_LDA_imm8; -Instructions.push(is_LDA_i); - -class IS_LDB_imm8 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x004; - this.Mnemonic = "LDB"; - this.LongName = "LOAD Register B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate8; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; - } -} -is_LDB_i = new IS_LDB_imm8; -Instructions.push(is_LDB_i); - -class IS_LDC_imm8 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x006; - this.Mnemonic = "LDC"; - this.LongName = "LOAD Register C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate8; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; - } -} -is_LDC_i = new IS_LDC_imm8; -Instructions.push(is_LDC_i); - -class IS_LDD_imm8 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x008; - this.Mnemonic = "LDD"; - this.LongName = "LOAD Register D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate8; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; - } -} -is_LDD_i = new IS_LDD_imm8; -Instructions.push(is_LDD_i); - -class IS_LDAB_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x00A; - this.Mnemonic = "LDAB"; - this.LongName = "LOAD Register A and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH | CONTROL_PCC; - } -} -is_LDAB_i = new IS_LDAB_imm16; -Instructions.push(is_LDAB_i); - -class IS_LDAC_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x00B; - this.Mnemonic = "LDAC"; - this.LongName = "LOAD Register A and C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RCIH | CONTROL_PCC; - } -} -is_LDAC_i = new IS_LDAC_imm16; -Instructions.push(is_LDAC_i); - -class IS_LDAD_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x00C; - this.Mnemonic = "LDAD"; - this.LongName = "LOAD Register A and D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RDIH | CONTROL_PCC; - } -} -is_LDAD_i = new IS_LDAD_imm16; -Instructions.push(is_LDAD_i); - -class IS_LDBA_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x00D; - this.Mnemonic = "LDBA"; - this.LongName = "LOAD Register B and A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RAIH | CONTROL_PCC; - } -} -is_LDBA_i = new IS_LDBA_imm16; -Instructions.push(is_LDBA_i); - -class IS_LDBC_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x00E; - this.Mnemonic = "LDBC"; - this.LongName = "LOAD Register B and C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RCIH | CONTROL_PCC; - } -} -is_LDBC_i = new IS_LDBC_imm16; -Instructions.push(is_LDBC_i); - -class IS_LDBD_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x00F; - this.Mnemonic = "LDBD"; - this.LongName = "LOAD Register B and D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_RDIH | CONTROL_PCC; - } -} -is_LDBD_i = new IS_LDBD_imm16; -Instructions.push(is_LDBD_i); - -class IS_LDCA_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x010; - this.Mnemonic = "LDCA"; - this.LongName = "LOAD Register C and A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RAIH | CONTROL_PCC; - } -} -is_LDCA_i = new IS_LDCA_imm16; -Instructions.push(is_LDCA_i); - -class IS_LDCB_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x011; - this.Mnemonic = "LDCB"; - this.LongName = "LOAD Register C and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RBIH | CONTROL_PCC; - } -} -is_LDCB_i = new IS_LDCB_imm16; -Instructions.push(is_LDCB_i); - -class IS_LDCD_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x012; - this.Mnemonic = "LDCD"; - this.LongName = "LOAD Register C and D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH | CONTROL_PCC; - } -} -is_LDCD_i = new IS_LDCD_imm16; -Instructions.push(is_LDCD_i); - -class IS_LDDA_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x013; - this.Mnemonic = "LDDA"; - this.LongName = "LOAD Register D and A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RAIH | CONTROL_PCC; - } -} -is_LDDA_i = new IS_LDDA_imm16; -Instructions.push(is_LDDA_i); - -class IS_LDDB_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x014; - this.Mnemonic = "LDDB"; - this.LongName = "LOAD Register D and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RBIH | CONTROL_PCC; - } -} -is_LDDB_i = new IS_LDDB_imm16; -Instructions.push(is_LDDB_i); - -class IS_LDDC_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x015; - this.Mnemonic = "LDDC"; - this.LongName = "LOAD Register D and C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_RCIH | CONTROL_PCC; - } -} -is_LDDC_i = new IS_LDDC_imm16; -Instructions.push(is_LDDC_i); - - - -//--------------------------- General Purpose Registers LDx Absolutes --------------------------- - - -class IS_LDA_abs16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x042; - this.Mnemonic = "LDA"; - this.LongName = "LOAD Register A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute16; - this.Operands = new Array({Operand: "", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - } -} -is_LDA_a = new IS_LDA_abs16; -Instructions.push(is_LDA_a); - -class IS_LDB_abs16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x044; - this.Mnemonic = "LDB"; - this.LongName = "LOAD Register B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute16; - this.Operands = new Array({Operand: "", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; - } -} -is_LDB_a = new IS_LDB_abs16; -Instructions.push(is_LDB_a); - -class IS_LDC_abs16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x046; - this.Mnemonic = "LDC"; - this.LongName = "LOAD Register C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute16; - this.Operands = new Array({Operand: "", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; - } -} -is_LDC_a = new IS_LDC_abs16; -Instructions.push(is_LDC_a); - -class IS_LDD_abs16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x048; - this.Mnemonic = "LDD"; - this.LongName = "LOAD Register D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute16; - this.Operands = new Array({Operand: "", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; - } -} -is_LDD_a = new IS_LDD_abs16; -Instructions.push(is_LDD_a); - -class IS_LDA_abs24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x062; - this.Mnemonic = "LDA"; - this.LongName = "LOAD Register A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute24; - this.Operands = new Array({Operand: "", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 12; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDA_a24 = new IS_LDA_abs24; -Instructions.push(is_LDA_a24); - -class IS_LDB_abs24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x064; - this.Mnemonic = "LDB"; - this.LongName = "LOAD Register B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute24; - this.Operands = new Array({Operand: "", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 12; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; - this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDB_a24 = new IS_LDB_abs24; -Instructions.push(is_LDB_a24); - -class IS_LDC_abs24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x066; - this.Mnemonic = "LDC"; - this.LongName = "LOAD Register C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute24; - this.Operands = new Array({Operand: "", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 12; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; - this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDC_a24 = new IS_LDC_abs24; -Instructions.push(is_LDC_a24); - -class IS_LDD_abs24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x068; - this.Mnemonic = "LDD"; - this.LongName = "LOAD Register D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute24; - this.Operands = new Array({Operand: "", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 12; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; - this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDD_a24 = new IS_LDD_abs24; -Instructions.push(is_LDD_a24); - - -//--------------------------- General Purpose Registers LDx Indirect --------------------------- - -class IS_LDA_ind16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x082; - this.Mnemonic = "LDA"; - this.LongName = "LOAD Register A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Indirect16; - 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_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - } -} -is_LDA_in = new IS_LDA_ind16; -Instructions.push(is_LDA_in); - -class IS_LDB_ind16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x084; - this.Mnemonic = "LDB"; - this.LongName = "LOAD Register B"; - this.Aliases = new Array(); - this.Words = 2; - this.Cycles = 6; - - this.Type = InstructionTypes.Indirect16; - this.Operands = new Array({Operand: "#", Bitwidth: 16}); - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; - } -} -is_LDB_in = new IS_LDB_ind16; -Instructions.push(is_LDB_in); - -class IS_LDC_ind16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x086; - this.Mnemonic = "LDC"; - this.LongName = "LOAD Register C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Indirect16; - 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_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; - } -} -is_LDC_in = new IS_LDC_ind16; -Instructions.push(is_LDC_in); - -class IS_LDD_ind16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x088; - this.Mnemonic = "LDD"; - this.LongName = "LOAD Register D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Indirect16; - 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_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; - } -} -is_LDD_in = new IS_LDD_ind16; -Instructions.push(is_LDD_in); - -class IS_LDA_ind24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x0C2; - this.Mnemonic = "LDA"; - this.LongName = "LOAD Register A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Indirect24; - this.Operands = new Array({Operand: "#", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 13; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDA_in24 = new IS_LDA_ind24; -Instructions.push(is_LDA_in24); - -class IS_LDB_ind24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x0C4; - this.Mnemonic = "LDB"; - this.LongName = "LOAD Register B"; - this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect24; - this.Operands = new Array({Operand: "#", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 13; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; - this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDB_in24 = new IS_LDB_ind24; -Instructions.push(is_LDB_in24); - -class IS_LDC_ind24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x0C6; - this.Mnemonic = "LDC"; - this.LongName = "LOAD Register C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Indirect24; - this.Operands = new Array({Operand: "#", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 13; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_PCC; - this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDC_in24 = new IS_LDC_ind24; -Instructions.push(is_LDC_in24); - -class IS_LDD_ind24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x0C8; - this.Mnemonic = "LDD"; - this.LongName = "LOAD Register D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Indirect24; - this.Operands = new Array({Operand: "#", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 13; - - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RDIL | CONTROL_PCC; - this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; - } -} -is_LDD_in24 = new IS_LDD_ind24; -Instructions.push(is_LDD_in24); - - -class IS_LDAB_GPCD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x020; - this.Mnemonic = "LDAB"; - this.LongName = "LOAD Register A and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "CD", Bitwidth: 16}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_CD | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH; - } -} -is_LDAB_GPCD = new IS_LDAB_GPCD; -Instructions.push(is_LDAB_GPCD); - - -class IS_LDAB_abs16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x04A; - this.Mnemonic = "LDAB"; - this.LongName = "LOAD Register A and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Absolute16; - this.Operands = new Array({Operand: "", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH | CONTROL_PCC; - } -} -is_LDAB_a = new IS_LDAB_abs16; -Instructions.push(is_LDAB_a); - -class IS_LDSPP_imm8 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x01F; - this.Mnemonic = "LDSPP"; - this.LongName = "LOAD Stack Pointer Page"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HS | CONTROL_PCC; - } -} -is_LDSPP_i = new IS_LDSPP_imm8; -Instructions.push(is_LDSPP_i); - - - -class IS_STAL_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x102; - this.Mnemonic = "STAL"; - this.LongName = "STORE Register A to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI; - - } -} -is_STAL_i = new IS_STAL_imm16; -Instructions.push(is_STAL_i); - -class IS_STAH_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x103; - this.Mnemonic = "STAH"; - this.LongName = "STORE Register A to HIGH Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_AH | CONTROL_RI; - } -} -is_STAH_i = new IS_STAH_imm16; -Instructions.push(is_STAH_i); - -class IS_STBL_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x104; - this.Mnemonic = "STBL"; - this.LongName = "STORE Register B to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_BL | CONTROL_RI; - } -} -is_STBL_i = new IS_STBL_imm16; -Instructions.push(is_STBL_i); - -class IS_STBH_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x105; - this.Mnemonic = "STBH"; - this.LongName = "STORE Register B to HIGH Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_BH | CONTROL_RI; - } -} -is_STBH_i = new IS_STBH_imm16; -Instructions.push(is_STBH_i); - -class IS_STCL_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x106; - this.Mnemonic = "STCL"; - this.LongName = "STORE Register C to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_CL | CONTROL_RI; - } -} -is_STCL_i = new IS_STCL_imm16; -Instructions.push(is_STCL_i); - -class IS_STCH_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x107; - this.Mnemonic = "STCH"; - this.LongName = "STORE Register C to HIGH Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_CH | CONTROL_RI; - } -} -is_STCH_i = new IS_STCH_imm16; -Instructions.push(is_STCH_i); - -class IS_STDL_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x108; - this.Mnemonic = "STDL"; - this.LongName = "STORE Register D to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_DL | CONTROL_RI; - } -} -is_STDL_i = new IS_STDL_imm16; -Instructions.push(is_STDL_i); - -class IS_STDH_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x109; - this.Mnemonic = "STDH"; - this.LongName = "STORE Register D to HIGH Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_DH | CONTROL_RI; - } -} -is_STDH_i = new IS_STDH_imm16; -Instructions.push(is_STDH_i); - -class IS_STAB_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x10A; - this.Mnemonic = "STAB"; - this.LongName = "STORE Register A and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_AB | CONTROL_RI; - } -} -is_STAB_i = new IS_STAB_imm16; -Instructions.push(is_STAB_i); - -class IS_STAB_sp extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x156; - this.Mnemonic = "STAB"; - this.LongName = "STORE Register A and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.RegisterAbsolute; - this.Operands = new Array({Operand: "SP", Bitwidth: 16}); - this.Words = 1; - this.Cycles = 6; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[5] = CONTROL_OUT_AB | CONTROL_RI; - } -} -is_STAB_sp = new IS_STAB_sp; -Instructions.push(is_STAB_sp); - -class IS_PSTAL_sp_ind extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x198; - this.Mnemonic = "PSTAL"; - this.LongName = "Page STORE Register A to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.RegisterIndirect; - this.Operands = new Array({Operand: "[SP]", Bitwidth: 16}); - this.Words = 1; - this.Cycles = 6; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[5] = CONTROL_OUT_AL | CONTROL_RI; - } -} -is_PSTAL_spin = new IS_PSTAL_sp_ind; -Instructions.push(is_PSTAL_spin); - -class IS_PSTAL_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x102; - this.Mnemonic = "PSTAL"; - this.LongName = "Page STORE Register A to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 5; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI; - } -} -is_PSTAL_i = new IS_PSTAL_imm16; -Instructions.push(is_PSTAL_i); - -class IS_STAL_sp_ind24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x1D8; - this.Mnemonic = "STAL"; - this.LongName = "STORE Register A to LOW Byte"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.RegisterIndirect; - this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); - this.Words = 1; - this.Cycles = 12; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; - this.Microcode[4] = CONTROL_SPC; - this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[6] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[7] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[9] = CONTROL_OUT_AL | CONTROL_RI; - this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; - //this.Microcode[12] = 0; - } -} -is_STAL_spin = new IS_STAL_sp_ind24; -Instructions.push(is_STAL_spin); - - -class IS_TAB extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x200; - this.Mnemonic = "TAB"; - this.LongName = "TRANSFER Register A to B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RBIL; - } -} - -is_TAB = new IS_TAB; -Instructions.push(is_TAB); - -class IS_TAC extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x201; - this.Mnemonic = "TAC"; - this.LongName = "TRANSFER Register A to C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RCIL; - } -} - -is_TAC = new IS_TAC; -Instructions.push(is_TAC); - -class IS_TAD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x202; - this.Mnemonic = "TAD"; - this.LongName = "TRANSFER Register A to D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RDIL; - } -} - -is_TAD = new IS_TAD; -Instructions.push(is_TAD); - -class IS_TBA extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x203; - this.Mnemonic = "TBA"; - this.LongName = "TRANSFER Register B to A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RAIL; - } -} - -is_TBA = new IS_TBA; -Instructions.push(is_TBA); - -class IS_TBC extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x204; - this.Mnemonic = "TBC"; - this.LongName = "TRANSFER Register B to C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RCIL; - } -} - -is_TBC = new IS_TBC; -Instructions.push(is_TBC); - -class IS_TBD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x205; - this.Mnemonic = "TBD"; - this.LongName = "TRANSFER Register B to D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RDIL; - } -} - -is_TBD = new IS_TBD; -Instructions.push(is_TBD); - -class IS_TCA extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x206; - this.Mnemonic = "TCA"; - this.LongName = "TRANSFER Register C to A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RAIL; - } -} - -is_TCA = new IS_TCA; -Instructions.push(is_TCA); - -class IS_TCB extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x207; - this.Mnemonic = "TCB"; - this.LongName = "TRANSFER Register C to B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RBIL; - } -} - -is_TCB = new IS_TCB; -Instructions.push(is_TCB); - -class IS_TCD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x208; - this.Mnemonic = "TCD"; - this.LongName = "TRANSFER Register C to D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RDIL; - } -} - -is_TCD = new IS_TCD; -Instructions.push(is_TCD); - -class IS_TDA extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x209; - this.Mnemonic = "TDA"; - this.LongName = "TRANSFER Register D to A"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RAIL; - } -} - -is_TDA = new IS_TDA; -Instructions.push(is_TDA); - -class IS_TDB extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x20A; - this.Mnemonic = "TDB"; - this.LongName = "TRANSFER Register D to B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RBIL; - } -} - -is_TDB = new IS_TDB; -Instructions.push(is_TDB); - -class IS_TDC extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x20B; - this.Mnemonic = "TDC"; - this.LongName = "TRANSFER Register D to C"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RCIL; - } -} - -is_TDC = new IS_TDC; -Instructions.push(is_TDC); - -// This is a simple ADD command which will ADD GPA and GPB putting the sum in GPA -class IS_ADD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x300; - this.Mnemonic = "ADD"; - this.LongName = "Addition"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_ADD | CONTROL_OUT_AB; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO; - } -} -is_ADD = new IS_ADD; -Instructions.push(is_ADD); - -class IS_SUB extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x301; - this.Mnemonic = "SUB"; - this.LongName = "Subtraction"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_SUB; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO; - } -} -is_SUB = new IS_SUB; -Instructions.push(is_SUB); - -class IS_NOT extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x302; - this.Mnemonic = "NOT"; - this.LongName = "Logical NOT"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 9; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_RAIL; - this.Microcode[5] = CONTROL_ALU_NOT; - this.Microcode[6] = CONTROL_OUT_AO | CONTROL_RBIL | CONTROL_SPC; - this.Microcode[7] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RAIL; - } -} -is_NOT = new IS_NOT; -Instructions.push(is_NOT); - -class IS_FNOT extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x303; - this.Mnemonic = "FNOT"; - this.LongName = "Logical FAST NOT"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_NOT; - this.Microcode[3] = CONTROL_RBIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_FNOT = new IS_FNOT; -Instructions.push(is_FNOT); - -class IS_AND extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x304; - this.Mnemonic = "AND"; - this.LongName = "Logical AND"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_AND; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_AND = new IS_AND; -Instructions.push(is_AND); - -class IS_NAND extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x305; - this.Mnemonic = "NAND"; - this.LongName = "Logical NAND"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_NAND; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_NAND = new IS_NAND; -Instructions.push(is_NAND); - -class IS_OR extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x306; - this.Mnemonic = "OR"; - this.LongName = "Logical OR"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_OR; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_OR = new IS_OR; -Instructions.push(is_OR); - -class IS_NOR extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x307; - this.Mnemonic = "NOR"; - this.LongName = "Logical NOR"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_NOR; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_NOR = new IS_NOR; -Instructions.push(is_NOR); - -class IS_XOR extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x308; - this.Mnemonic = "XOR"; - this.LongName = "Logical XOR"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_XOR; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_XOR = new IS_XOR; -Instructions.push(is_XOR); - -class IS_XNOR extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x309; - this.Mnemonic = "XNOR"; - this.LongName = "Logical XNOR"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_ALU_XNOR; - this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC; - } -} -is_XNOR = new IS_XNOR; -Instructions.push(is_XNOR); - -class IS_CMP extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x30A; - this.Mnemonic = "CMP"; - this.LongName = "Logical COMPARE"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_AB | CONTROL_ALU_ADD; - } -} -is_CMP = new IS_CMP; -Instructions.push(is_CMP); - -class IS_CMP_gpcd_abs extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x30B; - this.Mnemonic = "CMP"; - this.LongName = "Logical COMPARE"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.RegisterAbsolute; - this.Operands = new Array({Operand: "CD", Bitwidth: 16}); - this.Words = 1; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_CD | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_ALU_ADD; - } -} -is_CMP_cda = new IS_CMP_gpcd_abs(); -Instructions.push(is_CMP_cda); - -class IS_CMP_gpc_gpd extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x30C; - this.Mnemonic = "CMP"; - this.LongName = "Logical COMPARE"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "C", Bitwidth: 8},{Operand: "D", Bitwidth: 8}); - this.Words = 1; - this.Cycles = 3; - this.Microcode[2] = CONTROL_OUT_CD | CONTROL_ALU_ADD; - } -} -is_CMP_c_d = new IS_CMP_gpc_gpd(); -Instructions.push(is_CMP_c_d); - -class IS_ADD_gpa_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x30D; - this.Mnemonic = "ADD"; - this.LongName = "Addition"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 10; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_BL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_AB | CONTROL_ALU_ADD; - this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RAIL | CONTROL_SPC; - this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL; - } -} -is_ADD_gpai = new IS_ADD_gpa_imm; -Instructions.push(is_ADD_gpai); - -class IS_ADD_gpb_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x30E; - this.Mnemonic = "ADD"; - this.LongName = "Addition"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "B", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 10; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_AB | CONTROL_ALU_ADD; - this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RBIL | CONTROL_SPC; - this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL; - } -} -is_ADD_gpbi = new IS_ADD_gpb_imm; -Instructions.push(is_ADD_gpbi); - -class IS_ADD_gpc_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x30F; - this.Mnemonic = "ADD"; - this.LongName = "Addition"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "C", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 10; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_CA | CONTROL_ALU_ADD; - this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RCIL | CONTROL_SPC; - this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL; - } -} -is_ADD_gpci = new IS_ADD_gpc_imm; -Instructions.push(is_ADD_gpci); - - -class IS_ADD_gpd_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x310; - this.Mnemonic = "ADD"; - this.LongName = "Addition"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array({Operand: "D", Bitwidth: 8},{Operand: "$", Bitwidth: 8}); - this.Words = 2; - this.Cycles = 10; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_DA | CONTROL_ALU_ADD; - this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RDIL | CONTROL_SPC; - this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL; - } -} -is_ADD_gpdi = new IS_ADD_gpd_imm; -Instructions.push(is_ADD_gpdi); - - -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_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_PLA extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2A0; - this.Mnemonic = "PLA"; - this.LongName = "PULL Stack and place in Register A (Low BYTE)"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 5; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL; - } -} -is_PLA = new IS_PLA; -Instructions.push(is_PLA); - -class IS_PLB extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2A1; - this.Mnemonic = "PLB"; - this.LongName = "PULL Stack and place in Register B (Low BYTE)"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Words = 1; - this.Cycles = 5; - this.Operands = new Array(); - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL; - } -} -is_PLB = new IS_PLB; -Instructions.push(is_PLB); - -class IS_PLC extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2A2; - this.Mnemonic = "PLC"; - this.LongName = "PULL Stack and place in Register C (Low BYTE)"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 5; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL; - } -} -is_PLC = new IS_PLC; -Instructions.push(is_PLC); - -class IS_PLD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2A3; - this.Mnemonic = "PLD"; - this.LongName = "PULL Stack and place in Register D (Low BYTE)"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 5; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL; - } -} -is_PLD = new IS_PLD; -Instructions.push(is_PLD); - -class IS_PLAB extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2A4; - this.Mnemonic = "PLAB"; - this.LongName = "PULL Stack and place in Register A and B"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 5; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH; - } -} -is_PLAB = new IS_PLAB; -Instructions.push(is_PLAB); - -class IS_PLCD extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2AC; - this.Mnemonic = "PLCD"; - this.LongName = "PULL Stack and place in Register C and D"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Register; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 5; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH; - } -} -is_PLCD = new IS_PLCD; -Instructions.push(is_PLCD); - - -class IS_JMP_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2C0; - this.Mnemonic = "JMP"; - this.LongName = "JUMP to address"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate16; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; - } -} -is_JMP_i = new IS_JMP_imm16; -Instructions.push(is_JMP_i); - -class IS_JMP_imm24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2C1; - this.Mnemonic = "JMP"; - this.LongName = "JUMP to address"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate24; - this.Operands = new Array({Operand: "$", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 7; - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_PCI; - this.Microcode[6] = CONTROL_OUT_2O | CONTROL_RHI; - } -} -is_JMP_i24 = new IS_JMP_imm24; -Instructions.push(is_JMP_i24); - - -class IS_BCC_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.UsesCarry = true; - this.Bytecode = 0x2C2; - this.Mnemonic = "BCC"; - this.LongName = "Branch if Carry Clear"; - this.Aliases = new Array("JNC"); - - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.CarryWords = 2; - this.CarryCycles = 3; - this.MicrocodeCarry = new Array(16); - for (let a = 0; a < 16; a++) { - this.MicrocodeCarry[a] = this.Microcode[a]; - } - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; - this.MicrocodeCarry[2] = CONTROL_PCC; // Step over the immediate value - } -} - -is_BCC_i = new IS_BCC_imm; -Instructions.push(is_BCC_i); - -class IS_BCS_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.UsesCarry = true; - this.Bytecode = 0x2C3; - this.Mnemonic = "BCS"; - this.LongName = "Branch if Carry Set"; - this.Aliases = new Array("JC"); - - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 3; - this.CarryWords = 2; - this.CarryCycles = 4; - this.MicrocodeCarry = new Array(16); - for (let a = 0; a < 16; a++) { - this.MicrocodeCarry[a] = this.Microcode[a]; - } - this.Microcode[2] = CONTROL_PCC; // Step over the immediate value - this.MicrocodeCarry[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.MicrocodeCarry[3] = CONTROL_OUT_RO | CONTROL_PCI; - } -} - -is_BCS_i = new IS_BCS_imm; -Instructions.push(is_BCS_i); - -class IS_BEQ_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.UsesZero = true; - this.Bytecode = 0x2C4; - this.Mnemonic = "BEQ"; - this.LongName = "Branch if Equal"; - this.Aliases = new Array("JE","JZ"); - - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 3; - this.ZeroWords = 2; - this.ZeroCycles = 4; - this.MicrocodeZero = new Array(16); - for (let a = 0; a < 16; a++) { - this.MicrocodeZero[a] = this.Microcode[a]; - } - this.Microcode[2] = CONTROL_PCC; // Step over the immediate value - this.MicrocodeZero[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.MicrocodeZero[3] = CONTROL_OUT_RO | CONTROL_PCI; - } -} - -is_BEQ_i = new IS_BEQ_imm; -Instructions.push(is_BEQ_i); - -class IS_BNE_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.UsesZero = true; - this.Bytecode = 0x2C5; - this.Mnemonic = "BNE"; - this.LongName = "Branch if NOT Equal"; - this.Aliases = new Array("JNE","JNZ"); - - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 16}); - this.Words = 2; - this.Cycles = 4; - this.ZeroWords = 2; - this.ZeroCycles = 3; - this.MicrocodeZero = new Array(16); - for (let a = 0; a < 16; a++) { - this.MicrocodeZero[a] = this.Microcode[a]; - } - this.MicrocodeZero[2] = CONTROL_PCC; // Step over the immediate value - this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; - } -} - -is_BNE_i = new IS_BNE_imm; -Instructions.push(is_BNE_i); - -class IS_JSR_imm16 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2FC; - this.Mnemonic = "JSR"; - this.LongName = "JUMP to Subroutine"; - 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_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_RO | CONTROL_PCI; - - } -} -is_JSR_i = new IS_JSR_imm16; -Instructions.push(is_JSR_i); - -class IS_RTS_paged extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2FD; - this.Mnemonic = "RTS"; - this.LongName = "RETURN from Subroutine (called with 16 bit immediate)"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.RTS16; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 6; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_RO | CONTROL_PCI; - this.Microcode[5] = CONTROL_PCC; - } -} -is_RTS_paged = new IS_RTS_paged(); -Instructions.push(is_RTS_paged); - - -class IS_JSR_imm24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2FE; - this.Mnemonic = "JSR"; - this.LongName = "JUMP to Subroutine"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate24; - this.Operands = new Array({Operand: "$", Bitwidth: 24}); - this.Words = 3; - this.Cycles = 11; - this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; - this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[7] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[8] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[9] = CONTROL_OUT_RO | CONTROL_PCI; - this.Microcode[10] = CONTROL_OUT_2O | CONTROL_RHI; - } -} -is_JSR_i24 = new IS_JSR_imm24; -Instructions.push(is_JSR_i24); - -class IS_RTS extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x2FF; - this.Mnemonic = "RTS"; - this.LongName = "RETURN from Subroutine (called with 24 bit immediate)"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.RTS24; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 9; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_I2 | CONTROL_SPC; - this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[6] = CONTROL_OUT_RO | CONTROL_PCI; - this.Microcode[7] = CONTROL_OUT_2O | CONTROL_RHI | CONTROL_PCC; - this.Microcode[8] = CONTROL_PCC; - } -} -is_RTS = new IS_RTS; -Instructions.push(is_RTS); - - -class IS_NOP extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x3ff; - this.Mnemonic = "NOP"; - this.LongName = "NO OPERATION"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.SingleWord; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 2; - } -} -is_NOP = new IS_NOP; -Instructions.push(is_NOP); - -class IS_NOP0 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x0; - this.Mnemonic = "NOP"; - this.LongName = "NO OPERATION"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.SingleWord; - this.Operands = new Array(); - this.Words = 1; - this.Cycles = 2; - } -} -is_NOP0 = new IS_NOP0; -Instructions.push(is_NOP0);