forked from n3tael/labast
8 lines
246 B
Rust
8 lines
246 B
Rust
use crate::errors::RunError;
|
|
|
|
pub fn mul(memory: &mut Vec<u16>) {
|
|
let a: u16 = memory.pop().expect(&format!("{}", RunError::MemoryEmpty));
|
|
let b: u16 = memory.pop().expect(&format!("{}", RunError::MemoryEmpty));
|
|
|
|
memory.push(b * a);
|
|
} |