protected override PICInstruction DecodeEEPROMInstruction() { if (!rdr.TryReadByte(out byte uEEByte)) { return(new PICInstructionNoOpnd(Mnemonic.invalid)); } var bl = new List <byte>() { uEEByte }; for (int i = 0; i < 7; i++) { if (!lastusedregion.Contains(rdr.Address)) { break; } if (!rdr.TryReadByte(out uEEByte)) { break; } bl.Add(uEEByte); } instrCur = new PICInstructionPseudo(Mnemonic.DE, new PICOperandDEEPROM(bl.ToArray())) { Address = addrCur, Length = (int)(rdr.Address - addrCur), }; return(instrCur); }
protected override PICInstruction DecodeConfigInstruction() { if (!rdr.TryReadByte(out byte uConfigByte)) { return(new PICInstructionNoOpnd(Mnemonic.invalid)); } instrCur = new PICInstructionPseudo(Mnemonic.CONFIG, new PICOperandConfigBits(arch, addrCur, uConfigByte)) { Address = addrCur, Length = (int)(rdr.Address - addrCur), }; return(instrCur); }
protected override PICInstruction DecodeUserIDInstruction() { if (!rdr.TryReadUInt16(out ushort uConfigWord)) { return(null); } instrCur = new PICInstructionPseudo(Mnemonic.__IDLOCS, new PICOperandIDLocs(addrCur, uConfigWord)) { Address = addrCur, Length = (int)(rdr.Address - addrCur) }; return(instrCur); }
protected override PICInstruction DecodeDWInstruction() { if (!rdr.TryReadUInt16(out ushort uDWWord)) { return(null); } instrCur = new PICInstructionPseudo(Mnemonic.DW, new PICOperandDWord(uDWWord)) { Address = addrCur, Length = (int)(rdr.Address - addrCur) }; return(instrCur); }
protected override PICInstruction DecodeDBInstruction() { if (!rdr.TryReadByte(out byte uDBByte)) { return(null); } instrCur = new PICInstructionPseudo(Mnemonic.DB, new PICOperandDByte(uDBByte)) { Address = addrCur, Length = (int)(rdr.Address - addrCur) }; return(instrCur); }
protected override PICInstruction DecodeDAInstruction() { if (!rdr.TryReadByte(out byte uDAByte)) { return(null); } instrCur = new PICInstructionPseudo(Opcode.DA, new PICOperandDASCII(uDAByte)) { Address = addrCur, Length = (int)(rdr.Address - addrCur) }; return(instrCur); }
protected override PICInstruction DecodeUserIDInstruction() { if (!rdr.TryReadByte(out byte uIDByte)) { return(new PICInstructionNoOpnd(Mnemonic.invalid)); } instrCur = new PICInstructionPseudo(Mnemonic.__IDLOCS, new PICOperandIDLocs(addrCur, uIDByte)) { Address = addrCur, Length = (int)(rdr.Address - addrCur), }; return(instrCur); }
protected override PICInstruction DecodeDAInstruction() { if (!rdr.TryReadByte(out byte uDAByte)) { return(new PICInstructionNoOpnd(Mnemonic.invalid)); } instrCur = new PICInstructionPseudo(Mnemonic.DA, new PICOperandDASCII(uDAByte)) { Address = addrCur, Length = (int)(rdr.Address - addrCur), }; return(instrCur); }
protected override PICInstruction DecodeDWInstruction() { if (!rdr.TryReadUInt16(out ushort uDWWord)) { return(new PICInstructionNoOpnd(Opcode.invalid)); } instrCur = new PICInstructionPseudo(Opcode.DW, new PICOperandDWord(uDWWord)) { Address = addrCur, Length = (int)(rdr.Address - addrCur), }; return(instrCur); }
protected override PICInstruction DecodeDBInstruction() { if (!rdr.TryReadByte(out byte uDBByte)) { return(new PICInstructionNoOpnd(Opcode.invalid)); } instrCur = new PICInstructionPseudo(Opcode.DB, new PICOperandDByte(uDBByte)) { Address = addrCur, Length = (int)(rdr.Address - addrCur), }; return(instrCur); }
protected override PICInstruction DecodeConfigInstruction() { if (!rdr.TryReadUInt16(out ushort uConfigWord)) { return(null); } var cfgAddr = PICProgAddress.Ptr((uint)(addrCur.ToLinear() >> 1)); instrCur = new PICInstructionPseudo(Mnemonic.__CONFIG, new PICOperandConfigBits(arch, cfgAddr, uConfigWord)) { Address = addrCur, Length = (int)(rdr.Address - addrCur) }; return(instrCur); }