[][src]Enum aoc_2018_state_machine::OpCode

pub enum OpCode {
    AddR,
    AddI,
    MulR,
    MulI,
    BAnR,
    BAnI,
    BOrR,
    BOrI,
    SetR,
    SetI,
    GtIR,
    GtRI,
    GtRR,
    EqIR,
    EqRI,
    EqRR,
}

Variants

AddR

addr (add register) stores into register C the result of adding register A and register B.

AddI

addi (add immediate) stores into register C the result of adding register A and value B.

MulR

mulr (multiply register) stores into register C the result of multiplying register A and register B.

MulI

muli (multiply immediate) stores into register C the result of multiplying register A and value B.

BAnR

banr (bitwise AND reigster) stores into register C the result of the bitwise AND register A and register B.

BAnI

bani (bitwise AND immediate) stores into register C the result of the bitwise AND of register A and value B.

BOrR

borr (bitwise OR register) stores into register C the result of the bitwise OR of register A and register B.

BOrI

bori (bitwise OR immediate) stores into register C the result of the bitwise OR of register A and value B.

SetR

setr (set register) copies the contents of register A into register C. (Input B is ignored.)

SetI

seti (set immediate) stores value A into register C. (Input B is ignored.)

GtIR

gtir (greater-than immediate/register) sets register C to 1 if value A is greater than register B. Otherwise, register C is set to 0.

GtRI

gtri (greater-than register/immediate) sets register C to 1 if register A is greater than value B. Otherwise, register C is set to 0.

GtRR

gtrr (greater-than register/register) sets register C to 1 if register A is greater than register B. Otherwise, register C is set to 0.

EqIR

eqir (equal immediate/register) sets register C to 1 if value A is equal to register B. Otherwise, register C is set to 0

EqRI

eqri (equal register/immediate) sets register C to 1 if register A is equal to value B. Otherwise, register C is set to 0.

EqRR

eqrr (equal register/register) sets register C to 1 if register A is equal to register B. Otherwise, register C is set to 0.

Methods

impl OpCode
[src]

pub const OPCODES: [OpCode; 16][src]

pub fn iter(
) -> impl Iterator<Item = OpCode>
[src]

impl OpCode
[src]

pub fn from_name(s: &str) -> Option<Self>
[src]

Trait Implementations

impl Eq for OpCode
[src]

impl Into<&'static str> for OpCode
[src]

impl PartialOrd<OpCode> for OpCode
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Copy for OpCode
[src]

impl PartialEq<OpCode> for OpCode
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for OpCode
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for OpCode
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for OpCode
[src]

Auto Trait Implementations

impl Send for OpCode

impl Sync for OpCode

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]