comparison clojure/com/aurellem/assembly.clj @ 122:e85b53994fac

working on proper timing for modes
author Robert McIntyre <rlm@mit.edu>
date Fri, 16 Mar 2012 20:55:28 -0500
parents 744de3427c05
children c9a280b8bd1c
comparison
equal deleted inserted replaced
121:744de3427c05 122:e85b53994fac
600 600
601 ;; beginning of main state machine 601 ;; beginning of main state machine
602 0x18 ;D380 ; Declaration of variables 602 0x18 ;D380 ; Declaration of variables
603 0x05 ;D381 ; 5 variables: 603 0x05 ;D381 ; 5 variables:
604 0x00 ;D382 ; current-mode 604 0x00 ;D382 ; current-mode
605 0x00 ;D383 ; bytes-left-to-write 605 0x00 ;D383 ; bytes-to-write
606 0x00 ;D384 ; start-point 606 0x00 ;D384 ; start-point
607 0x00 ;D385 ; unused 607 0x00 ;D385 ; unused
608 0x00 ;D386 ; unused 608 0x00 ;D386 ; unused
609 609
610 610
773 (defn test-write-memory [] 773 (defn test-write-memory []
774 (set-state! (write-memory)) 774 (set-state! (write-memory))
775 (dorun 775 (dorun
776 (dotimes [_ 5000] 776 (dotimes [_ 5000]
777 (view-memory (step @current-state) current-mode)))) 777 (view-memory (step @current-state) current-mode))))
778 778
779 (def bytes-to-write 0xD383)
780 (def start-point 0xD384)
781
782 (defn test-mode-2 []
783 (->
784 (write-memory)
785 (view-memory bytes-to-write)
786 (view-memory start-point)
787 (step)
788 (step [:a])
789 (step [:b])
790 (step [:start])
791 (step [])
792 (view-memory bytes-to-write)
793 (view-memory start-point)))