RISC_OS Debugger

Written by Richard H Heywood

This program may be distributed freely in the public domain as long as
all the files associated with it are left unaltered. The !run and !boot may
be tweeked for your own systems but all other code, data, copyright messages
and help must be left unaltered.

How to use it.

Inside the !debug application is a file called debugger. Copy this file into 
the place you keep all your .h files and #include it into any risc_os
application that you are developing. You will be given 2 new functions to 
call.
         debug(line_number, message);
         debug_int(line_number, message, integer);

  Line_number is an int between 1 and 6. anything else will be ignored. the
message is a string (eg. "made it to main wimp poll"). Keep these messages
smaller than 45 characters long. If they are longer they will simply be
truncated and you won't be able to read them anyway.

Once all the strange bugs have been ironed out, get rid of all the debug()
calls and the #include and send it to the nearest public domain library
(unless you are one of those nasty people that expects money for you 
products!!). Theres no real reason why you should take the debug()s out,
its only that someone else may have !debug running and it would make a mess
of it.


How it works.

There is a system varibale for each line of text plus one to mark if any of
the lines have changed. When a call to debug is made, the appropriate line ischanged and the marker changed. At !debugs next poll, it will notice that
something has changed and update all the lines.
Because of this you can not have two different copies of it running at the 
same time. If you do have two running, only one will get any changes to the
messages (whichever one is polled first!)


Getting it to work with BASIC wimp progs.

 This is no real problem - simply take a look at the two functions inside
'debugger' and re-write them in basic. They are very simple as all they do is
change 2 system variables. Next bolt the 2 PROCs to the end of you basic 
proggy and call them when needed.

 
Hope it helps you out :-)
I needed it when writting it :-( 


HISTORY

Version 1.00
  First implementation




Comments, bugs etc to :-

Rik
rhh88@uk.ac.soton.ecs        (dies end of July 91)

or
Harewood
Harewood Road,
Chalfont St Giles,
Bucks HP8 4UA.
