home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
a
/
armedit
/
Docs
/
Module
< prev
next >
Wrap
Text File
|
1997-02-21
|
17KB
|
555 lines
File : Module
Date : 21-Feb-97
Author : © A.Thoukydides, 1995, 1996, 1997
Description : Description of the ARMEdit module.
INTRODUCTION
The ARMEdit module forms the core of the ARMEdit suite of software. It
provides the communications between software running on the PC card and
RISC OS.
The module should normally be loaded after the desktop has been started,
but before the PC front-end has been loaded. However, if Wimp$ScrapDir is
set to a suitable value then the module may be loaded before the desktop
has been entered. A good place for loading the ARMEdit module is in the
!Run file of the PC front-end.
The current version of this module will work with versions of the PC
front-end software 1.87 and above. However, significantly better performance
will be obtained if PCPro (!PC version 2.00 of higher) is used. The version
number is displayed in the Info window from the icon-bar icon. See the
Contacts documentation for details of obtaining upgrades.
SYSTEM VARIABLES
The ARMEdit module sets and uses the following system variables:
ARMEdit$Path
Path used to access Messages file. This is normally set to point to
the file contained within the module and placed in ResourceFS.
ARMEdit$ScrapDir
Directory used for temporary files. This is normally set to
<Wimp$Scrap>.ARMEdit, but may be changed if required. If there is
sufficient memory in the computer then better performance would
result from placing this in a RAM disc.
The module sets and uses this variable (if not already defined)
during initialisation. Hence it is necessary for <Wimp$Scrap> to be
defined before the module is loaded.
*COMMANDS
The following *commands are provided by the ARMEdit module:
*ARMEdit_Clients
This command displays details of the clients that have registered
with the ARMEdit module for communication purposes.
*ARMEdit_Devices
List the RISC OS path of all active emulated devices.
*ARMEdit_DevicesRelog [-now]
Force a relog of the RISC OS directory structure. This releases most
of the memory claimed to support device driver operation and closes
open files.
Note that this may not take immediate effect - DOS must acknowledge
a change of disc before any relog occurs. This normally occurs if
no files are open on the device, and a simple operation (such as
typing DIR) is performed on the drive. Note that each emulated device
is treated seperately; some devices may be reset before others.
The -now switch forces an immediate reset. This should only be used
if essential, and must never be used in the middle of a disc access,
otherwise DOS could be confused by an inconsistent disc image.
It can be useful to call this from the DOS command line using the
OSCLI command (supplied as part of the ARMEdit suite) - perhaps it
should be placed in a DOS batch file for easier use.
*ARMEdit_DOSMap
This command updates the cached list of mappings between DOS
extensions and RISC OS filetypes. These details are read initially
from DOSFS, but may be re-read at any time using this command.
*ARMEdit_Files
This command displays details of the RISC OS files currently open for
PC software. For each open file the file handle and filename is
displayed. There is also a field that indicates whether the file will
automatically be deleted when it is closed (either explicitly by the
PC software, or when the PC is reset or quit).
*ARMEdit_Memory
This command displays details of the RISC OS memory currently being
used by PC software. For each block of memory claimed the base
address and size of the block is displayed.
The memory is currently allocated from the RMA, but a header is
attached to the start of each block. Hence the address displayed is
not the start of a heap block. The information in the header is used
to automatically release the memory when the PC is reset or quit if
the PC software fails to do so.
*ARMEdit_Polling [[-fore] <polls>] [[-back] <polls>]
This command allows the multitasking speed of the PC card to be
controlled. Larger values increase the performance of the PC card
at the expense of slowing down the desktop. A value of 0 results
in the normal behaviour.
Use with no parameters to display the current settings. If only
a single value is specified (without switches) then both settings
are updated.
*ARMEdit_Version
This command displays the version numbers of the data structures used
by the most recently used PC front-end. It also displays the range of
versions catered for by this version of the module.
SWIs
The following SWIs are provided by the ARMEdit module. For more details
regarding the use of the communciations SWIs see the Code documentation.
SWI "ARMEdit_ControlPC" (&4BC40)
Control the PC front-end.
On entry:
R0 = Operation to perform:
0 Suspend full screen mode
1 Freeze running in a window
2 Reset the PC
3 Quit the front-end
On exit:
All registers preserved.
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 allows the PC front-end to be controlled. Note that if the
PC front-end is not the current application then this will only take
effect the next time the front-end is paged in.
Note that suspending full screen mode only starts execution in a
window if enabled by the current configuration.
SWI "ARMEdit_TalkStart" (&4BC41)
Register a new client task.
On entry:
R0 = Pre-allocated ID for this task.
R1 = Flags (see below).
R2 = Pointer to a function to be called when a message is available,
or 0 for none.
R3 = Value for R12 to contain when function pointed to by R2 is
called.
On exit:
R0 = A unique client handle.
R1 = Pointer to a poll word for this task.
Interrupts:
Interrupt status is undefined.
Fast interrupts are enabled.
Processor mode:
Processor is in SVC mode.
Re-entrancy:
SWI is not re-entrant.
Use:
An application that provides services to PC software should call this
when it is starting. A message buffer is allocated and a unique
handle for this task assigned. This handle should be stored and used
in all other calls relating to this task.
The currently defined flag bits are:
Bit Meaning if set
0 Messages from the ARMEdit module are required.
All other bits should be set to 0 to allow for future expansion.
The poll word is initially set to zero. When there is potentially a
message waiting for this task the poll word is set to a non-zero
value. The poll word is cleared when either the message has been
read, or no message is available for some other reason. Note that a
non-zero poll word does not imply that a message will be available;
another task might have read the message if it was not directed to
a specific handle. The poll word must not be written to; it must only
be modified by the ARMEdit module.
SWI "ARMEdit_TalkEnd" (&4BC42)
Deregister a client task.
On entry:
R0 = The previously assigned handle for this client task.
On exit:
All registers preserved.
I