Here's the logic I use, take it for what its worth. Its been so long since I wrote it, I forget how to interpret it
ISTHERE L;\198;\199
IF\198<1THEN LABEL2 STARTING LINE FOR SUBROUTINE NOT COMMANDED! :[CYCLEBUTT] :EXIT
ISTHERE R;\198;\199
IF\198=<1THENr=1 :LABEL2 NUMBER OF REPEATS "R" HAS DEFAULTED TO ONLY 1;14'defaults to one time through the subroutine
\36=\199

ISPLAY6 \36
GOSUB Ol;r 'subroutine must be lettered with an "O" firstly, lower case "L" is "O"subroutine number, repeated for "R" number of times
-----M98
LOADING \55
IF\55<1THENEXIT
REFRESH
'next code for incrementing the part counter as a repeat counter for subroutines
\36={\36-1}
DISPLAY6 \36
RETURN
-----M99