diff --git a/app/Main.hs b/app/Main.hs index 2db676e..855529e 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -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