home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / s / swiref / !SWIRef / !Help < prev    next >
Text File  |  1995-01-20  |  6KB  |  163 lines

  1.                                     !SWIRef
  2.                                   Version 1.02
  3.                                By David McMullen
  4.                                © BubbleSoft 1995
  5.  
  6. Boring © Stuff...
  7.  
  8.      !SWIRef is FREEWARE. This means that it can be distributed freely as
  9.      long as all the files are included in an unaltered condition, and no
  10.      charge is made for the distribution other than media costs and minimal
  11.      postage. The files included are:
  12.  
  13.      !Boot                 Obey
  14.      !Help                 Text (This file)
  15.      !Run                  Obey
  16.      !RunImage             Absolute
  17.      !Sprites              Sprite
  18.      Resources.Messages    Text
  19.      Resources.MsgTrans    Module
  20.      Resources.Sprites     Sprite
  21.      Resources.Templates   Template
  22.      Resources.WimpExt     Module
  23.  
  24.      The MessageTrans module is © Acorn Computers Ltd
  25.      The WimpExtension module is © Jon Ribbens of DoggySoft
  26.  
  27.      I retain © on all files except the two modules mentioned above.
  28.  
  29. Which RISC OS?
  30.  
  31.      !SWIRef has only been tester£d with RISC OS 3.1, but should work with
  32.      any version. That is, I have tried to avoid using any OS dependant
  33.      routines, and have even tried to check for RISC OS 2, so that !SWIRef
  34.      doesn't make any calls to DragASprite. If you have any problems, let me
  35.      know what the error/problem was and where and when it occured, and I'll
  36.      see what I can do.
  37.  
  38. What is !SWIRef?
  39.  
  40.      !SWIRef is a program for converting SWI names, eg OS_File, to their
  41.      equivalent numbers, eg 8. This is useful for 2 reasons:
  42.  
  43.      1) It makes programs smaller, as they have a 5 figure number instead of
  44.         huge string.
  45.  
  46.      2) It can speed up the execution of a program, as the computer converts
  47.         the SWI name to a number when it executes, so this removes the need
  48.         for that, and the computer can execute the SWI directly without
  49.         having to spend time looking the name up first.
  50.  
  51.      !SWIRef can convert SWIs in three different ways:
  52.  
  53. 1) Interactive SWI Conversion.
  54.  
  55.      To use interactive SWI conversion click SELECT or ADJUST on the !SWIRef
  56.      icon on the iconbar to open the main window. When this window is opened
  57.      the caret will be in the SWI number writeable icon. To move the caret to
  58.      the SWI name writeable icon either click in it with SELECT or ADJUST, or
  59.      use the ⇧ or ⇩ cursor keys.
  60.  
  61.      By default you should enter SWI numbers in decimal, but this can be
  62.      changed to hexadecimal via the options window (click on Options, or
  63.      select  Options... from the iconbar menu). The three letters in brackets
  64.      in the main window's title bar show the current setting, either (hex) 
  65.      for hexadecimal or (dec) for decimal.
  66.  
  67.      To convert a SWI number to its equivalent name, enter the number in the
  68.      appropriate base (hex or dec) in the SWI number writeable icon, and
  69.      either press <RETURN> or click SELECT or ADJUST on the Convert icon.
  70.  
  71.      To convert a SWI name to its number, enter the name in the SWI name
  72.      writeable icon, and either press <RETURN> or click SELECT or ADJUST on
  73.      the Convert icon. NB - The SWI name is case sensitive.
  74.  
  75.      Note - When you click on Convert, !SWIRef converts the name or number
  76.      according to which icon owns the caret at the time. If neither icon owns
  77.      the caret !SWIRef will attempt to convert the number.
  78.  
  79. 2) Convert SYS names to numbers in a BASIC program.
  80.  
  81.      When 'Convert names to numbers' is selected from the options window, the
  82.      text 'Name->Num' will appear under the icon on the iconbar, then you can
  83.      drag a BASIC file to the !SWIRef icon to convert all the SYS commands
  84.      (BASICs version of SWI) from names to numbers. When you drag the file to
  85.      !SWIRef it is loaded and converted. When the conversion is finished a
  86.      savebox will appear. The converted file is the saved in the normal way.
  87.      The Save Report icon will save a report for the conversion if it is
  88.      ticked. This report is saved to the same directory as the converted
  89.      file, and has the filename ConvReport. This report tells you how many
  90.      SYS commands were in the file, how many were converted, and how many
  91.      were not recognised. It also provides a list of any unrecognised SYS
  92.      commands.
  93.  
  94.      Note: Conversion of files can take quite a long time. The hourglass
  95.      percentage gives some indication of how the conversion is progressing.
  96.      To abort the conversion at any point press Escape.
  97.  
  98.  
  99. 3) Convert SYS numbers to names in a BASIC program.
  100.  
  101.      This works in the same way as Convert names to numbers, and is selected
  102.      via the options window. Due to the way I've written it, this routine
  103.      takes about twice as long as the previous one, as it initially scans
  104.      through the program to allocate memory for the conversion. When it is
  105.      scanning the program, the hourglass counts down from 99 to 0, and then
  106.      back up to 99 when it is converting the program.
  107.  
  108.      Again, to abort at any stage press Escape.
  109.  
  110. Reasons for Unrecognised SWIs/SYSs
  111.  
  112.      For simplicity I will just refer to SWIs, as they are technically
  113.      exactly the same as SYSs.
  114.  
  115.      SWIs are usually unrecognised for one of two reasons:
  116.  
  117.      1) The name has been misspelt - SWI names are case sensitive.
  118.      2) The module that provides the SWI is not resident in memory.
  119.  
  120. Anything Else.....
  121.  
  122.      The above is (I hope) a guide to the use of !SWIRef. If you have any
  123.      immediate problems then !SWIRef does support interactive Help via
  124.      Acorn's !Help.
  125.  
  126.      If you have any problems, comments, bug reports (and there are probably
  127.      still several in there), or would like more information about BubbleSoft
  128.      or its sister (or is that brother) company Wabbit, then I can be reached
  129.      at :
  130.  
  131. E-Mail (until June 1995) :
  132.      se1dmm@dmu.ac.uk
  133.  
  134. Snail Mail :
  135.      Term time until June 1995
  136.  
  137.      Room 217a
  138.      Gimson Hall of Residence
  139.      DeMontfort Square
  140.      77-89 Princess Road East
  141.      Leicester
  142.      LE1 7DQ
  143.  
  144.      Home
  145.  
  146.      5, Cathedral Close
  147.      Richmond Park
  148.      Dukinfield
  149.      Cheshire
  150.      SK16 5RN
  151.  
  152.      If in doubt, use my home address.
  153.  
  154. For info about Wabbit, write to Keith McKnight at:
  155.  
  156. E-Mail :
  157.      K.T.McKnight@mcs.salford.ac.uk
  158.  
  159. Snail Mail :
  160.      18, Grosvenor Gardens
  161.      Sharston
  162.      Greater Manchester
  163.      M22 4XA