<< Click to Display Table of Contents >> Navigation: 3. Script Language > JXX. - Jump - Instructions > JXX-Commands: "Jump If ..." |
MiniRobotLanguage (MRL)
JMP./GTO. Unconditional Jump
JuMP to label
Intention
Continues Script Execution at the given Label (GOTO). You can type GTO. instead of JMP. both commands are technically equal.
You can jump to variables, if they contain valid labels at runtime.
Syntax
JMP.P1[|P2]
Parameter Explanation
P1 - TXT (Label)
P2 - if Option "r" is given, a previous RET.
- will be removed from the JSR./GSB./RET. Stack.
JMP. may use variables, which must evaluate to a valid Label.
Speed in Ticks:
This command uses typically between 10 to 20 Ticks.
Example
'***********************************************
' Example 1 - without Parameters,
' with local and global variables
'***********************************************
' This Example shows how to use JMP.
' Please run in Single-Step Mode/Editor.
: $$AAA=0
:A0
VIC.$$AAA
GTO.A$$AAA
:A1
DBP.LAB=A1
JMP.A0
:A2
DBP.LAB=A2
JMP.A0
:A3
MBX.Ready
Remarks
JMP. can use variables in the Parameter field.
You can type GTO. instead of JMP. both commands are technically equal.
Limitations:
There is no Limitation in the number of Labels you can Jump to. However, having thousands of Labels in your Script may slow down Script execution a bit.
See also:
• JME. - Jump on More or Equal
• JLE. - Jump on Less or Equal
• JSR. - Jump SubRoutine (Label)