PsiFS: SWI Calls

PsiFS_Get

PsiFS_Get
(SWI &520C3)
Read a PsiFS option or status value

On entry:R0 =option or status value to read
If the value specified by R0 is a string
R1 =pointer to buffer to contain null terminated string value
R2 =size of buffer

On exit:If the value specified by R0 is numeric
R1 =value of the option
If the value specified by R0 is a string
R2 = number of spare bytes in the buffer including the null terminator, i.e.:
R2 > 0implies there are (R2-1) completely unused bytes in the buffer; so R2=1 implies there are 0 unused bytes in the buffer, and therefore the terminator just fitted
R2 < 1implies there are (1-R2) too many bytes to fit in the buffer, which has consequently not been filled in; so R2=0 implies there is 1 byte too many - the terminator - to fit in the buffer

Interrupts:Interrupt status is undefined
Fast interrupts are enabled

Processor mode:Processor is in SVC mode

Re-entrancy:SWI is not re-entrant

Use: This call reads a PsiFS option or status value. An error may be returned if an attempt is made to read the value of an option that is meaningless for the current mode of operation.

The values that may be read are:
R0TypeOption
&0numericmode of operation
&100stringname of the serial block driver
&101numericserial block driver port number
&102numericserial block driver baud rate
&103stringoptional extra serial block driver options
&104numericautomatic baud rate identification mode
&108numericactive serial block driver baud rate
&110numericclock synchronization mode
&120numericremote link idle disconnect time
&121numericprinter mirror idle disconnect time
&122numericidle disconnect external power mode
&128numericidle background operations mode
&200numericnumber of bytes of serial data received
&201numericnumber of bytes of serial data transmitted
&210numericnumber of valid protocol frames received
&211numericnumber of invalid protocol frames received
&212numericnumber of retries for received protocol frames
&214numericnumber of protocol frames transmitted
&216numericnumber of retries for transmitted protocol frames
&1000numericstatus of the remote link
&1010numerictype of the remote machine
&1011stringdescription of the remote machine type
&1012numericlanguage of the remote machine
&1018numericmajor version of the remote machine operating system
&1019numericminor version of the remote machine operating system
&101Anumericbuild of remote machine operating system
&1020numericlow word of the unique identifier of the remote machine
&1021numerichigh word of the unique identifier of the remote machine
&1030stringowner information of the remote machine
&11xxnumericstatus of the specified remote drive
&12xxstringname of the specified remote drive
&13xxnumericunique identifier of the specified remote drive
&1800numericstatus of the main battery
&1801numericvoltage of the main battery
&1802numericmaximum voltage of the main battery
&1810numericstatus of the backup battery
&1811numericvoltage of the backup battery
&1812numericmaximum voltage of the backup battery
&1820numericstatus of external power
&2000numericstatus of the printer mirror
&2001stringname of the printer mirror destination

If a string value is specified this may be used as a two-pass process:

  1. On entry, set R0 to specify the value to read, and R1 and R2 (the pointer to, and the size of, the buffer) to zero. On exit, R2 = -(length of string)
  2. Claim a buffer of the right size (1-R2, not just -R2, as a space is needed for the terminator). On entry, ensure that R0 still specifies the value to read, that R1 is set to point to the buffer, and R2 contains the lenght of the buffer. On exit the buffer should be filled in, and R2 should be 1; but check to make sure.

Related SWIs:PsiFS_Set, PsiFS_Mode

Related vectors:None

PsiFS_Get &0
(SWI &520C3)
Get the mode of operation

On entry:R0 =&0

On exit:R1 =mode of operation

Use: This call reads the current mode of operation. The possible values are:
ValueMeaning
0inactive
1remote link mode
2printer mirror mode

PsiFS_Get &100
(SWI &520C3)
Get the serial block driver name

On entry:R0 =&100
R1 =pointer to buffer to contain null terminated serial block driver name
R2 =size of buffer

On exit:R2 =number of spare bytes in the buffer including the null terminator

Use: This call reads the name of the configured serial block driver.

