Enum mindjuice::Instruction
[−]
[src]
pub enum Instruction { MoveRight, MoveLeft, Increment, Decrement, Output, Input, JumpToLeft(usize), JumpToRight(usize), }
Variants
MoveRight
Increment the memory pointer by one
MoveLeft
Decrement the memory pointer by one
Increment
Increment the memory value at the memory pointer by one
Decrement
Decrement the memory value at the memory pointer by one
Output
Output the value of the current memory pointer as a char
Input
Set the memory value at the current memory pointer to a char read from stdin.
JumpToLeft(usize)
This is the left side of a loop. If the memory value at the memory pointer is zero, set the next instruction to the contained value.
JumpToRight(usize)
This is the right side of a loop. If the memory value at the memory pointer is non-zero, set the next instruction to the contained value.