assembler line number
Posted: Fri Jul 03, 2015 9:12 am
Hello you all !
In EASy68k, you can use the character "*" as a reference to the current line number. For example, the instruction
will reserve a space, padd, from the current line to the $2000 address.
Would any of you happen to know if there is a similar way of doing it with our current assembly tools ?
What I really want to do is pass the line number as a parameter to an asm macro. For example,
I need to give a parameter. If I don't, when I call the macro twice, there will be two labels with the same name.
Of course, I can manually type down the line number when I call my macro (eg, "myMacro 785"), but it would be more elegant to simply put "myMacro *"
In EASy68k, you can use the character "*" as a reference to the current line number. For example, the instruction
Code: Select all
ds.b $2000-*
Would any of you happen to know if there is a similar way of doing it with our current assembly tools ?
What I really want to do is pass the line number as a parameter to an asm macro. For example,
Code: Select all
.macro myMacro line
// some instruction
bra .LABEL1\line
// some instruction
bra .LABEL2\line
// some instruction
.LABEL1\line:
// some instruction
.LABEL2\line:
// some instruction
.endm
Of course, I can manually type down the line number when I call my macro (eg, "myMacro 785"), but it would be more elegant to simply put "myMacro *"