Actual use

This commit is contained in:
Aearnus 2018-05-24 02:09:54 -07:00
parent 539d71aa86
commit f10c428309
1 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,18 @@
module Main where
import SixtyFiveOhTwo.Instruction
import Control.Monad.State
accumulatorLoadNStore :: Instruction
accumulatorLoadNStore = do
lda (Immediate 0x10)
sta (Absolute 0x0200)
rts (Implied)
myProgram :: Instruction
myProgram = do
define "accumulatorLoadNStore" accumulatorLoadNStore
call "accumulatorLoadNStore"
main :: IO ()
main = putStrLn "Compiled"
main = print $ execState myProgram emptyState