(load [file])
This commit is contained in:
7
projects/aoc/src/year2020/BootCodeCommon.kiss
Normal file
7
projects/aoc/src/year2020/BootCodeCommon.kiss
Normal file
@@ -0,0 +1,7 @@
|
||||
(defprop &mut accumulator 0)
|
||||
|
||||
(defmethod setBreakPoint [] (addBreakPoint instructionPointer))
|
||||
|
||||
(defmethod nop [v] (setBreakPoint))
|
||||
(defmethod acc [v] (setBreakPoint) (set accumulator (+ accumulator v)))
|
||||
(defmethod jmp [v] (setBreakPoint) (set instructionPointer (+ instructionPointer (- v 1))))
|
@@ -1,10 +1,4 @@
|
||||
(defprop &mut accumulator 0)
|
||||
|
||||
(defmethod setBreakPoint [] (addBreakPoint instructionPointer))
|
||||
|
||||
(defmethod nop [v] (setBreakPoint))
|
||||
(defmethod acc [v] (setBreakPoint) (set accumulator (+ accumulator v)))
|
||||
(defmethod jmp [v] (setBreakPoint) (set instructionPointer (+ instructionPointer (- v 1))))
|
||||
(load "BootCodeCommon.kiss")
|
||||
|
||||
(defreadermacro "" [stream] #| ReaderExp.CallExp(
|
||||
{
|
||||
|
Reference in New Issue
Block a user