Allow larger address ranges

git-svn-id: svn://svn.cc65.org/cc65/trunk@370 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-10-15 19:52:33 +00:00
parent 221ef5a9c2
commit 5807140732

View File

@@ -291,7 +291,7 @@ static void LabelSection (void)
CfgError ("Size already given"); CfgError ("Size already given");
} }
CfgAssureInt (); CfgAssureInt ();
CfgRangeCheck (1, 0x800); CfgRangeCheck (1, 0x10000);
Size = CfgIVal; Size = CfgIVal;
CfgNextTok (); CfgNextTok ();
break; break;
@@ -313,6 +313,9 @@ static void LabelSection (void)
/* Use default */ /* Use default */
Size = 1; Size = 1;
} }
if (Value + Size > 0x10000) {
CfgError ("Invalid size (address out of range)");
}
if (HaveLabel ((unsigned) Value)) { if (HaveLabel ((unsigned) Value)) {
CfgError ("Label for address $%04lX already defined", Value); CfgError ("Label for address $%04lX already defined", Value);
} }