PIC 18F family - Assembler
There is a macro enabling, at compiling time, two other macros based on the sign of these parameters, ranging from 127 to -127
For that I used the expresion PARAM#v(i) where i is a local variable. So far, so good.
My next (unsolved) problem is to get the absolute value of those constants to be used in further code inside the same macro. The solution has eluded me for the last three days.
Any help appreciated.
(Having the awful feeling that the solution is just in front of me)
There is a macro enabling, at compiling time, two other macros based on the sign of these parameters, ranging from 127 to -127
Rich (BB code):
CONSTANT PARAM0 -3
CONSTANT PARAM1 124
CONSTANT PARAM2 -56
CONSTANT PARAM3 -7
CONSTANT PARAM4 78
CONSTANT PARAM5 -6
My next (unsolved) problem is to get the absolute value of those constants to be used in further code inside the same macro. The solution has eluded me for the last three days.
Any help appreciated.
(Having the awful feeling that the solution is just in front of me)