REM > Inform
      ------


This file should document the purpose (if any) of the code, and general
information about how the program works. I hope you find it useful and
well documented.

Purpose :
-------

The "Wibble module" is essentially a simple & short demo of how the VID-C
support chip can be programmed from assembler. It was written before the
other programs I have sent you as a test, and then later expanded to become
an event-driven routine in module form.

It is best used to puzzle and infuriate collegues at work - the sight of a
poor beginner (or even an expert or two) struggling to use the RISC OS
Desktop while it sways from side to side is not to be missed !!

It is similar to other "graphics demos" that you have published in the past,
and I think it is short enough to be put in the magazine as well as the disc.

It can be easily adapted by BASIC programmers (since the algorithm is in 
BASIC) to perform all kinds of screen movements and provides a lot of fun.

Features :
--------

*  It is in module form. This is because RISC OS performs memory-mapping
   when applications (eg, Desktop) are run, and this would wreck any interrupt
   driven code unless the program was informed of the mapping. A module with
   initialisation & finalisation code is the safest way of providing this.
   Wibble hasn't yet crashed !

*  It can be easily stopped / started by the commands *FX 13 4 (disable VSync
   event), and *FX 14 4

*  It writes directly to the VID-C chip registers by specifying the register
   number in the top 13 bits, and the data is written to address &3400000
   The routine must be in an OPERATING SYSTEM mode (SVC, IRQ or FIQ) because
   the VID-C is in protected RAM. Rather handily, all event code is entered
   in IRQ mode which saves us the hassle of entering a privileged mode

*  It uses the X-form (non-error returning) form of all SWI's, this is 
   important for module code (especially event driven background tasks !!)

*  Also all relevant registers & flags are preserved, v.important for
   background code

*  The code is so short that the user notices no loss in processor power

*  The program will run in any 640 x 256 screen mode (eg, 0, 12, 15) and is
   intended to run under the desktop, although it runs in the CLI too

*  Incidentally - running Wibble & !Madness at the same time drives most users
   crazy !


There are 2 versions of Wibble - a simple ellipse movement and a figure of
eight (the differences in code are about 6 characters !) and I though that
you could publish your favourite and mention the alterations in the article.




Nick Smith, 28/11/89.
