The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing label issue *found*
#1
I have a program (fourspriter. Yet again!) that has a compilation error "no such label". Except I can see it. Right there! :-)

Am I going crazy?

I copied and pasted the following code into a separate project:

Code:
SUB FASTCALL fspUpdate() asm fspUpdateAsm: ld hl, fspDataStartAsm+1 ; Points to sprite 1 ld de, fspDataStartAsm+3 ldi ldi ld hl, fspDataStartAsm+1+43 ; Points to sprite 2 ld de, fspDataStartAsm+3+43 ldi ldi ld hl, fspDataStartAsm+1+43+43 ; Points to sprite 3 ld de, fspDataStartAsm+3+43+43 ldi ldi ld hl, fspDataStartAsm+1+43+43+43 ; Points to sprite 4 ld de, fspDataStartAsm+3+43+43+43 ldi ldi ret END asm END SUB SUB fspCollisionCheck() END SUB SUB FASTCALL fspRedraw() fspCollisionCheck() asm halt call fspEraseAsm call fspBufferAndDrawAsm call fspUpdateAsm end asm END SUB fspRedraw()

And it compiled perfectly. Which is bad, because this is FULL of references that don't exist. However, when I try the main code block, it reports:

FourSpriter3.bas:906: Error: Undefined label 'fspUpdateAsm'

Now, quite apart from the fact that line 906 reads " ;LD BC,2120 "- which means I have to hunt down the line it really means, that label is only used in two places. Both of those places are shown in the code above. One call and one arrival point.

I have NO idea why it's doing this. It's weird that it doesn't like the label in the main program, and yet is fine with all those other undefined labels in the part above. Any idea what's going on here?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)