Subroutine


This instruction tells the servo to execute other instructions, one after the other.
But first, the instructions must be loaded into the subroutine.
Start by laying out, on powered servo rail, the instructions you want for the subroutine.
Place two servo rails on each end of the instruction list.
At the beginning, leave the first extra rail blank, and on the second rail put the Entry Action instruction, set to read mode by clicking on it with an LMP.
At the very end, place the trap instruction, and before that, use Entry Action again, except this time in "Execute Immediately" mode.
Place the servo at the beginning, on the blank rail.
It should read in the instructions between the Entry Actions, and then stop.
Shift click the servo with an empty Instruction Group to load the instructions into the Subroutine.

Multiply By 2

[Servo Start]
Entry Action: read to stack
Push Integer: 1
Push Integer: 1
Sum
Product
Entry Action: execute immediately
Trap

8

[Servo Start]
Push Integer: 1
Push Integer: 1
Sum
Dup Sum
Dup Sum
Trap

Workbench.name
Subroutine


Subroutine
Shapeless:
Furnace.name