Mercurial > vba-clojure
comparison clojure/com/aurellem/gb/util.clj @ 230:fe26776e1a58
working on map memory, modified view-memory to output hex and decimal as well as binary
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 24 Mar 2012 14:42:34 -0500 |
parents | c9a855de1d07 |
children | 22f58fa47c3c |
comparison
equal
deleted
inserted
replaced
229:30f4fc9b1747 | 230:fe26776e1a58 |
---|---|
34 (binary-str (reg-fn state)))) | 34 (binary-str (reg-fn state)))) |
35 state) | 35 state) |
36 | 36 |
37 (defn view-memory | 37 (defn view-memory |
38 ([^SaveState state mem] | 38 ([^SaveState state mem] |
39 (println (format "mem 0x%04X = %s" mem | 39 (let [val (aget (memory state) mem)] |
40 (binary-str (aget (memory state) mem)))) | 40 (println (format "0x%04X = %s 0x%02X %d" mem |
41 (binary-str val) val val))) | |
41 state) | 42 state) |
42 ([mem] | 43 ([mem] |
43 (view-memory @current-state mem))) | 44 (view-memory @current-state mem))) |
44 | 45 |
45 (defn print-listing | 46 (defn print-listing |