2019-11-13 01:03:51 +00:00
|
|
|
#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);
|
|
|
|
}
|
|
|
|
|
2019-11-13 01:03:51 +00:00
|
|
|
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);
|
2019-11-13 01:03:51 +00:00
|
|
|
case P_ORG:
|
2019-11-13 04:32:10 +00:00
|
|
|
a.PC.currentpc = line.expr_value;
|
2019-11-13 01:03:51 +00:00
|
|
|
break;
|
|
|
|
case P_SAV:
|
|
|
|
a.savepath = line.operand;
|
|
|
|
break;
|
|
|
|
case P_LST:
|
|
|
|
res = doLST(a, line, opinfo);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return (res);
|
|
|
|
}
|