Restructured some of the code. Attribute handling is still a mess and needs
another cleanup. Added unnamed labels. git-svn-id: svn://svn.cc65.org/cc65/trunk@3700 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "code.h"
|
||||
#include "error.h"
|
||||
#include "global.h"
|
||||
#include "labels.h"
|
||||
#include "output.h"
|
||||
#include "data.h"
|
||||
|
||||
@@ -174,13 +175,8 @@ unsigned AddrTable (void)
|
||||
break;
|
||||
}
|
||||
|
||||
/* More than one byte left. Check if there is a label defined within
|
||||
* the address word.
|
||||
*/
|
||||
if (MustDefLabel (PC+1)) {
|
||||
/* Define the label */
|
||||
DefineConst (GetLabel (PC+1), GetComment (PC+1), PC+1);
|
||||
}
|
||||
/* More than one byte left. Define a forward label if necessary */
|
||||
ForwardLabel (1);
|
||||
|
||||
/* Now get the address from the PC */
|
||||
Addr = GetCodeWord (PC);
|
||||
@@ -191,7 +187,7 @@ unsigned AddrTable (void)
|
||||
AddIntLabel (Addr);
|
||||
}
|
||||
} else {
|
||||
const char* Label = GetLabel (Addr);
|
||||
const char* Label = GetLabel (Addr, PC);
|
||||
if (Label == 0) {
|
||||
/* OOPS! Should not happen */
|
||||
Internal ("OOPS - Label for address 0x%06X disappeard!", Addr);
|
||||
@@ -244,13 +240,8 @@ unsigned RtsTable (void)
|
||||
break;
|
||||
}
|
||||
|
||||
/* More than one byte left. Check if there is a label defined within
|
||||
* the address word.
|
||||
*/
|
||||
if (MustDefLabel (PC+1)) {
|
||||
/* Define the label */
|
||||
DefineConst (GetLabel (PC+1), GetComment (PC+1), PC+1);
|
||||
}
|
||||
/* More than one byte left. Define a forward label if necessary */
|
||||
ForwardLabel (1);
|
||||
|
||||
/* Now get the address from the PC */
|
||||
Addr = (GetCodeWord (PC) + 1) & 0xFFFF;
|
||||
@@ -261,7 +252,7 @@ unsigned RtsTable (void)
|
||||
AddIntLabel (Addr);
|
||||
}
|
||||
} else {
|
||||
const char* Label = GetLabel (Addr);
|
||||
const char* Label = GetLabel (Addr, PC);
|
||||
if (Label == 0) {
|
||||
/* OOPS! Should not happen */
|
||||
Internal ("OOPS - Label for address 0x%06X disappeard!", Addr);
|
||||
|
||||
Reference in New Issue
Block a user