diff --git a/src/kOS.Safe/Compilation/Opcode.cs b/src/kOS.Safe/Compilation/Opcode.cs
index ab916db15..1a171d735 100644
--- a/src/kOS.Safe/Compilation/Opcode.cs
+++ b/src/kOS.Safe/Compilation/Opcode.cs
@@ -1120,22 +1120,53 @@ public override void Execute(ICpu cpu)
///
///
- /// Pops a Int32 from the stack and then unconditionally
- /// advances the instruction pointer by it
+ /// Pops an Int32 from the stack and advances the instruction
+ /// pointer by it. Should the popped stack value be greater
+ /// than the specified max distance or less than or equal to
+ /// zero, jumps to fallback.
///
///
- /// ... dist ...
+ /// jumpstack maxDistance fallback
+ /// ... distance -- ...
///
- public class OpcodeJumpStack : Opcode
+ public class OpcodeJumpStack : BranchOpcode
{
+ [MLField(0,false)]
+ public int MaxDistance {get; set;}
+
protected override string Name { get { return "jumpstack"; } }
public override ByteCode Code { get { return ByteCode.JUMPSTACK; } }
+ public override void PopulateFromMLFields(List