diff options
Diffstat (limited to 'src/core.rs')
-rw-r--r-- | src/core.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core.rs b/src/core.rs index 415afa0..10bb05b 100644 --- a/src/core.rs +++ b/src/core.rs @@ -59,6 +59,7 @@ const RAM_OFFSET_R7: u8 = 0x07; const OPCODE_NOP: u8 = 0x00; const OPCODE_MOV_A_DATA: u8 = 0x74; const OPCODE_MOV_DIRECT_DATA: u8 = 0x75; +const OPCODE_SJMP: u8 = 0x80; const OPCODE_MOV_A_DIRECT: u8 = 0xE5; const OPCODE_MOV_A_INDIRECT_R0: u8 = 0xE6; const OPCODE_MOV_A_INDIRECT_R1: u8 = 0xE7; @@ -72,7 +73,6 @@ const OPCODE_MOV_A_R6: u8 = 0xEE; const OPCODE_MOV_A_R7: u8 = 0xEF; const OPCODE_PUSH: u8 = 0xC0; const OPCODE_POP: u8 = 0xD0; -const OPCODE_SJMP: u8 = 0xD2; const OP_LUT: [Isa8051Op; u8::max_value() as usize + 1] = { let mut lut = [Isa8051Op { @@ -99,6 +99,12 @@ const OP_LUT: [Isa8051Op; u8::max_value() as usize + 1] = { operand1: Some(Isa8051Operand::Direct), operand2: Some(Isa8051Operand::Data), }; + lut[OPCODE_SJMP as usize] = Isa8051Op { + opcode: Isa8051Opcode::Sjmp, + size: 2, + operand1: Some(Isa8051Operand::Reladdr), + operand2: None, + }; lut[OPCODE_MOV_A_DIRECT as usize] = Isa8051Op { opcode: Isa8051Opcode::Mov, size: 2, @@ -177,12 +183,6 @@ const OP_LUT: [Isa8051Op; u8::max_value() as usize + 1] = { operand1: Some(Isa8051Operand::Direct), operand2: None, }; - lut[OPCODE_SJMP as usize] = Isa8051Op { - opcode: Isa8051Opcode::Sjmp, - size: 2, - operand1: Some(Isa8051Operand::Reladdr), - operand2: None, - }; lut }; |