chibiakumas.com


Psion Series 3a

The Psion Series 3 and 3a were clamshell handheld organizers from the early 1990s. With their black and white screens, Qwerty keyboards and convenient size, they could run for many hours on a pair of AA batteries and were some of the finest 'portable computers' ever released (In my opinion!)

Although they resembled the later ARM handheld pc's, the PSIONs actually ran on 100% 8086 compatible processors, In fact, there is an official DOS based simulator for development!

Here is a comparison between the original Series 3, and the improved 3a, it's the 3a we'll be focusing on in these tutorials!


Series 3 Series 3a
Cpu NEC V30H 3.84mhz NEC V30H 7.68mhz
Display 240x80 2 color (Black,White) 480x160 3 color (Black,White,Grey)
Ram 128k / 256k 256k / 512k / 1mb /2mb
Sound Piezo buzzer Speaker / Microphone

Resources

Psion SDK and Manuals - Get these! You'll need them!
Psionics Files - Some unofficial documents which really help with ASM coding!
My WServer.txt - WSERVER in the Psionics Files had some omissions to the correct registers to use with some system calls, which I've attempted to fill by disassembling samples compiled with the C++ SDK



IMG Header

IMG files are similar to EXE files, but not the same!

We can 'Chop up' and EXE and use it to build a valid IMG, or create one from scratch

Offset 
Bytes 
Sample Meaning
0 16 'ImageFileType**',0 
Fixed string
16 2 0x200F Image Format Version
18 2 0x0040 Offset in the file to the program code
20 2 0x???? Size of the Program Code
22 2 0x0040 Exec address
24 2 0x0100 Stack Size (in blocks of 16 bytes)
26 2 0x???? Static Data Size (in blocks of 16 bytes)
28 2 0x0100 Heap Size (in blocks of 16 bytes)
30 2 0x???? Static Data Size (in bytes)
32 2 0x???? Checksum of the Program Code
34 2 0x???? Checksum of the Static Data
36 2 0x200C Program Version Number
38 2 0x0080 Program Priority (usually 128)
40 2 0x0000 Offset in the file to included file 1
42 2 0x0000 Length of included file 1
44 2 0x0000 Offset in the file to included file 2
46 2 0x0000 Length of included file 2
48 2 0x0000 Offset in the file to included file 3
50 2 0x0000 Length of included file 3
52 2 0x0000 Offset in the file to included file 4
54 2 0x0000 Length of included file 4
56 2 0x0000 Number of DLYs within the file (Relocations)
48 4 0x00000000 Offset within the file to the DYL table
62 2 0x0000 Unused


Interrupts with no subfunction

INT # Name Description
$8F GenDataSegment This call is only useful in assembler code; it sets ES to point to the start of the kernel data space (accessible in OPL using GenGetOsData).
$90 ProcPanic Panic the current process; this call never returns.
$91 ProcCopyFromById Copy a number of bytes from the indicated process to the current process.
$92 ProcCopyToById Copies a number of bytes from the current process to the indicated process.
$93 CharIsDigit
$94 CharIsHexDigit
$95 CharIsPrintable
$96 CharIsAlphabetic
$97 CharIsAlphaNumeric
$98 CharIsUpperCase
$99 CharIsLowerCase
$9A CharIsSpace
$9B CharIsPunctuation
$9C CharIsGraphic
$9D CharIsControl Tests to see whether the character has the indicated property. These functions are language dependent.
$9E CharToUpperChar
$9F CharToLowerChar
$A0 CharToFoldedChar Converts two characters to uppercase, lowercase, or folded (uppercase with no accents). These functions are language dependent.
$A1 BufferCopy Copies a number of bytes from one buffer to another. The case of the buffers overlapping is handled correctly.
$A2 BufferSwap Swaps the contents of two buffers. The case of the buffers overlapping is handled correctly.
$A3 BufferCompare
$A4 BufferCompareFolded The contents of the two buffers are compared byte-for-byte, using unsigned comparisons, and the result flags set accordingly.
$A5 BufferMatch
$A6 BufferMatchFolded The buffer is examined to determine whether it matches the pattern (using the usual wildcards); the call fails if it does not.
$A7 BufferLocate
$A8 BufferLocateFolded The buffer is searched to determine if the character occurs within it; the call fails if it does not.
$A9 BufferSubBuffer
$AA BufferSubBufferFolded Buffer 1 is searched to determine if buffer 2 occurs within it; the call fails if it does not.
$AB BufferJustify Buffer 1 is copied into buffer 2, and the remaining space filled with the fill character according to the control code
$AC StringCopy
$AD StringCopyFolded The cstr is copied into the buffer. StringCopyFolded passes each character through CharToFoldedChar during the copy.
$AE StringConvertToFolded Each character of the cstr is passed through CharToFoldedChar.
$AF StringCompare
$B0 StringCompareFolded The contents of the two cstrs are compared byte-for-byte, using unsigned comparisons, and the result flags set accordingly.
$B1 StringMatch
$B2 StringMatchFolded The cstr is searched to determine if the pattern occurs within it (using the usual wildcards); the call fails if it does not.
$B3 StringLocate
$B4 StringLocateFolded
$B5 StringLocateInReverse
$B6 StringLocateInReverseFolded The cstr is searched to determine if the character occurs within it; the call fails if it does not.
$B7 StringSubString
$B8 StringSubStringFolded Cstr 1 is searched to determine if cstr 2 occurs within it; the call fails if it does not.
$B9 StringLength Returns the length of a cstr, excluding the terminating zero byte.
$BA StringValidateName The cstr is checked to see if it a valid name, and the call fails if it is not.
$BB LongIntCompare Compares P and Q (both signed longs) and sets the result flags accordingly.
$BC LongIntMultiply Multiples P and Q (both signed longs); the call fails if the result cannot be represented as a signed long.
$BD LongIntDivide Divides P by Q (both signed longs); the call fails if Q is zero. The remainder will have the same sign as P.
$BE LongUnsignedIntCompare Compares P and Q (both unsigned longs) and sets the result flags accordingly.
$BF LongUnsignedIntMultiply Multiples P and Q (both unsigned longs); the call fails if the result cannot be represented as a unsigned long.
$C0 LongUnsignedIntDivide Divides P by Q (both unsigned longs); the call fails if Q is zero.
$C1 FloatAdd Calculates the specified one of P+Q, P-Q, P*Q, or P/Q, and places the result in P. Both P and Q are reals.
$C2 FloatSubtract Calculates the specified one of P+Q, P-Q, P*Q, or P/Q, and places the result in P. Both P and Q are reals.
$C3 FloatMultiply Calculates the specified one of P+Q, P-Q, P*Q, or P/Q, and places the result in P. Both P and Q are reals.
$C4 FloatDivide Calculates the specified one of P+Q, P-Q, P*Q, or P/Q, and places the result in P. Both P and Q are reals.
$C5 FloatCompare Compares two reals and sets the result flags appropriately.
$C6 FloatNegate Negates a real in-situ.
$C7 FloatToInt
$C8 FloatToUnsignedInt Converts a real to a signed or unsigned int; the call fails if the result is out of range. FloatToUnsignedInt ignores the sign of the real.
$C9 FloatToLong
$CA FloatToUnsignedLong Converts a real to a signed or unsigned long; the call fails if the result is out of range.
$CB IntToFloat
$CC UnsignedIntToFloat Converts a signed or unsigned int to a real.
$CD LongToFloat
$CE UnsignedLongToFloat Converts a signed or unsigned long to a real.
$CF LibSend
$D0 LibSendSuper These functions send a message to an object and invoke a method on that object.
$D4 Dummy This function has no effect.
$D5 GenIntByNumber This call is equivalent to the OS keyword; it calls another system call with the arguments and results stored in 12 byte blocks.
$D9 LibEnterSend This is identical to LibSend, except that it also starts a new "entry-exit region". The method description will state when this is needed.
$DA IoKeyAndMouseStatus
$DB StringCapitalise The first character of the cstr is passed through CharToUpperChar, and the remaining characters through CharToLowerChar.
$DC ProcIndStringCopyFromById This copies a cstr from the indicated process to the current process.
$DE IoSerManager

