Mercurial > vba-clojure
diff clojure/com/aurellem/assembly.clj @ 116:e45031af5327
functional number-input bootstrap code complete
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 16 Mar 2012 17:03:05 -0500 |
parents | 39fb0cbab25e |
children | bcb5c41626b4 |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/assembly.clj Fri Mar 16 16:52:29 2012 -0500 1.2 +++ b/clojure/com/aurellem/assembly.clj Fri Mar 16 17:03:05 2012 -0500 1.3 @@ -277,8 +277,8 @@ 1.4 ;; program will write. 1.5 ;; This is done by using each of the eight buttons to 1.6 ;; spell out an 8 bit number. The order of buttons is 1.7 -;; ["A" "B" "start" "select" "up" "right" "down" "left"], 1.8 -;; [:a :start :l] --> 10100001 1.9 +;; [:d :u :l :r :start :select :b :a] 1.10 +;; [:a :start :l] --> 00101001 1.11 1.12 ;; the next button press determines how many bytes are to be 1.13 ;; written, starting at the start position. 1.14 @@ -393,7 +393,7 @@ 1.15 1.16 0x06 ;D359 1.17 ;D35A 1.18 - (Integer/parseInt "11110000") ; "11110000" -> B 1.19 + (Integer/parseInt "11110000" 2) ; "11110000" -> B 1.20 0xFA ;D35B ; (FF00) -> A 1.21 0x00 ;D35C 1.22 0xFF ;D35D 1.23 @@ -414,7 +414,7 @@ 1.24 0xFF ; --> FF00 1.25 1.26 0x0E ; 1.27 - (Integer/parseInt "00001111") ; "00001111" -> C 1.28 + (Integer/parseInt "00001111" 2) ; "00001111" -> C 1.29 1.30 0xFA ; ; (FF00) -> A 1.31 0x00 ;