Skip to content

Commit

Permalink
update example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ix committed May 7, 2019
1 parent a2f85a5 commit a77e2a7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ Syntax example (will be updated as more complex constructs are added):
main :: IO ()
main = rom >>= T.putStrLn
where rom = compileROM $ do
write wram1 0xC0
write (wram1 + 1) 0xDE
write (wram0 + 10) 0xFA
write (wram0 + 11) 0xCE
memcpy wram1 wram0 10
cond Zero $ do
memcpy (wram0 + 10) (wram1 + 10) 10
smiley <- embedBytes image
memcpy (Name smiley) (Address vram) $ fromIntegral $ length image
setBackgroundPalette defaultPalette
setLCDControl $ defaultLCDControl { lcdDisplayEnable = True, lcdBackgroundEnable = True }
freeze

image :: [Word8]
image = [0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x81, 0x81, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00]
```

See `app/Main.hs` for a full usage example.
Expand Down

0 comments on commit a77e2a7

Please sign in to comment.