sixty-five-oh-two/app/Main.hs

19 lines
406 B
Haskell
Raw Normal View History

2018-05-23 10:51:24 +00:00
module Main where
import SixtyFiveOhTwo.Instruction
2018-05-24 09:09:54 +00:00
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"
2018-05-23 10:51:24 +00:00
main :: IO ()
2018-05-24 09:09:54 +00:00
main = print $ execState myProgram emptyState