home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 3: The Continuation / 17-Bit_The_Continuation_Disc.iso / amigan / amigan 11 / gomf / gomf.readmeoryou'llguru!! < prev    next >
Encoding:
Text File  |  1994-01-27  |  15.2 KB  |  303 lines

  1.  
  2.                                     GOMF1.0
  3.                                     ~~~~~~~
  4.   Introduction
  5.   ~~~~~~~~~~~~
  6.  
  7.   Please read the entire text of this file before using GOMF1.0.  It contains
  8.   important information and could save you a lot of hassle.
  9.  
  10.   The name of this application is an acronym for 'Get Outa My Face'.  I've
  11.   found myself mumbling this phrase all too often when public domain or even
  12.   commercial programs have created errors, bringing on the ubiquitous guru
  13.   meditation alert.  Of course the majority of these system traps I've seen
  14.   were caused by address errors in my own code, while in the early stages of
  15.   writing and debugging my own software.
  16.  
  17.   It is true that the user has the option, at the system requester presented
  18.   before the alert, of simply ignoring it and continuing to run programs,
  19.   even though the system is somewhat crippled.  I, however, found this to be
  20.   almost as inconvenient as rebooting.  I did so only when I had to save
  21.   valuable data to disk or was anticipating another problem with the program
  22.   I was developing.  At times I would run my program, select an option,
  23.   crash, make notes, click the system requester to the rear, run the program
  24.   again, select another option, crash, and make more notes, in a loop until I
  25.   had all the information I could glean.  Then I'd click a system requester
  26.   back to the front and go through the guru meditation every Amiga user has
  27.   been forced into.  There had to be a better way!
  28.  
  29.   Apparently in the nuclear power generation industry when the operating
  30.   system senses a grevious enough malfunction it shuts itself down.  The
  31.   operators or technicians then say that the 'system scrammed'.  I think this
  32.   is an appropriate way of describing the Amiga user's perdicament.
  33.  
  34.   My first experiments with the system traps was to write an error handler
  35.   module, which is linked to the assembler code I'm developing, that allows
  36.   me to clean up and debug while never crashing at all.  This worked rather
  37.   well because the program that caused the error 'knew' itself intimately and
  38.   could therefore extricate itself, upon user direction to do so, from the
  39.   system, with no ill effects.  I should mention at this point that the kind
  40.   of crashes I'm talking about are only those that cause a requester, not the
  41.   ones that have the system so badly out of shape that the normal interface
  42.   is gone.  The link module would protect system integrity only from its own
  43.   errors.  This meant that, if some other utility I was using caused an
  44.   error, then the guru would come with the handbasket.
  45.  
  46.   The second version of GOMF1.0 was designed to provide its error handling
  47.   features globally within the system.  It would then respond to errors in
  48.   any task or process.  The error handler would know nothing about a program,
  49.   except what it could fetch out of the system structures.  This means that
  50.   GOMF1.0 can only remove public memory, including, the task or process, its
  51.   memory allocations, messages unanswered and display screens and windows,
  52.   from the system.  This works well.  It may be that there is one more opener
  53.   than closer left in a library, device or resource, but this dosen't impede
  54.   normal operations like the guru alert is wont to do.  Any memory allocated
  55.   and maintained in a private memory list or messages saved internally by a
  56.   program, cannot be released to the system.
  57.  
  58.   The benifits of the GOMF1.0 system make it worth using, I believe, even for
  59.   the casual user.  The most obvious reason is the reduction in the frequency
  60.   of having to reboot the system at the guru meditation prompt.  This will
  61.   save you time.  When you don't have to reboot, you don't have to wait while
  62.   your startup-sequence configures your machine.  I've found this a real boon
  63.   because I was reticent to have a lot of background tasks or utilities
  64.   activated, mainly because I'd have to wait for them to be set up each time
  65.   I was forced to reboot.  When using GOMF1.0 this is reduced to the minimum
  66.   possible, I believe.
  67.  
  68.   If you don't have to reset the Amiga, you lose no data, unless the creator
  69.   of the error has trashed your workspace.  This saves your work.  You have
  70.   the option of saving out to disk any important files.  I suggest doing this
  71.   to temporary disk files so that if the data is corrupted, you have a chance
  72.   to verify this before overwriting your originals.  A recoverable ram disk,
  73.   otherwise known as VD0:, also protects contents of ram from losses caused
  74.   by resets.  They can be mounted upon rebooting to recover their previous
  75.   contents.  They will not protect against data corruption caused by a
  76.   runaway program either, however.  The main difference between GOMF1.0 and a
  77.   recoverable ram disk, to a user or programmer, is the same as the main
  78.   difference between VD0: and RAM:, other than recoverability.  Floppy disk
  79.   is reasonably fast.  RAM: is very fast.  VD0: is somewhere in between.
  80.   From the standpoint of speed, GOMF1.0 and RAM: are preferable to VD0:.  'I
  81.   feel the need....the need for speed!'
  82.  
  83.   I can hear some of you devious (intelligent?) computerists out there
  84.   thinking... 'Why not use RAM: for speed, when disk intensive operations
  85.   are called for, and place all important data in VD0: files so that they can
  86.   be recovered if a reset is necessary, just in case GOMF1.0 is unable to
  87.   recover from the crash?'  You know, I'm glad you thought of that.  It works
  88.   well.  GOMF1.0, RAM: and VD0: are foundational tools for programming, at
  89.   least in the early stages.  Development is quicker and more reliable.
  90.  
  91.  
  92.   Policies
  93.   ~~~~~~~~
  94.  
  95.   On all software described herein, I express no warranty of, but not
  96.   limited to, the usefulness, method of operation, or the user's
  97.   satisfaction with the results.  Neither do I imply such a warranty.  You
  98.   signify your willingness to exempt me from all responsibility for the
  99.   results of the use of these software products by your use of them.
  100.  
  101.   The GOMF1.0 software, listed below, may be shared with anyone, provided
  102.   this is done for no profit, other than a nominal fee for disk copying.  I
  103.   require also that all files listed be kept together as found.  I wish none
  104.   of this text file nor any of the executable programs be altered in any way.
  105.   GOMF1.0 and GOMF1.0.obj are shareware products which are to be utilized
  106.   only by those who pay the suggested sum of $5.00 each for the use of either
  107.   program.  If you find this software useful, please remit this minimal sum
  108.   to the address below.
  109.  
  110.   GOMF1.0 is not public domain software. Therefore, neither GOMF1.0 nor
  111.   GOMF1.0.obj may be included with any other program released, whether public
  112.   domain or commercial without the prior, written consent of the author,
  113.   Christian Johnsen.  If you wish to do so please arrange this by writing me
  114.   at the following address with the particulars.  I'll entertain customizing
  115.   this system for your particular application's use if required.
  116.  
  117.   I wish to mention, at this point, that I hope no one is offended by the
  118.   icon I've designed for these programs.  No disrespect was intended.
  119.  
  120.  
  121.   Contents
  122.   ~~~~~~~~
  123.  
  124.   The disk on which you found this information file should contain the
  125.   following programs and text files plus their attendant icons.
  126.  
  127.   1.  GOMFinfo - this text file of instructions and terms.
  128.  
  129.   2.  GOMF1.0 - the global error handler.
  130.  
  131.   3.  GOMF1.0.obj - the error handler object code link module.
  132.  
  133.   4.  Hey! - a program to allow recall of GOMF1.0 for user discretionary
  134.       operations on the program display.
  135.  
  136.   5.  Err1 - a simple Workbench screen error test program.
  137.  
  138.   6.  Err2 - an error test program with a custom double length screen,
  139.       containing fourteen windows.
  140.  
  141.   7.  Err3 - a custom double length screen error test program containing
  142.       no windows.
  143.  
  144.   8.  Err4 - an example test program linked with GOMF1.0.obj to demonstrate
  145.       the capabilities of the link module.
  146.  
  147.   9.  Err4.asm - the source code for Err4 that demonstrates the use of the
  148.       link module GOMF1.0.obj.
  149.  
  150.   Instructions
  151.   ~~~~~~~~~~~~
  152.  
  153.   GOMF1.0 is the global system error handler which I designed for the
  154.   average Amigaiod.  It notifies the user that it has installed itself, then
  155.   snoozes until the system scrams.  Then, according to user selection, it
  156.   restores the system in one of four ways.  The other version of the program,
  157.   GOMF1.0.obj, was designed for programmers.  It must be linked to a program
  158.   after assembly or compilation.  It will handle errors similar to GOMF1.0,
  159.   except that it can be customized as described in 'Using GOMF1.0.obj'.  The
  160.   Hey! program is useful if it becomes necessary to reenter the error handler
  161.   because you have exited it prematurely.  The Err1, Err2, and Err4 programs
  162.   are provided so that you may test the operation of GOMF1.0 and familiarize
  163.   yourself with its operation before you attempt to beat the guru under
  164.   normal operation conditions.  Err4 is a demo of a program linked to
  165.   GOMF1.0.obj.
  166.  
  167.  
  168.   Using GOMF1.0
  169.   ~~~~~~~~~~~~~
  170.  
  171.   This program can be run either from the CLI or the Workbench.  To use the
  172.   program from the CLI enter...
  173.  
  174.   Run GOMF1.0
  175.  
  176.   I suggest that the program be kept in the C directory of the Workbench
  177.   disk, and the above line be added to your startup-sequence.  This way your
  178.   Amiga system will be made reasonably crash proof upon booting up.
  179.  
  180.   When run there will be a momentary window displayed informing you that
  181.   GOMF1.0 is activated.  It will detect any setup errors and report these, if
  182.   found, so that you'll know that the system is then not protected.  GOMF1.0
  183.   and GOMF1.0.obj examine system structures to determine which of either
  184.   68000, 68010 or 68020 microprocessors are on board and configures itself to
  185.   handle the appropriate supervisor stack frame.  I have not, at this time
  186.   (June 25, 1987), had the pleasure of testing this on either the 68010 or
  187.   68020 configured machines.  I would appreciate any feedback on the success
  188.   or failure of GOMF1.0 on either of these processors.
  189.  
  190.   Once an error is encountered, the normal system requester, giving the RETRY
  191.   or CANCEL options will be presented.  Select the CANCEL gadget.  The
  192.   SYSTEM SCRAMMED window will then be presented.  It contains useful
  193.   information, similar to that encoded into the guru meditation alert number,
  194.   but it is decoded and presented in English text.  This includes the alert
  195.   number, the program counter address of the instruction immediately
  196.   following the error, the library or vector type of the error, the general
  197.   type of problem and a description of a more specific nature.  This includes
  198.   all known error types listed in the developer's alerts include file.  There
  199.   are also four gadget options.  You must use caution when using any of this
  200.   tool's options.
  201.  
  202.   The GOMF gadget removes, as safely as possible, the errant program, then
  203.   returns the system to normal processing.  It will not fix the problem in
  204.   the program, only remove the task or process without the need to reset the
  205.   computer.  Whenever the GOMF gadget is tweaked, the results of the
  206.   operation are displayed.  This would be either the completed message, if
  207.   successful, or an error message in the event of a failure.  Normally it is
  208.   only the removal of the display elements of a program which yield errors.
  209.   You can usually use the WHAP gadget as suggested in the error message to
  210.   recover the display should this occur, before attempting to use GOMF a
  211.   second time.  The messages provided by the error handler should be
  212.   sufficient to guide you through the removal of a program, but please use
  213.   the Err1, Err2 and Err4 programs to practice operations.
  214.  
  215.   The WHAP gadget is provided for use when a program's windows or screen
  216.   elude the automatic scan features of GOMF.  For instance, if it is
  217.   ascertained that only the WB screen is active, then you will be requested
  218.   to click on the WHAP gadget followed by the offensive program's window or
  219.   screen.  WHAP will remove the display element selected.  WHAP will make it
  220.   possible to remove piece by piece a multi-screen and/or multi-window
  221.   display, if necessary.  You will have to either, use the Left-AMIGA and N
  222.   or Left-AMIGA M key combinations to flip between the Workbench and the
  223.   applications' screen if it uses one of its own, or pull down the Workbench
  224.   screen to expose the faulty programs' display, when using this option.
  225.  
  226.   The RESET gadget allows a reboot of the system without visiting the guru
  227.   or giving the Amiga three finger salute.
  228.  
  229.   The GURU gadget calls the normal system alert as usual.
  230.  
  231.  
  232.   Using GOMF1.0.obj
  233.   ~~~~~~~~~~~~~~~~~
  234.  
  235.   GOMF1.0.obj is an object code file generated by an assembler.  For a
  236.   programmer to use it the code must be linked to the object output of an
  237.   assembler or compiler.  The ALINK linker directives FROM or ROOT are used
  238.   to accomplish this.  For example...
  239.  
  240.   ALINK MyProg,GOMF1.0.obj to ProgName
  241.  
  242.   GOMF1.0.obj provides the same protection as GOMF1.0, however the linked
  243.   module allows the programmer to design his or her own method of handling
  244.   these error returns.
  245.  
  246.   Setting up your source code for use with GOMF1.0.obj is relatively easy.
  247.   Your code must make references to the following external labels, _GOMF
  248.   and _GOMFEnding.  You may also wish to utilize other information with
  249.   external reference labels of _WHAP, _ProgramCounter, _GeneralErr,
  250.   _LibraryErr, _SpecificErr.  GOMF1.0.obj requires your source define its
  251.   own external label, _ErrorHandler, which is coded to recieve the return to
  252.   normal processing, after the error has been neutralized.  You will have to
  253.   write up a custom routine called _ErrorHandler that will recieve the
  254.   program flow after an error has been detected elsewhere in the program.
  255.   This may be simply closing screens, windows and libraries before exiting,
  256.   or you may wish to analyse the situation more completely and continue
  257.   execution of your program code at another point.  The potential of this
  258.   feature is not small.
  259.  
  260.   Early on in your program do a simple call of _GOMF such as JSR _GOMF or
  261.   GOMF().  This will activate the features of the linked module.  Before
  262.   your program cleans up and ends you must call _GOMFEnding in a like
  263.   fashion so that _GOMF can release its memory useage etc.
  264.  
  265.   To recap, _GOMF is the initialization entry point.  _GOMFEnding is the
  266.   termination entry point.  The other labels available are a structure laid
  267.   out as follows...
  268.  
  269.   STRUCTURE  GOMF1.0,0
  270.   ULONG      _ProgramCounter  value of the program counter after the error
  271.   APTR       _LibraryErr      pointer to null terminated string discriptor
  272.   APTR       _GeneralErr      pointer to null terminated string discriptor
  273.   APTR       _SpecificErr     pointer to null terminated string discriptor
  274.   UBYTE      _WHAP            boolean TRUE or FALSE of WHAP gadget selction
  275.  
  276.   See the source code example of the use of this structure in Err4.asm for
  277.   more clarification.
  278.  
  279.   Credits
  280.   ~~~~~~~
  281.  
  282.   GOMF1.0, GOMF1.0.obj, Err1, Err2, Err3, Err4, and Hey! were written
  283.   entirely in assembly language by Christian Johnsen.
  284.  
  285.   I trust this application is of use and value to you, and I welcome any
  286.   communication via mail at this address.
  287.  
  288.  
  289.  
  290.                                Christian Johnsen
  291.  
  292.                               3169  Consort Court
  293.  
  294.                                    Clearbrook
  295.  
  296.                                 British Columbia
  297.  
  298.                                     Canada
  299.  
  300.                                    V2T  4J5
  301.  
  302.                                 (604) 853-5426
  303.