Mercurial > vba-clojure
changeset 399:ddb3c6299619
allowed non-even initial blank inputs.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 13 Apr 2012 05:35:55 -0500 |
parents | 0591dcddf831 |
children | 1b9137ef7380 |
files | clojure/com/aurellem/gb/rlm_assembly.clj |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/gb/rlm_assembly.clj Fri Apr 13 05:28:17 2012 -0500 1.2 +++ b/clojure/com/aurellem/gb/rlm_assembly.clj Fri Apr 13 05:35:55 2012 -0500 1.3 @@ -217,7 +217,7 @@ 1.4 0xAF ;; test for output-mode (bytes-to-write > 0) 1.5 0x00 ;; (cp A B) 1.6 0x7B ;; E->A 1.7 - 0x20 ;; skip input section if 1.8 + 0x20 ;; skip input section if 1.9 :to-output ;; we're not in input mode 1.10 1.11 :to-be-executed 1.12 @@ -226,13 +226,18 @@ 1.13 0xEA 1.14 :to-be-executed-address 1.15 1.16 + ;; if A is zero, skip the protection section 1.17 + 0xA7 1.18 + 0x28 1.19 + 0x09 1.20 + 1.21 0x0C ;; inc C 1.22 0xCB 1.23 0x41 ;; test bit 0 of C 1.24 0x20 ;; if (0 == (C % 2)) 1.25 0x04 1.26 0xAF ;; put a no op (0x00) in to-be-executed 1.27 - 0xEA 1.28 + 0xEA ;; every other time. 1.29 :to-be-executed-address 1.30 1.31 0x18 ;; return 1.32 @@ -335,9 +340,10 @@ 1.33 (let [after 1.34 (-> (bootstrap-base) 1.35 (step []) 1.36 - (step []) 1.37 (step (buttons 0x67)) 1.38 (step (buttons n)) 1.39 + (step []) 1.40 + (step []) 1.41 )] 1.42 (hex (H after)))) 1.43