diff --git a/examples/printstring.asm b/examples/printstring.asm index 5c6a467..89b6784 100644 --- a/examples/printstring.asm +++ b/examples/printstring.asm @@ -13,7 +13,7 @@ SECTION .text START: LDAB MYSTRING ; Put string address into AB PHAB ; and push to the stack - PJSR PRINTSTRING ; Call PRINTSTRING routine + JSR PRINTSTRING ; Call PRINTSTRING routine SECTION .printstring PRINTSTRING: PLAB @@ -39,7 +39,7 @@ ROLLOVER: ADD D, $1 JMP PRINTLOOP ; Loop back and keep reading in the string RETURN: PLAB ; To return we need to clean up our stack use first PLA - PRTS + RTS SECTION .data DISPLAY equ D00000h diff --git a/js/isa/stx.js b/js/isa/stx.js index 92c482e..2d03bca 100644 --- a/js/isa/stx.js +++ b/js/isa/stx.js @@ -47,14 +47,38 @@ 0bXXX11100 [0x1C] 0bXXX11101 [0x1D] 0bXXX11110 [0x1E] SP - 0bXXX11111 [0x1F] SPP + 0bXXX11111 [0x1F] Examples: 24 bit indirect STAB [SP] -> 0x1D6 [0b10110110] (Stack is pushed with LSW of address first, followed by MSW of address.) 16 bit absolute STAL 0x0420 -> 0x142 [0b01000010] */ -//--------------------------- General Purpose Registers STx Absolutes --------------------------- + +//--------------------------- General Purpose Registers STx 16b Immediates --------------------------- + +class IS_STSP_imm16 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x10E; + this.Mnemonic = "STSP"; + this.LongName = "STORE Stack Pointer"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Immediate16; + this.Operands = new Array({Operand: "$", Bitwidth: 16}); + this.Words = 1; + this.Cycles = 4; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_SPI | CONTROL_PCC; + } +} +is_STSP_i16 = new IS_STSP_imm16; +Instructions.push(is_STSP_i16); + + +//--------------------------- General Purpose Registers STx 16b Absolutes --------------------------- + class IS_STAB_CDabs16 extends Microcode_Instruction { constructor(props) { super(props); @@ -484,17 +508,722 @@ class IS_STSP_abs16 extends Microcode_Instruction { this.Type = InstructionTypes.Absolute16; this.Operands = new Array({Operand: "", Bitwidth: 16}); - this.Words = 1; + this.Words = 2; this.Cycles = 5; - this.Microcode[2] = CONTROL_SPC; - this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI; - this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_SPI; } } is_STSP_a = new IS_STSP_abs16; Instructions.push(is_STSP_a); -//--------------------------- General Purpose Registers STx Indirect --------------------------- +//--------------------------- General Purpose Registers STx 24b Absolutes --------------------------- + + +class IS_STAL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x162; + this.Mnemonic = "STAL"; + this.LongName = "STORE Register A to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_AL | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAL_a24 = new IS_STAL_abs24; +Instructions.push(is_STAL_a24); + +class IS_STAH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x163; + this.Mnemonic = "STAH"; + this.LongName = "STORE Register A to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_AH | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAH_a24 = new IS_STAH_abs24; +Instructions.push(is_STAH_a24); + +class IS_STBL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x164; + this.Mnemonic = "STBL"; + this.LongName = "STORE Register B to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_BL | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBL_a24 = new IS_STBL_abs24; +Instructions.push(is_STBL_a24); + +class IS_STBH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x165; + this.Mnemonic = "STBH"; + this.LongName = "STORE Register B to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_BH | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBH_a24 = new IS_STBH_abs24; +Instructions.push(is_STBH_a24); + +class IS_STCL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x166; + this.Mnemonic = "STCL"; + this.LongName = "STORE Register C to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_CL | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCL_a24 = new IS_STCL_abs24; +Instructions.push(is_STCL_a24); + +class IS_STCH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x167; + this.Mnemonic = "STCH"; + this.LongName = "STORE Register C to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_CH | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCH_a24 = new IS_STCH_abs24; +Instructions.push(is_STCH_a24); + +class IS_STDL_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x168; + this.Mnemonic = "STDL"; + this.LongName = "STORE Register D to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_DL | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDL_a24 = new IS_STDL_abs24; +Instructions.push(is_STDL_a24); + +class IS_STDH_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x169; + this.Mnemonic = "STDH"; + this.LongName = "STORE Register D to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_DH | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDH_a24 = new IS_STDH_abs24; +Instructions.push(is_STDH_a24); + +class IS_STAB_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x16A; + this.Mnemonic = "STAB"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_AB | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAB_a24 = new IS_STAB_abs24; +Instructions.push(is_STAB_a24); + +class IS_STAC_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x16B; + this.Mnemonic = "STAC"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_AC | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAC_a24 = new IS_STAC_abs24; +Instructions.push(is_STAC_a24); + +class IS_STAD_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x16C; + this.Mnemonic = "STAD"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_AD | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAD_a24 = new IS_STAD_abs24; +Instructions.push(is_STAD_a24); + +class IS_STBA_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x16D; + this.Mnemonic = "STBA"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_BA | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBA_a24 = new IS_STBA_abs24; +Instructions.push(is_STBA_a24); + +class IS_STBC_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x16E; + this.Mnemonic = "STBC"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_BC | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBC_a24 = new IS_STBC_abs24; +Instructions.push(is_STBC_a24); + +class IS_STBD_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x16F; + this.Mnemonic = "STBD"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_BD | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBD_a24 = new IS_STBD_abs24; +Instructions.push(is_STBD_a24); + +class IS_STCA_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x170; + this.Mnemonic = "STCA"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_CA | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCA_a24 = new IS_STCA_abs24; +Instructions.push(is_STCA_a24); + +class IS_STCB_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x171; + this.Mnemonic = "STCB"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_CB | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCB_a24 = new IS_STCB_abs24; +Instructions.push(is_STCB_a24); + +class IS_STCD_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x172; + this.Mnemonic = "STCD"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_CD | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCD_a24 = new IS_STCD_abs24; +Instructions.push(is_STCD_a24); + +class IS_STDA_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x173; + this.Mnemonic = "STDA"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_DA | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDA_a24 = new IS_STDA_abs24; +Instructions.push(is_STDA_a24); + +class IS_STDB_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x174; + this.Mnemonic = "STDB"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_DB | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDB_a24 = new IS_STDB_abs24; +Instructions.push(is_STDB_a24); + +class IS_STDC_abs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x175; + this.Mnemonic = "STDC"; + this.LongName = "STORE 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_DC | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDC_a24 = new IS_STDC_abs24; +Instructions.push(is_STDC_a24); + +class IS_STAB_SPabs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x176; + this.Mnemonic = "STAB"; + this.LongName = "STORE Register A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + 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_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_AB | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAB_spa24 = new IS_STAB_SPabs24; +Instructions.push(is_STAB_spa24); + +class IS_STCD_SPabs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x177; + this.Mnemonic = "STCD"; + this.LongName = "STORE Register C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + 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_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_CD | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCD_spa24 = new IS_STCD_SPabs24; +Instructions.push(is_STCD_spa24); + +class IS_STAL_SPabs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x178; + this.Mnemonic = "STAL"; + this.LongName = "STORE Register A to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + 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_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | 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; + } +} +is_STAL_spa24 = new IS_STAL_SPabs24; +Instructions.push(is_STAL_spa24); + +class IS_STAH_SPabs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x179; + this.Mnemonic = "STAH"; + this.LongName = "STORE Register A to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + 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_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_AH | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAH_spa24 = new IS_STAH_SPabs24; +Instructions.push(is_STAH_spa24); + +class IS_STBL_SPabs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x17A; + this.Mnemonic = "STBL"; + this.LongName = "STORE Register B to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + 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_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_BL | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBL_spa24 = new IS_STBL_SPabs24; +Instructions.push(is_STBL_spa24); + +class IS_STBH_SPabs24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x17B; + this.Mnemonic = "STBH"; + this.LongName = "STORE Register B to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Absolute24; + 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_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_BH | CONTROL_RI; + this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBH_spa24 = new IS_STBH_SPabs24; +Instructions.push(is_STBH_spa24); + +//--------------------------- General Purpose Registers STx 16b Indirect --------------------------- class IS_STAB_CDind16 extends Microcode_Instruction { @@ -1067,66 +1796,636 @@ class IS_STSP_ind16 extends Microcode_Instruction { this.Type = InstructionTypes.Indirect16; this.Operands = new Array({Operand: "[SP]", Bitwidth: 16}); - this.Words = 1; + this.Words = 2; 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_SP | CONTROL_RI; + this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC; + this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_RO | CONTROL_SPI; } } is_STSP_in = new IS_STSP_ind16; Instructions.push(is_STSP_in); +//--------------------------- General Purpose Registers STx 24b Indirect --------------------------- - - - - -class IS_STAB_sp extends Microcode_Instruction { +class IS_STAL_ind24 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x156; + this.Bytecode = 0x1C2; + this.Mnemonic = "STAL"; + this.LongName = "STORE Register A to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AL | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAL_in24 = new IS_STAL_ind24; +Instructions.push(is_STAL_in24); + +class IS_STAH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C3; + this.Mnemonic = "STAH"; + this.LongName = "STORE Register A to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AH | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAH_in24 = new IS_STAH_ind24; +Instructions.push(is_STAH_in24); + +class IS_STBL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C4; + this.Mnemonic = "STBL"; + this.LongName = "STORE Register B to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BL | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBL_in24 = new IS_STBL_ind24; +Instructions.push(is_STBL_in24); + +class IS_STBH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C5; + this.Mnemonic = "STBH"; + this.LongName = "STORE Register B to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BH | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBH_in24 = new IS_STBH_ind24; +Instructions.push(is_STBH_in24); + +class IS_STCL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C6; + this.Mnemonic = "STCL"; + this.LongName = "STORE Register C to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_CL | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCL_in24 = new IS_STCL_ind24; +Instructions.push(is_STCL_in24); + +class IS_STCH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C7; + this.Mnemonic = "STCH"; + this.LongName = "STORE Register C to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_CH | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCH_in24 = new IS_STCH_ind24; +Instructions.push(is_STCH_in24); + +class IS_STDL_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C8; + this.Mnemonic = "STDL"; + this.LongName = "STORE Register D to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_DL | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDL_in24 = new IS_STDL_ind24; +Instructions.push(is_STDL_in24); + +class IS_STDH_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1C9; + this.Mnemonic = "STDH"; + this.LongName = "STORE Register D to 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_DH | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDH_in24 = new IS_STDH_ind24; +Instructions.push(is_STDH_in24); + +class IS_STAB_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1CA; this.Mnemonic = "STAB"; - this.LongName = "STORE Register A and B"; + this.LongName = "STORE Registers 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; + 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AB | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; } } -is_STAB_sp = new IS_STAB_sp; -Instructions.push(is_STAB_sp); +is_STAB_in24 = new IS_STAB_ind24; +Instructions.push(is_STAB_in24); -class IS_PSTAL_sp_ind extends Microcode_Instruction { +class IS_STAC_ind24 extends Microcode_Instruction { constructor(props) { super(props); - this.Bytecode = 0x198; - this.Mnemonic = "PSTAL"; - this.LongName = "Page STORE Register A to LOW Byte"; + this.Bytecode = 0x1CB; + this.Mnemonic = "STAC"; + this.LongName = "STORE Registers A and C"; 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; + 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AC | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; } } -is_PSTAL_spin = new IS_PSTAL_sp_ind; -Instructions.push(is_PSTAL_spin); +is_STAC_in24 = new IS_STAC_ind24; +Instructions.push(is_STAC_in24); +class IS_STAD_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1CC; + this.Mnemonic = "STAD"; + this.LongName = "STORE Registers A and D"; + this.Aliases = new Array(); -class IS_STAL_sp_ind24 extends Microcode_Instruction { + 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AD | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAD_in24 = new IS_STAD_ind24; +Instructions.push(is_STAD_in24); + +class IS_STBA_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1CD; + this.Mnemonic = "STBA"; + this.LongName = "STORE Registers B and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BA | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBA_in24 = new IS_STBA_ind24; +Instructions.push(is_STBA_in24); + +class IS_STBC_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1CE; + this.Mnemonic = "STBC"; + this.LongName = "STORE Registers B and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BC | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBC_in24 = new IS_STBC_ind24; +Instructions.push(is_STBC_in24); + +class IS_STBD_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1CF; + this.Mnemonic = "STBD"; + this.LongName = "STORE Registers B and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BD | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBD_in24 = new IS_STBD_ind24; +Instructions.push(is_STBD_in24); + +class IS_STCA_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D0; + this.Mnemonic = "STCA"; + this.LongName = "STORE Registers C and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_CA | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCA_in24 = new IS_STCA_ind24; +Instructions.push(is_STCA_in24); + +class IS_STCB_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D1; + this.Mnemonic = "STCB"; + this.LongName = "STORE Registers C and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_CB | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCB_in24 = new IS_STCB_ind24; +Instructions.push(is_STCB_in24); + +class IS_STCD_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D2; + this.Mnemonic = "STCD"; + this.LongName = "STORE Registers C and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_CD | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCD_in24 = new IS_STCD_ind24; +Instructions.push(is_STCD_in24); + +class IS_STDA_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D3; + this.Mnemonic = "STDA"; + this.LongName = "STORE Registers D and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_DA | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDA_in24 = new IS_STDA_ind24; +Instructions.push(is_STDA_in24); + +class IS_STDB_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D4; + this.Mnemonic = "STDB"; + this.LongName = "STORE Registers D and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_DB | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDB_in24 = new IS_STDB_ind24; +Instructions.push(is_STDB_in24); + +class IS_STDC_ind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D5; + this.Mnemonic = "STDC"; + this.LongName = "STORE Registers D and 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 | CONTROL_PCC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RHI; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_DC | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STDC_in24 = new IS_STDC_ind24; +Instructions.push(is_STDC_in24); + +class IS_STAB_SPind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D6; + this.Mnemonic = "STAB"; + this.LongName = "STORE Registers A and B"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); + this.Words = 1; + this.Cycles = 13; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AB | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAB_spin24 = new IS_STAB_SPind24; +Instructions.push(is_STAB_spin24); + +class IS_STCD_SPind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D7; + this.Mnemonic = "STCD"; + this.LongName = "STORE Registers C and D"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); + this.Words = 1; + this.Cycles = 13; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_CD | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STCD_spin24 = new IS_STCD_SPind24; +Instructions.push(is_STCD_spin24); + +class IS_STAL_SPind24 extends Microcode_Instruction { constructor(props) { super(props); this.Bytecode = 0x1D8; @@ -1134,22 +2433,124 @@ class IS_STAL_sp_ind24 extends Microcode_Instruction { this.LongName = "STORE Register A to LOW Byte"; this.Aliases = new Array(); - this.Type = InstructionTypes.RegisterIndirect; + this.Type = InstructionTypes.Indirect24; this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); this.Words = 1; - this.Cycles = 12; + this.Cycles = 13; 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; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AL | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; } } -is_STAL_spin = new IS_STAL_sp_ind24; -Instructions.push(is_STAL_spin); +is_STAL_spin24 = new IS_STAL_SPind24; +Instructions.push(is_STAL_spin24); + +class IS_STAH_SPind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1D9; + this.Mnemonic = "STAH"; + this.LongName = "STORE Register A to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); + this.Words = 1; + this.Cycles = 13; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_AH | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STAH_spin24 = new IS_STAH_SPind24; +Instructions.push(is_STAH_spin24); + +class IS_STBL_SPind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1DA; + this.Mnemonic = "STBL"; + this.LongName = "STORE Register B to LOW Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); + this.Words = 1; + this.Cycles = 13; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BL | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBL_spin24 = new IS_STBL_SPind24; +Instructions.push(is_STBL_spin24); + +class IS_STBH_SPind24 extends Microcode_Instruction { + constructor(props) { + super(props); + this.Bytecode = 0x1DB; + this.Mnemonic = "STBH"; + this.LongName = "STORE Register B to HIGH Byte"; + this.Aliases = new Array(); + + this.Type = InstructionTypes.Indirect24; + this.Operands = new Array({Operand: "[SP]", Bitwidth: 24}); + this.Words = 1; + this.Cycles = 13; + this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC; + this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[5] = CONTROL_OUT_I2 | CONTROL_SPC; + this.Microcode[6] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[7] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[8] = CONTROL_OUT_2O | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC; + this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RRI; + this.Microcode[10] = CONTROL_OUT_BH | CONTROL_RI; + this.Microcode[11] = CONTROL_OUT_SP | CONTROL_RRI; + this.Microcode[12] = CONTROL_OUT_RO | CONTROL_RHI; + } +} +is_STBH_spin24 = new IS_STBH_SPind24; +Instructions.push(is_STBH_spin24); + + + + + + + + + + + + + + + + + + diff --git a/js/isa/tx.js b/js/isa/tx.js index 47951aa..d46ed24 100644 --- a/js/isa/tx.js +++ b/js/isa/tx.js @@ -225,3 +225,4 @@ class IS_TDC extends Microcode_Instruction { is_TDC = new IS_TDC; Instructions.push(is_TDC); + diff --git a/js/main.js b/js/main.js index 87c8952..5ca37d7 100644 --- a/js/main.js +++ b/js/main.js @@ -28,7 +28,7 @@ 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; -cpu.RAM[0xDD] = is_STAL_spin.Bytecode; +cpu.RAM[0xDD] = is_STAL_spa24.Bytecode; cpu.RAM[0xDE] = is_ADD_gpci.Bytecode cpu.RAM[0xDF] = 1; cpu.RAM[0xE0] = is_BCS_i.Bytecode;