ee3119c6c9 | ||
---|---|---|
app | ||
src/SixtyFiveOhTwo | ||
test | ||
.gitignore | ||
ChangeLog.md | ||
LICENSE | ||
README.md | ||
Setup.hs | ||
fancy_banner.png | ||
package.yaml | ||
screenshot.png | ||
stack.yaml |
README.md
A 65C02 Assembly DSL for Haskell
... shut up, show me the code!
Here's some example code utilizing all of the features of the eDSL:
import SixtyFiveOhTwo.Instruction
accumulatorLoadNStore :: Instruction
accumulatorLoadNStore = do
lda (Immediate 0x10)
sta (Absolute 0x0200)
rts (Implied)
myProgram :: Instruction
myProgram = do
define "accumulatorLoadNStore" accumulatorLoadNStore
call "accumulatorLoadNStore"
Here's a fun little snippet that adds 10 to the accumulator using Haskell Monad Magic:
test3f2 :: Instruction
test3f2 = replicateM_ 10 (inc (Accumulator))
More documentation coming soon!