Day 11, part 1, but horrible

This commit is contained in:
2019-12-11 20:40:09 +00:00
parent e81f3f6ab7
commit 48ca004a53
4 changed files with 142 additions and 3 deletions

View File

@@ -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