/*****************************************************************************/
/* */
-/* asmlabel.c */
+/* asmlabel.c */
/* */
-/* Generate assembler code labels */
+/* Generate assembler code labels */
/* */
/* */
/* */
/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
static unsigned NextLabel = 0;
/* Check for an overflow */
- if (NextLabel > 0xFFFF) {
+ if (NextLabel >= 0xFFFF) {
Internal ("Local label overflow");
}
const char* LocalLabelName (unsigned L)
/* Make a label name from the given label number. The label name will be
- * created in static storage and overwritten when calling the function
- * again.
- */
+** created in static storage and overwritten when calling the function
+** again.
+*/
{
static char Buf[64];
sprintf (Buf, "L%04X", L);
if (Name[0] != 'L' || strlen (Name) != 5) {
return 0;
}
- for (I = 1; I <= 5; ++I) {
+ for (I = 1; I <= 4; ++I) {
if (!IsXDigit (Name[I])) {
return 0;
}
/* Local label name */
return 1;
}
-
-
-
-