Closed Settis closed 1 year ago
I see that the comma is already used as an argument separator. So I can't do it because of the dasm syntaxis. Is it still possible to add dynamic label assembling for arguments? The label parts could be separated by the other separator.
The documentation reads:
The concat-eval “,” operator also works on the expression side of EQU/SET directives, so dynamic labels can be used with opcodes.
However, the following code returns a weird result for me, or I'm misunderstanding something.
PROCESSOR 6502
ORG $1000
lab_1
nop
num SET 1
addr SET "lab_",num
jmp addr
I'm expecting addr
to be assigned $1000, but in fact it takes a seemingly random value:
1 0000 PROCESSOR 6502
2 0000 ????
3 1000 ORG $1000
4 1000 lab_1
5 1000 ea nop
6 1001
7 1001 num SET 1
8 1001 addr SET "lab_",num
9 1001
10 1001 4c 5f 62 jmp addr
It seems that you can use:
addr SET lab_,num
Good for me.
I can construct dynamic label when I define it:
But I can't construct it for using in jump:
It fails with error: