Return 64 Deallocates a 64-byte

OS9 F$Ret64 103E 31 block of memory

Entry Conditions:

A = block number
X = address of the base page

Error Output:

CC = carry set on error
B = error code (if any)

Additional Information:

0 See the Allocate 64 system call for more information.

8-101
OS-9 Technical Reference
Set Process DAT Copies all or part of
Image the DAT image into a
process descriptor
F$SetImg 103E 3C
Entry Condition:

A = starting image block number
B = block count
X = process descriptor pointer
U = new image pointer

Error Output:

CC = carry set on error
B = error code (if any)

Additional Information:







The support module for this call is OS9p1.

8-102


Set P rocess Task Writes to the hardware
DAT Registers DAT registers
F$SetTsk 103E 41

Entry Conditions:

X = pointer to process descriptor

Error Output:

CC = carry set on error
B = error code (if any)

Additional Information:






· The support module for this call is OS9p1.

8-103
OS-9 Technical Reference

System Link


F$SLink 103E 34

Adds a module from
outside the current
address space into
current address space

Entry Conditions:

A = module type
X = module name string pointer
Y = name string DAT image pointer

Exit Conditions:

A
B
X
Y
U

module type
module revision (if no error)
updated name string pointer
module entry point
module pointer

Error Output:

CC = carry set on error
B = error code (If an error occurs)

Additional Information:

0 The I/O System uses the System Link call to link into the
current process's address space those modules specified by a
device name in a user call. User calls such as Create File
and Open Path use this System Link.

0 The support module for this call is OS9p 1.

s-104
Privileged System Mode Calls / 8

Request System

Memory


OS9 F$SRqMem 103E 28

Entry Conditions:

D = byte count

Exit Conditions:

U = starting address of the memory area
D = new memory size

Error Output:

CC = carry set on error
B = error code (if any)

Additional Information:

Allocates a block of
memory of the
specified size from the
top of available RAM

The Request System Memory call rounds the size request
to the next page boundary.

This call allocates memory only for system address space.

8-105
OS-9 Technical Reference

Return System Deallocates a block of
Memory contiguous pages

OS9 F$SRtMem 103E 29

Entry Conditions:



D = number of bytes to return

Error Output:

CC = carry set on error
B = error code (if any)

Additional Information:

~ Register U must point to an even page boundary.

~ This call deallocates memory for system address space only.

8-106






Entry Conditions:
Y = address of the system call
initialization table
Error Output:
CC = C bit set
B = error code
Additional Information:
· Set SVC adds or replaces a system call, which you have
written, to OS-9's user and system mode system call tables.
· Register Y passes the address of a table, which contains the
function codes and offsets, to the corresponding system call
°handler routines. This table has the following format:














OS-9 Technical Reference






















8-108


Store A Byte Stores A at O,X in
rIn A Task Task B






















8-109
OS-9 Technical Reference

Install virtual

interrupt


OS9 F$VIRQ 103E 27

Entry Conditions:

Installs a virtual
interrupt handler
routine

D
X

initial count value
0 to delete entry
1 to install entry
address of 5-byte packet

Error Output:

CC = carry set on error
B = appropriate error code

Additional Information:

Install VIR(a for use with devices in the Multi-Pak Expan
sion Interface. This call is explained in detail in Chapter 2.

8-110
Privileged System Mode Calls / 8

Validate Module


OS9 F$VModul 103E 2E

Checks the module
header parity and CRC
bytes of a module

Entry Conditions:

D = DAT image pointer
X = new module block offset

Exit Conditions:

U = address of the module directory entry

Error Output:

CC = carry set on error
B = error code (if any)

Additional Information:

0 If the values of the specified module are valid, OS-9
searches the module directory for a module with the same
name. If one exists, OS-9 keeps in memory the module that
has the higher revision level. If both modules have the save
revision level, OS-9 retains the module in memory.