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:
| Notation | Argument |
|---|---|
.b, .w, .l | byte, word or long integer |
.q, .f | quick (fixed point) or float |
$ | string |
any | any type; the library is told which one it got |
.Type | the type of the command’s suffix |
& in front, as &.l | the 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
| Library | Number | Commands | About |
|---|---|---|---|
| 2dlib | 119 | 16 | Drawing on bitmaps - lines, boxes, circles, ellipses and polygons, flood fill, colour remapping, clipped blits and windows into bitmaps. |
| animlib | 94 | 4 | IFF animations - loading Deluxe Paint style ANIM files and playing them frame by frame on bitmaps. |
| arexxlib | 92 | 14 | ARexx - sending commands and scripts to ARexx, receiving commands from ARexx scripts as a host, and their results. |
| arrayslib | 65434 | 0 | The memory of arrays and list arrays for Dim and Dim List. |
| asllib | 80 | 4 | The system's ASL requesters - files, drawers, fonts and screen modes chosen with the standard requesters of AmigaOS. |
| audiolib | 116 | 12 | Sounds - samples in chip memory, loaded from IFF 8SVX files or made by the program, played on the Amiga's four audio channels. |
| banklib | 76 | 9 | Memory banks - blocks of memory as numbered objects, loaded from and saved to files, and plain memory allocation. |
| bblitlib | 146 | 6 | Buffered blits - drawing shapes after saving the background under them, to restore it exactly later. |
| bitmaplib | 160 | 6 | Bitmaps - the drawing surfaces of Blitz Basic, in chip memory, taken from a screen or a shape, or loaded from IFF pictures. |
| blitlib | 150 | 8 | Blitting - drawing shapes into the used bitmap with the blitter, in several modes, and testing for collisions. |
| blitzcoplib | 144 | 14 | Slices - the Blitz mode display made of horizontal bands, each with its own bitmaps, resolution, sprites and colours, and colour splits and custom copper instructions. |
| blitzkeyslib | 98 | 6 | The keyboard in Blitz mode - Inkey$ without the system, the state of single keys and the qualifier keys. |
| blitzoslib | 117 | 27 | Blitz 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. |
| brexxlib | 132 | 16 | BREXX macros - recording and playing back mouse and keyboard input on tapes, and simulated mouse moves, clicks and typing. |
| chipbaselib | 64100 | 0 | The base address of the Amiga's custom chips, $DFF000, for direct access to the hardware. |
| cliargslib | 106 | 4 | Program arguments - the parameters given in the CLI or on the Workbench, and how the program was started. |
| clrlib | 64635 | 0 | Clearing the local variables of a procedure. |
| collslib | 104 | 10 | Collisions - overlapping shapes, sprites and rectangles, and the hardware collision detection of sprites and bitmaps. |
| crunchlib | 74 | 4 | Packed data - crunching with the Imploder and unpacking Imploder, Crunch-Mania and PowerPacker data in memory. |
| datalib | 64535 | 0 | The start of the program's Data statements, for Read and Restore. |
| datelib | 78 | 11 | Dates and time - the system date as a day number, dates as strings and back, day, month, year and weekday, and the time of day. |
| debuglib | 64060 | 0 | The run time part of the Blitz debugger - runtime errors, single steps, breakpoints and the trace of procedures and interrupts. |
| dhandlerlib | 1 | 0 | The connection between a program run from the editor and the debugger's user interface. |
| displaylib | 143 | 18 | Blitz mode displays for ECS and AGA - copper lists with bitmaps, sprites and palettes, and line by line colour, scroll and zoom effects. |
| editlib | 186 | 3 | Reading input - a line of text or a number with Edit$ and Edit, and single characters with Inkey$, from the current input channel. |
| environlib | 193 | 8 | The environment of the program - the Workbench screen's size, depth and mode, the processor and the version of the system. |
| errtraplib | 64040 | 0 | Error trapping - SetErr ... End SetErr, ClrErr, Ern and ErrFail, the handling of runtime errors in a program. |
| exitslib | 65035 | 0 | The End command - leaving the program from anywhere, also from inside procedures and subroutines. |
| fadelib | 157 | 5 | Fading - the colours of the used slice faded in from black to a palette, or out to black, at once or step by step. |
| ffplib | 64935 | 0 | The base of mathffp.library, for the floating point numbers of Blitz programs. |
| fileiolib | 124 | 18 | Files - opening, reading and writing files sequentially or as records, with buffered access, positions and lengths. |
| floatquicklib | 64080 | 0 | Conversion between quicks and floats. |
| fontlib | 142 | 7 | Text on bitmaps - Print and Edit on a Blitz bitmap with 8 by 8 BlitzFonts, colours and cursor position. |
| freqlib | 152 | 1 | The file requester of Blitz Basic 2 - a window for choosing a file, with a directory list, drives, parent and path. |
| gadgetslib | 140 | 30 | Intuition gadgets - text, string, proportional and shape gadgets in gadget lists, their state, their look, and button groups. |
| gameiolib | 190 | 5 | Joysticks, mouse buttons and CD32 pads - read straight from the hardware, in Amiga and Blitz mode. |
| gtlib | 141 | 33 | GadTools gadgets - buttons, check boxes, cycle and mutual exclude gadgets, list views, sliders, scrollers, string, integer, text and number gadgets in GTList objects. |
| iffiolib | 162 | 0 | Reading IFF files for other libraries - a buffered reader of bytes, words, longs and chunks. |
| iffmakelib | 114 | 4 | Saving IFF files - bitmaps, screens and shapes as ILBM pictures, palettes as colour maps. |
| ilbmifflib | 161 | 6 | IFF ILBM pictures - the size, depth and mode of a picture file, and pictures unpacked from memory into bitmaps. |
| inputoutputlib | 164 | 4 | Input and output channels - where Print writes and Edit$ reads, the shell window by default, and returning to the previous channel. |
| intlib | 65520 | 0 | Interrupts - the handlers of SetInt ... End SetInt, ClrInt and VWait, in Amiga and Blitz mode. |
| intuifontlib | 134 | 1 | Fonts for Intuition - loading system fonts of any size for screens, windows and gadgets. |
| ldivlib | 64735 | 0 | Division of longs and quicks, for the 68000. |
| linklistlib | 128 | 14 | List arrays - adding, removing, walking and sorting the items of arrays made with Dim List. |
| lmullib | 64835 | 0 | Multiplication of longs and quicks, for the 68000. |
| mathtranslib | 192 | 13 | The transcendental functions for floats - square root, trigonometric, hyperbolic, exponential and logarithmic - and the power operator. |
| maxlenlib | 64135 | 0 | MaxLen - a string variable with a fixed buffer of a given length. |
| maxslib | 64335 | 0 | The memory of the Blitz objects - the tables of shapes, windows, screens and the other objects, and copies of strings. |
| medlib | 82 | 11 | MED modules - playing MED and OctaMED music, one step for each call of PlayMed, with the notes and volumes readable for effects. |
| memacclib | 180 | 4 | Memory access - reading and writing bytes, words, longs, numbers and strings at an address, and calling machine code. |
| memlib | 65530 | 0 | The memory management of Blitz programs - memory that the program and the string libraries take, freed when the program ends. |
| menuslib | 136 | 11 | Intuition menus - menu lists with titles, items and subitems of text or shapes, shortcuts, check marks, and enabling or disabling them. |
| modlib | 64070 | 0 | The MOD operator for every numeric type. |
| mouselib | 108 | 8 | The mouse in Blitz mode - its position and speed, the area it can move in, and a sprite as its pointer. |
| palettelib | 156 | 23 | Palettes and colours - palette objects loaded from IFF files or made in the program, colours of screens and slices, fading, mixing and colour cycling. |
| polylib | 121 | 8 | Fast filled polygons for 3D graphics - on bitmaps, with dithering, and on the copper chunky areas of the display library. |
| printlib | 187 | 6 | Printing values with Print and NPrint, numbers as strings with Str$, and the format of printed numbers. |
| qblitlib | 148 | 5 | Queued blits - drawing shapes and remembering where, to clear or restore those areas again later, as in games. |
| rawkeylib | 130 | 0 | Raw key codes and characters - the conversion between them for the keyboard commands of other libraries. |
| rundebuglib | 64050 | 0 | Runtime errors of executables - the minimal error handling of executables created with runtime error checking on, without the debugger. |
| runerrlib | 65500 | 0 | Runtime error checks - array bounds, object numbers, stack, loops and number conversions of programs compiled with runtime error checking. |
| screenslib | 158 | 15 | Intuition screens - opening and closing them, using the Workbench or another screen, showing bitmaps, and the mouse on a screen. |
| scrolllib | 100 | 5 | Pixels and areas of bitmaps - plotting and reading pixels, clearing a bitmap and copying areas with the blitter. |
| seriallib | 90 | 12 | The serial port - opening a serial device, reading and writing bytes, strings and memory, and its settings. |
| shapeslib | 154 | 13 | Shapes - graphics in chip memory for blitting, loaded from IFF pictures, cut from a bitmap, or saved and loaded as shapes files. |
| shapetrixlib | 118 | 4 | Changing shapes - scaling, rotating and mirroring shape objects. |
| sortlib | 110 | 3 | Sorting arrays - the elements of an array of numbers or strings sorted in ascending or descending order. |
| speaklib | 88 | 5 | Speech - the Amiga's synthetic voice through the narrator device, from text or from phonemes. |
| spriteslib | 112 | 8 | Hardware sprites - sprite objects made from shapes, shown on the channels of a slice, their priority against the playfields, and sprite files. |
| staticslib | 65335 | 0 | The memory of NewType variables, global and local. |
| stencillib | 122 | 3 | Stencils - one plane masks of the foreground graphics of a bitmap, for shapes that move behind them. |
| strcomplib | 64435 | 0 | String comparison - the operators = <> < <= > >= on strings, and Select and Case with strings. |
| stringfunclib | 185 | 27 | The string functions - parts of strings, searching and replacing, case, padding, and numbers as characters or bytes. |
| strings1lib | 65235 | 0 | The string work buffer - where string expressions are built, and copying strings into it. |
| strings2lib | 65135 | 0 | String assignment - storing a string in a global, local or shared string variable. |
| switchlib | 65510 | 0 | The modes of a program - BLITZ, AMIGA and QAMIGA, switching between the running system and direct use of the hardware. |
| trackerlib | 96 | 3 | Tracker modules - playing Sound- and NoiseTracker music in the background, from the vertical blank interrupt. |
| utillib | 194 | 4 | Message ports and signals - creating and deleting message ports, waiting for signals, and the names of tasks. |
| vallib | 120 | 16 | Numbers - 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. |
| varslib | 65534 | 0 | The memory of the global variables of a program. |
| wbstartuplib | 65533 | 0 | The start of a program from the CLI or the Workbench, and the list of its parameters. |
| windowslib | 138 | 69 | Intuition windows - opening and closing them, their events, text input and output in a window, and drawing into it. |