C64Studio
C64Studio copied to clipboard
#define like in c or c++
Hello Georg,
is there any way to define a kind of macro like in c or c++?
For example I would like find closest power of two of any value. So the code is:
v = v - 1
v = v | v>>1
v = v | v>>2
v = v | v>>4
v = v + 1
I can't (maybe I'm wrong) use macro like:
!macro ClosestPowerOfTwo v
v = v - 1
v = v | v>>1
v = v | v>>2
v = v | v>>4
v = v + 1
!end
and put in the source:
and #+ClosestPowerOfTwo 12