tis_100/lib.rs
1//! A TIS-100 emulator.
2//!
3//! # Example
4//!
5//! ```
6//! use tis_100::save::parse_save;
7//! use tis_100::machine::Sandbox;
8//!
9//! // This program reads the value from the console and simply passes it to the console output.
10//! let src = "@1\nMOV UP DOWN\n@5\nMOV UP DOWN\n@9\nMOV UP RIGHT\n@10\nMOV LEFT DOWN\n";
11//!
12//! let save = parse_save(src).unwrap();
13//! let mut sandbox = Sandbox::from_save(&save);
14//!
15//! sandbox.write_console(42);
16//!
17//! for _ in 0..5 {
18//! sandbox.step();
19//! }
20//!
21//! assert_eq!(sandbox.read_console(), Some(42));
22//! ```
23
24extern crate hlua;
25extern crate vec_map;
26
27pub mod core;
28pub mod lex;
29pub mod parse;
30pub mod io;
31pub mod node;
32pub mod image;
33pub mod save;
34pub mod spec;
35pub mod machine;