home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
s
/
swiref
/
!SWIRef
/
!Help
< prev
next >
Wrap
Text File
|
1995-01-20
|
6KB
|
163 lines
!SWIRef
Version 1.02
By David McMullen
© BubbleSoft 1995
Boring © Stuff...
!SWIRef is FREEWARE. This means that it can be distributed freely as
long as all the files are included in an unaltered condition, and no
charge is made for the distribution other than media costs and minimal
postage. The files included are:
!Boot Obey
!Help Text (This file)
!Run Obey
!RunImage Absolute
!Sprites Sprite
Resources.Messages Text
Resources.MsgTrans Module
Resources.Sprites Sprite
Resources.Templates Template
Resources.WimpExt Module
The MessageTrans module is © Acorn Computers Ltd
The WimpExtension module is © Jon Ribbens of DoggySoft
I retain © on all files except the two modules mentioned above.
Which RISC OS?
!SWIRef has only been tester£d with RISC OS 3.1, but should work with
any version. That is, I have tried to avoid using any OS dependant
routines, and have even tried to check for RISC OS 2, so that !SWIRef
doesn't make any calls to DragASprite. If you have any problems, let me
know what the error/problem was and where and when it occured, and I'll
see what I can do.
What is !SWIRef?
!SWIRef is a program for converting SWI names, eg OS_File, to their
equivalent numbers, eg 8. This is useful for 2 reasons:
1) It makes programs smaller, as they have a 5 figure number instead of
huge string.
2) It can speed up the execution of a program, as the computer converts
the SWI name to a number when it executes, so this removes the need
for that, and the computer can execute the SWI directly without
having to spend time looking the name up first.
!SWIRef can convert SWIs in three different ways:
1) Interactive SWI Conversion.
To use interactive SWI conversion click SELECT or ADJUST on the !SWIRef
icon on the iconbar to open the main window. When this window is opened
the caret will be in the SWI number writeable icon. To move the caret to
the SWI name writeable icon either click in it with SELECT or ADJUST, or
use the ⇧ or ⇩ cursor keys.
By default you should enter SWI numbers in decimal, but this can be
changed to hexadecimal via the options window (click on Options, or
select Options... from the iconbar menu). The three letters in brackets
in the main window's title bar show the current setting, either (hex)
for hexadecimal or (dec) for decimal.
To convert a SWI number to its equivalent name, enter the number in the
appropriate base (hex or dec) in the SWI number writeable icon, and
either press <RETURN> or click SELECT or ADJUST on the Convert icon.
To convert a SWI name to its number, enter the name in the SWI name
writeable icon, and either press <RETURN> or click SELECT or ADJUST on
the Convert icon. NB - The SWI name is case sensitive.
Note - When you click on Convert, !SWIRef converts the name or number
according to which icon owns the caret at the time. If neither icon owns
the caret !SWIRef will attempt to convert the number.
2) Convert SYS names to numbers in a BASIC program.
When 'Convert names to numbers' is selected from the options window, the
text 'Name->Num' will appear under the icon on the iconbar, then you can
drag a BASIC file to the !SWIRef icon to convert all the SYS commands
(BASICs version of SWI) from names to numbers. When you drag the file to
!SWIRef it is loaded and converted. When the conversion is finished a
savebox will appear. The converted file is the saved in the normal way.
The Save Report icon will save a report for the conversion if it is
ticked. This report is saved to the same directory as the converted
file, and has the filename ConvReport. This report tells you how many
SYS commands were in the file, how many were converted, and how many
were not recognised. It also provides a list of any unrecognised SYS
commands.
Note: Conversion of files can take quite a long time. The hourglass
percentage gives some indication of how the conversion is progressing.
To abort the conversion at any point press Escape.
3) Convert SYS numbers to names in a BASIC program.
This works in the same way as Convert names to numbers, and is selected
via the options window. Due to the way I've written it, this routine
takes about twice as long as the previous one, as it initially scans
through the program to allocate memory for the conversion. When it is
scanning the program, the hourglass counts down from 99 to 0, and then
back up to 99 when it is converting the program.
Again, to abort at any stage press Escape.
Reasons for Unrecognised SWIs/SYSs
For simplicity I will just refer to SWIs, as they are technically
exactly the same as SYSs.
SWIs are usually unrecognised for one of two reasons:
1) The name has been misspelt - SWI names are case sensitive.
2) The module that provides the SWI is not resident in memory.
Anything Else.....
The above is (I hope) a guide to the use of !SWIRef. If you have any
immediate problems then !SWIRef does support interactive Help via
Acorn's !Help.
If you have any problems, comments, bug reports (and there are probably
still several in there), or would like more information about BubbleSoft
or its sister (or is that brother) company Wabbit, then I can be reached
at :
E-Mail (until June 1995) :
se1dmm@dmu.ac.uk
Snail Mail :
Term time until June 1995
Room 217a
Gimson Hall of Residence
DeMontfort Square
77-89 Princess Road East
Leicester
LE1 7DQ
Home
5, Cathedral Close
Richmond Park
Dukinfield
Cheshire
SK16 5RN
If in doubt, use my home address.
For info about Wabbit, write to Keith McKnight at:
E-Mail :
K.T.McKnight@mcs.salford.ac.uk
Snail Mail :
18, Grosvenor Gardens
Sharston
Greater Manchester
M22 4XA