asminfo.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003,2005 by David Saxton                               *
00003  *   david@bluehaze.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
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

Generated on Tue May 8 17:05:27 2007 for KTechLab by  doxygen 1.5.1