Basic Macro (create a macro with basic) similar to function
Like asm macro's but can be written in basic.
Would not save code size, but would make program shorter and more neat.
Put 1 line in basic code with passed values that inserts the full macro at assembly time.
........something like, not real code
B1 var byte.......
SomeMacro var macro var1,var2, etc
B2 var word
......................
...........creating the macro..................
VBmacro SomeMacro
local var1, var2
variable var1= port.pin, var2= count
some basic code...........
high var1
pause count
etc
endmacro
.................................................. ........
........using macro in some basic code...........................
start:
for a =1 to 50
serout (xxxxxxxx)
count = count +1
SomeMacro (portB.4, 50)
next a
etc....etc
Don
Re: Basic Macro (create a macro with basic) similar to function
http://support.melabs.com/threads/89...on-Start-Here)
Might be something of use. I have not tried it yet but looking forward to it.
Re: Basic Macro (create a macro with basic) similar to function
Thanks !
Looks like about what I was thinking. Brings up some questions. Now I will get PBP3. Looks like each macro can only act on 1 value at a time ? ........write basic code, build it to get code for macro in asm ?..........
Definitely seems like advanced stuff for little basic.
Don
Re: Basic Macro (create a macro with basic) similar to function
Would not save code size, but would make program shorter and more neat.
Put 1 line in basic code with passed values that inserts the full macro at assembly time.