PsiFS_Get &101
(SWI &520C3)
Get the serial block driver port number

On entry:R0 =&101

On exit:R1 =port number (0 for the first)

Use: This call reads the configured serial block driver port number.

PsiFS_Get &102
(SWI &520C3)
Get the serial block driver baud rate

On entry:R0 =&102

On exit:R1 =baud rate

Use: This call reads the configured serial block driver baud rate. The actual baud rate used may be different if either the requested baud rate is not available or automatic baud rate identification is active.

PsiFS_Get &103
(SWI &520C3)
Get the serial block driver options

On entry:R0 =&103
R1 =pointer to buffer to contain null terminated serial block driver options
R2 =size of buffer

On exit:R2 =number of spare bytes in the buffer including the null terminator

Use: This call reads the optional parameter string of the configured serial block driver.

PsiFS_Get &104
(SWI &520C3)
Get the automatic baud rate identification mode

On entry:R0 =&104

On exit:R1 =automatic baud rate identification (0 disables)

Use: This call reads whether automatic baud rate identification is enabled. Only the remote link is affected; the printer mirror always uses the configured baud rate.

PsiFS_Get &108
(SWI &520C3)
Get the active serial block driver baud rate

On entry:R0 =&108

On exit:R1 =active baud rate

Use: This call reads the serial block driver baud rate actively being used. This may be different to the configured baud rate if either the requested baud rate is not available or automatic baud rate identification is active.

PsiFS_Get &110
(SWI &520C3)
Get the clock synchronization mode

On entry:R0 =&110

On exit:R1 =clock synchronization mode (0 disables)

Use: This call reads whether synchronization of clocks on connection of the remote link is enabled. This only affects EPOC devices; it is not possible to synchronize the clock of SIBO devices.

PsiFS_Get &120
(SWI &520C3)
Get the remote link idle disconnect time

On entry:R0 =&120

On exit:R1 =idle disconnect time in seconds (0 disables)

Use: This call reads whether automatic disconnection of the remote link after a period of activity is enabled.

PsiFS_Get &121
(SWI &520C3)
Get the printer mirror idle disconnect time

On entry:R0 =&121

On exit:R1 =idle disconnect time in seconds (0 disables)

Use: This call reads whether automatic disconnection of the printer mirror after a period of activity is enabled.

PsiFS_Get &122
(SWI &520C3)
Get the idle disconnect external power mode

On entry:R0 =&122

On exit:R1 =idle disconnect external power mode (0 disables)

Use: This call reads whether automatic disconnection after a period of inactivity if running on external power is enabled. This only affects EPOC devices; it is not possible to determine the status of external power for SIBO devices.

PsiFS_Get &128
(SWI &520C3)
Get the idle background operations mode

On entry:R0 =&128

On exit:R1 =idle background operations mode (0 disables)

Use: This call reads whether throttling back of background operations when idle is enabled.

PsiFS_Get &200
(SWI &520C3)
Get the number of bytes of serial data received

On entry:R0 =&200

On exit:R1 =number of bytes of serial data received

Use: This call reads the number of bytes of serial data received since the remote link or printer mirror was last enabled.

PsiFS_Get &201
(SWI &520C3)
Get the number of bytes of serial data transmitted

On entry:R0 =&200

On exit:R1 =number of bytes of serial data trasmitted

Use: This call reads the number of bytes of serial data transmitted since the remote link or printer mirror was last enabled.

PsiFS_Get &210
(SWI &520C3)
Get the number of valid protocol frames received

On entry:R0 =&210

On exit:R1 =number of valid protocol frames received

Use: This call reads the number of valid protocol frames received since the remote link was last enabled.

PsiFS_Get &211
(SWI &520C3)
Get the number of invalid protocol frames received

On entry:R0 =&211

On exit:R1 =number of invalid protocol frames received

Use: This call reads the number of invalid protocol frames received since the remote link was last enabled.

PsiFS_Get &212
(SWI &520C3)
Get the number of retries for received protocol frames

On entry:R0 =&212

On exit:R1 =number of retries for received protocol frames

