A Module Information Utility by Mike Ironmonger

Double-clicking on the !ModInfo icon opens a window listing all ROM modules,
along with their current status (running, active, dormant or unplugged).
Clicking on a module's status changes it from active to dormant to unplugged
and back to active (you cannot change the status of a running module).

Clicking on a module's title opens a window containing the module header
information. Clicking on the 'Command keyword table' entry opens a window
listing all of the commands recognised by that module. Clicking on any of
the three SWI entries opens a window listing the SWI prefix and any SWIs
recognised by the module.

Closing the window containing the module list terminates the program.

Full details of the module header format are given in the Programmer's
Reference Manual.
_______________________________________________________________________________

Modifications by Majid Anwar...

1  -now displays ROM modules and/or RAM modules as well.

2  -installs icon on icon bar: closing window no longer terminates program;
   -clicking SELECT over icon re-opens Main window;
   -clicking ADJUST over icon re-opens Help window.
    (version 'A' only - see below)

3  -option to update module list (if other modules loaded/killed during
     program execution);
   -options to display modules as status/name or version/title, where 
     NAME is that used by the '*modules' command, and 
     TITLE is that given by '*help modules';
   -options may be saved: -ROM/RAM lists on or off,
                          -version/status for ROM/RAM lists,
                          -Main Window position/size/scroll,
                          -Help Window position and 'format' size (see below),
                          -fast ROM status is NOT saved, but depends on the
                            machine state at the time of next execution of
                            !ModInfo.

4  -any *commands may be executed from menu;
   -if menu is selected over a command in the Command Window (or a Command
     Info window, or the Help Window), the command will automatically
     be placed on the menu for convenience, although parameters may still be
     added in the usual way;
   -all *commands are executed via Wimp_StartTask and are therefore as
     Wimp-compatible as they will ever be.

5  -clicking ADJUST over command in Command Window displays Command Info;
   -clicking SELECT over Command Info gives help string and syntax;
   -otherwise, with all other windows ADJUST and SELECT behave as in filer 
     windows  i.e. ADJUST closes the current window behind it.

6  -all sub-windows now "deleted" upon clicking over close icon, not simply
     "closed". This prevents Wimp overload (which I experienced) if looking 
     through many modules. (technical point, that one !)

7  -fast ROMs speeds up MEMC such that ROMS are read at 8MHz instead of 4MHz
     i.e. has a similar speed increase effect to RMFASTER-ing all the ROMs,
          but saving on RMA memory: but there's no guarantee that the Acorn
          RISCOS ROM chips can work at this speed (I've haven't had any 
          crashes so far).

8  -while over commands in the Command Window, syntax strings are sent to 
     the !Help utility if it is running. This saves you from clicking 
     repeatedly over commands in a long list to get their syntax messages.

9  -the 'WIDTH' (menu) refers to the width of the help window in characters:
     this can only be selected once the help window has something to display,
     i.e. it is not available immediately on program execution, but from the 
          point that the first command help string is examined (as above) and
          from then on.
     It is useful if moving from 80 character modes (e.g. 12) to 132 character
     ones (e.g. 17), etc; or for some help strings which seem to have been
     'formatted' by the author and read clearly only in 80 char modes.

10 -while over any window (except the Info Window below) selecting the 'PRINT'
     option will spool the contents of that window to the printer stream.
     Pressing the ESCAPE key will abandon the printout and clear the internal
     printer buffer. In the command list, '(Config)' after a keyword means
     that it is a configure option i.e. used as '*configure x'.

11 -colours: Main Window red= running; black= active; grey= dormant/unplugged
             Command Window  black= command keyword;  grey= configure keyword.

12 -there is now an Info Window - I assumed that this should be version 
     2.20 (previously A 1.05). 
    The 'A 2.20' version installs on the icon bar.
    The 'B 2.20' version does not install on the icon bar, and hence closing
     the main window terminates the program. It is best used using
     !TinyDirs, or a 'sticky backdrop' type program.
     (Also, I had to name the window "Info" instead of the Acorn standard,
      "About this program" because Mike's original FNcreate_window did not
      seem to support indirected title names and I did not see any need to 
      re-write it).

13 -selectable icons (i.e. those over which clicking produces more information)
     are now highlighted if the pointer is correctly positioned... for the
     benefit of those of us with wobbly hands and poor eyesight !!

14 -clicking over the Command Info window will issue a '*help x' where x is
     the command. Again this is issued using Wimp_StartTask.
     This feature is useful for commands that have no text but are
     indirected to a piece of module code (command flag bit 5 set) e.g.
     '*help filecommands'.

15 -modules may also be RMKilled/RMReInitialised from the Menu. This allows
     the user to keep the module versions displayed, while modifying module
     status e.g. while comparing new and old versions of a module.
    Changing module status from the menu automatically updates the module
     list, whereas clicking the module 'status' icons does not. Hence if
     the user requires to change the status of many modules, it is best to
     change the display to Name/Status, then change the statuses, and
     finally perform a single update (which can be quite time-consuming).

16 -pressing the shift key while closing any window will cause all windows
    to be closed, in order to keep the desktop tidy (in version B all except
    the main window).

NOTE: if some module names appear odd (e.g. with version strings tagged on
      at end) it is because some programmers have failed to follow Acorn's 
      simple guidelines on Module help strings (p.635, new PRM's). !ModInfo 
      has complex range-checking routines to remove these quirks, but cannot 
      foresee every possibility. In fact in some (rare) cases certain 
      assumptions that !ModInfo makes may actually cause the names to appear 
      strange (but not very likely!!)
      (for the technically minded: if the TITLE string does not end in a &09 
       as it should - which separates the TITLE from the version - !ModInfo 
       searches for the first decimal point (.) and tracks back. 
       This ASSUMES that:
          a) the version string has a decimal point, and 
          b) the TITLE does not
       If either assumption is incorrect (e.g. a module called "Hello.Jimmy")
       I presume that !ModInfo will get rather confused).
                                                                            
I apologise for any bugs that I may have unintentionally introduced into a
previously well-written program.

COPYRIGHT:
The above modifications were made to the program because I thought the 
original program was an excellent idea, and that as it stood it had a lot of 
potential for enhancement. The modifications were therefore made in good
faith, and there was no intention to infringe copyright, which as far as I
see still belongs to RISC USER/Mike Ironmonger, unless they wish otherwise.

Majid Anwar
Glasgow, March 1990.
