DT, you are my teacher and I learn a lot from you here. With all my respect to you, please allow me to make a point;
BRANCHL will cause the program to jump. Thus, "return" with a "subroutine" will not work.
I made my point as below.
Code:i VAR BYTE main: FOR i = 0 to 4 BRANCHL i,[subName0, subName1, subName2, subName3, subName4] Sayzers_Point: 'continue from where we were. NEXT i GOTO main subName0: GOTO Sayzers_Point subName1: GOTO Sayzers_Point subName2: GOTO Sayzers_Point subName3: GOTO Sayzers_Point subName4: goto Sayzers_Point
or another example could be as below.
Code:i VAR BYTE main: FOR i = 0 to 4 SELECT CASE i CASE 0 'do something CASE 1 'do something else CASE 2 'do something more CASE 3 'do something interesting CASE 4 'do something bro END SELECT NEXT i GOTO main
---------------------------------




Bookmarks