mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-07 20:55:35 +00:00
Add test for DEF(@)
This commit is contained in:
1 parent
98a221d6b6
commit
f1f70d250a
4 files changed
+14
-1
No files matched your search
+7
-1
@@ -314,7 +314,13 @@ uint32_t sym_GetConstantValue(char *s)
|
||||
{
|
||||
struct sSymbol *psym = sym_FindSymbol(s);
|
||||
|
||||
if (psym != NULL) {
|
||||
if (psym == pPCSymbol) {
|
||||
if (pCurrentSection->nOrg == -1)
|
||||
yyerror("Expected constant PC but section is not fixed");
|
||||
else
|
||||
return pPCSymbol->nValue;
|
||||
|
||||
} else if (psym != NULL) {
|
||||
if (psym->nType & SYMF_CONST)
|
||||
return getvaluefield(psym);
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
IF DEF(@)
|
||||
PRINTT "defined\n"
|
||||
ELSE
|
||||
PRINTT "not defined\n"
|
||||
ENDC
|
||||
@@ -0,0 +1,2 @@
|
||||
ERROR: pc-def.asm(1):
|
||||
'@' is not allowed as argument to the DEF function
|
||||
Whitespace-only changes.
Reference in new issue
Block a user