Skip to content
Command libraries

Command libraries

The commands of Blitz Basic 2 come from the command libraries that the compiler loads from acidlibs when it starts. Each page below belongs to one of these libraries and lists its commands in alphabetical order, as the library itself declares them. The pages are made from the libraries the build produces, so they always match what the compiler sees.

Reading an entry

Each command shows what kind of command it is, its help text and the argument forms it accepts.

The kind. A statement stands on its own (Window 0,...), a function returns a value and is used in an expression (a=Event), and a statement or function can be used both ways. A function names the type of its result. Some commands take a type suffix, such as Peek.w, and then work on that type. An object name, such as Shape, is not a command: it names the kind of object the library manages, for commands like Use and Free (Use Shape 1) and in the compiler options, which set how many such objects a program can have. The page of such a library gives the default of that maximum.

The help text is the text the editor shows when you press HELP on the command, exactly as the library has it. It names the arguments, and square brackets mark optional ones. It comes from the original library: some commands have none, and some texts describe only one of several forms.

The forms. A command can accept several argument lists; the compiler chooses the form by the number of arguments. Each form lists the types the arguments are converted to:

NotationArgument
.b, .w, .lbyte, word or long integer
.q, .fquick (fixed point) or float
$string
anyany type; the library is told which one it got
.Typethe type of the command’s suffix
& in front, as &.lthe address of a variable of that type, written &a.l
array()a whole array, written a()
{ ... }...a group of arguments that can be repeated, as in Print a,b,c

For example, Window lists three forms; the shortest is .w, .w, .w, .w, .w, .l, $, .w, .w: the window number, its position and size, the flags, the title and two colours.

The libraries

