Enum mlem_asm::Instruction [] [src]

pub enum Instruction {
    NoOp,
    Zero(Address),
    Move(AddressAddress),
    Output(Address),
    Input(Address),
    Add(AddressAddress),
    Sub(AddressAddress),
    Jump(Address),
    JumpIfZero(AddressAddress),
    JumpNotZero(AddressAddress),
    Push(Address),
    Pop(Address),
    Halt,
    Illegal,
}

Possible instructions for the machine to execute. For each instruction, the first operand is a, second is b, et cetera

Variants

Increment IP.

Set a equal to 0

Set b equal to a

Push a onto the output

Pop from the input into a

Add the unsigned a to b, storing the result in a

Subtract the unsigned b from a, storing the result in a

Uncontitionally jump to the position given by a

Jump to a if the value at b is 0

Jump to a if the value at b is NOT zero

Push a to the stack

Pop a value from the stack into the given address

Gracefully shut down the machine

An illegal instruction. Executing this is a Fault.

Trait Implementations

impl Copy for Instruction
[src]

impl Deserialize for Instruction
[src]

impl Serialize for Instruction
[src]

impl PartialEq<Instruction> for Instruction
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Instruction
[src]

Formats the value using the given formatter.

impl Clone for Instruction
[src]