home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / z / zapds / !Zap / 3rdParty / Salt / DS next >
Text File  |  1995-09-15  |  8KB  |  255 lines

  1. ZapDS 0.21 help file
  2. © Darren Salt, 1995
  3.  
  4. This software is COPYRIGHT, but has been released as FREEWARE. Please see the
  5. end of this file for conditions of use and distribution.
  6.  
  7.  
  8. For commands where no syntax is given, this is because they take no
  9. parameters!
  10.  
  11. Any commands which take a string parameter will open the minibuffer if no
  12. parameter is supplied.
  13.  
  14.  
  15. DS_RunApp
  16. —————————
  17. Will save the file if changes have been made, then tries to run it as an
  18. application (also sends the window to the back) - AFTER Shift & Ctrl are
  19. released (if they were pressed). For example:
  20.   File being edited  File actually run  Notes
  21.   !Beep.!RunImage    !Beep.!Run        Runs !Beep.!RunImage if not found
  22.   !Beep.Data.Make    !Beep.Data.Make
  23.   Text.Build         Text.Build
  24.  
  25.  
  26. DS_Insert
  27. —————————
  28. Inserts a space at the cursor as in !Edit.
  29. In byte mode, inserts a zero byte.
  30. In word mode, inserts a zero word.
  31. In code mode, inserts a DCD 0.
  32.  
  33.  
  34. DS_Eval
  35. ———————
  36. Evaluates the supplied expression and inserts the signed result in the
  37. supplied base at the cursor position. If the expression evaluates to a
  38. string, the base (if supplied) is ignored.
  39.  
  40. Syntax: DS_Eval "<base>:<expression>"
  41.     or: DS_Eval "<expression>"
  42.  
  43. For numeric expressions:
  44.  
  45. Valid base values are between 2 and 36. In the second form, the base defaults
  46. to decimal.
  47.  
  48.   Examples:        C    BASIC    Others
  49.     16:160*1024    0x28000    &28000    &28000
  50.     640-16        624    624    624
  51.     36:123456    36_2N9C    36_2N9C    36_2N9C
  52.     2:27         0b11011    %11011    2_11011
  53.  
  54. Exceptions:
  55.  
  56. In byte mode, only the bottom byte of the result is used. For example, if
  57. DS_EVAL "123" is executed then the byte &7B ('{') is inserted. The base is
  58. ignored.
  59.  
  60. In word and code modes, the result is inserted as a hex word, much like DCD
  61. in assembler, but reversed if the 'big endian' flag is set. The base is
  62. ignored.
  63.  
  64. For these modes, or for string expressions, it does not matter whether you
  65. use DS_Eval, DS_UEval or DS_EvalH since they will function identically.
  66.  
  67.  
  68. DS_UEval
  69. ————————
  70. Like DS_Eval but the result is unsigned. Similar syntax.
  71.  
  72.  
  73. DS_EvalH
  74. ————————
  75. Like DS_Eval but the result is always unsigned hexadecimal.
  76.  
  77. Syntax: DS_EvalH "<expression>"
  78.  
  79.  
  80. DS_AdrL
  81. ———————
  82. Assembles a long (two instruction) ADR.
  83.  
  84. Syntax: DS_AdrL "[<condition code>] <register>,<address>"
  85.  
  86. Example:
  87.     at address &1000, the command
  88.         DS_AdrL "LT R1,&5344"
  89.     is equivalent to
  90.         Assemble "ADRLT R1,&1344"
  91.         Assemble "ADDLT R1,R1,#&4000"
  92. (It will of course use SUB if required.)
  93.  
  94.  
  95. DS_AdrX
  96. ———————
  97. Assembles a very long (three instruction) ADR, much as DS_AdrL does - it even
  98. has the same syntax.
  99.  
  100.  
  101. DS_FindFile
  102. ———————————
  103. Looks for an object name (file or directory) at the cursor. If a file name is
  104. found, then it attempts to load the named file - if nothing appears to
  105. happen, this is because the file is already loaded. If a directory name is
  106. found, then it is opened using *Filer_OpenDir.
  107.  
  108. A name may not contain control codes, spaces, or one of " # * |. These, along
  109. with start and end of file, are taken as the delimiting characters. For
  110. example, executing DS_FindFile with the cursor somewhere in the middle of
  111. *<Zap$Dir>.Fonts.* causes the directory <Zap$Dir>.Fonts to be opened. Note
  112. that the trailing dot is ignored.
  113.  
  114. Slight cheat: even if nothing is found with the given name, Zap_FindFile is
  115. called in order to expand the name to a full pathname and report an error.
  116.  
  117.  
  118. DS_OpenParent
  119. —————————————
  120. Opens the directory containing the current file - just like clicking
  121. Shift-Adjust on the close icon!
  122.  
  123.  
  124. DS_SwapCaseCursor
  125. —————————————————
  126. Swaps the case of the letter at the cursor, advancing the cursor by one
  127. character - whether there is a selection or not.
  128.  
  129.  
  130. DS_SaveKeepStamp
  131. ————————————————
  132. Saves the file immediately (ie. no prompt), but preserves the datestamp
  133. regardless of whether the file has changed or not.
  134.  
  135. If the file does not have a complete pathname, it is not saved - you will
  136. hear a beep instead.
  137.  
  138.  
  139. DS_StripCtrlCodes
  140. —————————————————
  141. Strips all control codes (except for the current tab and return characters)
  142. from a file, and removes everything from the first ctrl-Z onwards. These effects are, of course, optional.
  143.  
  144. Syntax: DS_StripCtrlCodes <action>
  145.  
  146. The following values of 'action' are defined:
  147.  
  148. Bit 0 set: strip all control codes
  149. Bit 1 set: strip all control codes except ctrl-G [bell], ctrl-H [backspace]
  150.        and ctrl-L [form feed]
  151. bit 2 set: remove everything from the first ctrl-Z [soft-EOF]
  152.  
  153. The default parameter value is 5.
  154.  
  155. Other values are masked so that only the above values may occur.
  156.  
  157. If control code stripping is selected, then the 'DOS text file' and 'spool
  158. file' flags are also cleared.
  159.  
  160. The cursor may be moved by this command: this one small feature not
  161. implemented = vast speed improvement.
  162.  
  163. This command will not operate in byte, word, code or BASIC modes (it will
  164. beep at you instead).
  165.  
  166.  
  167. DS_Untabify
  168. ———————————
  169. Converts tabs to spaces, whilst maintaining the formatting - thus reversing
  170. the effects of StripSpaces 4.
  171.  
  172. In BASTXT, CMode, C, Pascal, and Assembler modes, tabs enclosed in double
  173. quotes " are left intact.
  174.  
  175. The cursor may be moved by this command: this one small feature not
  176. implemented = vast speed improvement.
  177.  
  178. This command will not operate in byte, word, code or BASIC modes (it will
  179. beep at you instead).
  180.  
  181.  
  182. DS_MessageID
  183. ————————————
  184. Generates a new date and message ID from the real-time clock and the e-mail
  185. address in the "From:" line.
  186.  
  187. The "From:" line must be in either of the two commonly-used formats:
  188.     From: arcsalt@spuddy.mew.co.uk (Darren Salt)
  189.     From: Darren Salt <arcsalt@spuddy.mew.co.uk>
  190.  
  191. The "Date: " and "Message-ID: " header lines must be present - *including*
  192. the space; the rest of these lines is ignored.
  193.  
  194. No action is taken if any of the required lines are missing or badly formed.
  195.  
  196. I cannot guarantee that the message ID is unique, but the fact that it
  197. includes the CRC of the e-mail address helps!
  198.  
  199. This command only works in 'Email' mode.
  200.  
  201.  
  202. DS_StripCtrlWithMask
  203. ————————————————————
  204. Like DS_StripCtrlCodes, but much more flexible...
  205.  
  206. The command takes one parameter (evaluated via OS_EvaluateExpression - think
  207. *Eval if you don't know that SWI), in which bit x (if set) causes all
  208. occurrences of character code x to be removed from the file.
  209.  
  210. The default parameter, if 0 is supplied, is to strip all control codes except
  211. \a (\7), \b (\8), \f (\12), and the current return and tab characters.
  212.  
  213. The cursor may be moved by this command: this one small feature not
  214. implemented = vast speed improvement.
  215.  
  216. This command will not operate in byte, word, code or BASIC modes (it will
  217. beep at you instead).
  218.  
  219. Syntax: DS_StripCtrlWithMask "<mask_word>"
  220.  
  221. For example, to strip ASCII codes 1, 2, 3, 6 and 21:
  222.     DS_StripCtrlWithMask "2_00000000001000000000000001001110"
  223. or    DS_StripCtrlWithMask "&0020004E"
  224. or    DS_StripCtrlWithMask "1<<21 OR 1<<6 OR 1<<3 OR 1<<2 OR 1<<1"
  225.  
  226.  
  227. DosTextFile and SpoolFile
  228. ———————————    —————————
  229. Both commands have been deleted at the suggestion of Chris Manning
  230. (chrism@spuddy.mew.co.uk)
  231. For DosTextFile or FFlags_Toggle &1B, use FFlags_Toggle &DD1B
  232. For SpoolFile    or FFlags_Toggle &1D, use FFlags_Toggle &DB1D
  233.  
  234.  
  235.  
  236. Copyright
  237. —————————
  238. The conditions of copying this program and its associated documentation are
  239. the same as those of the main Zap application, except you do not need my
  240. permission to copy it if you have Dominic Symes's.
  241.  
  242. This software is provided as is with no warranty as to its suitability or
  243. otherwise for any particular task. If it does anything nasty then I want to
  244. know so I can fix it, but I'm not taking any responsibility. (Besides,
  245. there's no point in sueing me since I've got no money.)
  246.  
  247. Please note that I reserve the right to make alterations to this program, its
  248. operation, documentation, and/or conditions of use without notice in any way
  249. I see fit. Hopefully it will be an improvement.
  250.  
  251.  
  252. Contact
  253. ———————
  254. arcsalt@spuddy.mew.co.uk
  255.