mirror of
https://github.com/DataKinds/sixty-five-oh-two.git
synced 2024-06-01 01:41:39 +00:00
613 B
613 B
A 65C02 Assembly DSL for Haskell
... shut up, show me the code!
Here's some example code utilizing all of the features of the DSL:
import SixtyFiveOhTwo.Instruction
accumulatorLoadNStore :: Instruction
accumulatorLoadNStore = do
lda (Immediate 0x10)
sta (Absolute 0x0200)
rts (Implied)
myProgram :: Instruction
myProgram = do
define "accumulatorLoadNStore" accumulatorLoadNStore
call "accumulatorLoadNStore"
(taken from main.hs)
More documentation coming soon!