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:
cuz
2006-01-29 19:00:22 +00:00
parent 7086da868b
commit d31f72d057
15 changed files with 825 additions and 411 deletions

View File

@@ -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);