Use: This call reads the number of retries for received protocol frames since the remote link was last enabled.

PsiFS_Get &214
(SWI &520C3)
Get the number of protocol frames transmitted

On entry:R0 =&214

On exit:R1 =number of protocol frames transmitted

Use: This call reads the number of protocol frames transmitted since the remote link was last enabled.

PsiFS_Get &216
(SWI &520C3)
Get the number of retries for transmitted protocol frames

On entry:R0 =&216

On exit:R1 =number of retries for transmitted protocol frames

Use: This call reads the number of retries for transmitted protocol frames since the remote link was last enabled.

PsiFS_Get &1000
(SWI &520C3)
Get the status of the remote link

On entry:R0 =&1000

On exit:R1 =remote link status

Use: This call reads the status of the remote link. The bits of the result have the following meaning:
BitMeaning when set
0remote link active
4connected to a SIBO device
5connected to an EPOC device

PsiFS_Get &1010
(SWI &520C3)
Get the type of the remote machine

On entry:R0 =&1010

On exit:R1 =type of the remote machine

Use: This call reads the type of the remote machine. The possible values are:
ValueMeaning when set
&00Unknown
&01PC
&02MC
&03HC
&04Series 3
&05Series 3a, 3c, or 3mx
&06Workabout
&07Sienna
&08Series 3c
&20Series 5
&21WinC

PsiFS_Get &1011
(SWI &520C3)
Get the description of the remote machine type

On entry:R0 =&1011
R1 =pointer to buffer to contain null terminated description
R2 =size of buffer

On exit:R2 =number of spare bytes in the buffer including the null terminator

Use: This call reads the description of the remote machine type.

PsiFS_Get &1012
(SWI &520C3)
Get the language of the remote machine

On entry:R0 =&1012

On exit:R1 =language

Use: This call reads the language of the remote machine. The possible values are:
ValueMeaning
&00Test
&01English
&02French
&03German
&04Spanish
&05Italian
&06Swedish
&07Danish
&08Norwegian
&09Finnish
&0AAmerican
&0BSwiss French
&0CSwiss German
&0DPortuguese
&0ETurkish
&0FIcelandic
&10Russian
&11Hungarian
&12Dutch
&13Belgian Flemish
&14Australian
&15Belgian French
&16Austrian
&17New Zealand
&18International French
&19Czech
&1ASlovak
&1BPolish
&1CSlovenian

This value is only available for EPOC devices.


PsiFS_Get &1018
(SWI &520C3)
Get the major version of the remote machine operating system

On entry:R0 =&1018

On exit:R1 =major version

Use: This call reads the major version of the remote machine operating system.

This value is only available for EPOC devices.


PsiFS_Get &1019
(SWI &520C3)
Get the minor version of the remote machine operating system

On entry:R0 =&1019

On exit:R1 =minor version

Use: This call reads the minor version of the remote machine operating system.

This value is only available for EPOC devices.


PsiFS_Get &101A
(SWI &520C3)
Get the build of the remote machine operating system

On entry:R0 =&101A

On exit:R1 =build

Use: This call reads the build of the remote machine operating system.

This value is only available for EPOC devices.


PsiFS_Get &1020
(SWI &520C3)
Get the low word of the unique identifier of the remote machine

On entry:R0 =&1020

On exit:R1 =low word of unique identifier

Use: This call reads the low word of the unique identifier of the remote machine.

This value is only available for EPOC devices.


PsiFS_Get &1021
(SWI &520C3)
Get the high word of the unique identifier of the remote machine

On entry:R0 =&1021

On exit:R1 =high word of unique identifier

Use: This call reads the high word of the unique identifier of the remote machine.

This value is only available for EPOC devices.


PsiFS_Get &1030
(SWI &520C3)
Get the owner information of the remote machine

On entry:R0 =&1030
R1 =pointer to buffer to contain null terminated owner information
R2 =size of buffer

On exit:R2 =number of spare bytes in the buffer including the null terminator

Use: This call reads the owner information of the remote machine.

