mirror of
https://github.com/marketideas/qasm.git
synced 2024-12-27 15:29:30 +00:00
69 lines
1.1 KiB
C++
69 lines
1.1 KiB
C++
#include "psuedo.h"
|
|
|
|
#define CLASS TPsuedoOp
|
|
|
|
CLASS::CLASS()
|
|
{
|
|
|
|
}
|
|
|
|
CLASS::~CLASS()
|
|
{
|
|
|
|
}
|
|
|
|
int CLASS::doDUM(T65816Asm &a, MerlinLine &line, TSymbol &opinfo)
|
|
{
|
|
int res=-1;
|
|
//bool isdend=((opinfo.opcode==P_DEND)?true:false);
|
|
return(res);
|
|
}
|
|
|
|
int CLASS::doLST(T65816Asm &a, MerlinLine &line, TSymbol &opinfo)
|
|
{
|
|
std::string s;
|
|
if (a.pass > 0)
|
|
{
|
|
s = Poco::toUpper(Poco::trim(line.operand));
|
|
if ((s == "") || (s == "ON") || (line.expr_value > 0))
|
|
{
|
|
//printf("ON\n");
|
|
a.skiplist = true;
|
|
a.listing = true;
|
|
}
|
|
else if ((s == "OFF") || (line.expr_value == 0))
|
|
{
|
|
//printf("OFF\n");
|
|
a.skiplist = true;
|
|
a.listing = false;
|
|
}
|
|
}
|
|
return (0);
|
|
}
|
|
|
|
int CLASS::ProcessOpcode(T65816Asm &a, MerlinLine &line, TSymbol &opinfo)
|
|
{
|
|
int res = 0;
|
|
|
|
switch (opinfo.opcode)
|
|
{
|
|
default:
|
|
res = -1; // undefined p-op
|
|
line.setError(errUnimplemented);
|
|
break;
|
|
case P_DUM:
|
|
case P_DEND:
|
|
res=doDUM(a,line,opinfo);
|
|
case P_ORG:
|
|
a.PC.currentpc = line.expr_value;
|
|
break;
|
|
case P_SAV:
|
|
a.savepath = line.operand;
|
|
break;
|
|
case P_LST:
|
|
res = doLST(a, line, opinfo);
|
|
break;
|
|
}
|
|
return (res);
|
|
}
|