home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
utilsm
/
psionics
/
SysCalls.2
< prev
next >
Wrap
Text File
|
1994-10-25
|
34KB
|
1,064 lines
PSIONICS FILE - SYSCALLS.2
==========================
System calls (part 2)
Last modified 1994-09-06
========================
See part 1 for general notes and explanations.
Fn $88 Sub $00
ProcId
AX: -> process ID of the current process
Gets the process ID of the current process.
Fn $88 Sub $01
ProcIdByName fails
AX: -> process ID
BX: (cstr) pattern
Gets the process ID of a process whose name matches the pattern (usual
wildcards apply, and case is ignored).
Fn $88 Sub $02
ProcGetPriority fails
AL: -> priority
BX: process ID
Gets the priority of the specified process.
Fn $88 Sub $03
ProcSetPriority fails
AL: new priority
BX: process ID
Sets the priority of the specified process.
Fn $88 Sub $04 should not be used.
Fn $88 Sub $05
ProcCreateTask
Tasks are processes which share the data segment of another process. They
cannot be conveniently handled in OPL.
Fn $88 Sub $06
ProcResume fails
BX: process ID
Take a process out of the suspended state and start it executing.
Fn $88 Sub $07
ProcSuspend fails
BX: process ID
Place a process in the suspended state. If the process is waiting for a system
service (e.g. a semaphore), then it will be suspended when the service has
been carried out.
Fn $88 Sub $08
ProcKill fails
AL: reason code
BX: process ID
Kills the specified process, without allowing it to execute any cleanup code.
Only use this on the current process or in emergencies.
Fn $88 Sub $09
ProcPanicById fails
AL: panic code
BX: process ID
Simulate the specified panic on the specified process.
Fn $88 Sub $0A
ProcNameById fails
BX: process ID
DI: 13 byte buffer
Places the name (a cstr) of the specified process in the buffer.
Fn $88 Sub $0B
ProcFind fails
AX: -> process ID
BX: 0 or process ID
SI: 14 byte buffer
DI: (cstr) pattern
Obtains process IDs for processes whose name matches the pattern ("?" and "*"
wildcards have their Unix meaning, and case is ignored). BX should be zero to
return the first matching process, or the process ID returned by a previous
call to return subsequent matching processes. Process are returned in *task*
ID order. The buffer is filled with a cstr giving the process name.
Fn $88 Sub $0C
ProcRename fails
BX: process ID
DI: (cstr) new name
Rename the specified process; the new name must be between 1 and 8 characters.
Fn $88 Sub $0D
ProcTerminate fails
BX: process ID
Terminates the indicated process. The process will be sent a termination
message if it has so requested, and will be killed otherwise.
Fn $88 Sub $0E
ProcOnTerminate
BX: message type
When the current process is terminated, it will be sent a message of the
specified type; type 0 cancels the request. After receiving the message and
executing any clean-up code, the process should use ProcKill to kill itself.
Fn $88 Sub $0F is reserved for the Shell process.
Fn $88 Sub $10
ProcGetOwner fails
AX: -> owning process ID
BX: process ID
Gets the ID of the process owning the specified process (normally the
creator of that process).
Fn $89 Sub $00
TimSleepForTenths fails
CX: high half of delay
DX: low half of delay
Sleep for the specified delay (in units of 0.1 seconds). Changing the system
clock does not affect the call. Only time when the machine is switched on is
measured; any time when the machine is switched off will be in addition to
the requested delay.
Fn $89 Sub $01
TimSleepForTicks fails
CX: high half of delay
DX: low half of delay
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). Changing the system clock does
not affect the call. Only time when the machine is switched on is measured;
any time when the machine is switched off will be in addition to the requested
delay.
Fn $89 Sub $02
TimGetSystemTime
AX: -> high half of system clock
BX: -> low half of system clock
Reads the system clock (an abstime).
Fn $89 Sub $03
TimSetSystemTime
CX: high half of new system clock
DX: low half of new system clock
Sets the system clock to the given abstime.
Fn $89 Sub $04
TimSystemTimeToDaySeconds
CX: high half of abstime
DX: low half of abstime
DI: 8 byte buffer
Splits an abstime into a day number and an interval, placed in the buffer as
follows:
Offset 0 (long): day number
Offset 4 (long): interval
Fn $89 Sub $05
TimDaySecondsToSystemTime fails
AX: -> high half of abstime
BX: -> low half of abstime
DI: 8 byte buffer
Converts a day number and an interval to an abstime. The former are in the
buffer, in the same format as TimSystemTimeToDaySeconds.
Fn $89 Sub $06
TimDaySecondsToDate fails
SI: 8 byte buffer (day number and interval)
DI: 8 byte buffer (broken down time)
Converts a day number and an interval to broken-down time information. The
former is in the same format as TimSystemTimeToDaySeconds. The latter is in
the format:
Offset 0 (byte): year - 1900
Offset 1 (byte): month (0 = January, 11 = December)
Offset 2 (byte): day - 1
Offset 3 (byte): hours
Offset 4 (byte): minutes
Offset 5 (byte): seconds
Offset 6 (word): day number in year (0 to 364 or to 365)
Fn $89 Sub $07
TimDateToDaySeconds fails
SI: 8 byte buffer (broken down time)
DI: 8 byte buffer (day number and interval)
Converts broken-down time to a day number and an interval.
Fn $89 Sub $08
TimDaysInMonth fails
AX: -> number of days in month
CX: month * 256 + year - 1900
Gets the number of days in the specified month (0 = January, 11 = December).
Fn $89 Sub $09
TimDayOfWeek
AX: -> day of week (0 = Monday, 6 = Sunday)
CX: high half of day number
DX: low half of day number
Gets the day of the week of the given date.
Fn $89 Sub $0A
TimNameOfDay fails
AL: day of week (0 = Monday, 6 = Sunday)
BX: 33 byte buffer
The buffer is filled with a cstr giving the name of that day of the week.
Fn $89 Sub $0B
TimNameOfMonth fails
AL: month (0 = January, 11 = December)
BX: 33 byte buffer
The buffer is filled with a cstr giving the name of that month.
Fn $89 Sub $0C
TimWaitAbsolute fails
CX: high half of abstime
DX: low half of abstime
Sleep this process until the specified abstime. If the machine is turned off
at that time, it will turn back on. Changing the system clock will affect
when the call returns.
Fn $89 Sub $0D
TimWeekNumber fails
AX: -> week number (1 to 53)
CX: high half of day number
DX: low half of day number
Gets the week number of the specified day.
Fn $89 Sub $0E
TimNameOfDayAbb v3 fails
AL: day of week (0 = Monday, 6 = Sunday)
BX: 4 byte buffer
The buffer is filled with a cstr giving the abbreviated name of that day of
the week.
Fn $89 Sub $0F
TimNameOfMonthAbb v3 fails
AL: month (0 = January, 11 = December)
BX: 4 byte buffer
The buffer is filled with a cstr giving the abbreviated name of that month.
Fn $8A Sub $00
ConvUnsignedIntToBuffer
AX: -> length of converted value
BX: value to be converted
CX: radix
DI: buffer to hold converted value
The value is converted to a string in the specified radix and written to the
buffer. No trailing zero byte is written; instead, the length of the string
is returned. The radix can be any value from 2 to 200. If the radix is 11 or
greater, digits greater than 9 are written as "A", "B", etc; characters other
than digits and uppercase letters are used when the radix is 37 or more.
Fn $8A Sub $01
ConvUnsignedLongIntToBuffer
AX: -> length of converted value
BX: low half of value to be converted
CX: radix
DX: high half of value to be converted
DI: buffer to hold converted value
The value is converted to a string, in the same way as ConvUnsignedIntToBuffer.
Fn $8A Sub $02
ConvIntToBuffer
AX: -> length of converted value
BX: value to be converted
DI: buffer to hold converted value
The value is converted to a string in radix 10 and written to the buffer. If
the value is negative, a leading "-" will be included. No trailing zero byte
is written; instead, the length of the string is returned.
Fn $8A Sub $03
ConvLongIntToBuffer