i promise you this is the last commit
This commit is contained in:
parent
ef41729efb
commit
c131f7aa39
1 changed files with 2 additions and 2 deletions
|
@ -16,11 +16,11 @@ fn main() {
|
||||||
.expect("Registers file not read properly.");
|
.expect("Registers file not read properly.");
|
||||||
let sreg: Vec<&str> = lreg.split(",").collect();
|
let sreg: Vec<&str> = lreg.split(",").collect();
|
||||||
let mut x = 0;
|
let mut x = 0;
|
||||||
x = x + 1;
|
|
||||||
for s in sreg {
|
for s in sreg {
|
||||||
let c = s.replace("\n","");
|
let c = s.replace("\n","");
|
||||||
let int: i32 = c.parse().unwrap();
|
let int: i32 = c.parse().unwrap();
|
||||||
registers[x] = int;
|
registers[x] = int;
|
||||||
|
x = x + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ fn main() {
|
||||||
for x in registers {
|
for x in registers {
|
||||||
if x != 0 {
|
if x != 0 {
|
||||||
println!("Register {}: {}", a, x);
|
println!("Register {}: {}", a, x);
|
||||||
a = a + 1;
|
|
||||||
}
|
}
|
||||||
|
a = a + 1;
|
||||||
}
|
}
|
||||||
println!("Instruction Pointer: {}", i);
|
println!("Instruction Pointer: {}", i);
|
||||||
println!("Program Step: {}", ii);
|
println!("Program Step: {}", ii);
|
||||||
|
|
Loading…
Reference in a new issue