Mercurial > vba-clojure
comparison clojure/com/aurellem/assembly.clj @ 109:c8b48102b17c
saving progress
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 15 Mar 2012 14:32:10 -0500 |
parents | d3c0b990e163 |
children | f9dee79b2215 |
comparison
equal
deleted
inserted
replaced
108:d3c0b990e163 | 109:c8b48102b17c |
---|---|
76 state) | 76 state) |
77 | 77 |
78 (defn read-buttons [] | 78 (defn read-buttons [] |
79 (let [button-pressed (tick (step (mid-game) [:d]))] | 79 (let [button-pressed (tick (step (mid-game) [:d]))] |
80 (-> button-pressed | 80 (-> button-pressed |
81 (IE! 0) | 81 (IE! 0) ; disable interrupts |
82 (inject-item-assembly | 82 (inject-item-assembly |
83 (concat | 83 (concat |
84 ;; write 00010000 to 0xFF00 to select joypad | 84 ;; write 00010000 to 0xFF00 to select joypad |
85 [0x18 ;D31D ; jump over | 85 [0x18 ;D31D ; jump over |
86 0x01 ;D31E ; the next 8 bits | 86 0x01 ;D31E ; the next 8 bits |
90 0x1F ;D322 --] | 90 0x1F ;D322 --] |
91 0xD3 ;D323 --] DC1F ; data section | 91 0xD3 ;D323 --] DC1F ; data section |
92 0x01 ;D324 ; load 0xFF00 into BC | 92 0x01 ;D324 ; load 0xFF00 into BC |
93 0x00 ;D325 | 93 0x00 ;D325 |
94 0xFF ;D326 | 94 0xFF ;D326 |
95 0x02 ;D327 ; load (00010000) into FF00 | 95 0x02 ;D327 (BC)->A ; load (00010000) into FF00 |
96 ; to select directional | 96 ; to select directional |
97 ; buttons | 97 ; buttons |
98 | 98 |
99 ] | 99 ] |
100 | 100 |