This commit is contained in:
marketideas 2019-11-15 18:51:30 -08:00
parent 5c3dddd948
commit a8030744bc
5 changed files with 22 additions and 11 deletions

22
asm.cpp
View File

@ -87,7 +87,12 @@ void CLASS::print(uint32_t lineno)
}
pcol = 0;
if (!empty)
bool saddr = flags & FLAG_FORCEADDRPRINT;
saddr = (outbytect > 0) ? true : saddr;
saddr = (printlable != "") ? true : saddr;
if (saddr)
{
pcol += printf("%02X/%04X:", (startpc >> 16), startpc & 0xFFFF);
}
@ -143,7 +148,10 @@ void CLASS::print(uint32_t lineno)
pcol += printf(" ");
}
}
//pcol += printf("%s", comment.c_str());
else
{
pcol += printf("%s", comment.c_str());
}
}
}
else
@ -233,7 +241,7 @@ void CLASS::clear()
operand_expr2 = "";
addrtext = "";
linemx = 0;
commentcol=40;
commentcol = 40;
bytect = 0;
opflags = 0;
pass0bytect = 0;
@ -1575,12 +1583,12 @@ void CLASS::process(void)
operand = Poco::toLower(line.operand);
line.startpc = PC.currentpc;
line.linemx = mx;
uint16_t cc=tabs[2];
if (cc==0)
uint16_t cc = tabs[2];
if (cc == 0)
{
cc=40;
cc = 40;
}
line.commentcol=cc;
line.commentcol = cc;
line.bytect = 0;
line.showmx = showmx;

1
asm.h
View File

@ -18,6 +18,7 @@
#define FLAG_BIGNUM 0x10
#define FLAG_INDUM 0x20
#define FLAG_FORCEADDRPRINT 0x0100
#define OP_A 0x0001
#define OP_XY 0x0002

View File

@ -367,6 +367,8 @@ int CLASS::ProcessOpcode(T65816Asm &a, MerlinLine &line, TSymbol &opinfo)
case P_DUM:
case P_DEND:
res = doDUM(a, line, opinfo);
line.flags|=FLAG_FORCEADDRPRINT;
break;
case P_ORG:
if (line.operand.length() > 0)
@ -380,6 +382,7 @@ int CLASS::ProcessOpcode(T65816Asm &a, MerlinLine &line, TSymbol &opinfo)
a.PC.currentpc = a.PC.orgsave;
line.startpc = a.PC.orgsave;
}
line.flags|=FLAG_FORCEADDRPRINT;
break;
case P_SAV:
a.savepath = a.processFilename(line.operand, Poco::Path::current(), 0);

View File

@ -31,7 +31,7 @@ merlincompatible=true
symcolumns=3
[reformat]
tabs=12; 18; 36
tabs=12; 18; 30;
;tabs=0;0;0

View File

@ -1,4 +1,4 @@
lst off
;lst off
*
* main.s
* Merlin32 Test
@ -40,7 +40,6 @@ TSTADDR = $1000 ;absolute address for testing
*==========================================================
* Data Index DUM section test
lst off
DUM 0
dum0 ds 1 ;fractional byte
dum1 ds 1
@ -397,7 +396,7 @@ L00BC bit L00BC
lst
lup_start:
lup 3
;db 0 ; outside
db 0 ; outside
;lup 3
;db 1 ; inside
;--^