Window Interrupts

INT $8D AH=# Name Description
$00 wEndRedraw Ends redrawing, as started by wBeginRedrawWin or related calls.
$01 wEraseTextCursor Makes the text cursor invisible.
$02 wReleaseMouse Cancels any call to wCaptureMouse.
$03 gFreeTempGC Destroys the temporary graphics context, and makes the remembered current graphics context be current again.
$04 wCancel
$85 wDisconnect
$06 wDetachClient Detaches the client from any process it is attached to (see wAttachToClient) and moves it to the back.
$07 wCleanUp Returns the window server to a standard state. This frees any temporary graphics context, ends any redraws taking place
$08 wAttachToForegroundClient Attaches the client to the current foreground client, if different. See wAttachToClient for details.
$09 wUserMsg Instructs the window server to send the client a WM_USER_MSG event when there are no other events to deliver.
$8A wStartCompute Inform the window server that the client is about to start intensive computation, and its priority should be set to 112 (background) even if it is in the foreground.
$8B wEndCompute Cancel the effect of wStartCompute; if the client is in the foreground, sets its priority back to 128 (foreground).
$8C wClientInfo Returns information about a process
$0D wCloseWindowTree Destroys the window and all its descendants.
$8E wInquireWindow The first 10 bytes of the block are set to the flags, position, and size of the specified window.
$0F wCaptureMouse Captures the mouse within the window and its descendants.
$10 wBeginRedrawWin Validate the window for redrawing. Validation causes all pixels to be set or cleared if the background mode is 1 or 2
$11 wFree Destroy an object and free all the related resources.
$12 wMakeInvisible The window is marked as invisible; a window will not appear on the screen if it or any of its ancestors is invisible.
$93 wAttachtoClient Attaches the current process to the specified one.
$14 wInitialiseWindowTree The specified window and its descendants are initialized.
$15 wInvalidateWin Add the entire window to its own update region. This will cause a redraw event
$16 wValidateWin Validate the window - causing all pixels to be set or cleared if the background mode is 1 or 2
$17 wMakeVisible Cancels wMakeInvisible on the window.
$18 wClientIconised Iconises or deiconises the current process. Iconisation only works on large screen systems.
$19 wClientPosition Move the specified process (zero means the current process) to the given position in the window server task list.
$9A wInquireWindowOffset The buffer is filled in with the position of window B relative to window A
$1B wWindowPosition Moves the window to the specified position within the sibling list (the list of windows with the same parent).
$1C wScrollRect The pixels defined by the rectangle are copied to a new rectangle offset by the indicated distance.
$1D wRubberBand Starts rubber banding, with the rubber band limited to the specified window or allowed to roam over the screen.
$1E gCopyRect Copies a rectangular block from one part of a bitmap to another (the current graphics context should refer to a bitmap).
$9F gPeekBit Copies a horizontal row of pixels into the buffer. The point definition block gives the first pixel to be copied
$20 gDrawPolyLine Draws a sequence of lines according to the control block
$21 gFillPattern Fills the specified rectangle with copies of the bitmap.
$22 gCreateTempGC Creates a new temporary graphics context associated with the window or bitmap, and makes it the current GC.
$A3 gCreateGC Creates a new graphics context associated with the window or bitmap, and makes it the current GC.
$24 gSetGC Makes the specified graphics context current, and modifies those properties specified in the selector mask.
$25 wSetWindow Changes various properties of a window.
$26 wBeginRedrawWinGC Validate the window for redrawing (see wBeginRedrawWin) but using a temporary graphics context.
$27 gDrawLine Draws a line between the two locations. If horizontal or vertical, the line includes the end with the lower coordinates.
$28 gPrintText Prints the string at the indicated location.
$29 gCopyBit Copies a rectangular block from a bitmap or a backed-up window (see gSaveBit).
$AA wCreateWindow Creates a new window which is a child of the specified window, and gives it the indicated id and handle
$2B wBeginRedrawGC Validate the window for redrawing (see wBeginRedrawWin) with the update region set to the indicated rectangle
$AC gPrintClipText Prints the string at the indicated location as gPrintText, but only enough characters are printed to fit within the specified number of pixels.
$2D gPrintBoxText Clears the specified rectangle, then prints the string within it using text mode 0 (set pixels).
$AE gOpenBit Loads a specified bitmap from a file.
$AF gOpenMouseIcon Loads a specified mouse icon from a file.
$B0 gOpenFont Opens the specified font file.
$31 gDrawBox Draws a box of the appropriate size.
$B2 wLoadDYL Load a DYL into the window server. The DYL must already have been loaded into memory
$B3 gCreateBit Creates an uninitialized writeable bitmap.
$34 wScrollWin Identical to wScrollRect with the rectangle structure set to (0, 0, width, height).
$35 wDrawTextCursor As wTextCursor, but the properties byte is ignored and treated as zero.
$36 wInvalidateRect Add the rectangle to the update region of the window. This will generate a redraw event if necessary.
$37 wBeginRedraw Validate the window for redrawing (see wBeginRedrawWin) with the update region set to the rectangle.
$38 wValidateRect Validate the indicated rectangle of the window - causing all pixels to be set or cleared if the background mode is 1 or 2
$B9 gSaveBit Writes a bitmap to the named file. A window identifier must be for a window with a background redraw method of 3, in which case its off-screen bitmap is used.
$3A gClrRect Sets, clears, or inverts all pixels in the specified rectangle.
$3B wCallDYL Call a function in a DYL loaded into the window server that has no result.
$BC wCallDYLreply Call a function in a DYL loaded into the window server that has a result.
$BD wSetWinBitmap Attaches an animated sequence of bitmaps to the background of a window.
$3E wChangeWinBitmap Replace the appropriate bitmap in a sequence (see wSetWinBitmap) with the new information in the block.
$BF wEscapeon
$40 RConnect
$C1 wEscapeoff
$C2 wGetWindowPosition v3 Returns the position of the window in its sibling list (the windows with the same parent).
$C3 gSaveRect Saves a rectangle from a bitmap, backed-up window, or the screen (see gSaveBit for details).
$44 wReassignRootWindow All future calls within this client will treat the specified window as it it were the whole screen
$C5 wCaptureKey v3 Captures certain key combinations; from now on, these key presses will be sent to this client whether or not it is in the foreground.
$C6 wCancelCaptureKey v3 Cancels a call to wCaptureKey with identical arguments.
$47 wSystemModal v3 Makes the current client system modal and sets its position in the task list.
$48 wCancelSystemModal v3 Cancels a call to wSystemModal and re-positions the client.
$49 gBorder v3 cgc Draws a border just inside the window or bitmap of the current graphics context.
$4A gBorderRect v3 cgc Draws a border just inside the indicated rectangle. The border type is as for gBorder.
$4B gXPrintText v3 cgc Prints the text, as gPrintText in mode 4 (copy with background), but with embellishments
$4C gInvObloid v3 cgc Inverts all the pixels, except the four corner pixels, of the rectangle specified by the block
$4D wEnablePauseKey v3 Allows the program to be paused by the user by pressing CTRL-S; this is initially turned on.
$CE wDisablePauseKey v3 Disallow the program from being paused by the use of CTRL-S.
$4F wsEnable Turns on the permanent status window.
$50 wsDisable Turns off the permanent status window.
$51 wInformOn v3.5 Instructs the window server to send WM_ON events when the client is in the foreground.
$52 wsUpdate Updates the contents of the status window to reflect a change elsewhere.
$D3 wsCreateClock Creates a clock. See wsCreateClock2, which includes all the functionality of this call together with additional features.
$54 wsSetClock Changes the difference between clock and system time for a clock.
$D5 wSetBusyMsg Waits for the required time (during which another call can cancel the previous request) and then displays the text
$56 wsDisableTemp Disable the display of a temporary status window via the PSION-MENU keypress.
$57 wsEnableTemp Enable the display of a temporary status window via the PSION-MENU keypress.
$D8 wSystem Changes settings within the window server (thus affecting all clients).
$D9 wGetProcessList v3.5 The buffer is filled with a list of all the processes connected to the window server
$DA wSendCommand v3.5 Sends command data to the specified process. The process will receive a WM_COMMAND event, and should then call wGetCommand.
$DB wGetCommand v3.5 Reads the last command data sent by wSendCommand into the buffer.
$5C wTextCursor Make the text cursor visible if it is not, and move it to the window and location given.
$DD wAppKeyHandler
$DE wInfoMsgCorner Displays the text in the indicated corner for 2 to 2.5 seconds
$5F gSetOpenAddress Modifies the next call to any of...
$60 wDrawButton
$E1 wSetTaskKey v3.5 Causes the relevant keypresses (see wCaptureKey) to be treated as the "task key".
$E2 wSetBackTaskKey v3.5 Identical to wSetTaskKey, except that it sets a "reverse task key" which brings the rearmost process to the foreground.
$E3 wCancelTaskKey v3.5 Cancels a previous call to wSetTaskKey with the same arguments.
$E4 wCancelBackTaskKey v3.5 Cancels a previous call to wSetBackTaskKey with the same arguments.
$E5 SwExt
$E6 gOpenFontIndex v4 Opens the specified font from a multiple-font file.
$E7 gInitBit v4 Opens a file containing one or more bitmaps, ready for gGetBit and gDrawBit.
$E8 gGetBit v4 Loads a bitmap from the file given by the handle (which must have been returned by gInitBit).
$E9 gDrawBit v4 Copies a rectangle from a bitmap in a file to the window or bitmap given by the current graphics context.
$EA gQueryBit v4 The buffer is filled with the size of the specified bitmap
$6B wsStatusWindow v4 Sets the format of the status window.
$6C wInformOnAll v4 Instructs the window server to send or not send WM_ON events.
$ED wsCreateClock2 v4 Creates a clock, which will then tick automatically.
$EE wSetPriorityControl v4 Sets server-controlled priority handling.
$EF gConfigureFonts v4 Creates a font group, which is a set of fonts intended for use in various styles
$F0 wInquireStatusWindow v4 The buffer is filled in with the coordinates the status window would have if it had the indicated format
$F1 wInquireCompatibility Returns the state of the Compatibility mode. See wCompatibilityMode for details.
$F2 gReadFontHeader v4 The font header of the specified font is read into the buffer.
$F3 gReadFontGroupHeader v4 The file must be a multiple font file. The number of fonts is placed in the word at offset 0 of the buffer
$F4 wSetSystemFont v4 Changes the font in use for one of the four standard system fonts.
$F5 wSetSprite v4 Moves the sprite, or change a bitmap set, or both.
$F6 wCreateSprite v4 Attaches an animated sequence of bitmap sets to a window as a sprite; the sprite will appear in front of everything else in the window.
$F7 wsSetList v4 Sets the "mode", or "diamond" list in the status window.
$F8 wsSelectList v4 Sets the position of the diamond in the status window.
$79 gShadowText v4 cgc Prints the text, ignoring the text mode, but applying shadow and lighting effects according to the information block
$7A gDrawObject v4 cgc Draws a special object just inside the specified rectangle.
$7B gBorder2 v4 cgc Draws a border as gBorder, except that it can also generate a 3-D effect on screens with grey available.
$7C gBorder2Rect v4 cgc Draws a border as gBorderRect, except that it can also generate a 3-D effect on screens with grey available.
$FD wCompatibilityMode Changes the compatibility mode state. Off=Normal On=Doublesize
$7E AL $00 wDrawButton2 Draws a button containing a string. Series 3a buttons require the window to have a grey plane.
$7E AL $01 InformInactivity
$7E AL $02 wDisableKeyClick v4 Enables or disables key clicks for the current process.
$FF AL $00 gInitMultiSave v4 Creates a file capable of holding the specified number of bitmaps, for use with gSaveMultiBit and gSaveMultiRect.
$FF AL $01 gSaveMultiBit v4 Saves the specified bitmap as the next bitmap in the multisave file created by gInitMultiSave.
$FF AL $02 gSaveMultiRect v4 Saves a rectangle from the specified bitmap as the next bitmap in the multisave file, as for gSaveMultiBit.
$FF AL $03 gEndMultiSave v4 Closes the multisave file, making it unavailable for further saves.
$FF AL $04 gInquireChecksum v4 Checksums the specified bitmap and writes the checksum to the word pointed to
$FF AL $05 gCreateFontHeader
$FF AL $06 wSupportInfo v4 The buffer is filled in with information about supported features
$?? wsScreenExt The buffer is filled in with the size of the screen *excluding* the current status window.


