remove tigre and use fenster library for graphical stuff
fix readme
drop windows stuff in makefile and add support thing to readme
Blit is a small, stack-based language for bit art exploration.
Blit is maintained using Fossil, but a read-only Git mirror is provided for convenience. See https://quiltro.org/code/blit/ for the canonical repository.
To get a copy of the source code, the following options are available:
fossil clone https://quiltro.org/code/blit
)git clone https://git.sr.ht/~coyotes/blit
)See also the download page for archive downloads (TAR and ZIP files).
Currently tested targets are Linux and OpenBSD. Blit should build in any POSIX-compliant target, but most have not been tested. Windows and macOS are not supported, your mileage may vary.
Building is done by running the make
command (or gmake
if running on *BSD systems, after installing the package), this will build the interpreter and the assembler binaries.
The blit
program is the core interpreter.
$ cmd/blit -h
usage: blit [-h8Pc] [-D <image size>] [-t <value>] file
-h: print this help text
-8: use 8-bit grayscale mode
-P: use paletted mode
-c: accept bytecode input
-D <image size>: set image size (default: 256x256)
-t <value>: set machine's T register (default: 0)
blit
outputs Netpbm data, you might want to use a tool like ImageMagick to convert to commonly used image formats:
$ cmd/blit examples/birds.blit | convert - birds.gif
The blas
program assembles Blit code to bytecode. This can be useful for situations where a program will be evaluated multiple times (see the utils/animate.sh
script for an example). It takes both input and output files as arguments.
The animation script aids in creating GIF animations of Blit code. It takes all the parameters the blit
binary takes, except for -t
, and adds two parameters -f
and -d
for setting the length of the animation in frames and the time each frame takes, respectively.
It requires the Netpbm toolkit and Gifsicle.
$ make
$ util/animate.sh examples/city.blit
...
$ open examples/city.gif
See the language documentation page for a reference.