mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
Move code to a subroutine.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3804 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e8b90752d9
commit
10efd998e0
@ -360,6 +360,17 @@ void ForwardLabel (unsigned Offs)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ForwardLabels (unsigned Size)
|
||||||
|
/* Define forward labels for the range PC to PC+Size-1 if necessary */
|
||||||
|
{
|
||||||
|
unsigned I;
|
||||||
|
for (I = 0; I < Size; ++I) {
|
||||||
|
ForwardLabel (I);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void DefOutOfRangeLabel (unsigned long Addr)
|
static void DefOutOfRangeLabel (unsigned long Addr)
|
||||||
/* Define one label that is outside code range. */
|
/* Define one label that is outside code range. */
|
||||||
{
|
{
|
||||||
|
@ -94,6 +94,9 @@ void ForwardLabel (unsigned Offs);
|
|||||||
* bytes and is therefore output as "label = * + x".
|
* bytes and is therefore output as "label = * + x".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void ForwardLabels (unsigned Size);
|
||||||
|
/* Define forward labels for the range PC to PC+Size-1 if necessary */
|
||||||
|
|
||||||
void DefOutOfRangeLabels (void);
|
void DefOutOfRangeLabels (void);
|
||||||
/* Output any labels that are out of the loaded code range */
|
/* Output any labels that are out of the loaded code range */
|
||||||
|
|
||||||
|
@ -408,10 +408,8 @@ static void OneOpcode (unsigned RemainingBytes)
|
|||||||
*/
|
*/
|
||||||
if (D->Size <= RemainingBytes) {
|
if (D->Size <= RemainingBytes) {
|
||||||
/* Output labels within the next insn */
|
/* Output labels within the next insn */
|
||||||
unsigned I;
|
ForwardLabels (D->Size);
|
||||||
for (I = 1; I < D->Size; ++I) {
|
/* Output the insn */
|
||||||
ForwardLabel (I);
|
|
||||||
}
|
|
||||||
D->Handler (D);
|
D->Handler (D);
|
||||||
PC += D->Size;
|
PC += D->Size;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user