Browse files

spacing fixes

  • Loading branch information...
1 parent 173a745 commit 9635215800962b2152eba716be17e8a6723dc4c5 @jamorton jamorton committed Apr 5, 2012
Showing with 11 additions and 11 deletions.
  1. +11 −11 emu.rs
View
22 emu.rs
@@ -100,11 +100,11 @@ fn new_value(cpu: cpu_state, key: u16) -> value {
fn get_value(cpu: cpu_state, v: value) -> u16 {
alt v {
- value_reg(t) { cpu.regs[t] }
- value_mem(t) { cpu.mem[t] }
- value_sp { cpu.sp }
- value_pc { cpu.pc }
- value_o { cpu.o }
+ value_reg(t) { cpu.regs[t] }
+ value_mem(t) { cpu.mem[t] }
+ value_sp { cpu.sp }
+ value_pc { cpu.pc }
+ value_o { cpu.o }
value_literal(t) { t }
}
}
@@ -113,22 +113,22 @@ fn set_value(cpu: cpu_state, targ: value, v: u16) {
alt targ {
value_reg(t) { cpu.regs[t] = v; }
value_mem(t) { cpu.mem[t] = v; }
- value_sp { cpu.sp = v; }
- value_pc { cpu.pc = v; }
- value_o { cpu.o = v; }
+ value_sp { cpu.sp = v; }
+ value_pc { cpu.pc = v; }
+ value_o { cpu.o = v; }
value_literal(t) { error("set_val: attempt to set a literal"); }
}
}
fn step(cpu: cpu_state) {
let word = next_pc(cpu);
- let op = basic_op((word & 0b0000000000001111u16) as uint);
+ let op = basic_op((word & 0b0000000000001111u16) as uint);
let av = new_value(cpu, (word & 0b0000001111110000u16) >> 4u16);
let bv = new_value(cpu, (word & 0b1111110000000000u16) >> 10u16);
- let a = get_value(cpu, av) as uint;
- let b = get_value(cpu, bv) as uint;
+ let a = get_value(cpu, av) as uint;
+ let b = get_value(cpu, bv) as uint;
// Non-basic instructions
if op == NBI {

0 comments on commit 9635215

Please sign in to comment.