BRANCH - Memory Saving

Code:
' Branch Snippet - Save Memory
' Author Michael Collier

' This method of branching uses less memory than
' Branching with a GOTO as a return statement.

forever:
  for b0 = 0 to 4
		gosub BranchMe
  next
goto forever

BranchMe:
	Branch b0 , (zero , and_one , then_two)
	return ' Put this here so we return if the Branch does not execute

zero:
	toggle 0
 	return

and_one:
 	toggle 1
 	return

then_two:
 	toggle 2
 	return
 
Top