Skip to content

assembler -h flag + if + label math + substitution = ??? #685

@CharlesVanEeckhout

Description

@CharlesVanEeckhout

i've encountered this situation where it won't assemble
it tells me "STACK_CALCULATE: Confusing operand hint!"

i'm not sure if the problem is on my end or not
how can i make the operand hint not confusing? it's the .b, right?
if you could take a look, i'd appreciate it

-- example project --
commands
wla-6502 -h -o out/main.o SRC/main.asm

SRC/main.asm

.memorymap
    defaultslot 0
    slot 0 $0000 $0010 "ROMSwitchSlot"
.endme

.rombankmap
    bankstotal $1
    banksize $0010
    banks $1
.endro

.redef SUFFIX = 1
.section "ROM Bank $000" bank 0 slot "ROMSwitchSlot"

MyLabel_{SUFFIX}:
    .if SUFFIX == 1
        lda #MyLabel_{SUFFIX} - MyLabel_{SUFFIX}.b
    .endif

.ends

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions