Z88 Developers’ Notes
These are the Z88 Developers’ Notes, imported from the Cambridge Z88 wiki : how to write applications for the Z88 and its OZ operating system, its system calls, and its hardware. The pages follow the original notes’ structure.
Welcome to the Z88 Developers’ Notes.

The original text were published by Cambridge Computer in 1988, which could be bought separately or as part of a commercial Z88 application development kit. Matthew Soar has since then published them here: http://www.cix.co.uk/~ponda/Z88dev093.htm .
Cambridge Computer Team, 1988-1989
Editor:
Matthew Soar
Authors:
John Harrison
****Matthew Elton
Consultants:
Trinity Concepts Ltd, Jim Westwood & Graham French
The Z88 Project Development team picked up the text from V2 and continued to improve it, according to new developments in OZ.
Z88 Development Project Team since 1995
Authors:
Gunther Strube, Thierry Peycru & Dennis Gröning
Consultants:
Vic Gerhardi , Jorma Oksanen
6th June 2017: V5.0 edition ongoing.
25th October 2015: Final authoring of V4.6 edition ongoing.
9th July 2015: Progress of final authoring of V4.5 edition ongoing. First works have been added for OZ V4.6 API.
8th June 2014: Updated API for OZ V4.5
26th May 2012: 98% of the notes are now imported and improved with better text-layout. A few chapters have yet to be imported and links to System Call API’s are currently being applied everywhere in the text.
Contents
- Release Notes
- Introduction
- Z88 Overview
- Application writing
- Interfacing with the system
- Application Static Structures
- Error handling and related issues
- Organization of memory
- Memory Management
- Output and the screen driver
- File Input - Output
- Input and the keyboard decoder
- Shell environment and ELF
- Filters
- Time and date management
- Integer arithmetic
- Standard Input - Output and the CLI
- The Printer filter
- The floating point package
- Handling Alarms
- Linked lists
- The Serial Interface
- The Wildcard Handler
- DOR’s
- The Map Area
- Installation and removal of RAM Applications
- Miscellaneous useful routines
- Miscellaneous useful information
- BBC BASIC and the in-line assembler
- Manipulating the Blink Registers
- The Z88 Motherboard Hardware and periphial cards
- Glossary
- System Calls Reference
- DC_Alt, Pass an alternative character
- DC_Bye, Exit current process
- DC_Dbg, Enter debugger
- DC_Dis, Disassemble
- DC_Elf, Executable and Linkable Format (ELF) Interface
- DC_Ent, Enter process
- DC_Gen, Screen driver SOH call
- DC_Icl, Invoke new CLI
- DC_In, Read from CLI
- DC_Ini, initialize the Director
- DC_Nam, Name current application
- DC_Nq, Handle Director/CLI enquiries
- DC_Out, Write to CLI
- DC_Pol, Poll for application or card usage
- DC_Prt, Print to CLI
- DC_Rbd, rebind streams
- DC_Rbp, Remove Breakpoint
- DC_Rte, Return from ELF
- DC_Sbp, Set break point
- DC_Sp, Handle Director/CLI settings
- DC_Upd, Update Operating System
- DC_Xin, Examine CLI input
- OS_Alm, Alarm manipulation
- OS_Axm, Allocate explicit memory
- OS_Axp, Allocate explicit page
- OS_Bde, Copy bytes to extended address
- OS_Bhl, Copy bytes from extended address
- OS_Bix, Bind in extended address for availability
- OS_Blp, Make a bleep
- OS_Bout, Write string at (B)HL to standard output
- OS_Box, Restore bindings after OS_Bix
- OS_Bye, Exit application
- OS_Cl, Internal close
- OS_Cli, CLI interface
- OS_Del, File delete
- OS_Dly, Delay a given period
- OS_Dom, Open director memory
- OS_Dor, The DOR interface
- OS_Ent, Enter an application
- OS_Epr, File Eprom Interface
- EP_SAVE ($00) - blow RAM file to Eprom in slot 3
- EP_LOAD ($03) - read file from Eprom in slot 3 into RAM file
- EP_REQ ($06) - Check for “oz” File Eprom or File Area in slot C
- EP_Fetch ($09) - Copy saved/deleted file from File Area to RAM
- EP_Find ($0C) - Find active File(name) in File Area in slot C
- EP_DIR ($0F) - Fetch filename from Eprom in slot 3
- EP_First ($12) - Return first file entry in File Area in slot C
- EP_Prev ($15) - Return previous file entry in File Area
- EP_Next ($18) - Return next file entry in File Area
- EP_Last ($1B) - Return last file entry in File Area in slot C
- EP_TotSp ($1E) - Return amount of used file space in slot C
- EP_ActSp ($21) - Return active file space in slot C
- EP_FreSp ($24) - Return free file space in slot C
- EP_Count ($27) - Return number of files in File Area slot C
- EP_Stat ($2A) - Return file entry status (active or deleted)
- EP_Size ($2D) - Return file size of File Entry
- EP_Name ($30) - Copy File entry name to buffer at (CDE)
- EP_Image ($33) - Return pointer to start of file contents
- EP_SvFl ($39) - Save RAM file to Flash or UV Eprom to slot C
- EP_New ($36) - Return pointer to future new entry in File Area
- EP_Delete ($3C) - Mark File Entry as deleted on Flash or UV Eprom
- EP_Format ($3f) - Create File Area in slot C, on UV Eprom or Flash Card
- EP_NewFile ($42) - Write RAM file to File Card in slot C
- EP_WrBlk ($45), Write a block of bytes to UV Eprom in slot 3
- EP_Fptr ($48), Get file pointer via offset into file entry image
- EP_Empty ($4b) - Poll for empty file area in slot number C
- EP_SvAs ($4e) - Stream opened RAM file to Flash or UV Eprom to slot C
- OS_Erc, Get error context
- OS_Erh, Set error handler
- OS_Esc, Examine special condition
- OS_Exit, Quit process (application)
- OS_Fc, Select fast code (fast bank switching)
- OS_Fdp, File duplicate (sector-level)
- OS_Fep, Flash Card Interface
- FEP_CDID ($00), Identify Flash Memory Chip in slot C
- FEP_CDDT ($03), Get Flash Card Data
- FEP_SCER ($06), Erase sector in Flash Memory
- FEP_CDER ($09), Erase entire Flash Memory
- FEP_FFMT ($0C), Flash Memory File Area Formatting
- FEP_WRBT ($0F), Write byte to the Flash Memory
- FEP_WRBL ($12), Write a block of bytes to Flash Memory
- FEP_CPFL ($15), Copy file entry between two File Areas
- FEP_RDFA ($18), Reduce an existing “oz” File Area
- OS_Fma, Find Memory for Allocation
- OS_Fn, Handle functions
- OS_Frm, File read miscellaneous
- OS_Fth, Free tri-handle
- OS_Fwm, File write miscellaneous
- OS_Fxm, Free explicit memory
- OS_Gb, Get byte from file (or device)
- OS_Gbt, Get byte from file (or device) with timeout
- OS_Gth, Allocate tri-handle
- OS_Hout, write a hexadecimal byte to standard output
- OS_Ht, Hardware time manipulation
- OS_In, Read (wait for) character from standard input
- OS_Iso, key to ISO conversion
- OS_Isq, Initialize prefix sequence
- OS_Kin, Keyboard input
- OS_Mal, Allocate memory
- OS_Map, PipeDream map control
- OS_Mcl, Close memory (free memory pool)
- OS_Mfr, Free (previously allocated block) memory
- OS_Mgb, Get current bank binding in segment
- OS_Mop, Open memory (allocate memory pool)
- OS_Mpb, Set new bank binding in segment
- OS_Mv, Move bytes between stream and memory
- OS_Nln, send new line (CR/LF) to standard output
- OS_Nq, Enquire
- OS_Off, Switch machine off
- OS_Op, Internal open
- OS_Out, Write character to standard output
- OS_Pb, Write byte to file / device
- OS_Pbt, Write byte to file / device with timeout
- OS_Ploz, Poll for running OZ
- OS_Poll, Poll for an application
- OS_Pout, Write embedded string at (PC) to standard output.
- OS_Prt, Send character directly to printer filter
- OS_Pur, Purge keyboard buffer
- OS_Ren, File rename
- OS_Sci, Alter screen information
- OS_Si, Low level serial interface
- OS_Sp, Specify
- OS_Sout, Write local string to standard output
- OS_Sr, Save & restore operations
- OS_Stk, Stack file current process
- OS_Tin, Read character from standard input, with timeout
- OS_Uash, Update application static handle in stacked process environment
- OS_Use, Fetch information about process card usage
- OS_Ust, Update small timer
- OS_Vth, Verify tri-handle
- OS_Wait, Wait for event
- OS_Wrt, Write token
- OS_Wsq, Write to prefix sequence
- OS_Wtb, Write token base
- OS_Wts, Write tokenized string
- OS_Xin, Examine input
- OZ_Mgb, Get memory binding
- OZ_Mpb, Set new bank binding in segment
- GN_Aab, Allocate alarm block
- GN_Alp, Process an expired alarm
- GN_Cl, Close file
- GN_Cls, Classify character
- GN_Cpy, Copy a file
- GN_Cme, Compare null-terminated strings
- GN_Crc, Get CRC-32 of ressource
- GN_D16, 16bit unsigned division
- GN_D24, 24bit unsigned division
- GN_Dei, Convert zoned, external format date to internal format
- GN_Del, Delete a file from memory
- GN_Die, Convert internal format date to zoned format
- GN_Dir, Create a directory path
- GN_Elf, Enter ELF program
- GN_Err, Display an interactive error box
- GN_Esa, Read & write to filename segments
- GN_Esp, Return an extended pointer to a system error message
- GN_Fab, Free alarm block
- GN_Fcm, Compress a filename
- GN_Fex, Expand a filename
- GN_Flc, Close filter
- GN_Flf, Flush filter
- GN_Flo, Open a filter
- GN_Flr, Read character from filter
- GN_Flw, Write character to filter
- GN_Fpb, Push back a character into filter
- GN_Gab, Get first alarm block
- GN_Gdn, Convert an ASCII string to a binary integer number
- GN_Gdt, Convert an ASCII string to an internal binary date
- GN_Ghn, Convert hexadecimal string to 32 bits integer
- GN_Gmd, Get (read) the current machine system date in internal format
- GN_Gmt, Get (read) machine system time in internal format
- GN_Gtm, Convert an ASCII string to a time in internal format
- GN_Lab, Link an alarm block into the alarm chain
- GN_Ldm, Localized Date Manipulation
- GN_Lut, Lookup table facility
- GN_M16, 16bit unsigned multiplication
- GN_M24, 24bit unsigned multiplication
- GN_Mov, Move a file
- GN_Msc, Miscellaeneous time operations
- GN_Nln, Send newline (CR/LF) to standard output
- GN_Opf, Open file/resource (wildcard search)
- GN_Opw, Open wildcard handler
- GN_Pdn, Write binary integer number as decimal ASCII string
- GN_Pdt, Convert an internal date to an ASCII string
- GN_Pfs, Parse correctness of filename segment
- GN_Phn, Convert 32 bits integer to hexadecimal ascii string
- GN_Pmd, Put (set) the current machine date
- GN_Pmt, Put (set) machine time
- GN_Prs, Parse filename
- GN_Ptm, Convert (and display) internal time to an ASCII string
- GN_Rbe, Read byte at extended address
- GN_Ren, Rename file
- GN_Sdo, send date and time to standard output
- GN_Sip, System input line routine
- GN_Skc, Skip character
- GN_Skd, Skip delimiters in byte sequense
- GN_Skt, Skip to value
- GN_Soe, Write string at extended address to standard output
- GN_Sop, Write local string to standard output
- GN_Uab, Unlink an alarm block from the alarm chain
- GN_Wbe, Write byte at extended address
- GN_Wcl, Close wildcard handle
- GN_Wfn, Fetch next match for wildcard string
- GN_Win, Standard window create with banner and bottom line
- GN_Wsm, Match filename segment to wildcard string
- GN_Xdl, Delete an entry from a linked list
- GN_Xin, Insert an entry into a linked list
- GN_Xnx, Index next entry in linked list
- The floating point package reference
- The Zilog Z80 CPU Instruction Set
- General Purpose Arithmetic And Cpu Control Groups
- 8-Bit Load Group
- 16-Bit Load Group
- Exchange, Block Transfer And Search Group
- 8-Bit Arithmetic And Logical Group
- 16-Bit Arithmetic Group
- Rotate And Shift Group
- Bit Manipulation Group
- Jump Group
- Call and Return Group
- Input and Output Group
- The Zilog Z80 Undocumented instructions
- Eprom File Area
- The screen files
- Internationalization
- OZ internals
- FPGA project