 ____          ____  ___
|_  /__ _ _ __|  _ \/ __|
 / // _` | '_ \ |_) \__ \ 0.33, 15 January 1999
/___\__,_| .__/____/|___/  Darren Salt, 1996-9
         |_|

This software is COPYRIGHT, but has been released as FREEWARE. Please see the
end of this file for conditions of use and distribution.


Installation


Drop !ZapDS into !Zap.Modules and (quit and re)load Zap...


Commands


Commands without any specifed syntax take no parameters.

Any commands which take a string parameter will open the minibuffer if no
parameter is supplied.

A "Zap expression" is a string which is evaluated by OS_EvaluateExpression
but which may contain Zap functions.


DS_AdrL


Assembles a long (two instruction) ADR.

Syntax: DS_AdrL "[<condition code>] <register>,<address>"

Example:
	at address &1000, the command
		DS_AdrL "LT R1,&5344"
	is equivalent to
		Assemble "ADRLT R1,&1344"
		Assemble "ADDLT R1,R1,#&4000"
(It will of course use SUB if required.)


DS_AdrX


Assembles a very long (three instruction) ADR, much as DS_AdrL does - it even
has the same syntax.


DS_Add, DS_Sub, DS_Rsb, DS_And, DS_Or, DS_Eor
          

These commands perform an arithmetic or logic operation on the current byte
(or word, if in word or code mode). Each takes a Zap expression as a
parameter; it must evaluate to a number. (Even if the byte/word is unchanged,
the cursor is moved on.)

For example, to add &180 to a word (in word mode), you'd use
	DS_Add "&180"


DS_SWItoName


This takes an SWI number, found at the cursor position, and replaces it with
the corresponding name. In BASIC and BASTXT modes, quotation marks are
automatically inserted.


DS_SWItoNumber


This takes an SWI name, found at the cursor position, and replaces it with
the corresponding number. In BASIC and BASTXT modes, surrounding quotation
marks are automatically removed.


DS_ToIcon


Allows you to copy the selection to a writable icon, stopping at the first
control character. All you need to do is to click Select (or Adjust, which
causes a ^U to be typed first) where you want the text to be inserted, or
Menu to cancel.


SendURL


This command will look for something URL-like at the cursor position, and
will broadcast it for any interested applications.

ZapDS recognises URLs of the form "#{protocol}{address}#" or
"#URL:{protocol}{address}#". Recognised {protocol} types are:
	finger://	http://		news:		telnet://
	ftp://		https://	nntp:		tn3270://
	gopher://	mailto:		rlogin://
Minimal checking is performed on the {address}; however, email addresses
should contain one '@' else they'll not be coloured. mailto: is coloured
differently, and may be omitted if "URL:" is also. The "URL:" prefix is case
sensitive. '#' may be TAB, LF, space, '"', '<', or '>'.

For example, these will be recognised and sent:

ftp://ftp.demon.co.uk/pub/acorn/
"http://www.dsse.ecs.soton.ac.uk/"
<mailto:arcsalt@spuddy.mew.co.uk>
<URL:http://www.spuddy.org/>
darren.salt@unn.ac.uk

The last example would be automatically prefixed with "mailto:".

This command has been successfully tested with ArcWeb, Messenger and Browse.
It should also work with Termite, Fresco and Voyager, provided that they
implement either the ANT URL protocol (message &4AF80) or the URI launching
protocol.

The Alias$Open_URI_* and Alias$URLOpen_* system variable groups are
supported; these are used if the broadcast protocols failed. If either of
these are used, then the application to which it points is loaded; if the URI
variable is used, then the URI launching protocol is reused; the app may or
may not accept the broadcast, since there's no guarantee that it'll be ready "instantly".


SendURLGivenOffset


This command is deprecated.

It is intended for use by Zap modes to implement the sending of URLs via
mouse clicks, taking a file offset as a parameter and using this instead of
the cursor position. It is otherwise equivalent to SendURL.


SendURLString


Like SendURL, except that it broadcasts its supplied string parameter (if it
looks like a URL).

Used as a function, it expects a file offset and will return the URL at that
offset, or null if no URL is found.


Commands removed since v0.20


Command name			Equivalent		Location
					
DS_Eval, DS_EvalH, DS_UEval	Eval, EvalH, UEval	ZapUtil
DS_FindFile			FindFileCursor		ZapText
DS_Insert			InsertBlank		ZapText
DS_OpenParent			OpenParent		Zap
DS_SaveKeepStamp		SaveKeepStamp		ZapText
DS_StripCtrlCodes,
  DS_StripCtrlWithMask		StripCtrlCodes		ZapText
DS_SwapCaseCursor		SwapCaseCursor		ZapText
DS_Untabify			Untabify		ZapText
Format_Indented			FormatIndented		ZapText
If, And_If, Or_If, Eor_If	If			Zap
If_TRUE, If_FALSE		...Else...EndIf		Zap
Repeat				Repeat			Zap
CloseAll, DiscardAll,		(names unchanged)	ZapUtil
  SaveAll, SaveAndCloseAll,
  SaveAndDiscardAll


Copyright


The conditions of copying this program and its associated documentation are
the same as those of the main Zap application, except that you do not need my
permission to copy it if you have Dominic Symes's.

Versions marked "[TEST]" or "" are not to be distributed except with
similarly-marked versions of Zap.

This software is provided as is with no warranty as to its suitability or
otherwise for any particular task. If it does anything nasty then I want to
know so I can fix it, but I'm not taking any responsibility. (Besides,
there's no point in sueing me since I've got next to no money.)

Please note that I reserve the right to make alterations to this module, its
operation, documentation, and/or conditions of use without notice in any way
I see fit. Hopefully it will be an improvement.


Contact


Darren Salt - Zap: ds@zap.uk.eu.org
             Misc: ds@youmustbejoking.demon.co.uk
         Fallback: arcsalt@spuddy.mew.co.uk