ServFunc Interrupts

INT $D6 AH=# Name Description
$00 wConnect used to connect to the window server.
$01 gPlayback
$02 gCloseMetafile
$03 gRecordToMetafile
$04 wFlush Sends any buffered commands to the server.
$05 wCloseDown
$06 wSelect
$07 wPanic
$08 wGetEvent async.
$09 wDisconnect Disconnects from the window server and frees all associated resources.
$0A wCheckPoint Sends any buffered commands to the server (as wFlush) and reports any errors immediately (see wDisableLeaves)
$0B gTextWidth Returns the width in pixels of the specified string when displayed in the specified font and style adjustments.
$0C gFontInfo Fills the buffer with information about the font modified by the style
$0D wDisableLeaves Sets the error handling mechanism used by the window server calls.
$0E gCheckBitmapID v3 Succeeds (returning 0) if the bitmap identifier is valid. Fails otherwise.
$0F Alert
$10 AlertCancel
$11 gTextCount
$12 gGetWidthTable Fills the buffer with the widths of each character in the font as adjusted.
$13 wGetEventSpecial v4 Starts looking asynchronously for an event as wGetEvent, but only accepts events of specific types.
$14 wGetEventUpdate v4 If there is an asynchronous call to wGetEvent or wGetEventSpecial outstanding, it changes the mask specifying the events being looked for.

Segment Interrupts

INT $80 AH=# Name Description
$00 SegFreeMemory Returns the amount of free system memory, in units of 16 bytes.
$01 SegCreate Creates an additional memory segment. Each segment must be given a name, of the form "8.3" (i.e. up to 8 characters
$02 SegDelete Deletes an additional memory segment. If any other process has opened the segment, the call will fail.
$03 SegOpen Opens the additional memory segment with the given name (if no such segment exists, the call will fail).
$04 SegClose Closes an additional memory segment which the process has open.
$05 SegSize Returns the size of an additional memory segment in units of 16 bytes.
$06 SegAdjustSize Changes the size of an additional memory segment. The memory will be added to or removed from the end of the segment.
$07 SegFind Finds the additional memory segments with names matching the search pattern (use ? and * as wild cards).
$08 SegCopyTo Copies data from the current process to an additional memory segment.
$09 SegCopyFrom Copies data from an additional memory segment to the current process.
$0A SegLock Locks an additional memory segment; a locked segment will not be deleted even if no processes have it open.
$0B SegUnLock Unlocks an additional memory segment. The number of unlock calls should equal the number of lock calls
$0C SegRamDiskUsed Returns the size of the ram disc; this should be treated carefully, as it can change without warning.
$0D SegCloseLockedOrDevice Unlocks an additional memory segment where the handle may be that for a different process. See SegUnLock for more details.

Heap Interrupts

INT $81 AH=# Name Description
$00 HeapAllocateCell Allocates a block of memory from the heap. The returned block may be larger than requested.
$01 HeapReAllocateCell Changes the size of a heap block; the block may have to be moved to do this.
$02 HeapAdjustCellSize Changes the size of a heap block; the block may have to be moved to do this.
$03 HeapFreeCell Frees a previously allocated heap block.
$04 HeapCellSize Returns the actual size of a heap block (which may be larger than requested when the block was created or last resized).
$05 HeapFreeMemory Returns the amount of heap space which can be allocated

Semaphore Interrupts

INT $82 AH=# Name Description
$00 SemCreate Creates a new semaphore for process interlocking. Each semaphore has a list of processes associated with it
$01 SemDelete Deletes a semaphore. Any processes on the semaphore's list will be restarted.
$02 SemWait If the value of the semaphore is positive or zero, one is subtracted from it.
$03 SemSignalOnce If the list for the semaphore is not empty, the first process on the list is removed and restarted.
$04 SemSignalMany This is equivalent to making several calls to SemSignalOnce.
$05 SemSignalOnceNoReSched This is identical to SemSignalOnce except that a reschedule never takes place because of the call

Message Interrupts

INT $83 AH=# Name Description
$00 MessInit Initialize the message system so that the current process can receive inter-process messages.
$01 MessReceiveAsynchronous When a message arrives, the message slot pointer is set to the address of the message
$02 MessReceiveWithWait When a message arrives (this may have happened before the call; otherwise the call waits until a message arrives)
$03 MessReceiveCancel Cancel any pending MessReceiveAsynchronous.
$04 MessSend Send a message to a process. The call will block until there is a free message slot in the receiving process.
$05 MessSendReceiveAsynchronous Send a message to a process; when the recipient replies, the status word is set to the reply and the process is sent an IOSIGNAL.
$06 MessSendReceiveWithWait Send a message to a process, and blocks until the recipient replies.
$07 MessFree The reply is sent to the recipient of the message, and the message slot is freed and can be used for another incoming message.
$08 MessSignal Requests that, when the specified process terminates, the kernel sends a message of the indicated type to the current process.
$09 MessSignalCancel
$0A MessSignalCancelX Cancels a call to MessSignal for the indicated process.

IO Interrupts

INT $85 AH=# Name Description
$00 IoOpen Opens a channel to a device driver.
$06 DevLoadLDD
$07 DevLoadPDD Loads a device driver into the system. A driver cannot be opened until it is loaded.
$08 DevDelete Unloads a device driver from the system. Open drivers and those in the ROM cannot be unloaded.
$09 DevQueryUnits Returns the number of simultaneous open channels supported by a driver (which must be a logical one); $FFFF indicates no limit.
$0A DevFind Finds all devices with names matching the search pattern (use ? and * as wild cards).

Dev Interrupts

INT $86 AH=# Name Description
$00 IoAsynchronous
$01 IoAsynchronousNoError
$02 IoWithWait These calls are equivalent to the IOA, IOC, and IOW keywords respectively
$05 IoWaitForSignal This call is equivalent to the IOWAIT keyword.
$06 IoWaitForStatus This call is equivalent to the IOWAIT keyword.
$07 IoYield This call is equivalent to the IOYIELD keyword.
$08 IoSignal Sends an IOSIGNAL to the current process. This call is equivalent to the IOSIGNAL keyword.
$09 IoSignalByPid
$0A IoSignalByPidNoReSched Sends an IOSIGNAL to a process. With the latter call a reschedule never takes place because of the call
$10 IoClose This call is equivalent to the IOCLOSE keyword.
$11 IoRead These calls are equivalent to the IOREAD and IOWRITE keywords.
$12 IoWrite These calls are equivalent to the IOREAD and IOWRITE keywords.
$13 IoSeek This call is equivalent to the IOSEEK keyword.
$18 IoShiftStates This call makes available the state of the various modifier keys
$19 IoWaitForSignalNoHandler This call should be used instead of IOSEEK by tasks (subsidiary processes of a process).
$1A IoSignalKillAsynchronous This call completes, and the status word is set to 0, when the specified process terminates.
$1B IoSignalKillCancel Cancel any pending IoSignalKillAsynchronous.
$1E IoPlaySoundW v3 Plays a sound file. A duration of 0 means the file header specifies the duration
$1F IoPlaySoundA v3 Plays a sound file asynchronously; the call completes when the sound has finished.
$20 IoPlaySoundCancel Cancel any pending IoPlaySoundA.
$21 IoRecordSoundW v3 Records a sound file. Note that 2048 samples are slightly more than a quarter of a second.
$22 IoRecordSoundA v3 Records a sound file asynchronously; the call completes when the recording has finished.
$23 IoRecordSoundCancel v3 Cancel any pending IoRecordSoundA.
$24 IoPlaySoundAO v3.9 Plays part of a sound file asynchronously, skipping some initial portion of the sound; the call completes when the sound has finished.

File Interrupts

INT $87 AH=# Name Description
$00
carried out automatically for OPL programs.
$01 FilExecute Starts a new process and places it in "suspended" state.
$02 FilParse This call is equivalent to the PARSE$ keyword.
$03 FilPathGet The buffer is filled with the current filing system default path (a cstr).
$04 FilPathSet Sets the default path (equivalent to the SETPATH keyword).
$05 FilPathTest Equivalent to the EXIST keyword; the call succeeds if the file with that pathname exists.
$06 FilDelete Equivalent to the DELETE keyword; non-empty directories cannot be deleted.
$07 FilRename Equivalent to the RENAME keyword.
$08 FilStatusGet The buffer is filled in with information about the file
$09 FilStatusSet The attributes indicated in the mask of the specified file are altered to the new values
$0A FilStatusDevice The buffer is filled in with information about the device
$0B FilStatusSystem The buffer is filled in with information about the node
$0C FilMakeDirectory This is equivalent to the MKDIR keyword.
$0D FilOpenUnique Open a file with a unique name. This is equivalent to the IOOPEN keyword with a mode of 4.
$0E FilSystemAttach The specified physical device driver will be attached to the filing system, possible adding new nodes.
$0F FilSystemDetach Detaches a filing system. Built-in filing systems cannot be detached.
$10 FilPathGetById The buffer is set to the current path of the specified process (a cstr).
$11 FilChangeDirectory The path name is modified in the requested way.
$13 FilSetFileDate Sets the modification time of the specified file.
$14 FilLocChanged Specifies whether any directory in the LOC:: node has changed
$15 FilLocDevice v3 Provides the media type of a device on the LOC:: node (I and M both refer to the internal ramdisc).
$16 FilLocReadPDD v3 Copies data from a device on the LOC:: node to the current process. This call is very efficient, and accesses the raw device.

Proc Interrupts

INT $87 AH=# Name Description
$00 ProcId Gets the process ID of the current process.
$01 ProcIdByName Gets the process ID of a process whose name matches the pattern (usual wildcards apply, and case is ignored).
$02 ProcGetPriority Gets the priority of the specified process.
$03 ProcSetPriority Sets the priority of the specified process.
$05 ProcCreateTask Tasks are processes which share the data segment of another process. They cannot be conveniently handled in OPL.
$06 ProcResume Take a process out of the suspended state and start it executing.
$07 ProcSuspend Place a process in the suspended state.
$08 ProcKill Kills the specified process, without allowing it to execute any cleanup code.
$09 ProcPanicById Simulate the specified panic on the specified process.
$0A ProcNameById Places the name (a cstr) of the specified process in the buffer.
$0B ProcFind Obtains process IDs for processes whose name matches the pattern ("?" and "*" wildcards have their Unix meaning, and case is ignored).
$0C ProcRename Rename the specified process; the new name must be between 1 and 8 characters.
$0D ProcTerminate fails Terminates the indicated process. The process will be sent a termination message if it has so requested, and will be killed otherwise.
$0E ProcOnTerminate When the current process is terminated, it will be sent a message of the specified type; type 0 cancels the request.
$10 ProcGetOwner Gets the ID of the process owning the specified process (normally the creator of that process).

Time Interrupts

INT $89 AH=# Name Description
$00 TimSleepForTenths Sleep for the specified delay (in units of 0.1 seconds).
$01 TimSleepForTicks Sleep for the specified delay (in system ticks; there are 32 ticks per second on the Series 3 and 18.2 on the PC emulation).
$02 TimGetSystemTime Reads the system clock (an abstime).
$03 TimSetSystemTime Sets the system clock to the given abstime.
$04 TimSystemTimeToDaySeconds Splits an abstime into a day number and an interval, placed in the buffer
$05 TimDaySecondsToSystemTime Converts a day number and an interval to an abstime.
$06 TimDaySecondsToDate Converts a day number and an interval to broken-down time information.
$07 TimDateToDaySeconds Converts broken-down time to a day number and an interval. The day number in year (offset 6) is ignored.
$08 TimDaysInMonth Gets the number of days in the specified month (0 = January, 11 = December).
$09 TimDayOfWeek Gets the day of the week of the given date.
$0A TimNameOfDay The buffer is filled with a cstr giving the name of that day of the week.
$0B TimNameOfMonth The buffer is filled with a cstr giving the name of that month.
$0C TimWaitAbsolute Sleep this process until the specified abstime. If the machine is turned off at that time, it will turn back on.
$0D TimWeekNumber Gets the week number of the specified day.
$0E TimNameOfDayAbb v3 The buffer is filled with a cstr giving the abbreviated name of that day of the week.
$0F TimNameOfMonthAbb v3 The buffer is filled with a cstr giving the abbreviated name of that month.

Convert Interrupts

INT $8A AH=# Name Description
$00 ConvUnsignedIntToBuffer The value is converted to a string in the specified radix and written to the buffer.
$01 ConvUnsignedLongIntToBuffer The value is converted to a string, in the same way as ConvUnsignedIntToBuffer.
$02 ConvIntToBuffer The value is converted to a string in radix 10 and written to the buffer.
$03 ConvLongIntToBuffer The value is converted to a string in radix 10, as for ConvIntToBuffer.
$04 ConvArgumentsToBuffer The format is written to the buffer, with certain sequences of characters
$05 ConvStringToUnsignedInt The string is converted to an unsigned integer in the specified radix.
$06 ConvStringToUnsignedLongInt The string is converted, in the same manner as ConvStringToUnsignedInt.
$07 ConvStringToInt The string is converted to an signed integer in radix 10.
$08 ConvStringToLongInt The string is converted, in the same manner as ConvStringToInt.
$09 ConvFloatToBuffer The real value is converted to a cstr and placed in the buffer.
$0A ConvStringToFloat Converts a string representing a floating-point value and places it in the variable.

Gen Interrupts

INT $8B AH=# Name Description
$00 GenVersion Gets the version of the operating system.
$01 GenLcdType Gets the display type
$02 GenStartReason Gets the reason for the last cold start
$03 GenParse Parse filenames according to certain basic rules. Unlike FilParse, this does not invoke any device drivers.
$04 LongUnsignedIntRandom Generates a 32 bit unsigned random number from a seed; the number also replaces the seed
$05 GenGetCountryData Fills the buffer with country-specific data
$06 GenGetErrorText The buffer will be filled with a cstr giving an error message corresponding to the error number
$07 GenGetOsData Copy a number of bytes from the kernel workspace to the current process. Within assembler code, this can also be done via GenDataSegment
$09 GenNotify Sends a message to the notifier process and waits for a reply. The call fails if there is no notifier process running.
$0A GenNotifyError This call is equivalent to GenNotify with the second message derived from the error number via GenGetErrorText.
$0D GenGetRamSizeInParas Gets the amount of system RAM fitted, in units of 16 bytes.
$0E GenGetCommandLine Gets a pointer to the command line if the program was started with program information (see FilExecute).
$0F GenGetSoundFlags Gets the sound flags
$10 GenSetSoundFlags Sets the sound flags to new values (see GenGetSoundFlags).
$11 GenSound Makes a simple single-frequency note. Access to this call is sequenced
$12 GenMarkActive These two calls alter the state of the current process to "active" (the default when the process starts) or "non-active".
$13 GenMarkNonActive These two calls alter the state of the current process to "active" (the default when the process starts) or "non-active".
$14 GenGetText Copies a message (a cstr) from the kernel message table to the buffer.
$15 GenGetNotifyState Gets the notify state for the process.
$16 GenSetNotifyState Sets the notify state for the process. See GenGetNotifyState for details.
$17 GenGetAutoSwitchOffValue Gets the auto-off time.
$18 GenSetAutoSwitchOffValue Sets the auto-off time. Times of less than 15 are adjusted to 15.
$1B GenGetLanguageCode Gets the current locale code. Locale codes are listed in the Psionics file LOCALES.
$1C GenGetSuffixes The buffer is filled with 31 cstrs giving the correct suffix for each of the 31 days of the month.
$1D GenGetAmPmText The buffer is filled with a cstr giving the correct suffix for "a.m." or "p.m." times.
$1E GenSetCountryData Sets the country-specific data to that in the buffer. See GenGetCountryData for the format of the buffer.
$1F GenGetBatteryType The battery type is used to control the warning thresholds.
$20 GenSetBatteryType Sets the battery type (see GenGetBatteryType).
$21 GenEnvBufferGet Searches for an environment variable whose name matches the pattern (if there is more than one, which one is chosen is unspecified).
$22 GenEnvBufferSet Changes the value of the specified enviromment variable, creating it first if necessary. The name may not contain wildcards.
$23 GenEnvBufferDelete Searches for an environment variable whose name matches the pattern and deletes it
$24 GenEnvBufferFind Searches for each environment variable whose name matches the pattern.
$25 GenEnvStringGet Searches for an environment variable whose name matches the pattern
$26 GenEnvStringSet Changes the value of the specified enviromment variable, creating it first if necessary.
$27 GenEnvStringDelete Searches for an environment variable whose name matches the pattern and deletes it
$28 GenEnvStringFind Searches for each environment variable whose name matches the pattern.
$29 GenCrc Calculates the CCITT Cyclic Redundancy Checksum using the X^16+X^12+X^5+1 polynomial
$2A GenRomVersion Gets the version of the system ROM (which includes both the operating system and many files).
$2D GenAlarmId Gets the process ID of the alarm server process, or 0 if none is running.
$2E GenPasswordSet Sets a new system password. The call will fail and take no action if the current password is incorrect.
$2F GenPasswordTest Succeeds if the system password is that provided.
$30 GenPasswordControl Turns the system password on and off. The call will fail and take no action if the current password is not provided.
$31 GenPasswordQuery Get the status of the system password.
$32 GenTickle Resets the auto-off timer. A non-active process (see GenMarkNonActive) can use this to prevent auto-off.
$33 GenSetConfig
$34 GenMaskInit Initializes an encryption control block according to the password given.
$35 GenMaskEncrypt Encrypts a block of data according to the encryption control block, which will be updated.
$36 GenMaskDecrypt Decrypts a block of data according to the encryption control block, which will be updated.
$37 GenSetOnEvents v2.28 Enables or disables reporting of power-on events. By default this is enabled on the Series 3 and disabled on other systems.
$38 GenGetAutoMains v3 Gets the setting of the external power auto-off flag.
$39 GenSetAutoMains v3 Sets the external power auto-off flag.

Float Interrupts

INT $8C AH=# Name Description
$00 FloatSin sine
$01 FloatCos cosine
$02 FloatTan tangent
$03 FloatASin arc sine
$04 FloatACos arc cosine
$05 FloatATan arc tangent
$06 FloatExp exponentiation (base e)
$07 FloatLn natural logarithm (base e)
$08 FloatLog decimal logarithm (base 10)
$09 FloatSqrt Calculates the specified function of the argument.
$0A FloatPow Calculates the result of raising the base to the indicated power.
$0B FloatRand Generates a random real number based on the unsigned long integer seed, which is unaltered
$0C FloatMod Calculates the dividend modulo the divisor, using the formula
$0D FloatInt Rounds the argument to the closest integer towards zero (i.e. zeros the fractional part of the argument).

HardW Interrupts

INT $8E AH=# Name Description
$11 HwGetSupplyStatus Gets information about the power supply. The buffer is filled with the following data
$12 HwLcdContrastDelta Alters the LCD contrast by one step, upwards if AL is between 0 and 127, and downwards if it is between 128 and 255 (all inclusive).
$13 HwReadLcdContrast Gets the current LCD contrast setting. On a Series 3, only the bottom 4 bits are significant.
$14 HwSwitchOff Switches the machine off for the specified time, then back on again ($FFFF means never turn back on).
$16 HwExit Exits the emulation on PC systems; has no effect on actual Psion machines.
$1B HwGetPsuType Gets the PSU type: 0 = old MC, 1 = MC "Maxim", 2 = Series 3t, 3 = Series 3a
$1C HwSupplyWarnings Gets information about the power supply.
$1D HwForceSupplyReading
$1E HwGetBackLight On systems fitted with a backlight, this value indicates control of the backlight function.
$1F HwSetBackLight Sets the backlight control value (see HwGetBackLight).
$20 HwBackLight Turn Backlight ON/OFF
$22 HwSupplyInfo v3 Fills the buffer with additional information about the power supply
$28 HwGetScanCodes v3 The buffer is filled with information describing the state of each key on the keyboard.
$29 HwGetSsdData
$2A HwResetBatteryStatus v3.9 The battery status is reset, exactly as if the main batteries had been removed and then replaced.
$2B HwEnableAutoBatReset v3.9 Enables, disables, or queries the current setting of the automatic reset of the battery status.
$2C HwGetBatData v3.9 The data is described in the KERNEL file.
$2E HwReLogPacks v3.9 This has the same effect as opening and then closing the SSD doors.
$2F HwSetIRPowerLevel v3.9 Sets the IR power level, returning the previous level.
$30 HwReturnTickCount v3.9 Returns a tick count that is incremented 32 times per second.
$31 HwReturnExpansionPortState v3.9 Returns the type and state of the expansion port


 

View Options
Default Dark
Simple (Hide this menu)
Print Mode (white background)

Top Menu
***Main Menu***
My Games
Youtube channel
Patreon
Introduction to Assembly (Basics for absolute beginners)
AkuSprite Editor
ChibiTracker
Dec/Bin/Hex/Oct/Ascii Table

Z80 Content
***Z80 Tutorial List***
Learn Z80 Assembly (2021)
Learn Z80 Assembly (old)
Hello World
Simple Samples
Advanced Series
Multiplatform Series
Platform Specific Series
ChibiAkumas Series
Grime Z80
Z80 Downloads
Z80 Cheatsheet
Sources.7z
DevTools kit
Z80 Platforms
Amstrad CPC
Elan Enterprise
Gameboy & Gameboy Color
Master System & GameGear
MSX & MSX2
Sam Coupe
TI-83
ZX Spectrum
Spectrum NEXT
Camputers Lynx

6502 Content
***6502 Tutorial List***
Learn 6502 Assembly
Advanced Series
Platform Specific Series
Hello World Series
Simple Samples
Grime 6502
6502 Downloads
6502 Cheatsheet
Sources.7z
DevTools kit
6502 Platforms
Apple IIe
Atari 800 and 5200
Atari Lynx
BBC Micro
Commodore 64
Commodore PET
Commander x16
Super Nintendo (SNES)
Nintendo NES / Famicom
PC Engine (Turbografx-16)
Vic 20

68000 Content
***68000 Tutorial List***
Learn 68000 Assembly
Hello World Series
Platform Specific Series
Simple Samples
Grime 68000
68000 Downloads
68000 Cheatsheet
Sources.7z
DevTools kit
68000 Platforms
Amiga 500
Atari ST
Neo Geo
Sega Genesis / Mega Drive
Sinclair QL
X68000 (Sharp x68k)

8086 Content
Learn 8086 Assembly
Platform Specific Series
Hello World Series
Simple Samples
8086 Downloads
8086 Cheatsheet
Sources.7z
DevTools kit
8086 Platforms
Wonderswan
MsDos
Psion 3a
PC9821

ARM Content
Learn ARM Assembly
Learn ARM Thumb Assembly
Platform Specific Series
Hello World
Simple Samples
ARM Downloads
ARM Cheatsheet
Sources.7z
DevTools kit
ARM Platforms
Gameboy Advance
Nintendo DS
Risc Os

Risc-V Content
Learn Risc-V Assembly
Risc-V Downloads
Risc-V Cheatsheet
Sources.7z
DevTools kit

MIPS Content
Learn Risc-V Assembly
Platform Specific Series
Hello World
Simple Samples
MIPS Downloads
MIPS Cheatsheet
Sources.7z
DevTools kit
MIPS Platforms
Playstation
N64

PDP-11 Content
Learn PDP-11 Assembly
Platform Specific Series
Simple Samples
PDP-11 Downloads
PDP-11 Cheatsheet
Sources.7z
DevTools kit
PDP-11 Platforms
PDP-11
UKNC

TMS9900 Content
Learn TMS9900 Assembly
Platform Specific Series
Hello World
TMS9900 Downloads
TMS9900 Cheatsheet
Sources.7z
DevTools kit
TMS9900 Platforms
Ti 99

6809 Content
Learn 6809 Assembly
Learn 6309 Assembly
Platform Specific Series
Hello World Series
Simple Samples
6809 Downloads
6809/6309 Cheatsheet
Sources.7z
DevTools kit
6809 Platforms
Dragon 32/Tandy Coco
Fujitsu FM7
TRS-80 Coco 3
Vectrex

65816 Content
Learn 65816 Assembly
Hello World
Simple Samples
65816 Downloads
65816 Cheatsheet
Sources.7z
DevTools kit
65816 Platforms
SNES

eZ80 Content
Learn eZ80 Assembly
Platform Specific Series
eZ80 Downloads
eZ80 Cheatsheet
Sources.7z
DevTools kit
eZ80 Platforms
Ti84 PCE

IBM370 Content
Learn IBM370 Assembly
Simple Samples
IBM370 Downloads
IBM370 Cheatsheet
Sources.7z
DevTools kit

Super-H Content
Learn SH2 Assembly
Hello World Series
Simple Samples
SH2 Downloads
SH2 Cheatsheet
Sources.7z
DevTools kit
SH2 Platforms
32x
Saturn

PowerPC Content
Learn PowerPC Assembly
Hello World Series
Simple Samples
PowerPC Downloads
PowerPC Cheatsheet
Sources.7z
DevTools kit
PowerPC Platforms
Gamecube

My Patreon backers
Thanks to all my supporters who allow this site to keep going:

Ack, Adolfo Perez Alvarez
Alejandro Gil Cal
Alejandro Pérez
Barry White, Brett Owen
burnout_x1, Chris Lidyard
CPU, damarty, Dave Snowdon
David L. Martin
Dimitris Topouzis
Ervin Pajor
Fábio Domingos, Ferro0xid
FNQMatt, ishotjr
James Whitwell
Juergen Pichler, Justin
Leo Comerford, m00n
MacTORG Steen, Marco Leal
Mark Trombly
Markus Podszuk (Brainslave)
Matt Kasdorf (KnightFire66)
Mikebloke, MrDave6309
Neil Moore, pagetable.com
penryu, Peter Beständig
Robin Elvin, robsoft
Roland Rząsa, schmosef
SethSR, ske286, squid64
Str33tz, SUPERDIVORCE
Trevor Briscoe
Voyager_Sput
William Torres



Images/Links are those provided by my supporters and should not be assumed to represent the values of this sites author










Buy my Assembly programming book
on Amazon in Print or Kindle!


Buy my Assembly programming book





Available worldwide!
Search 'ChibiAkumas' on
your local Amazon website!
Click here for more info!
















































































































































Buy my Assembly programming book
on Amazon in Print or Kindle!


Buy my Assembly programming book





Available worldwide!
Search 'ChibiAkumas' on
your local Amazon website!
Click here for more info!
















































































































































Buy my Assembly programming book
on Amazon in Print or Kindle!


Buy my Assembly programming book





Available worldwide!
Search 'ChibiAkumas' on
your local Amazon website!
Click here for more info!