Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrong PEEKed value from @label (*solved*)
#7
britlion Wrote:It's a bug. I got the same thing. (though at different addresses)

I think the new label-offset code that Boriel put in isn't quite working correctly.

Looking at the asm:
Code:
print peek(gal-2)

Turns into:

ld hl, (_gal)
    dec hl
    dec hl
    ld b, h
    ld c, l
    ld a, (bc)
    call __PRINTU8
Which does indeed get the byte from gal-2 (albeit in a very strange fashion - what's wrong with ld a,(hl) instead of copying hl to bc ?)
I will investigate this, but it should be ld a,(hl) even if no optimization is being used. :?: hmmm.

britlion Wrote:I think it should be:
Code:
ld a, ( __LABEL__galeon02Charset - 2 )
That was the fix, indeed ;-)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)