public override Tlcs900Instruction Decode(byte b, Tlcs900Disassembler dasm) { if (dasm.opSize == 'w') { return(dasm.Decode(b, Opcode.ldirw, "")); } else { return(dasm.Decode(b, Opcode.ldir, "")); } }
public override Tlcs900Instruction Decode(byte b, Tlcs900Disassembler dasm) { dasm.opSrc = dasm.DecodeOperand(b, this.fmt); if (dasm.opSrc == null || !dasm.rdr.TryReadByte(out b)) { return(dasm.Decode(b, Opcode.invalid, "")); } return(memOpRecs[b].Decode(b, dasm)); }
public override Tlcs900Instruction Decode(byte b, Tlcs900Disassembler dasm) { dasm.opDst = dasm.DecodeOperand(b, this.fmt); if (dasm.opDst == null) { return(dasm.Decode(b, Opcode.invalid, "")); } return(new Tlcs900Instruction { Opcode = this.opcode, Address = dasm.addr, op1 = dasm.opSrc, op2 = dasm.opDst, }); }
public override Tlcs900Instruction Decode(byte b, Tlcs900Disassembler dasm) { dasm.opSrc = dasm.DecodeOperand(b, this.fmt); if (dasm.opSrc == null || !dasm.rdr.TryReadByte(out b)) { return(dasm.Decode(b, Opcode.invalid, "")); } var instr = dstOpRecs[b].Decode(b, dasm); if (instr.op1 != null && instr.op2 != null) { instr.op1.Width = instr.op2.Width; } if (instr.op2 != null && instr.op2.Width == null) { //$HACK to get conditional calls/jumps to work instr.op2.Width = PrimitiveType.Word32; } return(instr); }
public override Tlcs900Instruction Decode(byte b, Tlcs900Disassembler dasm) { if (this.fmt.Length == 0) { return(new Tlcs900Instruction { Opcode = this.opcode, Address = dasm.addr, op1 = dasm.opSrc }); } if (this.fmt[0] == 'Z') { // Override the size of opSrc dasm.opSrc.Width = dasm.Size(fmt[1]); return(new Tlcs900Instruction { Opcode = this.opcode, Address = dasm.addr, op1 = dasm.opSrc, }); } else { dasm.opDst = dasm.DecodeOperand(b, this.fmt); if (dasm.opDst == null) { return(dasm.Decode(b, Opcode.invalid, "")); } return(new Tlcs900Instruction { Opcode = this.opcode, Address = dasm.addr, op1 = dasm.opDst, op2 = dasm.opSrc, }); } }
public override Tlcs900Instruction Decode(byte b, Tlcs900Disassembler dasm) { return(dasm.Decode(b, opcode, fmt)); }