This commit is contained in:
marketideas 2019-11-17 12:17:28 -08:00
parent 18c6987d34
commit 988e4b1f62
3 changed files with 10 additions and 3 deletions

View File

@ -1357,7 +1357,6 @@ void CLASS::initpass(void)
s = Poco::trim(Poco::toUpper(s)); s = Poco::trim(Poco::toUpper(s));
cpumode = MODE_65816; cpumode = MODE_65816;
mx = 0x00;
if (s == "M65816") if (s == "M65816")
{ {
@ -1377,7 +1376,10 @@ void CLASS::initpass(void)
else else
{ {
printf("Unknown CPU type in .ini\n"); printf("Unknown CPU type in .ini\n");
mx=0x00;
} }
mx = getInt("asm.startmx",mx);;
relocatable = false; relocatable = false;
currentsym = NULL; currentsym = NULL;
currentsymstr=""; currentsymstr="";

View File

@ -576,6 +576,10 @@ int CLASS::doBase6502(MerlinLine & line, TSymbol & sym)
bytelen++; bytelen++;
} }
} }
if ( ((m==syn_absx) || (m==syn_diix)) && ((sym.opcode==4) || (sym.opcode==5))) // these are STX,LDX
{
err=true;
}
if ((m == syn_absx) || (m == syn_abs) || (m == syn_absy)) if ((m == syn_absx) || (m == syn_abs) || (m == syn_absy))
{ {
if ((line.flags & FLAG_FORCEABS) || (line.expr_value >= 0x100)) if ((line.flags & FLAG_FORCEABS) || (line.expr_value >= 0x100))
@ -829,7 +833,7 @@ void CLASS::insertOpcodes(void)
pushopcode("BNE", 0x03, 0, OPHANDLER(&CLASS::doBRANCH)); pushopcode("BNE", 0x03, 0, OPHANDLER(&CLASS::doBRANCH));
pushopcode("BPL", 0x00, 0, OPHANDLER(&CLASS::doBRANCH)); pushopcode("BPL", 0x00, 0, OPHANDLER(&CLASS::doBRANCH));
pushopcode("BRA", 0x40, 0, OPHANDLER(&CLASS::doBRANCH)); pushopcode("BRA", 0x40, 0, OPHANDLER(&CLASS::doBRANCH));
pushopcode("BRK", 0x00, 0, OPHANDLER(&CLASS::doBYTE)); pushopcode("BRK", 0x00, 1, OPHANDLER(&CLASS::doAddress));
pushopcode("BRL", 0x20, 0, OPHANDLER(&CLASS::doBRANCH)); pushopcode("BRL", 0x20, 0, OPHANDLER(&CLASS::doBRANCH));
pushopcode("BVC", 0x01, 0, OPHANDLER(&CLASS::doBRANCH)); pushopcode("BVC", 0x01, 0, OPHANDLER(&CLASS::doBRANCH));
pushopcode("BVS", 0x81, 0, OPHANDLER(&CLASS::doBRANCH)); pushopcode("BVS", 0x81, 0, OPHANDLER(&CLASS::doBRANCH));

View File

@ -21,7 +21,8 @@ path5=dirpath5
[asm] [asm]
casesen=true casesen=true
showmx=false showmx=true
startmx=3
lst=true lst=true
; can be M6502, M65C02, M65816 ; can be M6502, M65C02, M65816
cpu=M65816 cpu=M65816