Mercurial > vba-clojure
comparison clojure/com/aurellem/gb/rlm_assembly.clj @ 397:9b0d79cad624
use E as scratch instead of C
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 13 Apr 2012 04:56:01 -0500 |
parents | c7a43f4ffd9d |
children | 0591dcddf831 |
comparison
equal
deleted
inserted
replaced
396:c7a43f4ffd9d | 397:9b0d79cad624 |
---|---|
211 [0xAF 0x5F 0x57 0x47] ;; 0->A; 0->E; 0->D; 0->B | 211 [0xAF 0x5F 0x57 0x47] ;; 0->A; 0->E; 0->D; 0->B |
212 | 212 |
213 input | 213 input |
214 [0xC1 ;; pop BC so it's not volatile | 214 [0xC1 ;; pop BC so it's not volatile |
215 | 215 |
216 0x4F ;; A->C | 216 0x5F ;; A->E |
217 0xAF ;; test for output-mode (bytes-to-write > 0) | 217 0xAF ;; test for output-mode (bytes-to-write > 0) |
218 0x00 ;; (cp A B) | 218 0x00 ;; (cp A B) |
219 0x79 ;; C->A | 219 0x7B ;; E->A |
220 | 220 |
221 0x20 ;; skip input section if | 221 0x20 ;; skip input section if |
222 :to-output ;; we're not in input mode | 222 :to-output ;; we're not in input mode |
223 | 223 |
224 :to-be-executed | 224 :to-be-executed |
225 | 225 |
226 ;; write mode to instruction-to-be-executed (pun) | 226 ;; write mode to instruction-to-be-executed (pun) |
227 | |
228 0xEA | 227 0xEA |
229 :to-be-executed-address | 228 :to-be-executed-address |
230 0x18 ;; return | 229 0x18 ;; return |
231 :to-beginning-1] | 230 :to-beginning-1] |
232 | 231 |