qasm/psuedo.cpp

69 lines
1.1 KiB
C++
Raw Normal View History

#include "psuedo.h"
#define CLASS TPsuedoOp
CLASS::CLASS()
{
}
CLASS::~CLASS()
{
}
2019-11-13 04:32:10 +00:00
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;
2019-11-13 04:32:10 +00:00
case P_DUM:
case P_DEND:
res=doDUM(a,line,opinfo);
case P_ORG:
2019-11-13 04:32:10 +00:00
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);
}