LibraryNumberCommandsAbout
2dlib11916Drawing on bitmaps - lines, boxes, circles, ellipses and polygons, flood fill, colour remapping, clipped blits and windows into bitmaps.
animlib944IFF animations - loading Deluxe Paint style ANIM files and playing them frame by frame on bitmaps.
arexxlib9214ARexx - sending commands and scripts to ARexx, receiving commands from ARexx scripts as a host, and their results.
arrayslib654340The memory of arrays and list arrays for Dim and Dim List.
asllib804The system's ASL requesters - files, drawers, fonts and screen modes chosen with the standard requesters of AmigaOS.
audiolib11612Sounds - samples in chip memory, loaded from IFF 8SVX files or made by the program, played on the Amiga's four audio channels.
banklib769Memory banks - blocks of memory as numbered objects, loaded from and saved to files, and plain memory allocation.
bblitlib1466Buffered blits - drawing shapes after saving the background under them, to restore it exactly later.
bitmaplib1606Bitmaps - the drawing surfaces of Blitz Basic, in chip memory, taken from a screen or a shape, or loaded from IFF pictures.
blitlib1508Blitting - drawing shapes into the used bitmap with the blitter, in several modes, and testing for collisions.
blitzcoplib14414Slices - the Blitz mode display made of horizontal bands, each with its own bitmaps, resolution, sprites and colours, and colour splits and custom copper instructions.
blitzkeyslib986The keyboard in Blitz mode - Inkey$ without the system, the state of single keys and the qualifier keys.
blitzoslib11727Blitz OS - pages of boxes (buttons, string boxes, props, lists, views and drag boxes) on a bitmap, worked with joystick, keys and mouse in Blitz mode.
brexxlib13216BREXX macros - recording and playing back mouse and keyboard input on tapes, and simulated mouse moves, clicks and typing.
chipbaselib641000The base address of the Amiga's custom chips, $DFF000, for direct access to the hardware.
cliargslib1064Program arguments - the parameters given in the CLI or on the Workbench, and how the program was started.
clrlib646350Clearing the local variables of a procedure.
collslib10410Collisions - overlapping shapes, sprites and rectangles, and the hardware collision detection of sprites and bitmaps.
crunchlib744Packed data - crunching with the Imploder and unpacking Imploder, Crunch-Mania and PowerPacker data in memory.
datalib645350The start of the program's Data statements, for Read and Restore.
datelib7811Dates and time - the system date as a day number, dates as strings and back, day, month, year and weekday, and the time of day.
debuglib640600The run time part of the Blitz debugger - runtime errors, single steps, breakpoints and the trace of procedures and interrupts.
dhandlerlib10The connection between a program run from the editor and the debugger's user interface.
displaylib14318Blitz mode displays for ECS and AGA - copper lists with bitmaps, sprites and palettes, and line by line colour, scroll and zoom effects.
editlib1863Reading input - a line of text or a number with Edit$ and Edit, and single characters with Inkey$, from the current input channel.
environlib1938The environment of the program - the Workbench screen's size, depth and mode, the processor and the version of the system.
errtraplib640400Error trapping - SetErr ... End SetErr, ClrErr, Ern and ErrFail, the handling of runtime errors in a program.
exitslib650350The End command - leaving the program from anywhere, also from inside procedures and subroutines.
fadelib1575Fading - the colours of the used slice faded in from black to a palette, or out to black, at once or step by step.
ffplib649350The base of mathffp.library, for the floating point numbers of Blitz programs.
fileiolib12418Files - opening, reading and writing files sequentially or as records, with buffered access, positions and lengths.
floatquicklib640800Conversion between quicks and floats.
fontlib1427Text on bitmaps - Print and Edit on a Blitz bitmap with 8 by 8 BlitzFonts, colours and cursor position.
freqlib1521The file requester of Blitz Basic 2 - a window for choosing a file, with a directory list, drives, parent and path.
gadgetslib14030Intuition gadgets - text, string, proportional and shape gadgets in gadget lists, their state, their look, and button groups.
gameiolib1905Joysticks, mouse buttons and CD32 pads - read straight from the hardware, in Amiga and Blitz mode.
gtlib14133GadTools gadgets - buttons, check boxes, cycle and mutual exclude gadgets, list views, sliders, scrollers, string, integer, text and number gadgets in GTList objects.
iffiolib1620Reading IFF files for other libraries - a buffered reader of bytes, words, longs and chunks.
iffmakelib1144Saving IFF files - bitmaps, screens and shapes as ILBM pictures, palettes as colour maps.
ilbmifflib1616IFF ILBM pictures - the size, depth and mode of a picture file, and pictures unpacked from memory into bitmaps.
inputoutputlib1644Input and output channels - where Print writes and Edit$ reads, the shell window by default, and returning to the previous channel.
intlib655200Interrupts - the handlers of SetInt ... End SetInt, ClrInt and VWait, in Amiga and Blitz mode.
intuifontlib1341Fonts for Intuition - loading system fonts of any size for screens, windows and gadgets.
ldivlib647350Division of longs and quicks, for the 68000.
linklistlib12814List arrays - adding, removing, walking and sorting the items of arrays made with Dim List.
lmullib648350Multiplication of longs and quicks, for the 68000.
mathtranslib19213The transcendental functions for floats - square root, trigonometric, hyperbolic, exponential and logarithmic - and the power operator.
maxlenlib641350MaxLen - a string variable with a fixed buffer of a given length.
maxslib643350The memory of the Blitz objects - the tables of shapes, windows, screens and the other objects, and copies of strings.
medlib8211MED modules - playing MED and OctaMED music, one step for each call of PlayMed, with the notes and volumes readable for effects.
memacclib1804Memory access - reading and writing bytes, words, longs, numbers and strings at an address, and calling machine code.
memlib655300The memory management of Blitz programs - memory that the program and the string libraries take, freed when the program ends.
menuslib13611Intuition menus - menu lists with titles, items and subitems of text or shapes, shortcuts, check marks, and enabling or disabling them.
modlib640700The MOD operator for every numeric type.
mouselib1088The mouse in Blitz mode - its position and speed, the area it can move in, and a sprite as its pointer.
palettelib15623Palettes and colours - palette objects loaded from IFF files or made in the program, colours of screens and slices, fading, mixing and colour cycling.
polylib1218Fast filled polygons for 3D graphics - on bitmaps, with dithering, and on the copper chunky areas of the display library.
printlib1876Printing values with Print and NPrint, numbers as strings with Str$, and the format of printed numbers.
qblitlib1485Queued blits - drawing shapes and remembering where, to clear or restore those areas again later, as in games.
rawkeylib1300Raw key codes and characters - the conversion between them for the keyboard commands of other libraries.
rundebuglib640500Runtime errors of executables - the minimal error handling of executables created with runtime error checking on, without the debugger.
runerrlib655000Runtime error checks - array bounds, object numbers, stack, loops and number conversions of programs compiled with runtime error checking.
screenslib15815Intuition screens - opening and closing them, using the Workbench or another screen, showing bitmaps, and the mouse on a screen.
scrolllib1005Pixels and areas of bitmaps - plotting and reading pixels, clearing a bitmap and copying areas with the blitter.
seriallib9012The serial port - opening a serial device, reading and writing bytes, strings and memory, and its settings.
shapeslib15413Shapes - graphics in chip memory for blitting, loaded from IFF pictures, cut from a bitmap, or saved and loaded as shapes files.
shapetrixlib1184Changing shapes - scaling, rotating and mirroring shape objects.
sortlib1103Sorting arrays - the elements of an array of numbers or strings sorted in ascending or descending order.
speaklib885Speech - the Amiga's synthetic voice through the narrator device, from text or from phonemes.
spriteslib1128Hardware sprites - sprite objects made from shapes, shown on the channels of a slice, their priority against the playfields, and sprite files.
staticslib653350The memory of NewType variables, global and local.
stencillib1223Stencils - one plane masks of the foreground graphics of a bitmap, for shapes that move behind them.
strcomplib644350String comparison - the operators = <> < <= > >= on strings, and Select and Case with strings.
stringfunclib18527The string functions - parts of strings, searching and replacing, case, padding, and numbers as characters or bytes.
strings1lib652350The string work buffer - where string expressions are built, and copying strings into it.
strings2lib651350String assignment - storing a string in a global, local or shared string variable.
switchlib655100The modes of a program - BLITZ, AMIGA and QAMIGA, switching between the running system and direct use of the hardware.
trackerlib963Tracker modules - playing Sound- and NoiseTracker music in the background, from the vertical blank interrupt.
utillib1944Message ports and signals - creating and deleting message ports, waiting for signals, and the names of tasks.
vallib12016Numbers - the value of a string, integer and fractional parts, sign and absolute value, random numbers, limits for quick values, and a few facts about the display.
varslib655340The memory of the global variables of a program.
wbstartuplib655330The start of a program from the CLI or the Workbench, and the list of its parameters.
windowslib13869Intuition windows - opening and closing them, their events, text input and output in a window, and drawing into it.