Actual use
This commit is contained in:
parent
539d71aa86
commit
f10c428309
14
app/Main.hs
14
app/Main.hs
|
@ -1,6 +1,18 @@
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import SixtyFiveOhTwo.Instruction
|
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 :: IO ()
|
||||||
main = putStrLn "Compiled"
|
main = print $ execState myProgram emptyState
|
||||||
|
|
Loading…
Reference in New Issue