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

19 lines
405 B
Haskell

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 = print $ runState myProgram emptyState