C64Studio icon indicating copy to clipboard operation
C64Studio copied to clipboard

#define like in c or c++

Open truebluepl opened this issue 5 months ago • 1 comments

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

truebluepl avatar Sep 11 '24 10:09 truebluepl