Day 11, part 1, but horrible
This commit is contained in:
@@ -101,6 +101,8 @@ pub const Machine = struct {
|
||||
|
||||
ip: usize = 0,
|
||||
|
||||
halted: bool = false,
|
||||
|
||||
input: CharDev,
|
||||
output: CharDev,
|
||||
|
||||
@@ -257,9 +259,7 @@ pub const Machine = struct {
|
||||
self.rb += self.__read(0, insn.modes[0]);
|
||||
},
|
||||
|
||||
.END => {
|
||||
// std.debug.warn("{}: ended\n", self.idx);
|
||||
},
|
||||
.END => self.halted = true,
|
||||
};
|
||||
|
||||
// Only modify IP if the instruction itself has not
|
||||
|
Reference in New Issue
Block a user