mirror of
https://github.com/DataKinds/sixty-five-oh-two.git
synced 2024-06-12 13:29:28 +00:00
19 lines
406 B
Haskell
19 lines
406 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 $ execState myProgram emptyState
|