-
Loops in assembly
Hi, i was wondering if its possible to create a loop in assembly. I already know how to use GOTO to create a runtime loop but im looking to create a loop that is executed while the code is compiling and results in multiple lines of assembly being output.
Example:
Code:
for x=0 to 5
MOVFF var+x, var2+x
next
And the actual assembly code i would expect is:
Code:
MOVFF var+0, var2+0
MOVFF var+1, var2+1
MOVFF var+2, var2+2
MOVFF var+3, var2+3
MOVFF var+4, var2+4
MOVFF var+5, var2+5
-
Have you seen this thread? Might have the answer to your question.
http://www.picbasic.co.uk/forum/show...t=delay+cycles
-
I read through that thread and found while/endw. That does the job perfectly. Thanks :)