|
@@ -156,14 +156,20 @@ fn main() {
|
|
|
masks_map.insert("val_mask", (0b00000001111111111111111111111111, 0));
|
|
|
|
|
|
|
|
|
- let codex = &fs::read("codex.umz");
|
|
|
-
|
|
|
-
|
|
|
+ let codex8 = &fs::read("data/codex.umz").unwrap();
|
|
|
|
|
|
+ let mut codex = vec![0u32; codex8.len() / 4];
|
|
|
|
|
|
+ for i in 0..codex.len() {
|
|
|
+ codex[i] = u32::from_be_bytes([
|
|
|
+ codex8[i*4],
|
|
|
+ codex8[i*4+1],
|
|
|
+ codex8[i*4+2],
|
|
|
+ codex8[i*4+3] ]);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- let add_instr = 0b00110000000000000000000001010011;
|
|
|
+ let instr = codex[0];
|
|
|
|
|
|
|
|
|
|
|
@@ -171,7 +177,7 @@ fn main() {
|
|
|
|
|
|
|
|
|
|
|
|
- let full_op = parse_instr(masks_map, add_instr);
|
|
|
+ let full_op = parse_instr(masks_map, instr);
|
|
|
|
|
|
|
|
|
println!("Hello, world! - {}", full_op);
|