lazyboy-0.2.0.1: An EDSL for programming the Game Boy.

Copyright(c) Rose 2019
LicenseBSD3
Maintainerrose@lain.org.uk
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Lazyboy.Control

Description

This module defines methods of controlling the flow of execution for Lazyboy.

Synopsis

Documentation

getLabel :: Lazyboy Integer Source #

Get a label, and in the process increment the counter used to track labels. this provides a safe interface to label retrieval and utilization.

getLocalLabel :: Lazyboy Label Source #

Get a local label. The name is guaranteed to be unique.

getGlobalLabel :: Lazyboy Label Source #

Get a global label. The name is guaranteed to be unique.

withLabel :: (Label -> Lazyboy ()) -> Lazyboy () Source #

Execute an action within a global label and pass the action the label.

withLocalLabel :: (Label -> Lazyboy ()) -> Lazyboy () Source #

Execute an action within a local label and pass the action the label.

embedFile :: FilePath -> Lazyboy Label Source #

Embed a file and return a global label for it. A jump over the block of data is added to prevent the image data being executed.

embedImage :: FilePath -> Lazyboy Label Source #

Embed an image and return a (global) label for it. A jump over the block of data is added to prevent the image data being executed.

embedBytes :: [Word8] -> Lazyboy Label Source #

Embed a sequence of bytes into the file and return a (global) label for it. A jump over the block of data is added to prevent the image data being executed.

freeze :: Lazyboy () Source #

Suspend execution indefinitely by disabling interrupts and halting.

cond :: Condition -> Lazyboy () -> Lazyboy () Source #

Executes the given action provided condition flag is set.