summaryrefslogtreecommitdiff
path: root/assembly.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'assembly.lisp')
-rw-r--r--assembly.lisp6
1 files changed, 3 insertions, 3 deletions
diff --git a/assembly.lisp b/assembly.lisp
index e2b62f1..81b0ca1 100644
--- a/assembly.lisp
+++ b/assembly.lisp
@@ -1,6 +1,6 @@
(in-package :cl-forth)
-(defparameter *operations* (make-hash-table))
+(defparameter *operations* (make-hash-table :test 'equal))
(eval-always
(defun normalize-op-list (asm-list)
@@ -27,7 +27,7 @@
(defmacro defop (op-name+args (&key (indent 4)) &body body)
(with-gensyms (out-stream)
(destructuring-bind (op-name . args) (mklist op-name+args)
- `(setf (gethash ',op-name *operations*)
+ `(setf (gethash ,(string op-name) *operations*)
(lambda (,out-stream ,@args)
,(if (or (stringp (car body)) (stringp (caar body)))
`(defop-format ,out-stream ,indent
@@ -141,7 +141,7 @@
(format str " ;; -- ~s --~%" op))
(defun gen-code (op str)
- (let ((op-fn (gethash (car op) *operations*)))
+ (let ((op-fn (gethash (string (car op)) *operations*)))
(if (null op-fn)
(error "~s is not a valid op" op)
(apply op-fn str (cdr op)))))