Skip to Content
Amiga Assembly Library v41.21 — Motorola 68020 shared library for Commodore Amiga
DocumentationIntroduction

Amiga Assembly Library

A shared library for Commodore Amiga written in Motorola 68020 assembly language. Version 41.21 — Public Domain Software. Compatible with KickStart 3.0 and above.

This library can be used from both Assembly and C programs. It provides a wide range of utility functions organized into modules, from memory management to custom UI widgets.

Download Assembly Library v41.21 (ZIP) | Getting Started | View on GitHub 

Modules Overview

The Assembly Library is organized into 8 modules, each providing specialized functionality:

Exec

Memory and list management utilities.

  • AllocNewList — Allocate and initialize a new Exec list
  • AllocNode — Allocate and add a node to a list
  • FreeList / FreeNode — Free lists and nodes
  • FreeListName / FreeNodeName — Free named lists and nodes
  • ReAllocVec — Reallocate a memory vector
  • RevertMem — Reverse a memory region (byte, word, or longword)

DOS

File and volume operations.

  • Load / Save — Load and save files to/from memory buffers
  • FileInfo — Retrieve a FileInfoBlock for a given file
  • CheckFile — Validate a file and return error information
  • CheckSum — Compute a checksum on a buffer
  • LineInput — Read a single line from a file handle
  • UnitInfo — Get InfoData for a volume (free space, disk type, etc.)

Graphics

Graphics primitives and bitmap management.

  • AllocRastPort / CloneRastPort — Allocate or duplicate a RastPort
  • NewAllocRaster — Allocate raster memory
  • AddBitPlanes / RemoveBitPlanes — Manage bitplanes in a BitMap
  • DrawBox — Draw a filled or outlined box
  • DrawFrameState — Draw a framed state element (raised, recessed, etc.)
  • EraseInternalRect — Erase the interior of a window
  • TextFmtRastPort — Formatted text rendering into a RastPort

Libraries

String processing, IFF support, and generic utilities.

  • ChangeChar — Replace occurrences of a character in a string
  • FilterChars — Filter characters from a string by range
  • StringToUpper / StringToLower — Case conversion (locale-aware)
  • ReAllocVec — Reallocate memory vectors
  • FindAIFFChunk / NextIFFChunk / TestAIFFChunk — AIFF/IFF chunk parsing
  • UnPackerILBMBODY / UnPackerILBMCMAP — ILBM image unpacking

Math

Number format conversion routines.

  • Dec2Val / Hex2Val / Bin2Val — Convert decimal, hexadecimal, or binary strings to numeric values
  • ConvDec / ConvDecZ — Convert a value to a decimal string (with optional zero-padding)
  • ConvHex — Convert a value to a hexadecimal string
  • ConvBin — Convert a value to a binary string

Intuition & GadTools

High-level UI gadgets and requesters built on top of Intuition and GadTools.

  • AllocAsmRequest / FreeAsmRequest — Allocate and free custom requesters
  • AsmRequest — Display a formatted requester dialog
  • ChangeAsmReqAttrs — Modify requester attributes
  • FindAsmGadget — Find a gadget by name
  • SetAsmGadgetAttrs / GetAsmGadgetAttr — Set and get gadget attributes
  • InterfaceInfo — Retrieve information about an interface

REI Interface

A custom windowing and interface management system. REI (Runtime Environment Interface) provides a structured way to manage windows, gadgets, and menus.

  • OpenREI / CloseREI — Open and close REI windows
  • OpenInterface / CloseInterface — Load and release interface definitions
  • ActiveREI / FindREI — Find the active REI or locate one by name
  • LockREI / UnlockREI — Lock and unlock REI structures
  • WaitREIMsg — Wait for messages from a REI window
  • RefreshREI — Refresh a REI window
  • SetREIAttrs / GetREIAttrs — Set and get REI attributes
  • AS_MenuAddress — Get the address of a menu item

C Interface

How to call the Assembly Library from C programs using SAS/C or compatible compilers. Includes the HookEntry glue function for callback support.

Key Features

  • Pure 68020 assembly — Hand-optimized for the Motorola 68020 processor
  • Shared library architecture — Standard Amiga shared library (placed in LIBS:)
  • Auto-opens sub-libraries — When you open assembly.library, it automatically opens and caches pointers to graphics.library, intuition.library, dos.library, asl.library, gadtools.library, icon.library, workbench.library, datatypes.library, locale.library, lowlevel.library, and realtime.library
  • Public Domain — No copyright restrictions; free to use, modify, and distribute
  • Dual-language support — Callable from both 68k assembly and C
  • KickStart 3.0+ compatible — Takes advantage of AmigaOS 3.0 features including locale support, datatypes, and GadTools
  • REI windowing system — A high-level interface abstraction for building Amiga applications
Last updated on