diff --git a/js/microcode_compiler.js b/js/microcode_compiler.js index 758d87b..87ebabc 100644 --- a/js/microcode_compiler.js +++ b/js/microcode_compiler.js @@ -51,20 +51,56 @@ const InstructionTypes = { return this.Name; } }, - Immediate: { - Name: `Immediate`, + RTS16: { + Name: `JSR 16 Return`, toString() { return this.Name; } }, - Indirect: { - Name: `Indirect`, + RTS24: { + Name: `JSR 24 Return`, toString() { return this.Name; } }, - Absolute: { - Name: `Absolute`, + Immediate8: { + Name: `8 bit Immediate`, + toString() { + return this.Name; + } + }, + Immediate16: { + Name: `16 bit Immediate`, + toString() { + return this.Name; + } + }, + Immediate24: { + Name: `24 bit Immediate`, + toString() { + return this.Name; + } + }, + Indirect16: { + Name: `16 bit Indirect`, + toString() { + return this.Name; + } + }, + Indirect24: { + Name: `24 bit Indirect`, + toString() { + return this.Name; + } + }, + Absolute16: { + Name: `16 bit Absolute`, + toString() { + return this.Name; + } + }, + Absolute24: { + Name: `24 bit Absolute`, toString() { return this.Name; } @@ -86,7 +122,14 @@ const InstructionTypes = { toString() { return this.Name; } + }, + RegisterIndirect: { + Name: `Register Indirect`, + toString() { + return this.Name; + } } + }; function IsRegister(reg) { @@ -209,7 +252,7 @@ class IS_LDA_imm8 extends Microcode_Instruction { this.LongName = "LOAD Register A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate8; this.Operands = new Array({Operand: "$", Bitwidth: 8}); this.Words = 2; @@ -230,7 +273,7 @@ class IS_LDB_imm8 extends Microcode_Instruction { this.LongName = "LOAD Register B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate8; this.Operands = new Array({Operand: "$", Bitwidth: 8}); this.Words = 2; this.Cycles = 4; @@ -249,7 +292,7 @@ class IS_LDC_imm8 extends Microcode_Instruction { this.LongName = "LOAD Register C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate8; this.Operands = new Array({Operand: "$", Bitwidth: 8}); this.Words = 2; this.Cycles = 4; @@ -268,7 +311,7 @@ class IS_LDD_imm8 extends Microcode_Instruction { this.LongName = "LOAD Register D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate8; this.Operands = new Array({Operand: "$", Bitwidth: 8}); this.Words = 2; this.Cycles = 4; @@ -287,7 +330,7 @@ class IS_LDAB_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register A and B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -306,7 +349,7 @@ class IS_LDAC_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register A and C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -325,7 +368,7 @@ class IS_LDAD_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register A and D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -344,7 +387,7 @@ class IS_LDBA_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register B and A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -363,7 +406,7 @@ class IS_LDBC_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register B and C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -382,7 +425,7 @@ class IS_LDBD_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register B and D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -401,7 +444,7 @@ class IS_LDCA_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register C and A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -420,7 +463,7 @@ class IS_LDCB_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register C and B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -439,7 +482,7 @@ class IS_LDCD_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register C and D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -458,7 +501,7 @@ class IS_LDDA_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register D and A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -477,7 +520,7 @@ class IS_LDDB_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register D and B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -496,7 +539,7 @@ class IS_LDDC_imm16 extends Microcode_Instruction { this.LongName = "LOAD Register D and C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -520,7 +563,7 @@ class IS_LDA_abs16 extends Microcode_Instruction { this.LongName = "LOAD Register A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute16; this.Operands = new Array({Operand: "", Bitwidth: 16}); this.Words = 2; this.Cycles = 5; @@ -541,7 +584,7 @@ class IS_LDB_abs16 extends Microcode_Instruction { this.LongName = "LOAD Register B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute16; this.Operands = new Array({Operand: "", Bitwidth: 16}); this.Words = 2; this.Cycles = 5; @@ -561,7 +604,7 @@ class IS_LDC_abs16 extends Microcode_Instruction { this.LongName = "LOAD Register C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute16; this.Operands = new Array({Operand: "", Bitwidth: 16}); this.Words = 2; this.Cycles = 5; @@ -581,7 +624,7 @@ class IS_LDD_abs16 extends Microcode_Instruction { this.LongName = "LOAD Register D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute16; this.Operands = new Array({Operand: "", Bitwidth: 16}); this.Words = 2; this.Cycles = 5; @@ -601,7 +644,7 @@ class IS_LDA_abs24 extends Microcode_Instruction { this.LongName = "LOAD Register A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute24; this.Operands = new Array({Operand: "", Bitwidth: 24}); this.Words = 3; this.Cycles = 12; @@ -629,7 +672,7 @@ class IS_LDB_abs24 extends Microcode_Instruction { this.LongName = "LOAD Register B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute24; this.Operands = new Array({Operand: "", Bitwidth: 24}); this.Words = 3; this.Cycles = 12; @@ -657,7 +700,7 @@ class IS_LDC_abs24 extends Microcode_Instruction { this.LongName = "LOAD Register C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute24; this.Operands = new Array({Operand: "", Bitwidth: 24}); this.Words = 3; this.Cycles = 12; @@ -685,7 +728,7 @@ class IS_LDD_abs24 extends Microcode_Instruction { this.LongName = "LOAD Register D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute24; this.Operands = new Array({Operand: "", Bitwidth: 24}); this.Words = 3; this.Cycles = 12; @@ -716,7 +759,7 @@ class IS_LDA_ind16 extends Microcode_Instruction { this.LongName = "LOAD Register A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect16; this.Operands = new Array({Operand: "#", Bitwidth: 16}); this.Words = 2; this.Cycles = 6; @@ -740,7 +783,7 @@ class IS_LDB_ind16 extends Microcode_Instruction { this.Words = 2; this.Cycles = 6; - this.Type = InstructionTypes.Indirect; + 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; @@ -759,7 +802,7 @@ class IS_LDC_ind16 extends Microcode_Instruction { this.LongName = "LOAD Register C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect16; this.Operands = new Array({Operand: "#", Bitwidth: 16}); this.Words = 2; this.Cycles = 6; @@ -780,7 +823,7 @@ class IS_LDD_ind16 extends Microcode_Instruction { this.LongName = "LOAD Register D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect16; this.Operands = new Array({Operand: "#", Bitwidth: 16}); this.Words = 2; this.Cycles = 6; @@ -801,7 +844,7 @@ class IS_LDA_ind24 extends Microcode_Instruction { this.LongName = "LOAD Register A"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect24; this.Operands = new Array({Operand: "#", Bitwidth: 24}); this.Words = 3; this.Cycles = 13; @@ -829,7 +872,7 @@ class IS_LDB_ind24 extends Microcode_Instruction { this.Mnemonic = "LDB"; this.LongName = "LOAD Register B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect24; this.Operands = new Array({Operand: "#", Bitwidth: 24}); this.Words = 3; this.Cycles = 13; @@ -858,7 +901,7 @@ class IS_LDC_ind24 extends Microcode_Instruction { this.LongName = "LOAD Register C"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect24; this.Operands = new Array({Operand: "#", Bitwidth: 24}); this.Words = 3; this.Cycles = 13; @@ -887,7 +930,7 @@ class IS_LDD_ind24 extends Microcode_Instruction { this.LongName = "LOAD Register D"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.Indirect24; this.Operands = new Array({Operand: "#", Bitwidth: 24}); this.Words = 3; this.Cycles = 13; @@ -929,15 +972,15 @@ is_LDAB_GPCD = new IS_LDAB_GPCD; Instructions.push(is_LDAB_GPCD); -class IS_LDAB_abs extends Microcode_Instruction { +class IS_LDAB_abs16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x022; + this.Bytecode = 0x04A; this.Mnemonic = "LDAB"; this.LongName = "LOAD Register A and B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.Absolute16; this.Operands = new Array({Operand: "", Bitwidth: 16}); this.Words = 2; this.Cycles = 5; @@ -946,47 +989,61 @@ class IS_LDAB_abs extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH | CONTROL_PCC; } } -is_LDAB_a = new IS_LDAB_abs; +is_LDAB_a = new IS_LDAB_abs16; Instructions.push(is_LDAB_a); - -class IS_STAL_imm24 extends Microcode_Instruction { +class IS_LDSPP_imm8 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x030; + 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.Immediate; - 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_HO | CONTROL_RI; - this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI; - this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_PCC; - this.Microcode[6] = CONTROL_OUT_2O | CONTROL_RHI | CONTROL_PCC; - this.Microcode[7] = CONTROL_RRI; - this.Microcode[8] = CONTROL_OUT_AL | CONTROL_RI; - this.Microcode[9] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[10] = CONTROL_OUT_RO | CONTROL_RHI; + 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_imm24; +is_STAL_i = new IS_STAL_imm16; Instructions.push(is_STAL_i); -class IS_STAH_imm extends Microcode_Instruction { +class IS_STAH_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x031; + this.Bytecode = 0x103; this.Mnemonic = "STAH"; this.LongName = "STORE Register A to HIGH Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -994,19 +1051,19 @@ class IS_STAH_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_AH | CONTROL_RI; } } -is_STAH_i = new IS_STAH_imm; +is_STAH_i = new IS_STAH_imm16; Instructions.push(is_STAH_i); -class IS_STBL_imm extends Microcode_Instruction { +class IS_STBL_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x032; + this.Bytecode = 0x104; this.Mnemonic = "STBL"; this.LongName = "STORE Register B to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1014,19 +1071,19 @@ class IS_STBL_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_BL | CONTROL_RI; } } -is_STBL_i = new IS_STBL_imm; +is_STBL_i = new IS_STBL_imm16; Instructions.push(is_STBL_i); -class IS_STBH_imm extends Microcode_Instruction { +class IS_STBH_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x033; + this.Bytecode = 0x105; this.Mnemonic = "STBH"; this.LongName = "STORE Register B to HIGH Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1034,19 +1091,19 @@ class IS_STBH_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_BH | CONTROL_RI; } } -is_STBH_i = new IS_STBH_imm; +is_STBH_i = new IS_STBH_imm16; Instructions.push(is_STBH_i); -class IS_STCL_imm extends Microcode_Instruction { +class IS_STCL_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x034; + this.Bytecode = 0x106; this.Mnemonic = "STCL"; this.LongName = "STORE Register C to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1054,19 +1111,19 @@ class IS_STCL_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_CL | CONTROL_RI; } } -is_STCL_i = new IS_STCL_imm; +is_STCL_i = new IS_STCL_imm16; Instructions.push(is_STCL_i); -class IS_STCH_imm extends Microcode_Instruction { +class IS_STCH_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x035; + this.Bytecode = 0x107; this.Mnemonic = "STCH"; this.LongName = "STORE Register C to HIGH Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1074,19 +1131,19 @@ class IS_STCH_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_CH | CONTROL_RI; } } -is_STCH_i = new IS_STCH_imm; +is_STCH_i = new IS_STCH_imm16; Instructions.push(is_STCH_i); -class IS_STDL_imm extends Microcode_Instruction { +class IS_STDL_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x036; + this.Bytecode = 0x108; this.Mnemonic = "STDL"; this.LongName = "STORE Register D to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1094,19 +1151,19 @@ class IS_STDL_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_DL | CONTROL_RI; } } -is_STDL_i = new IS_STDL_imm; +is_STDL_i = new IS_STDL_imm16; Instructions.push(is_STDL_i); -class IS_STDH_imm extends Microcode_Instruction { +class IS_STDH_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x037; + this.Bytecode = 0x109; this.Mnemonic = "STDH"; this.LongName = "STORE Register D to HIGH Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1114,18 +1171,18 @@ class IS_STDH_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_DH | CONTROL_RI; } } -is_STDH_i = new IS_STDH_imm; +is_STDH_i = new IS_STDH_imm16; Instructions.push(is_STDH_i); -class IS_STAB_imm extends Microcode_Instruction { +class IS_STAB_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x038; + this.Bytecode = 0x10A; this.Mnemonic = "STAB"; this.LongName = "STORE Register A and B"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 5; @@ -1134,13 +1191,13 @@ class IS_STAB_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_AB | CONTROL_RI; } } -is_STAB_i = new IS_STAB_imm; +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 = 0x039; + this.Bytecode = 0x156; this.Mnemonic = "STAB"; this.LongName = "STORE Register A and B"; this.Aliases = new Array(); @@ -1161,12 +1218,12 @@ Instructions.push(is_STAB_sp); class IS_PSTAL_sp_ind extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x03A; + this.Bytecode = 0x198; this.Mnemonic = "PSTAL"; this.LongName = "Page STORE Register A to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; + this.Type = InstructionTypes.RegisterIndirect; this.Operands = new Array({Operand: "[SP]", Bitwidth: 16}); this.Words = 1; this.Cycles = 6; @@ -1179,16 +1236,16 @@ class IS_PSTAL_sp_ind extends Microcode_Instruction { is_PSTAL_spin = new IS_PSTAL_sp_ind; Instructions.push(is_PSTAL_spin); -class IS_PSTAL_imm extends Microcode_Instruction { +class IS_PSTAL_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x03B; + this.Bytecode = 0x102; this.Mnemonic = "PSTAL"; this.LongName = "Page STORE Register A to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; - this.Operands = new Array({Operand: "$", Bitwidth: 8}); + 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; @@ -1196,19 +1253,19 @@ class IS_PSTAL_imm extends Microcode_Instruction { this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI; } } -is_PSTAL_i = new IS_PSTAL_imm; +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 = 0x03C; + this.Bytecode = 0x1D8; this.Mnemonic = "STAL"; this.LongName = "STORE Register A to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.Indirect; - this.Operands = new Array({Operand: "[SP]", Bitwidth: 16}); + 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; @@ -1231,7 +1288,7 @@ Instructions.push(is_STAL_spin); class IS_TAB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x040; + this.Bytecode = 0x200; this.Mnemonic = "TAB"; this.LongName = "TRANSFER Register A to B"; this.Aliases = new Array(); @@ -1250,7 +1307,7 @@ Instructions.push(is_TAB); class IS_TAC extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x041; + this.Bytecode = 0x201; this.Mnemonic = "TAC"; this.LongName = "TRANSFER Register A to C"; this.Aliases = new Array(); @@ -1269,7 +1326,7 @@ Instructions.push(is_TAC); class IS_TAD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x042; + this.Bytecode = 0x202; this.Mnemonic = "TAD"; this.LongName = "TRANSFER Register A to D"; this.Aliases = new Array(); @@ -1288,7 +1345,7 @@ Instructions.push(is_TAD); class IS_TBA extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x043; + this.Bytecode = 0x203; this.Mnemonic = "TBA"; this.LongName = "TRANSFER Register B to A"; this.Aliases = new Array(); @@ -1307,7 +1364,7 @@ Instructions.push(is_TBA); class IS_TBC extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x044; + this.Bytecode = 0x204; this.Mnemonic = "TBC"; this.LongName = "TRANSFER Register B to C"; this.Aliases = new Array(); @@ -1326,7 +1383,7 @@ Instructions.push(is_TBC); class IS_TBD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x045; + this.Bytecode = 0x205; this.Mnemonic = "TBD"; this.LongName = "TRANSFER Register B to D"; this.Aliases = new Array(); @@ -1345,7 +1402,7 @@ Instructions.push(is_TBD); class IS_TCA extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x046; + this.Bytecode = 0x206; this.Mnemonic = "TCA"; this.LongName = "TRANSFER Register C to A"; this.Aliases = new Array(); @@ -1364,7 +1421,7 @@ Instructions.push(is_TCA); class IS_TCB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x047; + this.Bytecode = 0x207; this.Mnemonic = "TCB"; this.LongName = "TRANSFER Register C to B"; this.Aliases = new Array(); @@ -1383,7 +1440,7 @@ Instructions.push(is_TCB); class IS_TCD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x048; + this.Bytecode = 0x208; this.Mnemonic = "TCD"; this.LongName = "TRANSFER Register C to D"; this.Aliases = new Array(); @@ -1402,7 +1459,7 @@ Instructions.push(is_TCD); class IS_TDA extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x049; + this.Bytecode = 0x209; this.Mnemonic = "TDA"; this.LongName = "TRANSFER Register D to A"; this.Aliases = new Array(); @@ -1421,7 +1478,7 @@ Instructions.push(is_TDA); class IS_TDB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x04A; + this.Bytecode = 0x20A; this.Mnemonic = "TDB"; this.LongName = "TRANSFER Register D to B"; this.Aliases = new Array(); @@ -1440,7 +1497,7 @@ Instructions.push(is_TDB); class IS_TDC extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x04B; + this.Bytecode = 0x20B; this.Mnemonic = "TDC"; this.LongName = "TRANSFER Register D to C"; this.Aliases = new Array(); @@ -1460,7 +1517,7 @@ Instructions.push(is_TDC); class IS_ADD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x100; + this.Bytecode = 0x300; this.Mnemonic = "ADD"; this.LongName = "Addition"; this.Aliases = new Array(); @@ -1479,7 +1536,7 @@ Instructions.push(is_ADD); class IS_SUB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x101; + this.Bytecode = 0x301; this.Mnemonic = "SUB"; this.LongName = "Subtraction"; this.Aliases = new Array(); @@ -1498,7 +1555,7 @@ Instructions.push(is_SUB); class IS_NOT extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x102; + this.Bytecode = 0x302; this.Mnemonic = "NOT"; this.LongName = "Logical NOT"; this.Aliases = new Array(); @@ -1522,7 +1579,7 @@ Instructions.push(is_NOT); class IS_FNOT extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x103; + this.Bytecode = 0x303; this.Mnemonic = "FNOT"; this.LongName = "Logical FAST NOT"; this.Aliases = new Array(); @@ -1541,7 +1598,7 @@ Instructions.push(is_FNOT); class IS_AND extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x104; + this.Bytecode = 0x304; this.Mnemonic = "AND"; this.LongName = "Logical AND"; this.Aliases = new Array(); @@ -1560,7 +1617,7 @@ Instructions.push(is_AND); class IS_NAND extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x105; + this.Bytecode = 0x305; this.Mnemonic = "NAND"; this.LongName = "Logical NAND"; this.Aliases = new Array(); @@ -1579,7 +1636,7 @@ Instructions.push(is_NAND); class IS_OR extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x106; + this.Bytecode = 0x306; this.Mnemonic = "OR"; this.LongName = "Logical OR"; this.Aliases = new Array(); @@ -1598,7 +1655,7 @@ Instructions.push(is_OR); class IS_NOR extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x107; + this.Bytecode = 0x307; this.Mnemonic = "NOR"; this.LongName = "Logical NOR"; this.Aliases = new Array(); @@ -1617,7 +1674,7 @@ Instructions.push(is_NOR); class IS_XOR extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x108; + this.Bytecode = 0x308; this.Mnemonic = "XOR"; this.LongName = "Logical XOR"; this.Aliases = new Array(); @@ -1636,7 +1693,7 @@ Instructions.push(is_XOR); class IS_XNOR extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x109; + this.Bytecode = 0x309; this.Mnemonic = "XNOR"; this.LongName = "Logical XNOR"; this.Aliases = new Array(); @@ -1655,7 +1712,7 @@ Instructions.push(is_XNOR); class IS_CMP extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x10A; + this.Bytecode = 0x30A; this.Mnemonic = "CMP"; this.LongName = "Logical COMPARE"; this.Aliases = new Array(); @@ -1673,12 +1730,12 @@ Instructions.push(is_CMP); class IS_CMP_gpcd_abs extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x10B; + this.Bytecode = 0x30B; this.Mnemonic = "CMP"; this.LongName = "Logical COMPARE"; this.Aliases = new Array(); - this.Type = InstructionTypes.Absolute; + this.Type = InstructionTypes.RegisterAbsolute; this.Operands = new Array({Operand: "CD", Bitwidth: 16}); this.Words = 1; this.Cycles = 4; @@ -1692,7 +1749,7 @@ Instructions.push(is_CMP_cda); class IS_CMP_gpc_gpd extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x10C; + this.Bytecode = 0x30C; this.Mnemonic = "CMP"; this.LongName = "Logical COMPARE"; this.Aliases = new Array(); @@ -1710,7 +1767,7 @@ Instructions.push(is_CMP_c_d); class IS_ADD_gpa_imm extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x10D; + this.Bytecode = 0x30D; this.Mnemonic = "ADD"; this.LongName = "Addition"; this.Aliases = new Array(); @@ -1735,7 +1792,7 @@ Instructions.push(is_ADD_gpai); class IS_ADD_gpb_imm extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x10E; + this.Bytecode = 0x30E; this.Mnemonic = "ADD"; this.LongName = "Addition"; this.Aliases = new Array(); @@ -1760,7 +1817,7 @@ Instructions.push(is_ADD_gpbi); class IS_ADD_gpc_imm extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x10F; + this.Bytecode = 0x30F; this.Mnemonic = "ADD"; this.LongName = "Addition"; this.Aliases = new Array(); @@ -1786,7 +1843,7 @@ Instructions.push(is_ADD_gpci); class IS_ADD_gpd_imm extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x110; + this.Bytecode = 0x310; this.Mnemonic = "ADD"; this.LongName = "Addition"; this.Aliases = new Array(); @@ -1812,7 +1869,7 @@ Instructions.push(is_ADD_gpdi); class IS_PHA extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x180; + this.Bytecode = 0x280; this.Mnemonic = "PHA"; this.LongName = "PUSH Register A to the STACK"; this.Aliases = new Array(); @@ -1831,7 +1888,7 @@ Instructions.push(is_PHA); class IS_PHB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x181; + this.Bytecode = 0x281; this.Mnemonic = "PHB"; this.LongName = "PUSH Register B to the STACK"; this.Aliases = new Array(); @@ -1850,7 +1907,7 @@ Instructions.push(is_PHB); class IS_PHC extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x182; + this.Bytecode = 0x282; this.Mnemonic = "PHC"; this.LongName = "PUSH Register C to the STACK"; this.Aliases = new Array(); @@ -1869,7 +1926,7 @@ Instructions.push(is_PHC); class IS_PHD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x183; + this.Bytecode = 0x283; this.Mnemonic = "PHD"; this.LongName = "PUSH Register D to the STACK"; this.Aliases = new Array(); @@ -1888,7 +1945,7 @@ Instructions.push(is_PHD); class IS_PHAB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x184; + this.Bytecode = 0x284; this.Mnemonic = "PHAB"; this.LongName = "PUSH Register A and B to the STACK"; this.Aliases = new Array(); @@ -1907,7 +1964,7 @@ Instructions.push(is_PHAB); class IS_PHCD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x185; + this.Bytecode = 0x28C; this.Mnemonic = "PHCD"; this.LongName = "PUSH Register C and D to the STACK"; this.Aliases = new Array(); @@ -1927,7 +1984,7 @@ Instructions.push(is_PHCD); class IS_PLA extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x1A0; + this.Bytecode = 0x2A0; this.Mnemonic = "PLA"; this.LongName = "PULL Stack and place in Register A (Low BYTE)"; this.Aliases = new Array(); @@ -1947,7 +2004,7 @@ Instructions.push(is_PLA); class IS_PLB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x1A1; + this.Bytecode = 0x2A1; this.Mnemonic = "PLB"; this.LongName = "PULL Stack and place in Register B (Low BYTE)"; this.Aliases = new Array(); @@ -1967,7 +2024,7 @@ Instructions.push(is_PLB); class IS_PLC extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x1A2; + this.Bytecode = 0x2A2; this.Mnemonic = "PLC"; this.LongName = "PULL Stack and place in Register C (Low BYTE)"; this.Aliases = new Array(); @@ -1987,7 +2044,7 @@ Instructions.push(is_PLC); class IS_PLD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x1A3; + this.Bytecode = 0x2A3; this.Mnemonic = "PLD"; this.LongName = "PULL Stack and place in Register D (Low BYTE)"; this.Aliases = new Array(); @@ -2007,7 +2064,7 @@ Instructions.push(is_PLD); class IS_PLAB extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x1A4; + this.Bytecode = 0x2A4; this.Mnemonic = "PLAB"; this.LongName = "PULL Stack and place in Register A and B"; this.Aliases = new Array(); @@ -2027,7 +2084,7 @@ Instructions.push(is_PLAB); class IS_PLCD extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x1A5; + this.Bytecode = 0x2AC; this.Mnemonic = "PLCD"; this.LongName = "PULL Stack and place in Register C and D"; this.Aliases = new Array(); @@ -2045,15 +2102,15 @@ is_PLCD = new IS_PLCD; Instructions.push(is_PLCD); -class IS_JMP_imm extends Microcode_Instruction { +class IS_JMP_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x200; + this.Bytecode = 0x2C0; this.Mnemonic = "JMP"; this.LongName = "JUMP to address"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + this.Type = InstructionTypes.Immediate16; this.Operands = new Array({Operand: "$", Bitwidth: 16}); this.Words = 2; this.Cycles = 4; @@ -2061,14 +2118,37 @@ class IS_JMP_imm extends Microcode_Instruction { this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI; } } -is_JMP_i = new IS_JMP_imm; +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 = 0x201; + this.Bytecode = 0x2C2; this.Mnemonic = "BCC"; this.LongName = "Branch if Carry Clear"; this.Aliases = new Array("JNC"); @@ -2088,6 +2168,7 @@ class IS_BCC_imm extends Microcode_Instruction { this.MicrocodeCarry[2] = CONTROL_PCC; // Step over the immediate value } } + is_BCC_i = new IS_BCC_imm; Instructions.push(is_BCC_i); @@ -2095,7 +2176,7 @@ class IS_BCS_imm extends Microcode_Instruction { constructor(props) { super(props); this.UsesCarry = true; - this.Bytecode = 0x202; + this.Bytecode = 0x2C3; this.Mnemonic = "BCS"; this.LongName = "Branch if Carry Set"; this.Aliases = new Array("JC"); @@ -2123,7 +2204,7 @@ class IS_BEQ_imm extends Microcode_Instruction { constructor(props) { super(props); this.UsesZero = true; - this.Bytecode = 0x203; + this.Bytecode = 0x2C4; this.Mnemonic = "BEQ"; this.LongName = "Branch if Equal"; this.Aliases = new Array("JE","JZ"); @@ -2151,7 +2232,7 @@ class IS_BNE_imm extends Microcode_Instruction { constructor(props) { super(props); this.UsesZero = true; - this.Bytecode = 0x204; + this.Bytecode = 0x2C5; this.Mnemonic = "BNE"; this.LongName = "Branch if NOT Equal"; this.Aliases = new Array("JNE","JNZ"); @@ -2175,15 +2256,59 @@ class IS_BNE_imm extends Microcode_Instruction { is_BNE_i = new IS_BNE_imm; Instructions.push(is_BNE_i); -class IS_JSR extends Microcode_Instruction { +class IS_JSR_imm16 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x205; + this.Bytecode = 0x2FC; this.Mnemonic = "JSR"; this.LongName = "JUMP to Subroutine"; this.Aliases = new Array(); - this.Type = InstructionTypes.Immediate; + 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; @@ -2198,40 +2323,18 @@ class IS_JSR extends Microcode_Instruction { this.Microcode[10] = CONTROL_OUT_2O | CONTROL_RHI; } } -is_JSR = new IS_JSR; -Instructions.push(is_JSR); - -class IS_PJSR extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x206; - this.Mnemonic = "PJSR"; - this.LongName = "Page JUMP to Subroutine"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate; - 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_PJSR = new IS_PJSR; -Instructions.push(is_PJSR); +is_JSR_i24 = new IS_JSR_imm24; +Instructions.push(is_JSR_i24); class IS_RTS extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x207; + this.Bytecode = 0x2FF; this.Mnemonic = "RTS"; - this.LongName = "RETURN from Subroutine"; + this.LongName = "RETURN from Subroutine (called with 24 bit immediate)"; this.Aliases = new Array(); - this.Type = InstructionTypes.SingleWord; + this.Type = InstructionTypes.RTS24; this.Operands = new Array(); this.Words = 1; this.Cycles = 9; @@ -2247,69 +2350,6 @@ class IS_RTS extends Microcode_Instruction { is_RTS = new IS_RTS; Instructions.push(is_RTS); -class IS_PRTS extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x208; - this.Mnemonic = "PRTS"; - this.LongName = "Page RETURN from Subroutine"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.SingleWord; - 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_PRTS = new IS_PRTS; -Instructions.push(is_PRTS); - -class IS_JMP_imm24 extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x209; - this.Mnemonic = "JMP"; - this.LongName = "JUMP to address"; - this.Aliases = new Array(); - - this.Type = InstructionTypes.Immediate; - 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_LDSPP_imm extends Microcode_Instruction { - constructor(props) { - super(props); - this.Bytecode = 0x20A; - 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_imm; -Instructions.push(is_LDSPP_i); - - class IS_NOP extends Microcode_Instruction { constructor(props) {