Added function .ADDRSIZE to ca65
This commit is contained in:
@@ -135,6 +135,7 @@ struct DotKeyword {
|
||||
{ ".A16", TOK_A16 },
|
||||
{ ".A8", TOK_A8 },
|
||||
{ ".ADDR", TOK_ADDR },
|
||||
{ ".ADDRSIZE", TOK_ADDRSIZE },
|
||||
{ ".ALIGN", TOK_ALIGN },
|
||||
{ ".AND", TOK_BOOLAND },
|
||||
{ ".ASCIIZ", TOK_ASCIIZ },
|
||||
@@ -723,8 +724,24 @@ static token_t FindDotKeyword (void)
|
||||
R = bsearch (&K, DotKeywords, sizeof (DotKeywords) / sizeof (DotKeywords [0]),
|
||||
sizeof (DotKeywords [0]), CmpDotKeyword);
|
||||
if (R != 0) {
|
||||
|
||||
/* By default, disable any somewhat experiemental DotKeyword. */
|
||||
|
||||
switch (R->Tok) {
|
||||
|
||||
case TOK_ADDRSIZE:
|
||||
/* Disallow .ADDRSIZE function by default */
|
||||
if (AddrSize == 0) {
|
||||
return TOK_NONE;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return R->Tok;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return TOK_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user