 (ns emulator-chip8.opcode
-  ;;  #?(:cljs (:require-macros [emulator-chip8.opcode :refer [defop to-opcode-func]]))
+  #?(:cljs (:require-macros [emulator-chip8.opcode :refer [defop]]))
   )
 
 ;; #?(:clj


(def opcode-table (atom #{}))

(defmacro defop
  [opcode args & body]
  (let [key (keyword (name opcode))
        pname (symbol (str "opcode-" (name opcode)))
        ]
    `(defn ~pname [~@args] ~@body)
    (swap! opcode-table conj key)
    ))

;; http://stackoverflow.com/questions/24897818/how-to-add-docstring-support-to-defn-like-clojure-macro



(defop :8XYE
  "Store the value of register VY shifted left one bit in register VX.
  Set register VF to the most significant bit prior to the shift."
  [])

(defop :9XY0