PsiFS_Get &11xx
(SWI &520C3)
Get the status of the specified remote drive

On entry:R0 =&1100 + drive

On exit:R1 =remote drive status

Use: This call reads the status of a single remote drive. The bits of the result have the following meaning:
BitMeaning when set
0drive present
8ROM drive

The drive may be specified in one of three ways:

  • a zero based index (0 for drive A, through to 25 for drive Z)
  • the ASCII code of the drive letter in upper case (65 for drive A, through to 90 for drive Z)
  • the ASCII code of the drive letter in lower case (97 for drive A, through to 122 for drive Z)

PsiFS_Get &12xx
(SWI &520C3)
Get the name of the specified remote drive

On entry:R0 =&1200 + drive
R1 =pointer to buffer to contain null terminated drive name
R2 =size of buffer

On exit:R2 =number of spare bytes in the buffer including the null terminator

Use: This call reads the name of a single remote drive.

The drive may be specified in one of three ways:

  • a zero based index (0 for drive A, through to 25 for drive Z)
  • the ASCII code of the drive letter in upper case (65 for drive A, through to 90 for drive Z)
  • the ASCII code of the drive letter in lower case (97 for drive A, through to 122 for drive Z)

PsiFS_Get &13xx
(SWI &520C3)
Get the unique identifier of the specified remote drive

On entry:R0 =&1300 + drive

On exit:R1 =remote drive unique identifier

Use: This call reads the unique identifier of a single remote drive.

PsiFS_Get &1800
(SWI &520C3)
Get the status of the main battery

On entry:R0 =&1800

On exit:R1 =main battery status

Use: This call reads the status of the main battery. The possible values are:
ValueMeaning
0dead
1very low
2low
3good

This value is only available for EPOC devices.


PsiFS_Get &1801
(SWI &520C3)
Get the voltage of the main battery

On entry:R0 =&1801

On exit:R1 =main battery voltage

Use: This call reads the voltage of the main battery in milli-volts.

This value is only available for EPOC devices.


PsiFS_Get &1802
(SWI &520C3)
Get the maximum voltage of the main battery

On entry:R0 =&1802

On exit:R1 =main battery maximum voltage

Use: This call reads the maximum voltage of the main battery in milli-volts.

This value is only available for EPOC devices.


PsiFS_Get &1810
(SWI &520C3)
Get the status of the backup battery

On entry:R0 =&1810

On exit:R1 =backup battery status

Use: This call reads the status of the backup battery. The possible values are:
ValueMeaning
0dead
1very low
2low
3good

This value is only available for EPOC devices.


PsiFS_Get &1811
(SWI &520C3)
Get the voltage of the backup battery

On entry:R0 =&1811

On exit:R1 =backup battery voltage

Use: This call reads the voltage of the backup battery in milli-volts.

This value is only available for EPOC devices.


PsiFS_Get &1812
(SWI &520C3)
Get the maximum voltage of the backup battery

On entry:R0 =&1812

On exit:R1 =backup battery maximum voltage

Use: This call reads the maximum voltage of the backup battery in milli-volts.

This value is only available for EPOC devices.


PsiFS_Get &1820
(SWI &520C3)
Get the status of external power

On entry:R0 =&1820

On exit:R1 =status of external power (0 not present)

Use: This call reads the status of external power.

This value is only available for EPOC devices.


PsiFS_Get &2000
(SWI &520C3)
Get the status of the printer mirror

On entry:R0 =&2000

On exit:R1 =printer mirror status

Use: This call reads the status of the printer mirror. The bits of the result have the following meaning:
BitMeaning when set
0printer mirror active

PsiFS_Get &2001
(SWI &520C3)
Get the name of the printer mirror destination

On entry:R0 =&2001
R1 =pointer to buffer to contain null terminated printer mirror destination
R2 =size of buffer

On exit:R2 =number of spare bytes in the buffer including the null terminator

Use: This call reads the name of the printer mirror destination.

[Contents] [Up] Copyright © Alexander Thoukydides, 1998, 1999, 2000, 2001, 2002