This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; the zipper storing the interpreter's memory | |
(defvar *memory* (cons () (loop for i from 1 to 32768 collecting 0))) | |
; convenience function to reset global memory to all zeros | |
(defun reset-memory () | |
(setf *memory* (cons () (loop for i from 1 to 32768 collecting 0)))) | |
(defmacro with-blank-memory (&rest body) | |
`(let ((*memory* (cons () (loop for i from 1 to 32768 collecting 0)))) | |
,@body)) | |
; the forward portion of the memory zipper | |
(defmacro forward () |