comparison clojure/com/aurellem/gb/util.clj @ 301:1de6aada1cb7

inserted backwards jump into bootstrap program to fit it into item-pc space
author Robert McIntyre <rlm@mit.edu>
date Fri, 30 Mar 2012 23:39:58 -0500
parents eec3e69500d9
children 5bcda2d6d135
comparison
equal deleted inserted replaced
300:bc1f62b269b5 301:1de6aada1cb7
216 pokemon-record-begin 216 pokemon-record-begin
217 (inc D-memory-end)) 217 (inc D-memory-end))
218 descriptions)))) 218 descriptions))))
219 ([] (print-D-memory @current-state))) 219 ([] (print-D-memory @current-state)))
220 220
221
222 (defn signed-8-bits
223 "the lower 8 bits of an integer interpreted as a signed 8
224 bit number"
225 [n]
226 (let [lower-seven (bit-and n 127)]
227 (if (bit-test n 7)
228 (- 128 lower-seven)
229 lower-seven)))
230