public BaseAvm2Opcode Visit(DebugOpcode opcode, AbcDataReader arg) { opcode.DebugType = arg.ReadU8(); opcode.Name = _context.GetString(arg.ReadU30()); opcode.Register = arg.ReadU8(); opcode.Extra = arg.ReadU30(); return(opcode); }
public XElement Visit(DebugOpcode opcode, AbcMethodBodyInstruction arg) { var res = new XElement("debug", new XAttribute("type", opcode.DebugType), new XAttribute("name", opcode.Name)).AddRegister(opcode.Register); if (opcode.Extra != 0) { res.Add(new XAttribute("extra", opcode.Extra)); } return(res); }
public Instruction FetchAndDecode() { byte opcode = Cpu.ReadU8(); DebugOpcode debugOpcode = new DebugOpcode(opcode); switch (opcode) { case 0xCB: { opcode = Cpu.ReadU8(); debugOpcode = new DebugOpcode(opcode); return(Cpu.CB[opcode]); } default: return(Cpu.Default[opcode]); } }