00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ASMINFO_H
00012 #define ASMINFO_H
00013
00014 #include <qstring.h>
00015 #include <qstringlist.h>
00016 #include <qvaluelist.h>
00017
00021 struct Instruction
00022 {
00023 QString operand;
00024 QString description;
00025 QString opcode;
00026 };
00027 typedef QValueList<Instruction> InstructionList;
00028
00033 class AsmInfo
00034 {
00035 public:
00036 AsmInfo();
00037 virtual ~AsmInfo();
00038
00039 enum Set
00040 {
00041 PIC12 = 1 << 0,
00042 PIC14 = 1 << 1,
00043 PIC16 = 1 << 2
00044 };
00045 enum { AsmSetAll = PIC12 | PIC14 | PIC16 };
00046
00047 static QString setToString( Set set );
00048 static Set stringToSet( const QString & set );
00049
00053 virtual Set set() const = 0;
00057 QStringList operandList() const { return m_operandList; }
00064 void addInstruction( const QString &operand, const QString &description, const QString &opcode );
00065
00066 private:
00067 InstructionList m_instructionList;
00068 QStringList m_operandList;
00069 };
00070
00071 #endif