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

20 lines
442 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
2018-05-25 08:40:25 +00:00
import qualified Data.ByteString as B
2018-05-24 09:09:54 +00:00
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-25 08:40:25 +00:00
main = B.putStr $ runInstructions myProgram