Variable alias in assembly
max72
Posts: 1,155
I'm using an asm object from Beau Schwabe, that offers the possibility to execute custom functions in a separate cog, at full speed.
I have many different functions, math, string handling, and so on. Every single function uses the same set of variables (named t1, t2, t3..) to get arguments, doing the job and sending back the result.
I would like to alisa the variable names to better understand the code, when writing it, and in the future.
Is it posible?
For instance can I say variable t1 can also be called angle, asciioffset, bufferaddress, and still use only one long?
Thanks in advance,
Massimo
I have many different functions, math, string handling, and so on. Every single function uses the same set of variables (named t1, t2, t3..) to get arguments, doing the job and sending back the result.
I would like to alisa the variable names to better understand the code, when writing it, and in the future.
Is it posible?
For instance can I say variable t1 can also be called angle, asciioffset, bufferaddress, and still use only one long?
Thanks in advance,
Massimo
Comments
at the moment I have no example here, but this should be possible, if you place the variable in a dat section. There you can have labels (=Variable names) at the beginning of empty lines. So the adress will be the same for several variables.
Something like this:
Varnam1
Varnam2
Varnam3 long 1
Good luck,
Christof
My code will be more readable. Well, I hope so..
Massimo