From f10c42830987c75ba029a55ee50102cbb19ebc96 Mon Sep 17 00:00:00 2001 From: Aearnus Date: Thu, 24 May 2018 02:09:54 -0700 Subject: [PATCH] Actual use --- app/Main.hs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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