Refacotred isa file formats, added more instructions
This commit is contained in:
parent
3213553372
commit
55cfeb3c15
@ -69,6 +69,14 @@
|
|||||||
<script src="js/defines.js"></script>
|
<script src="js/defines.js"></script>
|
||||||
<script src="js/cpu.js"></script>
|
<script src="js/cpu.js"></script>
|
||||||
<script src="js/microcode_compiler.js"></script>
|
<script src="js/microcode_compiler.js"></script>
|
||||||
|
<script src="js/isa/ldx.js"></script>
|
||||||
|
<script src="js/isa/stx.js"></script>
|
||||||
|
<script src="js/isa/tx.js"></script>
|
||||||
|
<script src="js/isa/alu.js"></script>
|
||||||
|
<script src="js/isa/phx.js"></script>
|
||||||
|
<script src="js/isa/plx.js"></script>
|
||||||
|
<script src="js/isa/branching.js"></script>
|
||||||
|
<script src="js/isa/misc.js"></script>
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
<script src="js/asm_compiler.js"></script>
|
<script src="js/asm_compiler.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
8
isa.html
8
isa.html
@ -29,6 +29,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<script src="js/defines.js"></script>
|
<script src="js/defines.js"></script>
|
||||||
<script src="js/microcode_compiler.js"></script>
|
<script src="js/microcode_compiler.js"></script>
|
||||||
|
<script src="js/isa/ldx.js"></script>
|
||||||
|
<script src="js/isa/stx.js"></script>
|
||||||
|
<script src="js/isa/tx.js"></script>
|
||||||
|
<script src="js/isa/alu.js"></script>
|
||||||
|
<script src="js/isa/phx.js"></script>
|
||||||
|
<script src="js/isa/plx.js"></script>
|
||||||
|
<script src="js/isa/branching.js"></script>
|
||||||
|
<script src="js/isa/misc.js"></script>
|
||||||
<script src="js/asm_compiler.js"></script>
|
<script src="js/asm_compiler.js"></script>
|
||||||
<script src="js/instruction_doc.js"></script>
|
<script src="js/instruction_doc.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
351
js/isa/alu.js
Normal file
351
js/isa/alu.js
Normal file
@ -0,0 +1,351 @@
|
|||||||
|
// This is a simple ADD command which will ADD GPA and GPB putting the sum in GPA
|
||||||
|
class IS_ADD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x300;
|
||||||
|
this.Mnemonic = "ADD";
|
||||||
|
this.LongName = "Addition";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_ADD | CONTROL_OUT_AB;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_ADD = new IS_ADD;
|
||||||
|
Instructions.push(is_ADD);
|
||||||
|
|
||||||
|
class IS_SUB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x301;
|
||||||
|
this.Mnemonic = "SUB";
|
||||||
|
this.LongName = "Subtraction";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_SUB;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_SUB = new IS_SUB;
|
||||||
|
Instructions.push(is_SUB);
|
||||||
|
|
||||||
|
class IS_NOT extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x302;
|
||||||
|
this.Mnemonic = "NOT";
|
||||||
|
this.LongName = "Logical NOT";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 9;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_RAIL;
|
||||||
|
this.Microcode[5] = CONTROL_ALU_NOT;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_AO | CONTROL_RBIL | CONTROL_SPC;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_NOT = new IS_NOT;
|
||||||
|
Instructions.push(is_NOT);
|
||||||
|
|
||||||
|
class IS_FNOT extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x303;
|
||||||
|
this.Mnemonic = "FNOT";
|
||||||
|
this.LongName = "Logical FAST NOT";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_NOT;
|
||||||
|
this.Microcode[3] = CONTROL_RBIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_FNOT = new IS_FNOT;
|
||||||
|
Instructions.push(is_FNOT);
|
||||||
|
|
||||||
|
class IS_AND extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x304;
|
||||||
|
this.Mnemonic = "AND";
|
||||||
|
this.LongName = "Logical AND";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_AND;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_AND = new IS_AND;
|
||||||
|
Instructions.push(is_AND);
|
||||||
|
|
||||||
|
class IS_NAND extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x305;
|
||||||
|
this.Mnemonic = "NAND";
|
||||||
|
this.LongName = "Logical NAND";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_NAND;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_NAND = new IS_NAND;
|
||||||
|
Instructions.push(is_NAND);
|
||||||
|
|
||||||
|
class IS_OR extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x306;
|
||||||
|
this.Mnemonic = "OR";
|
||||||
|
this.LongName = "Logical OR";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_OR;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_OR = new IS_OR;
|
||||||
|
Instructions.push(is_OR);
|
||||||
|
|
||||||
|
class IS_NOR extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x307;
|
||||||
|
this.Mnemonic = "NOR";
|
||||||
|
this.LongName = "Logical NOR";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_NOR;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_NOR = new IS_NOR;
|
||||||
|
Instructions.push(is_NOR);
|
||||||
|
|
||||||
|
class IS_XOR extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x308;
|
||||||
|
this.Mnemonic = "XOR";
|
||||||
|
this.LongName = "Logical XOR";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_XOR;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_XOR = new IS_XOR;
|
||||||
|
Instructions.push(is_XOR);
|
||||||
|
|
||||||
|
class IS_XNOR extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x309;
|
||||||
|
this.Mnemonic = "XNOR";
|
||||||
|
this.LongName = "Logical XNOR";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_ALU_XNOR;
|
||||||
|
this.Microcode[3] = CONTROL_RAIL | CONTROL_OUT_AO | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_XNOR = new IS_XNOR;
|
||||||
|
Instructions.push(is_XNOR);
|
||||||
|
|
||||||
|
class IS_CMP extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x30A;
|
||||||
|
this.Mnemonic = "CMP";
|
||||||
|
this.LongName = "Logical COMPARE";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "B", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_AB | CONTROL_ALU_ADD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_CMP = new IS_CMP;
|
||||||
|
Instructions.push(is_CMP);
|
||||||
|
|
||||||
|
class IS_CMP_gpcd_abs extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x30B;
|
||||||
|
this.Mnemonic = "CMP";
|
||||||
|
this.LongName = "Logical COMPARE";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.RegisterAbsolute;
|
||||||
|
this.Operands = new Array({Operand: "CD", Bitwidth: 16});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_CD | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_ALU_ADD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_CMP_cda = new IS_CMP_gpcd_abs();
|
||||||
|
Instructions.push(is_CMP_cda);
|
||||||
|
|
||||||
|
class IS_CMP_gpc_gpd extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x30C;
|
||||||
|
this.Mnemonic = "CMP";
|
||||||
|
this.LongName = "Logical COMPARE";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "C", Bitwidth: 8},{Operand: "D", Bitwidth: 8});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_CD | CONTROL_ALU_ADD;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_CMP_c_d = new IS_CMP_gpc_gpd();
|
||||||
|
Instructions.push(is_CMP_c_d);
|
||||||
|
|
||||||
|
class IS_ADD_gpa_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x30D;
|
||||||
|
this.Mnemonic = "ADD";
|
||||||
|
this.LongName = "Addition";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "A", Bitwidth: 8},{Operand: "$", Bitwidth: 8});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 10;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_BL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RBIL | CONTROL_PCC;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_AB | CONTROL_ALU_ADD;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RAIL | CONTROL_SPC;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RBIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_ADD_gpai = new IS_ADD_gpa_imm;
|
||||||
|
Instructions.push(is_ADD_gpai);
|
||||||
|
|
||||||
|
class IS_ADD_gpb_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x30E;
|
||||||
|
this.Mnemonic = "ADD";
|
||||||
|
this.LongName = "Addition";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "B", Bitwidth: 8},{Operand: "$", Bitwidth: 8});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 10;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_AB | CONTROL_ALU_ADD;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RBIL | CONTROL_SPC;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_ADD_gpbi = new IS_ADD_gpb_imm;
|
||||||
|
Instructions.push(is_ADD_gpbi);
|
||||||
|
|
||||||
|
class IS_ADD_gpc_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x30F;
|
||||||
|
this.Mnemonic = "ADD";
|
||||||
|
this.LongName = "Addition";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "C", Bitwidth: 8},{Operand: "$", Bitwidth: 8});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 10;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_CA | CONTROL_ALU_ADD;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RCIL | CONTROL_SPC;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_ADD_gpci = new IS_ADD_gpc_imm;
|
||||||
|
Instructions.push(is_ADD_gpci);
|
||||||
|
|
||||||
|
|
||||||
|
class IS_ADD_gpd_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x310;
|
||||||
|
this.Mnemonic = "ADD";
|
||||||
|
this.LongName = "Addition";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array({Operand: "D", Bitwidth: 8},{Operand: "$", Bitwidth: 8});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 10;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_PCC;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_DA | CONTROL_ALU_ADD;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_AO | CONTROL_RDIL | CONTROL_SPC;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[9] = CONTROL_OUT_RO | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_ADD_gpdi = new IS_ADD_gpd_imm;
|
||||||
|
Instructions.push(is_ADD_gpdi);
|
247
js/isa/branching.js
Normal file
247
js/isa/branching.js
Normal file
@ -0,0 +1,247 @@
|
|||||||
|
class IS_JMP_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2C0;
|
||||||
|
this.Mnemonic = "JMP";
|
||||||
|
this.LongName = "JUMP to address";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_JMP_i = new IS_JMP_imm16;
|
||||||
|
Instructions.push(is_JMP_i);
|
||||||
|
|
||||||
|
class IS_JMP_imm24 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2C1;
|
||||||
|
this.Mnemonic = "JMP";
|
||||||
|
this.LongName = "JUMP to address";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate24;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 24});
|
||||||
|
this.Words = 3;
|
||||||
|
this.Cycles = 7;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_I2 | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_2O | CONTROL_RHI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_JMP_i24 = new IS_JMP_imm24;
|
||||||
|
Instructions.push(is_JMP_i24);
|
||||||
|
|
||||||
|
|
||||||
|
class IS_BCC_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.UsesCarry = true;
|
||||||
|
this.Bytecode = 0x2C2;
|
||||||
|
this.Mnemonic = "BCC";
|
||||||
|
this.LongName = "Branch if Carry Clear";
|
||||||
|
this.Aliases = new Array("JNC");
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.CarryWords = 2;
|
||||||
|
this.CarryCycles = 3;
|
||||||
|
this.MicrocodeCarry = new Array(16);
|
||||||
|
for (let a = 0; a < 16; a++) {
|
||||||
|
this.MicrocodeCarry[a] = this.Microcode[a];
|
||||||
|
}
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
this.MicrocodeCarry[2] = CONTROL_PCC; // Step over the immediate value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_BCC_i = new IS_BCC_imm;
|
||||||
|
Instructions.push(is_BCC_i);
|
||||||
|
|
||||||
|
class IS_BCS_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.UsesCarry = true;
|
||||||
|
this.Bytecode = 0x2C3;
|
||||||
|
this.Mnemonic = "BCS";
|
||||||
|
this.LongName = "Branch if Carry Set";
|
||||||
|
this.Aliases = new Array("JC");
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.CarryWords = 2;
|
||||||
|
this.CarryCycles = 4;
|
||||||
|
this.MicrocodeCarry = new Array(16);
|
||||||
|
for (let a = 0; a < 16; a++) {
|
||||||
|
this.MicrocodeCarry[a] = this.Microcode[a];
|
||||||
|
}
|
||||||
|
this.Microcode[2] = CONTROL_PCC; // Step over the immediate value
|
||||||
|
this.MicrocodeCarry[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.MicrocodeCarry[3] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_BCS_i = new IS_BCS_imm;
|
||||||
|
Instructions.push(is_BCS_i);
|
||||||
|
|
||||||
|
class IS_BEQ_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.UsesZero = true;
|
||||||
|
this.Bytecode = 0x2C4;
|
||||||
|
this.Mnemonic = "BEQ";
|
||||||
|
this.LongName = "Branch if Equal";
|
||||||
|
this.Aliases = new Array("JE","JZ");
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.ZeroWords = 2;
|
||||||
|
this.ZeroCycles = 4;
|
||||||
|
this.MicrocodeZero = new Array(16);
|
||||||
|
for (let a = 0; a < 16; a++) {
|
||||||
|
this.MicrocodeZero[a] = this.Microcode[a];
|
||||||
|
}
|
||||||
|
this.Microcode[2] = CONTROL_PCC; // Step over the immediate value
|
||||||
|
this.MicrocodeZero[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.MicrocodeZero[3] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_BEQ_i = new IS_BEQ_imm;
|
||||||
|
Instructions.push(is_BEQ_i);
|
||||||
|
|
||||||
|
class IS_BNE_imm extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.UsesZero = true;
|
||||||
|
this.Bytecode = 0x2C5;
|
||||||
|
this.Mnemonic = "BNE";
|
||||||
|
this.LongName = "Branch if NOT Equal";
|
||||||
|
this.Aliases = new Array("JNE","JNZ");
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.ZeroWords = 2;
|
||||||
|
this.ZeroCycles = 3;
|
||||||
|
this.MicrocodeZero = new Array(16);
|
||||||
|
for (let a = 0; a < 16; a++) {
|
||||||
|
this.MicrocodeZero[a] = this.Microcode[a];
|
||||||
|
}
|
||||||
|
this.MicrocodeZero[2] = CONTROL_PCC; // Step over the immediate value
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_BNE_i = new IS_BNE_imm;
|
||||||
|
Instructions.push(is_BNE_i);
|
||||||
|
|
||||||
|
class IS_JSR_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2FC;
|
||||||
|
this.Mnemonic = "JSR";
|
||||||
|
this.LongName = "JUMP to Subroutine";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 6;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_JSR_i = new IS_JSR_imm16;
|
||||||
|
Instructions.push(is_JSR_i);
|
||||||
|
|
||||||
|
class IS_RTS_paged extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2FD;
|
||||||
|
this.Mnemonic = "RTS";
|
||||||
|
this.LongName = "RETURN from Subroutine (called with 16 bit immediate)";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.RTS16;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 6;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
this.Microcode[5] = CONTROL_PCC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_RTS_paged = new IS_RTS_paged();
|
||||||
|
Instructions.push(is_RTS_paged);
|
||||||
|
|
||||||
|
|
||||||
|
class IS_JSR_imm24 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2FE;
|
||||||
|
this.Mnemonic = "JSR";
|
||||||
|
this.LongName = "JUMP to Subroutine";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate24;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 24});
|
||||||
|
this.Words = 3;
|
||||||
|
this.Cycles = 11;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_PC | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_I2 | CONTROL_PCC;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[9] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
this.Microcode[10] = CONTROL_OUT_2O | CONTROL_RHI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_JSR_i24 = new IS_JSR_imm24;
|
||||||
|
Instructions.push(is_JSR_i24);
|
||||||
|
|
||||||
|
class IS_RTS extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2FF;
|
||||||
|
this.Mnemonic = "RTS";
|
||||||
|
this.LongName = "RETURN from Subroutine (called with 24 bit immediate)";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.RTS24;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 9;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_I2 | CONTROL_SPC;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_RO | CONTROL_PCI;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_2O | CONTROL_RHI | CONTROL_PCC;
|
||||||
|
this.Microcode[8] = CONTROL_PCC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_RTS = new IS_RTS;
|
||||||
|
Instructions.push(is_RTS);
|
1940
js/isa/ldx.js
Normal file
1940
js/isa/ldx.js
Normal file
File diff suppressed because it is too large
Load Diff
33
js/isa/misc.js
Normal file
33
js/isa/misc.js
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
class IS_NOP extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x3ff;
|
||||||
|
this.Mnemonic = "NOP";
|
||||||
|
this.LongName = "NO OPERATION";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.SingleWord;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_NOP = new IS_NOP;
|
||||||
|
Instructions.push(is_NOP);
|
||||||
|
|
||||||
|
class IS_NOP0 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x0;
|
||||||
|
this.Mnemonic = "NOP";
|
||||||
|
this.LongName = "NO OPERATION";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.SingleWord;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_NOP0 = new IS_NOP0;
|
||||||
|
Instructions.push(is_NOP0);
|
113
js/isa/phx.js
Normal file
113
js/isa/phx.js
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
class IS_PHA extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x280;
|
||||||
|
this.Mnemonic = "PHA";
|
||||||
|
this.LongName = "PUSH Register A to the STACK";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_AL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PHA = new IS_PHA;
|
||||||
|
Instructions.push(is_PHA);
|
||||||
|
|
||||||
|
class IS_PHB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x281;
|
||||||
|
this.Mnemonic = "PHB";
|
||||||
|
this.LongName = "PUSH Register B to the STACK";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_BL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PHB = new IS_PHB;
|
||||||
|
Instructions.push(is_PHB);
|
||||||
|
|
||||||
|
class IS_PHC extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x282;
|
||||||
|
this.Mnemonic = "PHC";
|
||||||
|
this.LongName = "PUSH Register C to the STACK";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_CL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PHC = new IS_PHC;
|
||||||
|
Instructions.push(is_PHC);
|
||||||
|
|
||||||
|
class IS_PHD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x283;
|
||||||
|
this.Mnemonic = "PHD";
|
||||||
|
this.LongName = "PUSH Register D to the STACK";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_DL | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PHD = new IS_PHD;
|
||||||
|
Instructions.push(is_PHD);
|
||||||
|
|
||||||
|
class IS_PHAB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x284;
|
||||||
|
this.Mnemonic = "PHAB";
|
||||||
|
this.LongName = "PUSH Register A and B to the STACK";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_AB | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PHAB = new IS_PHAB;
|
||||||
|
Instructions.push(is_PHAB);
|
||||||
|
|
||||||
|
class IS_PHCD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x28C;
|
||||||
|
this.Mnemonic = "PHCD";
|
||||||
|
this.LongName = "PUSH Register C and D to the STACK";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 4;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_CD | CONTROL_RI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PHCD = new IS_PHCD;
|
||||||
|
Instructions.push(is_PHCD);
|
119
js/isa/plx.js
Normal file
119
js/isa/plx.js
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
class IS_PLA extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2A0;
|
||||||
|
this.Mnemonic = "PLA";
|
||||||
|
this.LongName = "PULL Stack and place in Register A (Low BYTE)";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PLA = new IS_PLA;
|
||||||
|
Instructions.push(is_PLA);
|
||||||
|
|
||||||
|
class IS_PLB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2A1;
|
||||||
|
this.Mnemonic = "PLB";
|
||||||
|
this.LongName = "PULL Stack and place in Register B (Low BYTE)";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RBIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PLB = new IS_PLB;
|
||||||
|
Instructions.push(is_PLB);
|
||||||
|
|
||||||
|
class IS_PLC extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2A2;
|
||||||
|
this.Mnemonic = "PLC";
|
||||||
|
this.LongName = "PULL Stack and place in Register C (Low BYTE)";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PLC = new IS_PLC;
|
||||||
|
Instructions.push(is_PLC);
|
||||||
|
|
||||||
|
class IS_PLD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2A3;
|
||||||
|
this.Mnemonic = "PLD";
|
||||||
|
this.LongName = "PULL Stack and place in Register D (Low BYTE)";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RDIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PLD = new IS_PLD;
|
||||||
|
Instructions.push(is_PLD);
|
||||||
|
|
||||||
|
class IS_PLAB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2A4;
|
||||||
|
this.Mnemonic = "PLAB";
|
||||||
|
this.LongName = "PULL Stack and place in Register A and B";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RAIL | CONTROL_RBIH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PLAB = new IS_PLAB;
|
||||||
|
Instructions.push(is_PLAB);
|
||||||
|
|
||||||
|
class IS_PLCD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x2AC;
|
||||||
|
this.Mnemonic = "PLCD";
|
||||||
|
this.LongName = "PULL Stack and place in Register C and D";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RCIL | CONTROL_RDIH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PLCD = new IS_PLCD;
|
||||||
|
Instructions.push(is_PLCD);
|
270
js/isa/stx.js
Normal file
270
js/isa/stx.js
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
class IS_STAL_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x102;
|
||||||
|
this.Mnemonic = "STAL";
|
||||||
|
this.LongName = "STORE Register A to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STAL_i = new IS_STAL_imm16;
|
||||||
|
Instructions.push(is_STAL_i);
|
||||||
|
|
||||||
|
class IS_STAH_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x103;
|
||||||
|
this.Mnemonic = "STAH";
|
||||||
|
this.LongName = "STORE Register A to HIGH Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_AH | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STAH_i = new IS_STAH_imm16;
|
||||||
|
Instructions.push(is_STAH_i);
|
||||||
|
|
||||||
|
class IS_STBL_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x104;
|
||||||
|
this.Mnemonic = "STBL";
|
||||||
|
this.LongName = "STORE Register B to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_BL | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STBL_i = new IS_STBL_imm16;
|
||||||
|
Instructions.push(is_STBL_i);
|
||||||
|
|
||||||
|
class IS_STBH_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x105;
|
||||||
|
this.Mnemonic = "STBH";
|
||||||
|
this.LongName = "STORE Register B to HIGH Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_BH | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STBH_i = new IS_STBH_imm16;
|
||||||
|
Instructions.push(is_STBH_i);
|
||||||
|
|
||||||
|
class IS_STCL_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x106;
|
||||||
|
this.Mnemonic = "STCL";
|
||||||
|
this.LongName = "STORE Register C to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_CL | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STCL_i = new IS_STCL_imm16;
|
||||||
|
Instructions.push(is_STCL_i);
|
||||||
|
|
||||||
|
class IS_STCH_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x107;
|
||||||
|
this.Mnemonic = "STCH";
|
||||||
|
this.LongName = "STORE Register C to HIGH Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_CH | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STCH_i = new IS_STCH_imm16;
|
||||||
|
Instructions.push(is_STCH_i);
|
||||||
|
|
||||||
|
class IS_STDL_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x108;
|
||||||
|
this.Mnemonic = "STDL";
|
||||||
|
this.LongName = "STORE Register D to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_DL | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STDL_i = new IS_STDL_imm16;
|
||||||
|
Instructions.push(is_STDL_i);
|
||||||
|
|
||||||
|
class IS_STDH_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x109;
|
||||||
|
this.Mnemonic = "STDH";
|
||||||
|
this.LongName = "STORE Register D to HIGH Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_DH | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STDH_i = new IS_STDH_imm16;
|
||||||
|
Instructions.push(is_STDH_i);
|
||||||
|
|
||||||
|
class IS_STAB_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x10A;
|
||||||
|
this.Mnemonic = "STAB";
|
||||||
|
this.LongName = "STORE Register A and B";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_AB | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STAB_i = new IS_STAB_imm16;
|
||||||
|
Instructions.push(is_STAB_i);
|
||||||
|
|
||||||
|
class IS_STAB_sp extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x156;
|
||||||
|
this.Mnemonic = "STAB";
|
||||||
|
this.LongName = "STORE Register A and B";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.RegisterAbsolute;
|
||||||
|
this.Operands = new Array({Operand: "SP", Bitwidth: 16});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 6;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_AB | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STAB_sp = new IS_STAB_sp;
|
||||||
|
Instructions.push(is_STAB_sp);
|
||||||
|
|
||||||
|
class IS_PSTAL_sp_ind extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x198;
|
||||||
|
this.Mnemonic = "PSTAL";
|
||||||
|
this.LongName = "Page STORE Register A to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.RegisterIndirect;
|
||||||
|
this.Operands = new Array({Operand: "[SP]", Bitwidth: 16});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 6;
|
||||||
|
this.Microcode[2] = CONTROL_SPC;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_AL | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PSTAL_spin = new IS_PSTAL_sp_ind;
|
||||||
|
Instructions.push(is_PSTAL_spin);
|
||||||
|
|
||||||
|
class IS_PSTAL_imm16 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x102;
|
||||||
|
this.Mnemonic = "PSTAL";
|
||||||
|
this.LongName = "Page STORE Register A to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Immediate16;
|
||||||
|
this.Operands = new Array({Operand: "$", Bitwidth: 16});
|
||||||
|
this.Words = 2;
|
||||||
|
this.Cycles = 5;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_PC | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_PCC;
|
||||||
|
this.Microcode[4] = CONTROL_OUT_AL | CONTROL_RI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_PSTAL_i = new IS_PSTAL_imm16;
|
||||||
|
Instructions.push(is_PSTAL_i);
|
||||||
|
|
||||||
|
class IS_STAL_sp_ind24 extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x1D8;
|
||||||
|
this.Mnemonic = "STAL";
|
||||||
|
this.LongName = "STORE Register A to LOW Byte";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.RegisterIndirect;
|
||||||
|
this.Operands = new Array({Operand: "[SP]", Bitwidth: 24});
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 12;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[3] = CONTROL_OUT_HO | CONTROL_RI | CONTROL_SPC;
|
||||||
|
this.Microcode[4] = CONTROL_SPC;
|
||||||
|
this.Microcode[5] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[6] = CONTROL_OUT_RO | CONTROL_RHI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[7] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[8] = CONTROL_OUT_RO | CONTROL_RRI | CONTROL_SPD | CONTROL_SPC;
|
||||||
|
this.Microcode[9] = CONTROL_OUT_AL | CONTROL_RI;
|
||||||
|
this.Microcode[10] = CONTROL_OUT_SP | CONTROL_RRI;
|
||||||
|
this.Microcode[11] = CONTROL_OUT_RO | CONTROL_RHI;
|
||||||
|
//this.Microcode[12] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
is_STAL_spin = new IS_STAL_sp_ind24;
|
||||||
|
Instructions.push(is_STAL_spin);
|
227
js/isa/tx.js
Normal file
227
js/isa/tx.js
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
class IS_TAB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x200;
|
||||||
|
this.Mnemonic = "TAB";
|
||||||
|
this.LongName = "TRANSFER Register A to B";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RBIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TAB = new IS_TAB;
|
||||||
|
Instructions.push(is_TAB);
|
||||||
|
|
||||||
|
class IS_TAC extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x201;
|
||||||
|
this.Mnemonic = "TAC";
|
||||||
|
this.LongName = "TRANSFER Register A to C";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RCIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TAC = new IS_TAC;
|
||||||
|
Instructions.push(is_TAC);
|
||||||
|
|
||||||
|
class IS_TAD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x202;
|
||||||
|
this.Mnemonic = "TAD";
|
||||||
|
this.LongName = "TRANSFER Register A to D";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_AL | CONTROL_RDIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TAD = new IS_TAD;
|
||||||
|
Instructions.push(is_TAD);
|
||||||
|
|
||||||
|
class IS_TBA extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x203;
|
||||||
|
this.Mnemonic = "TBA";
|
||||||
|
this.LongName = "TRANSFER Register B to A";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TBA = new IS_TBA;
|
||||||
|
Instructions.push(is_TBA);
|
||||||
|
|
||||||
|
class IS_TBC extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x204;
|
||||||
|
this.Mnemonic = "TBC";
|
||||||
|
this.LongName = "TRANSFER Register B to C";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RCIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TBC = new IS_TBC;
|
||||||
|
Instructions.push(is_TBC);
|
||||||
|
|
||||||
|
class IS_TBD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x205;
|
||||||
|
this.Mnemonic = "TBD";
|
||||||
|
this.LongName = "TRANSFER Register B to D";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_BL | CONTROL_RDIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TBD = new IS_TBD;
|
||||||
|
Instructions.push(is_TBD);
|
||||||
|
|
||||||
|
class IS_TCA extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x206;
|
||||||
|
this.Mnemonic = "TCA";
|
||||||
|
this.LongName = "TRANSFER Register C to A";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TCA = new IS_TCA;
|
||||||
|
Instructions.push(is_TCA);
|
||||||
|
|
||||||
|
class IS_TCB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x207;
|
||||||
|
this.Mnemonic = "TCB";
|
||||||
|
this.LongName = "TRANSFER Register C to B";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RBIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TCB = new IS_TCB;
|
||||||
|
Instructions.push(is_TCB);
|
||||||
|
|
||||||
|
class IS_TCD extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x208;
|
||||||
|
this.Mnemonic = "TCD";
|
||||||
|
this.LongName = "TRANSFER Register C to D";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_CL | CONTROL_RDIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TCD = new IS_TCD;
|
||||||
|
Instructions.push(is_TCD);
|
||||||
|
|
||||||
|
class IS_TDA extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x209;
|
||||||
|
this.Mnemonic = "TDA";
|
||||||
|
this.LongName = "TRANSFER Register D to A";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TDA = new IS_TDA;
|
||||||
|
Instructions.push(is_TDA);
|
||||||
|
|
||||||
|
class IS_TDB extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x20A;
|
||||||
|
this.Mnemonic = "TDB";
|
||||||
|
this.LongName = "TRANSFER Register D to B";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RBIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TDB = new IS_TDB;
|
||||||
|
Instructions.push(is_TDB);
|
||||||
|
|
||||||
|
class IS_TDC extends Microcode_Instruction {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.Bytecode = 0x20B;
|
||||||
|
this.Mnemonic = "TDC";
|
||||||
|
this.LongName = "TRANSFER Register D to C";
|
||||||
|
this.Aliases = new Array();
|
||||||
|
|
||||||
|
this.Type = InstructionTypes.Register;
|
||||||
|
this.Operands = new Array();
|
||||||
|
this.Words = 1;
|
||||||
|
this.Cycles = 3;
|
||||||
|
this.Microcode[2] = CONTROL_OUT_DL | CONTROL_RCIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
is_TDC = new IS_TDC;
|
||||||
|
Instructions.push(is_TDC);
|
@ -24,7 +24,7 @@ cpu.RAM[0xD5] = is_PHA.Bytecode;
|
|||||||
cpu.RAM[0xD6] = is_LDAB_i.Bytecode;
|
cpu.RAM[0xD6] = is_LDAB_i.Bytecode;
|
||||||
cpu.RAM[0xD7] = v_displayl;
|
cpu.RAM[0xD7] = v_displayl;
|
||||||
cpu.RAM[0xD8] = is_PHAB.Bytecode;
|
cpu.RAM[0xD8] = is_PHAB.Bytecode;
|
||||||
cpu.RAM[0xD9] = is_LDAB_GPCD.Bytecode; // printloop
|
cpu.RAM[0xD9] = is_LDAB_cda.Bytecode; // printloop
|
||||||
cpu.RAM[0xDA] = is_CMP.Bytecode;
|
cpu.RAM[0xDA] = is_CMP.Bytecode;
|
||||||
cpu.RAM[0xDB] = is_BEQ_i.Bytecode;
|
cpu.RAM[0xDB] = is_BEQ_i.Bytecode;
|
||||||
cpu.RAM[0xDC] = v_return;
|
cpu.RAM[0xDC] = v_return;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user