mirror of
https://github.com/guilhermewerner/machine
synced 2025-06-16 05:04:18 +00:00
Simple 8 bits operations
This commit is contained in:
BIN
Examples/Simple.bin
Normal file
BIN
Examples/Simple.bin
Normal file
Binary file not shown.
14
Examples/Simple.rs
Normal file
14
Examples/Simple.rs
Normal file
@ -0,0 +1,14 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use ::Machine::*;
|
||||
use std::fs;
|
||||
|
||||
fn main() {
|
||||
let mut vm = Machine::New(0x00);
|
||||
|
||||
let bytecode = fs::read("Examples/Simple.bin").unwrap();
|
||||
|
||||
vm.LoadProgram(&bytecode, 0x00);
|
||||
|
||||
vm.Execute();
|
||||
}
|
Reference in New Issue
Block a user