/* */
/* */
/* */
-/* (C) 2000-2011, Ullrich von Bassewitz */
+/* (C) 2000-2014, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
#include "opctable.h"
#include "scanner.h"
#include "segment.h"
+#include "handler.h"
{ "ADDR", INFOTOK_ADDR },
{ "NAME", INFOTOK_NAME },
{ "SIZE", INFOTOK_SIZE },
+ { "VOPERAND", INFOTOK_VOPERAND },
};
/* Locals - initialize to avoid gcc warnings */
char* Comment = 0;
long Value = -1;
long Size = -1;
+ long VOperand = -1;
/* Skip the token */
InfoNextTok ();
InfoNextTok ();
break;
+ case INFOTOK_VOPERAND:
+ InfoNextTok ();
+ if (VOperand >= 0) {
+ InfoError ("VOperand already given");
+ }
+ InfoAssureInt ();
+ InfoRangeCheck (1, 0x10000);
+ VOperand = InfoIVal;
+ InfoNextTok ();
+ break;
+
default:
Internal ("Unexpected token: %u", InfoTok);
}
} else {
AddExtLabelRange ((unsigned) Value, Name, Size);
}
+ if (VOperand >= 0) {
+ SetSubroutineVOperand ((unsigned) Value, (unsigned) VOperand);
+ }
/* Define the comment */
if (Comment) {
if (Start < 0) {
InfoError ("Start address is missing");
}
- if (Start == End) {
- InfoError ("Segment is empty");
- }
if (Start > End) {
InfoError ("Start address of segment is greater than end address");
}
/* Check that segments do not overlap */
if (SegmentDefined ((unsigned) Start, (unsigned) End)) {
- InfoError ("Segments cannot overlap");
+ InfoError ("Segments must not overlap");
}
/* Remember the segment data */