home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / dos / ced.lzh / CED.DOC next >
Text File  |  1985-11-28  |  59KB  |  1,451 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                               ced 1.0 User's Guide
  19.                                 Table of Contents
  20.  
  21.                     Purpose  . . . . . . . . . . . . . .    1
  22.                     System Requirements  . . . . . . . .    1
  23.                     Terminology  . . . . . . . . . . . .    1
  24.                     Installation . . . . . . . . . . . .    2
  25.                     Command line editor  . . . . . . . .    2
  26.                     DOS command stack  . . . . . . . . .    3
  27.                     Application command stack  . . . . .    5
  28.                     Pcall function . . . . . . . . . . .    5
  29.                     Synonyms . . . . . . . . . . . . . .    6
  30.                     Command chaining . . . . . . . . . .    7
  31.                     Command parameters . . . . . . . . .    9
  32.                     Ignoring commands  . . . . . . . . .   10
  33.                     Ignoring individual commands . . . .   11
  34.                     Clearing ced objects . . . . . . . .   11
  35.                     Configuration files  . . . . . . . .   12
  36.                     Changing default buffer sizes  . . .   13
  37.                     Status display . . . . . . . . . . .   15
  38.                     Multiple definitions . . . . . . . .   15
  39.                     User Commands  . . . . . . . . . . .   16
  40.                          Subfunction 0: Enqueue  . . . .   16
  41.                          Subfunction 1: Dequeue  . . . .   17
  42.                          Return registers  . . . . . . .   17
  43.                          Command processor . . . . . . .   17
  44.                     Problem reporting  . . . . . . . . .   18
  45.                     Copyright and Disclaimer . . . . . .   19
  46.                     Appendix A: Command summary  . . . .   20
  47.                     Appendix B: Order of Processing  . .   22
  48.                     Appendix C: Limitations  . . . . . .   23
  49.                     Appendix D: User Command Demo  . . .   24
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                                                                           1
  57.                           === ced 1.0 User's Guide ===
  58.  
  59.           Purpose
  60.           -------
  61.  
  62.           Ced  (which  stands  for  Command  EDitor) provides the following
  63.           functions at the DOS prompt, or from within  certain applications
  64.           programs:
  65.  
  66.                -- Complete command line editing facility.
  67.  
  68.                -- Recall of previously issued commands for re-entry.
  69.  
  70.                -- Command  synonyms, which may include "chaining" of a
  71.                series of commands.
  72.  
  73.                -- Parameterization of synonym commands.
  74.  
  75.                -- Recall of parameters for previously issued commands.
  76.  
  77.                -- User-settable buffer sizes for all functions.
  78.  
  79.                -- For  programmers, a  facility to  add new "resident"
  80.                commands to the DOS shell.
  81.  
  82.           Ced  is  an  evolutionary  development of two earlier programs by
  83.           another  author: DOSEDIT,   and  RETRIEVE   (an  IBM  copyrighted
  84.           product).  It performs all of the functions of both programs, and
  85.           has a number of enhancements.   Both  DOSEDIT  and  RETRIEVE were
  86.           written by Jack Gersbach.
  87.  
  88.  
  89.           System Requirements
  90.           -------------------
  91.  
  92.           Ced  was  written  for  an  IBM  PC/XT/AT  or compatible machine.
  93.           However, it  uses  no  hardware-specific  functions,  so  it will
  94.           probably work with any MS-DOS machine.
  95.  
  96.           Ced requires DOS Version 2.00 or later.  It increases the size of
  97.           resident DOS by about 14K bytes  after installation  with default
  98.           buffer sizes (this can be reduced).
  99.  
  100.  
  101.           Terminology
  102.           -----------
  103.  
  104.           This document  will usually refer to "commands" or "DOS commands"
  105.           as ced targets; you should take  this to  mean either  (a) actual
  106.           DOS  commands,  or  (b)  input  to  ced-compatible  programs (for
  107.           example, DEBUG commands).
  108.  
  109.           Key names are as follows:
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.                                                                           2
  117.                           === ced 1.0 User's Guide ===
  118.  
  119.           <Up>           The up-arrow key on the numeric keypad.
  120.           <Down>         The down-arrow key on the numeric keypad.
  121.           <Left>         The left-arrow key on the numeric keypad.
  122.           <Right>        The right-arrow key on the numeric keypad.
  123.           <Backspace>    The large left-arrow key, next to NumLock.
  124.  
  125.           A carat (^) means  to press  the Ctrl  key in  conjunction with a
  126.           named key;  for example,  <^End> means  "press and  hold the Ctrl
  127.           key, then press <End>".
  128.  
  129.           Words in CAPS are ced keywords and must be typed exactly as shown
  130.           (they need not be capitalized when you use them).
  131.  
  132.           Words in [brackets] are optional elements of a command.
  133.  
  134.  
  135.           Installation
  136.           ------------
  137.  
  138.           Installation  (in  its  simplest  form) is accomplished by typing
  139.           "ced" at the DOS prompt, or including the statement "ced" in your
  140.           AUTOEXEC.BAT file.  There are optional parameters when installing
  141.           ced; these will be covered later.
  142.  
  143.           After ced is installed, everything will appear to  be normal, but
  144.           you now  have many  new features when entering DOS commands.  The
  145.           remainder of this document will describe these features.
  146.  
  147.           Ced is active either at the  DOS prompt,  or when  an application
  148.           program requests  buffered keyboard  input from DOS (DOS function
  149.           0AH).  There are a few such programs (DEBUG  and EDLIN  are two);
  150.           but the main use of ced is at the DOS prompt.  
  151.  
  152.           Once  ced  has  been  installed,  the  command  "CED"  becomes an
  153.           internal DOS command.  Thus, when you want to  issue ced commands
  154.           (as  explained  below),  you  will  type "CED <command>", but the
  155.           program file  (CED.COM)  need  NOT  be  available  on  disk.  Ced
  156.           becomes fully  memory resident  and is  an extension to DOS after
  157.           installation.  In particular,  this  means  that  you  should NOT
  158.           include a  drive or  path in  issuing CED  commands after initial
  159.           installation.  A command like "C:CED SYN d dir"  will reload ced,
  160.           which is probably not what you intend.
  161.  
  162.  
  163.           Command line editor
  164.           -------------------
  165.  
  166.           Ced provides  a new  "editor" for  DOS commands.  The DOS editing
  167.           keys (F3 for  copy-to-end-of-line,  for  example)  are  no longer
  168.           available.  Instead, the following keys may be used:
  169.  
  170.           <Home>              Cursor to home position (first character).
  171.  
  172.  
  173.  
  174.  
  175.  
  176.                                                                           3
  177.                           === ced 1.0 User's Guide ===
  178.  
  179.  
  180.           <End>               Cursor   to   end  position  (following  last
  181.                               character displayed).
  182.  
  183.           <Left>              Cursor  left  one  character  position.  This
  184.                               does  not  erase  any  characters,  it simply
  185.                               moves the cursor.
  186.  
  187.           <Right>             Cursor right one position.
  188.  
  189.           <^Left>             Cursor left one word.
  190.  
  191.           <^Right>            Cursor right one word.
  192.  
  193.           <Ins>               Enter/exit Insert  mode.  When  Insert is on,
  194.                               new  characters   will  be  inserted  at  the
  195.                               current cursor position.  When Insert is off,
  196.                               new characters  will type  over the character
  197.                               at the cursor position.
  198.  
  199.           <Del>               Delete the character at the cursor position.
  200.  
  201.           <Backspace>         Delete  the  character  to  the  left  of the
  202.                               cursor position (destructive backspace).
  203.  
  204.           <^End>              Delete all characters from cursor position to
  205.                               end of line.
  206.  
  207.           <Esc>               Cancel: erase all data and start over.
  208.  
  209.           When you have completed entering and  editing the  command, press
  210.           <Enter> as usual to execute.
  211.  
  212.  
  213.           DOS command stack
  214.           -----------------
  215.  
  216.           Ced keeps  a record  of each command you enter.  You can retrieve
  217.           and re-enter these commands by using the <Up> and <Down>  keys to
  218.           display the  old commands, then pressing <Enter> when the desired
  219.           command is displayed (the command can be edited, of course).
  220.  
  221.           You can visualize the  stored  data  as  a  "stack"  of commands.
  222.           Ced  keeps  a  pointer  to  somewhere in this stack.  The pointer
  223.           always points to a  location  "between"  two  commands;  when you
  224.           press <Up>,  ced displays  the command  "above" the pointer, then
  225.           moves the  pointer up  one command.   When you  press <Down>, ced
  226.           displays the  command "below" the pointer, then moves the pointer
  227.           down one command.
  228.  
  229.           For example, suppose you have entered  commands A,  B, and C. The
  230.           stack will appear as follows:
  231.  
  232.  
  233.  
  234.  
  235.  
  236.                                                                           4
  237.                           === ced 1.0 User's Guide ===
  238.  
  239.  
  240.                               +-------------+
  241.                               |      A      |
  242.                               +-------------+
  243.                               |      B      |
  244.                               +-------------+
  245.                               |      C      |
  246.                               +-------------+  <-- pointer
  247.  
  248.           The  stack  is  circular  in  nature; thus, if the pointer points
  249.           "below" the last command in the stack (as  it does  above), it is
  250.           actually  between  the  last  command  (C)  and the first command
  251.           (A).  In the situation above, pressing <Up> will  display command
  252.           C and  leave the  pointer between  B and C.  Pressing <Down> will
  253.           display command A, and leave the pointer between A and B.
  254.  
  255.           When you recall an old command  and re-enter  it without editing,
  256.           the re-entered command is not added to the stack, and the pointer
  257.           will drop one level.  Suppose, for  example, that  you press <Up>
  258.           twice from  the position above (pointer below C): B is displayed,
  259.           and the stack looks like this:
  260.  
  261.  
  262.                               +-------------+
  263.                               |      A      |
  264.                               +-------------+ <-- pointer
  265.                               |      B      |
  266.                               +-------------+
  267.                               |      C      |
  268.                               +-------------+
  269.  
  270.           If you now press <Enter> (without editing the command), command B
  271.           will be sent to DOS, and the pointer will drop to point between B
  272.           and C.  From there, <Up> will  display B  again, and  <Down> will
  273.           display  C.   Thus  you  can  "recycle"  a  series of commands by
  274.           pressing <Up> until you see the first command, <Enter> to execute
  275.           it, then  a series  of <Down><Enter>  sequences to re-execute the
  276.           commands in the original order.
  277.  
  278.           If you retrieve an old command and edit it before  execution, the
  279.           newly edited command is added to the bottom of the stack, and the
  280.           pointer will point just below it.
  281.  
  282.           Ced will not stack any commands  of two  characters or  less (the
  283.           theory  being  that  it's  easier  to retype than to go searching
  284.           through the stack).
  285.  
  286.           This is one of those computer gizmos that's easier to use than it
  287.           is to  explain.  Just  play with  <Up> and <Down>; you'll get the
  288.           idea.
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.                                                                           5
  296.                           === ced 1.0 User's Guide ===
  297.  
  298.           You can remove a command from  the  stack  by  displaying  it and
  299.           pressing <PgDn>,  and you  can clear the entire stack by pressing
  300.           <PgUp>.
  301.  
  302.           The actual number of commands which will be held in  the stack is
  303.           a function  of the  length of  the commands  and the  size of the
  304.           stack (which can be increased; see below for details).
  305.  
  306.           Application command stack
  307.           -------------------------
  308.  
  309.           Ced actually keeps two  complete command  stacks: one is  for DOS
  310.           commands, the  other for  commands entered into compatible appli-
  311.           cations programs (DEBUG, et al).   Thus,  DOS  commands  will not
  312.           appear in the command stack while in DEBUG, and vice versa.
  313.  
  314.  
  315.           Pcall function
  316.           --------------
  317.  
  318.           "Pcall"  stands  for  parameter  recall;  this is a second way to
  319.           quickly  retrieve  old  commands.   Pcall  simply  remembers  old
  320.           parameters to  specific commands.   For example, suppose you have
  321.           an editor called "edit", and the last time  you executed  it, you
  322.           used "edit c:\util\foo.doc".  If you now enter "edit" without any
  323.           parameters, ced will assume that you want to  edit the  same file
  324.           and will supply the "c:\util\foo.doc" for you.
  325.  
  326.           You could,  of course,  scroll back through the command buffer to
  327.           find the old command, but it might take a while  to find  it (and
  328.           the command might be missing if it was too long ago).
  329.  
  330.           Because  many  commands  are  best  used WITHOUT parameter recall
  331.           (FORMAT and ERASE are good examples), ced will only use  pcall on
  332.           commands that you specify.   To make a command "pcallable", type
  333.  
  334.                CED PCALL <command>
  335.  
  336.           at the  DOS prompt.   For example,  if you  want to make "edit" a
  337.           pcall command, type
  338.  
  339.                CED PCALL edit
  340.  
  341.           (Remember that the ced diskette need not be available).
  342.  
  343.           If you wish to issue a  command for  which pcall  is enabled, but
  344.           you do  not want  it to  have parameters,  add a  space after the
  345.           command.  For example, suppose you have issued a  "CED PCALL dir"
  346.           command  and  your  last  dir  was a "dir *.exe". If you now type
  347.           "dir", ced will add the "*.exe"  automatically.  However,  if you
  348.           type "dir  " (note  the space), ced will not add the "*.exe", and
  349.           you'll get a full directory. 
  350.  
  351.  
  352.  
  353.  
  354.  
  355.                                                                           6
  356.                           === ced 1.0 User's Guide ===
  357.  
  358.  
  359.           You may also bypass  pcall  processing  through  the  use  of the
  360.           ignore   character;   see   below,   under  "Ignoring  Individual
  361.           Commands".
  362.  
  363.  
  364.           Synonyms
  365.           --------
  366.  
  367.           The synonym function allows  you to  define brief  "synonyms" for
  368.           frequently used  commands.  For  example, suppose you invoke your
  369.           communications package  by typing  "talk rbbs  /c63".  Ced allows
  370.           you  to  abbreviate  this  to  a  shorter  command, say, "bb", by
  371.           typing at the DOS prompt:
  372.  
  373.                CED SYN bb talk rbbs /c63
  374.  
  375.           The exact syntax is:
  376.  
  377.                CED SYN <synonym> <command>
  378.  
  379.           The <synonym> is the command abbreviation (which you will type at
  380.           the DOS  prompt), and  <command> is  the word or phrase which ced
  381.           will substitute when it  sees <synonym>.   The synonym  is always
  382.           the first  word after  the keyword "syn", and <command> is always
  383.           all of the remaining words.
  384.  
  385.           For example, "ced syn d dir"  allows you  to type  "d" instead of
  386.           "dir".  You  may add  parameters: "d *.exe" becomes equivalent to
  387.           "dir *.exe".
  388.  
  389.           Many  people  define  very  short  synonyms  for  frequently used
  390.           commands:
  391.  
  392.                CED SYN d dir
  393.                CED SYN e edit
  394.                CED SYN g debug
  395.                CED SYN l link
  396.                CED SYN rbbs talk rbbs /c63
  397.                CED SYN cc1 cc1 -bpe
  398.  
  399.           Note in  the last  example that  you can  use a  synonym which is
  400.           identical to its associated phrase and simply use  it to automat-
  401.           ically add parameters.
  402.  
  403.           Also  note  that  synonym  processing  takes  place  AFTER  pcall
  404.           processing; thus if  you  use  a  command  synonym  and  wish the
  405.           command to be "pcallable", use the synonym in the pcall command.
  406.           For example:
  407.  
  408.                CED SYN e edit
  409.                CED PCALL e    (not PCALL edit)
  410.  
  411.  
  412.  
  413.  
  414.  
  415.                                                                           7
  416.                           === ced 1.0 User's Guide ===
  417.  
  418.  
  419.  
  420.           User program synonyms
  421.           ---------------------
  422.  
  423.           Because ced  "knows" whether it is being used from the DOS prompt
  424.           or from an application program such as DEBUG,  it is  possible to
  425.           define separate  sets of  synonyms for  DOS commands and for user
  426.           programs.  The syntax for a "user synonym" is
  427.  
  428.                CED USERSYN <synonym> <command>
  429.  
  430.           This is identical to the SYN command except  for the  new keyword
  431.           USERSYN.  For  example, if  you need to frequently type the DEBUG
  432.           command "d ds:1010 1200", you might use
  433.  
  434.                CED USERSYN d1 d es:1010 1200
  435.  
  436.           (Remember that DEBUG is  a ced-compatible  program; thus  you can
  437.           type ced  commands at  the DEBUG  prompt.)  Then you could simply
  438.           type "d1"  to  dump  memory  from  the  specified  address.  Note
  439.           that   a "d1"  USERSYN is  separate from  a "d1"  SYN; at the DOS
  440.           prompt you'd get  the  SYN,  in  DEBUG  or  EDLIN  you'd  get the
  441.           USERSYN.
  442.  
  443.  
  444.           Command chaining
  445.           ----------------
  446.  
  447.           The command  chaining feature  allows you  to place more than one
  448.           command in a SYN or USERSYN.  These commands  would be  passed to
  449.           DOS or  to the user program one at a time, as input is requested.
  450.           Suppose, for example, that  in order  to run  your communications
  451.           package, you always type:
  452.  
  453.                cd \talk
  454.                talk cis /c63
  455.                cd \
  456.  
  457.           You could put this sequence into one synonym by typing
  458.  
  459.                CED SYN cis cd \talk^talk cis /c63^cd \
  460.  
  461.           The ^ character serves as a command separator.  When you type CIS
  462.           at the prompt, ced will output  everything up  to the  ^ (in this
  463.           case, "cd  \talk") and  then simulate  an <Enter>.  The next time
  464.           DOS requests input, it  will get  "talk cis  /c63<Enter>", and so
  465.           on.
  466.  
  467.           Note  that  ced  will  not  pass  DOS-chained  commands  to  user
  468.           programs; thus, in
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.                                                                           8
  476.                           === ced 1.0 User's Guide ===
  477.  
  478.                CED SYN bug cd \util^debug^cd \
  479.  
  480.           DEBUG would not see  the trailing  "cd \",  which would  still be
  481.           held up until you return to the DOS prompt.
  482.  
  483.           The first  of the chained commands (e.g., the first 'cd \' above)
  484.           cannot itself be a synonym, but the remaining commands can.  That
  485.           is, if 'f' and 'g' are synonyms, the command
  486.  
  487.                CED SYN h dir^f^g
  488.  
  489.           will work as you expect.  Be careful, though.  A command like
  490.  
  491.                CED syn f dir^f
  492.  
  493.           will put the computer into a loop from which there is no retreat.
  494.  
  495.           If one  of the chained commands is a synonym which itself defines
  496.           more chain commands, the unused portions of the  first chain will
  497.           be lost.  If, for example, you have defined:
  498.  
  499.                CED SYN f a^b^c
  500.                CED SYN b x^y
  501.  
  502.           and you  then execute "f", the commands actually executed will be
  503.           a, x, and y.  Command c will be not be executed.
  504.  
  505.           You may alter the chain character (command separator) via the ced
  506.           command
  507.  
  508.                CED CHAINCH <char>
  509.  
  510.           So, for  example, "CED  CHAINCH &"  would replace ^ with & as the
  511.           command separator.  The chain character can,  but probably should
  512.           not,  be  a  control  character.   If  you are typing the command
  513.           directly into ced, you can just type the control character:
  514.  
  515.                CED CHAINCH <Ctrl-A>
  516.  
  517.           However, if you are setting the chain character via configuration
  518.           files  (below),  it  may  not  be possible to type in the control
  519.           character directly.  For this  reason,  you  can  also  specify a
  520.           control  character  by  typing  the  carat  (^) and a letter key.
  521.           Thus, if you  wanted  to  use  ^Y  as  the  chain  character, you
  522.           would use '^' and 'Y':
  523.  
  524.                CED CHAINCH ^Y
  525.  
  526.           Certain  control  characters  should  not  be  used  as  for this
  527.           purpose, because they are used for other functions  by DOS; among
  528.           these  are  ^C  (cancel),  ^G  (bell),  ^H (backspace), ^I (tab),
  529.  
  530.  
  531.  
  532.  
  533.  
  534.                                                                           9
  535.                           === ced 1.0 User's Guide ===
  536.  
  537.           ^L (linefeed), ^M (carriage  return),  ^P  (printer  on),  and ^S
  538.           (stop).
  539.  
  540.           The use  of control  characters as  described has more meaningful
  541.           use in  setting  the  "ignore"  and  "status  request" characters
  542.           (below).
  543.  
  544.  
  545.           Command parameters
  546.           ------------------
  547.  
  548.           This section describes how synonyms and command chaining interact
  549.           with command line parameters.
  550.  
  551.           The simplest case is a single word synonym like
  552.  
  553.                CED SYN d dir
  554.  
  555.           which specifies no special parameter handling.  In this case, any
  556.           command line  parameters are  simply tacked  on after the synonym
  557.           substitution: "d *.exe /w" becomes "dir *.exe /w".
  558.  
  559.           If the synonym itself contains parameters:
  560.  
  561.                CED SYN dw dir /w
  562.  
  563.           a similar situation holds.  For example, "dw *.asm"  becomes "dir
  564.           /w *.asm".   You might  think of these simple nonchained synonyms
  565.           as just substitutions: when ced sees the synonym, it  will simply
  566.           substitute the  replacement text, leaving the rest of the command
  567.           line alone.
  568.  
  569.           This simple substitution, however,  means that  your command line
  570.           parameters must  always be  the last  text of the synonym.  There
  571.           would be no way, for example,  to  define  a  synonym  that would
  572.           obtain a  directory of  <name>.exe, where <name> is some filename
  573.           entered on the command line and  ".exe" is  part of  the synonym.
  574.           That is,  it would  not be  possible to define a synonym "d" such
  575.           that the command
  576.  
  577.                d foo
  578.  
  579.           would result in a "dir foo.exe" command.
  580.  
  581.           However, ced does provide a way to substitute parameters into the
  582.           middle of a synonym.  Ced  recognizes  the  "%n"  dummy parameter
  583.           format used  by DOS batch files.  %1 represents the first command
  584.           line parameter, %2 is the second, and so on, up to %9.   Refer to
  585.           your DOS documentation (batch file section) if this is unclear.
  586.  
  587.           Thus, a synonym which would provide the example function is:
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.                                                                          10
  595.                           === ced 1.0 User's Guide ===
  596.  
  597.                CED SYN d dir %1.exe
  598.  
  599.           When  "d   foo"  is  executed,  "foo"  (the  first  command  line
  600.           parameter) is substituted for  the %1,  resulting in  the desired
  601.           command "dir foo.exe".
  602.  
  603.           When   a   synonym   contains  chained  commands,  all  parameter
  604.           substitution is  performed  at  one  time,  before  the  chain is
  605.           started.  Thus,
  606.  
  607.                CED SYN f a %1^b %2^c %3
  608.  
  609.           when executed "f one two three" will result in three commands:
  610.  
  611.                a one
  612.                b two
  613.                c three
  614.  
  615.           If a  chain-command synonym contains no dummy parameters (no %'s)
  616.           the command line parameters will be  appended to  the end  of the
  617.           chain, i.e., as parameters to the last command.  So,
  618.  
  619.                CED SYN f a^b^c
  620.  
  621.           when executed "f foo" will result in the three commands:
  622.  
  623.                a
  624.                b
  625.                c foo
  626.  
  627.  
  628.           Ignoring commands
  629.           -----------------
  630.  
  631.           There  may  be  certain  commands  that  you  do  not want ced to
  632.           process; for  example,  you  might  not  want  the  ERASE command
  633.           stacked.   To  instruct  ced  to  ignore  a  command, use the ced
  634.           command
  635.  
  636.                CED IGNORE <command>
  637.  
  638.           For example:
  639.  
  640.                CED IGNORE erase
  641.  
  642.           When a command is set to  IGNORE, ced  will not  place it  in the
  643.           command stack, check for aliases, or perform any pcall processing
  644.           (even if you have set PCALL for that command).
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.                                                                          11
  653.                           === ced 1.0 User's Guide ===
  654.  
  655.           Ignoring individual commands
  656.           ----------------------------
  657.  
  658.           You may  sometimes want  ced to  ignore processing  of a specific
  659.           command.  For  example, you  may have  "dir" defined as a synonym
  660.           for an external program  which will  display a  sorted directory,
  661.           but on  occasion want  to display  a standard  DOS directory.  To
  662.           force ced to suspend all processing of a command, precede it with
  663.           ^N (Ctrl-N).   If the  first character  of input  is ^N, ced will
  664.           not stack the command,  check for  aliases, or  perform any pcall
  665.           processing (just  as if it were IGNOREd).  The Ctrl-N, of course,
  666.           is not passed to DOS or to the application program.  For example:
  667.  
  668.                ^Ndir
  669.  
  670.           If you find ^N inconvenient, you can change  the ignore character
  671.           to a different character by using the IGNORECH command:
  672.  
  673.                CED IGNORECH ^T
  674.                CED IGNORECH !
  675.  
  676.           See the  section on command chaining (above) for more information
  677.           on how to enter control characters in this command.
  678.  
  679.  
  680.           Clearing ced objects
  681.           --------------------
  682.  
  683.           From time to time  it may  be useful  to clear  a ced "object": a
  684.           pcall  command,  a  synonym,  or  an  ignore  command.  The CLEAR
  685.           command allows you to do this.  The formal syntax is:
  686.  
  687.                CED CLEAR <function> [[FROM] <name>]
  688.  
  689.           This looks more complex  than it  is.  The  <function> is  one of
  690.           SYN, USERSYN,  PCALL, and  IGNORE.  Since  the [[FROM] <name>] is
  691.           optional, the simplest form of the  clear command  is exemplified
  692.           by:
  693.  
  694.                CED CLEAR SYN
  695.  
  696.           which will clear all synonyms.  Similarly,
  697.  
  698.                CED CLEAR PCALL
  699.  
  700.           clears all pcall commands.
  701.  
  702.           You  may  clear  an  individual  item by including its name.  For
  703.           example:
  704.  
  705.                CED CLEAR USERSYN foo
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.                                                                          12
  713.                           === ced 1.0 User's Guide ===
  714.  
  715.           clears  the  user  synonym  "foo",  leaving  all  others synonyms
  716.           undisturbed.
  717.  
  718.           Finally, you  can clear  all items  FROM a specified item through
  719.           the end of the list with the FROM option.  For example:
  720.  
  721.                CED CLEAR USERSYN FROM foo
  722.  
  723.           would clear the user synonym "foo" and all  synonyms listed after
  724.           "foo".  This  command is particularly useful if you have loaded a
  725.           temporary set of synonyms for some special purpose.  Suppose, for
  726.           example, that  you have a set of synonyms already in memory, then
  727.           you load an additional set to be used temporarily.  When  you are
  728.           done, the command
  729.  
  730.                CED CLEAR SYN FROM foo
  731.  
  732.           would delete  all of  the "temporary" synonyms, assuming that the
  733.           first of these was "foo".
  734.  
  735.           Note  that  SYN  and  USERSYN  objects  share  storage.   Thus, a
  736.           CLEAR SYN FROM <item> or CLEAR USERSYN FROM <item> will clear all
  737.           synonyms (of either type) FROM the named item.   Similarly, CLEAR
  738.           SYN and CLEAR USERSYN are functionally identical: all synonyms of
  739.           either type will be cleared.
  740.  
  741.  
  742.           Configuration files
  743.           -------------------
  744.  
  745.           Obviously it would be inconvenient to  have  to  type  in  all of
  746.           these commands  every time  you use  your computer.  However, you
  747.           may put any ced  command into  a special  ced configuration file,
  748.           and have them loaded all at once.
  749.  
  750.           The configuration  file is  simply an ASCII text file (created by
  751.           your text editor, EDLIN, or word  processor in  nondocument mode)
  752.           which  contains  a  series  of  ced commands.  Just leave out the
  753.           keyword "CED", but include the rest of the command:
  754.  
  755.                Rem       Remarks are OK if preceded by "REM"
  756.                Rem
  757.                Rem       Set chain char to '&'
  758.                Chainch &
  759.                Rem       Set ignore char to '!'
  760.                Ignorech !
  761.                Rem       Set a few synonyms
  762.                Syn d dir
  763.                Syn e edit
  764.                Syn cis cd \talk & talk cis & cd \
  765.                Usersyn dd d ds:1017 L40
  766.                Rem       And a few pcall commands
  767.  
  768.  
  769.  
  770.  
  771.  
  772.                                                                          13
  773.                           === ced 1.0 User's Guide ===
  774.  
  775.                Pcall e
  776.                Pcall debug
  777.                Rem       Ignore all DEL, ERASE, and FORMAT commands
  778.                Ignore erase
  779.                Ignore format
  780.                Ignore del
  781.  
  782.           To read in your file, use the CED -f command line switch:
  783.  
  784.                CED -F<filename>
  785.  
  786.           For example, if your  configuration file  is call  CED.CFG, you'd
  787.           use
  788.  
  789.                CED -Fced.cfg
  790.  
  791.           If you  load new configuration files during one computer session,
  792.           the PCALL, SYN, USERSYN, and IGNORE  commands are  added to those
  793.           already  stored,  without  regard  to  duplication (see "Multiple
  794.           definitions" below).
  795.  
  796.           Note that if you  have several  commands that  you want  to enter
  797.           into ced (but don't have them in a file), you can use
  798.  
  799.                CED -Fcon
  800.  
  801.           (which specifies  CON: as the  configuration file  name) and then
  802.           type a series of ced commands  from the  keyboard.  Type  ^Z when
  803.           you are done.
  804.  
  805.  
  806.           Changing default buffer sizes
  807.           -----------------------------
  808.  
  809.           Ced maintains  six separate  internal buffers  (regions of memory
  810.           where data is stored).  Each buffer is initially set to a default
  811.           size.  The buffers and their default sizes are:
  812.  
  813.                1. DOS command stack (2048 bytes)
  814.                2. Application program command stack (1024)
  815.                3. Synonym list (2048)
  816.                4. Pcall list (1024)
  817.                5. Ignore command list (1024)
  818.                6. User command list (described below) (1024)
  819.  
  820.           You may  make these buffers larger or smaller by including a list
  821.           of buffer sizes the FIRST time  you  load  ced  during  a session
  822.           (i.e., when  you turn  on the  computer, or  after a Ctrl-Alt-Del
  823.           reboot).  Use a -B switch as the FIRST ced command:
  824.  
  825.                CED -Bn1,n2,n3,n4,n5,n6
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.                                                                          14
  833.                           === ced 1.0 User's Guide ===
  834.  
  835.           where n1 is the desired size for buffer 1 (DOS command stack), n2
  836.           is the  size for  buffer 2 (App program command stack), etc.  You
  837.           need not specify all  sizes, but  if you  skip one  or more sizes
  838.           (telling ced  to use the default) you must include the separating
  839.           commas.  Examples:
  840.  
  841.                CED -B1000,2000,3000,4000,5000,6000  (Set all sizes)
  842.                CED -B1000,,3000  (Set sizes 1 and 3)
  843.                CED -B,,,,,6000 (Set size 6 only)
  844.  
  845.           You cannot set any individual size less than  128 bytes,  and the
  846.           total of all sizes must be not exceed 52K (53248) bytes.
  847.  
  848.           Remember that  the -B  command must be the FIRST command used the
  849.           FIRST time you run ced during each session.  It is  not valid any
  850.           other time.   If you  wish to  set sizes and read a configuration
  851.           file during autoexec, the syntax would be:
  852.  
  853.                CED -Bn1,n2,n3,n4,n5,n6 -F<filename>
  854.  
  855.           For your general information, here is what is  stored in  each of
  856.           the buffers, and what happens when it fills:
  857.  
  858.           1. DOS  Command  stack: all  non-ignored  commands  of  3 or more
  859.           characters entered at the  DOS  prompt.   The  command  is stored
  860.           before alias  and pcall processing.  Each stored command requires
  861.           one byte  more than  the length  of the  command. When the buffer
  862.           fills, the oldest command is deleted.
  863.  
  864.           2. Application  program  command  stack: same  as  above,  except
  865.           commands entered  at  participating  program  prompts  are stored
  866.           here.
  867.  
  868.           3. Synonym  list: the  full  list  of synonyms (both DOS and user
  869.           synonyms) plus their meanings.  Each entry  requires the combined
  870.           length  of  the  synonym  and  its  associated command plus three
  871.           bytes.  When the synonym list  fills,  no  new  synonyms  will be
  872.           accepted unless a CLEAR is performed first.
  873.  
  874.           4. Pcall command  list: the list  of all  pcall commands plus the
  875.           most recent parameter list for  each.   Each  entry  requires the
  876.           combined  length  of  the  command  and its parameters (including
  877.           leading separators) plus two bytes.  If the buffer is full when a
  878.           "CED PCALL" command is entered, the new pcall command will not be
  879.           accepted.  If the buffer is  full  when  a  pcallable  command is
  880.           entered, its parameters will not be remembered.
  881.  
  882.           5. Ignore command  list: the list  of all  IGNORE commands.  Each
  883.           entry requires the command length plus  one byte.   If the buffer
  884.           is  full  when  a  new  "CED  IGNORE" command is entered, the new
  885.           command will be rejected.
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.                                                                          15
  893.                           === ced 1.0 User's Guide ===
  894.  
  895.           6. User command list: the list  of  all  user-installed commands.
  896.           Requires the  command length  plus six bytes of storage for each.
  897.           New commands will be rejected if the buffer is full.   Ced itself
  898.           uses ten bytes of this buffer.
  899.  
  900.  
  901.           Status display
  902.           --------------
  903.  
  904.           You may  obtain a  partial display  of ced status any time CED is
  905.           active (i.e., at  the  DOS  prompt  or  in  a  compatible program
  906.           awaiting input).  Do this by hitting ^T (Ctrl-T).  Ced will first
  907.           display  all  synonyms  (preceded  by  [S]  for  SYN  or  [U] for
  908.           USERSYN), then  a list  of all buffers.  For each buffer ced will
  909.           show the total bytes allocated and the number of bytes free.
  910.  
  911.           When the display is  complete,  ced  will  redisplay  any partial
  912.           input that you typed before ^T, and you may continue data entry.
  913.  
  914.           If  ^T  is  not  convenient,  you  can  change the status request
  915.           character by using the ced command
  916.  
  917.                CED STATCH <character>
  918.  
  919.           as in  "CED STATCH  ^A" or  "CED STATCH  %".  See  the section on
  920.           command chaining for more information on using control characters
  921.           in this command.
  922.  
  923.  
  924.           Multiple definitions
  925.           --------------------
  926.  
  927.           It is possible to duplicate a  definition within  one of  the ced
  928.           lists (SYN, USERSYN, PCALL, IGNORE).  For example, you may create
  929.           more  than  one  synonym  for  "d".   In  the  event  of multiple
  930.           definitions, ced will always use the newest.
  931.  
  932.           Suppose,  for  example,  that  you  have "d" defined as a SYN for
  933.           "dir".  If you subsequently issue the command "CED  SYN d debug",
  934.           you will have two synonyms for "d".  When you enter "d", ced will
  935.           use the latest definition: "debug".  If you  then issue  a "CLEAR
  936.           SYN d",  ced will  again use  the latest definition and clear the
  937.           "debug"  synonym,  at  which  point  the  "dir"  definition again
  938.           becomes effective.
  939.  
  940.           Multiple definitions  have no  real meaning for PCALL and IGNORE,
  941.           but they are supported nonetheless.
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.                                                                          16
  950.                           === ced 1.0 User's Guide ===
  951.  
  952.           User Commands
  953.           -------------
  954.  
  955.           This section describes how  to add  new resident  commands to DOS
  956.           using  ced.   It  is  an  advanced  topic,  and  is  intended for
  957.           programmers only; you don't need to read this section to use ced.
  958.  
  959.           Ced provides a means to enqueue new DOS commands, that is, to add
  960.           internal commands to DOS.  Once enqueued, ced will call a routine
  961.           that you specify whenever the  user  types  the  new  command (at
  962.           the DOS prompt, or in a "participating" program).
  963.  
  964.           Access  to  ced  service  is  provided  via a bogus DOS function,
  965.           0FFH.  This function behaves as a  normal DOS  function; that is,
  966.           you must set up the registers as needed by the call, place a 0FFH
  967.           in register AH, and execute an INT 21H.  The two subfunctions are
  968.           described  below;  the  subfunction  code  is  placed in register
  969.           AL.
  970.  
  971.  
  972.           SUBFUNCTION 0: ENQUEUE
  973.  
  974.           This subfunction allows you  to  enqueue  a  new  command.  Input
  975.           register use is as follows:
  976.  
  977.                AH = 0FFH (ced service)
  978.  
  979.                AL = 0 (ENQUEUE)
  980.  
  981.                BL = MODE
  982.                     This is  a bit  flag which  tells ced when to call your
  983.                     routine.  You have the option of  being called  if your
  984.                     command is  typed at  the DOS prompt, at a user program
  985.                     prompt, or both.  Bit 0, if set, specifies that you are
  986.                     to  be  called  at  the  DOS  prompt;  Bit  1,  if set,
  987.                     specifies that you are to be  called at  a user program
  988.                     prompt.
  989.  
  990.                DS:SI = command name
  991.                     This is  a dword pointer to your command (i.e., you are
  992.                     to be called when the  user  types  this  string).  The
  993.                     command   must   be   from  one  to  eight  characters,
  994.                     terminated by  a  carriage  return.   Ced  is  not case
  995.                     sensitive.
  996.  
  997.                ES:DI = command processor entry point
  998.                     This is  a dword  pointer to the routine which is to be
  999.                     executed when the new command is entered.
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.                                                                          17
  1008.                           === ced 1.0 User's Guide ===
  1009.  
  1010.           SUBFUNCTION 1: DEQUEUE
  1011.  
  1012.           This subfunction allows you  to dequeue  a user  command; after a
  1013.           command has  been dequeued,  ced will  no longer  call you if the
  1014.           user types your command.  Input register use is:
  1015.  
  1016.                AH = 0FFH (ced service)
  1017.  
  1018.                AL = 1 (DEQUEUE)
  1019.  
  1020.                DS:SI = command name
  1021.                     A dword pointer  to  the  name  of  the  command  to be
  1022.                     dequeued (i.e.,  the same  DS:SI as was used to enqueue
  1023.                     the command).
  1024.  
  1025.  
  1026.           RETURN REGISTERS
  1027.  
  1028.           On return from ced service (DOS function 0FFH), all registers are
  1029.           preserved except  AX.  The  carry flag, if set, indicates that an
  1030.           error occurred; AX has the error code, which will be one of:
  1031.  
  1032.                1:   Invalid  function.   At  present,  only  subfunctions 0
  1033.                     and 1 are supported.  Subfunction 2 is reserved.
  1034.  
  1035.                2:   Command not found (DEQUEUE only).
  1036.  
  1037.                8:   Insufficient memory (ENQUEUE only).
  1038.  
  1039.                13:  Invalid data. (ENQUEUE  only; bad MODE flag, or invalid
  1040.                     command length).
  1041.  
  1042.           NOTE: In current versions of DOS,  AH  returns  0FFH  if function
  1043.           0FFH  is  requested  and  ced  is not installed.  You may use the
  1044.           reserved subfunction (2), at  your  own  risk,  to  test  for ced
  1045.           installation.  If  AH returns  any value  other than 0FFH, ced is
  1046.           probably installed.
  1047.  
  1048.  
  1049.           COMMAND PROCESSOR
  1050.  
  1051.           Your command processor is entered via a far call from ced.  Entry
  1052.           registers are as follows:
  1053.  
  1054.                BL = MODE
  1055.                     This is  the same  bit flag  as is  used in the ENQUEUE
  1056.                     subfunction.  You may use it to test "where you are".
  1057.  
  1058.                CL = MAXLEN
  1059.                     This is the maximum  allowed length  of the  user input
  1060.                     string (i.e.,  the value  of byte 0 of the DOS function
  1061.                     0AH input buffer) less one.
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.                                                                          18
  1068.                           === ced 1.0 User's Guide ===
  1069.  
  1070.  
  1071.                DS:DX = Command tail pointer
  1072.                     This is a dword pointer  to  the  command  tail  of the
  1073.                     user's input.   For example, if your command is "hello"
  1074.                     and the user types "hello sam", DS:DX will point to the
  1075.                     space after "hello".
  1076.  
  1077.                DS:DI = Command pointer
  1078.                     This is a dword pointer to the first byte of the actual
  1079.                     user input.
  1080.  
  1081.           Note that DS:DI and DS:DX point to buffer  space within  ced, not
  1082.           to  the  actual  DOS  function  0AH  input  buffer.  There are no
  1083.           length attribute bytes preceding the buffer; DS:SI points  to the
  1084.           first byte of the buffer, not the third.  Ced will copy the final
  1085.           buffer, after all processing, to the actual input buffer.
  1086.  
  1087.           You may manipulate the buffer to your heart's content.  It is 255
  1088.           characters long,  but ced  will truncate  the string if necessary
  1089.           (if the final command is longer than the  maximum allowed  by the
  1090.           function 0AH  request).  In particular, note two things about the
  1091.           ced buffer:
  1092.  
  1093.                1.   The string MUST  be  terminated  by  a  carriage return
  1094.                     ASCII 13).
  1095.  
  1096.                2.   If  you  null  out  the  buffer  (by putting a carriage
  1097.                     return in relative  byte  0)  ced  will  return  a null
  1098.                     string to  DOS or  the user  program.  This is probably
  1099.                     what you will want to do.
  1100.  
  1101.           There are few restrictions on what you can do within your service
  1102.           routine.   You  may  request  other  DOS service (but you may NOT
  1103.           request more buffered input via function 0AH!!), and you need not
  1104.           preserve  any  registers  except  SS:SP.   The stack in effect on
  1105.           entry will have about 200 bytes free; switch to a larger internal
  1106.           stack if necessary.
  1107.  
  1108.           Return to ced via a far RET.
  1109.  
  1110.           Appendix D  contains a  sample MASM  program to enqueue a trivial
  1111.           command.
  1112.  
  1113.  
  1114.           Problem reporting
  1115.           -----------------
  1116.  
  1117.           If you find any problems with  ced,  please  report  them  to me,
  1118.           preferably  at   CompuServe  ID   76703,2002.   Before  reporting
  1119.           problems, however, please take the following steps:
  1120.  
  1121.                1. Reread the documentation!
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.                                                                          19
  1128.                           === ced 1.0 User's Guide ===
  1129.  
  1130.  
  1131.                2. Install ced in a  "clean" environment,  i.e., without any
  1132.                other   resident   utilities.    Temporarily   rename   your
  1133.                AUTOEXEC.BAT and CONFIG.SYS files  to  other  names; reboot,
  1134.                reinstall ced,  and test.  If it works correctly, there is a
  1135.                conflict with some other  program.  Isolate  the conflict by
  1136.                reinstalling your  other programs  one by one and by varying
  1137.                the load  order.  If  you locate  the conflict,  let me know
  1138.                about  it.   I  cannot  guarantee  that the conflict will be
  1139.                resolved, but I will make an attempt when time permits.
  1140.  
  1141.                It would not be  necessary to  rename CONFIG.SYS  if it only
  1142.                contains   FILE,   BUFFER,   COUNTRY,   FCBS,  and  ANSI.SYS
  1143.                statements.
  1144.  
  1145.           If the problem persists, please report the problem  as accurately
  1146.           and  completely  as  possible.   Include  the  ced version number
  1147.           (obtained  by  the  command  CED  VER),  and  a  listing  of your
  1148.           CONFIG.SYS and  AUTOEXEC.BAT files  if you  think that might have
  1149.           some bearing.
  1150.  
  1151.  
  1152.           Copyright and Disclaimer
  1153.           ------------------------
  1154.           Ced is hereby placed  in the  public domain.   Both ced  and this
  1155.           documentation are,  however, copyrighted  by the  author.  Ced is
  1156.           intended for your private, noncommercial use only.  You  may make
  1157.           copies of  the ced  program and  documentation files for your own
  1158.           use, and you  may  copy  the  files  for  others.   You  may not,
  1159.           however, charge  for such  copies, or  in any  other way sell the
  1160.           program or  otherwise  attempt  to  make  money  from  it  or any
  1161.           modified version of it.
  1162.  
  1163.           However, recognized user's groups are hereby authorized to charge
  1164.           an amount not more than $6.00 for materials, postage, etc.
  1165.  
  1166.           I do not warrant that the documentation is accurate, or  that the
  1167.           program  operates  as  designed.   I  will  not be liable for any
  1168.           damages of any kind sustained through the use of the program.  By
  1169.           using the program, you agree to this.
  1170.  
  1171.           IBM is  a registered trademark of International Business Machines
  1172.           Corporation.  MS-DOS is a trademark of Microsoft Corporation.
  1173.  
  1174.           Both ced and this document are:
  1175.  
  1176.                                 Copyright (c) 1985 by
  1177.                                Christopher J. Dunford   
  1178.                               10057-2 Windstream Drive
  1179.                               Columbia, Maryland 21044
  1180.                               CompuServe ID 76703,2002
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                                                                          20
  1187.                           === ced 1.0 User's Guide ===
  1188.  
  1189.                              Appendix A: Command summary
  1190.                              ---------------------------
  1191.           The following is a complete summary  of all  ced commands.  These
  1192.           commands may  be included  in a  ced configuration file (with the
  1193.           exception of  -F and  -B), or  they may  be typed  in directly by
  1194.           prefixing them with "CED ".
  1195.  
  1196.           -Bn1,n2,n3,n4,n5,n6      Sets  the  sizes  of  the  six  internal
  1197.                                    buffers.  Valid  ONLY  as  first command
  1198.                                    when   installing   ced  after  boot  or
  1199.                                    reboot.
  1200.  
  1201.           -F<Filename>             Loads a  ced configuration  file.  Not a
  1202.                                    valid command within a config file.
  1203.  
  1204.           SYN <synonym> <command>  Defines  a  synonym.   The first word is
  1205.                                    the  synonym,  all  remaining  words are
  1206.                                    substituted for the synonym.
  1207.  
  1208.           USERSYN <synonym>  <command>   Defines a user synonym.  Identical
  1209.                                    to  SYN,  except  that  the  synonym  is
  1210.                                    available  within  user  programs rather
  1211.                                    than at the DOS prompt.
  1212.  
  1213.           PCALL <command>          Defines  a  command  subject   to  pcall
  1214.                                    processing.
  1215.  
  1216.           IGNORE <command>         Defines  a  command  to  be ignored--ced
  1217.                                    will not perform any  processing on this
  1218.                                    command at all.
  1219.  
  1220.           CHAINCH <char>           Defines the  command chaining character,
  1221.                                    which is the character  used to separate
  1222.                                    commands in a multi-command synonym.
  1223.  
  1224.           IGNORECH <char>          Defines  the  keyboard-ignore character;
  1225.                                    when  this  character  is  typed  as the
  1226.                                    first  character  of keyboard input, ced
  1227.                                    will perform  no  further  processing on
  1228.                                    it.
  1229.  
  1230.           STATCH <char>            Defines  the  status  request character.
  1231.                                    When you  type this  character while ced
  1232.                                    is active, ced will display its status.
  1233.  
  1234.           CLEAR <function> [[FROM] <name>]   Clears all or part of a
  1235.                                    list of  ced objects.  <function> is one
  1236.                                    of  SYN,  USERSYN,  PCALL,   or  IGNORE.
  1237.                                    Without  arguments,  clears  all  of the
  1238.                                    specified list.  With  a  <name>, clears
  1239.                                    that  item  only.   With  a FROM <name>,
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.                                                                          21
  1246.                           === ced 1.0 User's Guide ===
  1247.  
  1248.                                    clears  that  item  and  all  subsequent
  1249.                                    items. 
  1250.  
  1251.           VER                      Display ced version number and copyright
  1252.                                    notice.
  1253.  
  1254.  
  1255.           Commands may be abbreviated as follows:
  1256.  
  1257.                USERSYN        USYN
  1258.                PCALL          PC       
  1259.                IGNORE         IG
  1260.                CHAINCH        CC
  1261.                IGNORECH       IC   
  1262.                STATCH         SC
  1263.                CLEAR          CL
  1264.  
  1265.           Note,  however,  that  the   arguments  to   CLEAR  may   NOT  be
  1266.           abbreviated; CLEAR USYN or CLEAR PC are not valid.
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.                                                                          22
  1275.                           === ced 1.0 User's Guide ===
  1276.  
  1277.                            Appendix B: Order of Processing
  1278.                            -------------------------------
  1279.  
  1280.           Ced performs its basic processing in the following order:
  1281.  
  1282.           1. Obtain input.   If there  is a chained command pending, obtain
  1283.           input from the chain; otherwise from keyboard.
  1284.  
  1285.           2. Check for "ignore".  If command is  an "ignore"  command or if
  1286.           the first character of input is the ignore character, suspend all
  1287.           further processing.
  1288.  
  1289.           3. Stack the command  (if  longer  than  two  characters)  in the
  1290.           appropriate command stack.
  1291.  
  1292.           4. Perform  pcall  (parameter  recall)  processing  and store the
  1293.           result  for  pcall  processing  next  time  the  same  command is
  1294.           entered.
  1295.  
  1296.           5. Perform synonym processing and parameter substitution.  If the
  1297.           synonym  contains  chained  commands,  set  up  for  chaining  of
  1298.           subsequent input requests.
  1299.  
  1300.           6. Examine the resulting command and see if it's a user-installed
  1301.           command or a CED  command.   If  so,  call  CED  or  user command
  1302.           processor.
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.                                                                          23
  1310.                           === ced 1.0 User's Guide ===
  1311.  
  1312.                                Appendix C: Limitations
  1313.                                -----------------------
  1314.  
  1315.           There is  a limit  of 255 characters on any input line from a ced
  1316.           configuration file.  DOS will limit you to 127  characters at the
  1317.           DOS prompt.
  1318.  
  1319.           For  PCALL,  SYN,  USERSYN,  and  IGNORE  to  be effective, their
  1320.           commands must begin in the first  column  of  input  and  must be
  1321.           separated from any parameters by one of the following characters:
  1322.  
  1323.                ; , < > | = + [ ] / <Tab> <Space>
  1324.  
  1325.           Thus, if  you have  "cd" defined for pcall processing, "cd\" will
  1326.           not work correctly.  However, "cd \"  will be  OK.  Similarly, if
  1327.           you have  a synonym "d" for "debug", the command "c:\util\d" will
  1328.           not work, nor will " d" (note leading space).
  1329.  
  1330.           Programs  which  allow  you  to  execute  DOS  commands  or other
  1331.           programs as  subtasks generally  do not  use DOS  function 0AH to
  1332.           input the name of  the  subtask  or  command;  thus,  ced  is not
  1333.           active, and synonyms are usually not effective.
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.                                                                          24
  1340.                           === ced 1.0 User's Guide ===
  1341.  
  1342.  
  1343.                             Appendix D: User Command Demo
  1344.                             -----------------------------
  1345.  
  1346.           Comment *
  1347.  
  1348.                userdemo.com - demo of ced user command enqueuing
  1349.  
  1350.                Assembly: (M)ASM userdemo;
  1351.                          LINK userdemo;   (ignore NO STACK message)
  1352.                          EXE2BIN userdemo userdemo.com
  1353.  
  1354.                Use:      Just type 'userdemo'.  You now have
  1355.                          a new DOS command, "hello"
  1356.  
  1357.                Author:   CJDunford
  1358.                          05/28/85
  1359.  
  1360.           *
  1361.  
  1362.           CED       equ 0FFH            ; Special "DOS" fn for CED service
  1363.  
  1364.           ENQUEUE   equ 0               ; Subfunction: enqueue
  1365.           DEQUEUE   equ 1               ; Subfunction: dequeue
  1366.  
  1367.           DOS       equ 1               ; Cmd to be active at DOS prompt
  1368.           USER      equ 2               ; Cmd to be active at user prompt
  1369.  
  1370.           CR        equ 13
  1371.           LF        equ 10
  1372.  
  1373.           code segment
  1374.           assume cs:code,ds:code
  1375.           org 100H
  1376.           main proc far
  1377.                jmp Install              ; Go to installation
  1378.  
  1379.           ; -----------------------------------------------------
  1380.           ; This is the command processor.  It will be called
  1381.           ; whenever the user types "hello" at the DOS prompt.
  1382.           ; The routine simply prints the string "Hi there, ace".
  1383.           ;
  1384.           ; On entry:
  1385.           ;    BL: mode flag
  1386.           ;       1 = at DOS prompt
  1387.           ;       2 = at user program prompt
  1388.           ;    CL: max length of input
  1389.           ;    DS:SI => user command
  1390.           ;    DS:DX => user command tail
  1391.           ;
  1392.           ; Remember to null out the user string so that
  1393.           ; it is not passed on to DOS, then exit via a far
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.                                                                          25
  1400.                           === ced 1.0 User's Guide ===
  1401.  
  1402.           ; return to ced.  Not necessary to preserve any
  1403.           ; registers.
  1404.           ; ------------------------------------------------------
  1405.           Hello proc far                ; Must be a far procedure
  1406.                mov byte ptr [si],CR     ; Null out the user's input
  1407.  
  1408.                mov ax,cs                ; Set up local addressing
  1409.                mov ds,ax
  1410.  
  1411.                mov dx,offset HiThere$   ; Display our message
  1412.                mov ah,9
  1413.                int 21H
  1414.  
  1415.                ret                      ; No need to restore any regs
  1416.           Hello endp
  1417.  
  1418.           HiThere$ db 'Hi there, ace',CR,LF,'$'   ; Message to be displayed
  1419.  
  1420.  
  1421.           ; -----------------------------------------------
  1422.           ; This is the installation routine.  It sets up
  1423.           ; the regs for a call to the ced command enqueing
  1424.           ; service, enqueues the command, and terminates,
  1425.           ; leaving the command service routine resident
  1426.           ; ------------------------------------------------
  1427.           Install:
  1428.                mov ah,CED               ; CED service request
  1429.                mov al,ENQUEUE           ; Enqueue a new command
  1430.                mov bl,DOS               ; To be active at DOS prompt
  1431.                mov si,offset Hello$     ; DS:SI => command ("Hello")
  1432.                mov di,offset Hello      ; ES:DI => service routine
  1433.                int 21H                  ; Enqueue new command
  1434.                jnc OK                   ; No carry, no error
  1435.  
  1436.                mov dx,offset Error$     ; Only 1 error possible here
  1437.                mov ah,9                 ; Print string
  1438.                int 21H
  1439.                int 20H                  ; Return to DOS
  1440.  
  1441.           OK:
  1442.                mov dx,offset Install    ; OK: terminate/resident
  1443.                int 27H
  1444.           main endp
  1445.  
  1446.           Hello$    db 'hello',CR        ; New command
  1447.           Error$    db 'ced user command list full',CR,LF,'$'
  1448.  
  1449.           code ends
  1450.           end main