00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "asminfo.h"
00012
00013 #include <kdebug.h>
00014
00015 AsmInfo::AsmInfo()
00016 {
00017 }
00018
00019
00020 AsmInfo::~AsmInfo()
00021 {
00022 }
00023
00024
00025 void AsmInfo::addInstruction( const QString & operand, const QString & description, const QString & opcode )
00026 {
00027 Instruction instruction;
00028 instruction.operand = operand;
00029 instruction.description = description;
00030 instruction.opcode = opcode;
00031 m_instructionList.append( instruction );
00032 m_operandList.append( operand );
00033 }
00034
00035
00036 QString AsmInfo::setToString( Set set )
00037 {
00038 switch (set)
00039 {
00040 case AsmInfo::PIC12:
00041 return "PIC12";
00042
00043 case AsmInfo::PIC14:
00044 return "PIC14";
00045
00046 case AsmInfo::PIC16:
00047 return "PIC16";
00048 }
00049
00050 kdWarning() << k_funcinfo << "Unrecognized set="<<set<<endl;
00051 return QString::null;
00052 }
00053
00054
00055 AsmInfo::Set AsmInfo::stringToSet( const QString & set )
00056 {
00057 if ( set == "PIC12" )
00058 return PIC12;
00059
00060 if ( set == "PIC14" )
00061 return PIC14;
00062
00063 if ( set == "PIC16" )
00064 return PIC16;
00065
00066
00067 return PIC14;
00068 }