home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / cpm68k / cpx2plus.doc < prev    next >
Encoding:
Text File  |  1987-02-22  |  14.2 KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                    CCPx2+ - An alternitive CCP for CP/M-68K
  12.                    CCPx2+ - An alternitive CCP for CP/M-68K
  13.                    CCPx2+ - An alternitive CCP for CP/M-68K
  14.  
  15.  
  16.                                  Robert Heller
  17.                                  Robert Heller
  18.                                  Robert Heller
  19.  
  20.                       Sun Feb 15, 1987 ***First Draft***
  21.                       Sun Feb 15, 1987 ***First Draft***
  22.                       Sun Feb 15, 1987 ***First Draft***
  23.  
  24.  
  25.                 (c) 1987 By Robert Heller. All rights reserved.
  26.                 (c) 1987 By Robert Heller. All rights reserved.
  27.                 (c) 1987 By Robert Heller. All rights reserved.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                ABSTRACT.  This  document  describes  design notes
  38.                ABSTRACT.
  39.                ABSTRACT.
  40.  
  41.                for CCPx2+, an alternitive CCP for CP/M-68K.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.                CONTACT INFO. I can be reached as follows:
  48.                CONTACT INFO.
  49.                CONTACT INFO.
  50.  
  51.  
  52.                ARAPNet:      Heller@UMass.CS.EDU
  53.  
  54.                BITNET:       Heller@UMass.BITNET
  55.  
  56.                BIX:          heller
  57.  
  58.                GEnie:        RHELLER
  59.  
  60.                FidoNet:      101/27 (Dave's Fido)
  61.  
  62.                           or 101/147 (Orange Fido)
  63.  
  64.                CompuServe:   71450,3432
  65.  
  66.                U.S. Mail:    Robert Heller
  67.  
  68.                              Star Route Box 51A
  69.  
  70.                              Wendell, MA 01379
  71.  
  72.                Voice Phone:  617-544-6933, early evenings
  73.  
  74.                                            (before 7:30 PM
  75.  
  76.                                            Eastern), and
  77.  
  78.                                            weekends.
  79.  
  80.                              413-545-0528, Monday to Friday
  81.  
  82.                                            8:00 AM to 4:00 PM
  83.  
  84.                                            Eastern.
  85.  
  86.                Data Phone:   617-544-6933, 7:30 PM to 7:00 AM
  87.  
  88.                                            Eastern.
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 2
  109.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  110.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  111.  
  112.  
  113.  
  114.  
  115.                                1: Introduction.
  116.                                   Introduction.
  117.                                   Introduction.
  118.  
  119.  
  120.                These design notes are intended to put  in  writing  my
  121.  
  122.           ideas  for  an  improved CCP (Console Command Processor) for
  123.  
  124.           CP/M-68K.  I'd like to circulate  these  ideas  through  the
  125.  
  126.           CP/M-68K  user  community  and  get  some  feedback on these
  127.  
  128.           ideas.  I don't know if I will implement all  of  the  ideas
  129.  
  130.           presented   here,   but  I  indend  to  implement  the  more
  131.  
  132.           important ones.    I  intend  to  produce   this   code   as
  133.  
  134.           shareware,  with  object  code  and  documentation available
  135.  
  136.           free, with source code available for a small fee.
  137.  
  138.  
  139.                               2: Major Features.
  140.                                  Major Features.
  141.                                  Major Features.
  142.  
  143.  
  144.                The major features of CCPx2+ are:
  145.  
  146.  
  147.                   o Forground/Backgound Tasks.  The  main  feature  of
  148.                     Forground/Backgound Tasks.
  149.                     Forground/Backgound Tasks.
  150.  
  151.           CCPx2+   will   be   a   dual   TPA   system,  allowing  two
  152.  
  153.           core-resident tasks  to  be  run.     It   won't   be   true
  154.  
  155.           multi-tasking,  just a way to suspend a forground task (such
  156.  
  157.           as an editor) and run a background task (such as  getting  a
  158.  
  159.           directory listing or compiling a program).
  160.  
  161.  
  162.                   o  Command Line Recall. A history mechanism, simular
  163.                      Command Line Recall.
  164.                      Command Line Recall.
  165.  
  166.           to VMS's DCL - will use control  characters  to  recall  and
  167.  
  168.           edit (as a one-line screen editor) previous command lines.
  169.  
  170.  
  171.                   o  Nested  Submit  Files.  This  simply  means  that
  172.                      Nested  Submit  Files.
  173.                      Nested  Submit  Files.
  174.  
  175.           submit  files  will  behave  like  subroutines,   with   the
  176.  
  177.           neccessary context saved on a pushdown stack in the CCP.
  178.  
  179.  
  180.                   o   Flow  Control  in  Submit  Files.  Simple  "if",
  181.                       Flow  Control  in  Submit  Files.
  182.                       Flow  Control  in  Submit  Files.
  183.  
  184.           "goto", and labels.  Should be enough for most purposes.
  185.  
  186.  
  187.                   o "Lexical Functions". These  will  be  builtin  CCP
  188.                     "Lexical Functions".
  189.                     "Lexical Functions".
  190.  
  191.           commands with  a  functional  syntax.  Things like file name
  192.  
  193.           parsing,  file  tests  (exists,  size,  etc.)   and   system
  194.  
  195.           interegation (user number, current drive, etc.)
  196.  
  197.  
  198.                   o  User  Interface  Hacks.  Things  like  control of
  199.                      User  Interface  Hacks.
  200.                      User  Interface  Hacks.
  201.  
  202.           command  line  echoing  while  executing  submit  files  and
  203.  
  204.           command prompt.
  205.  
  206.  
  207.                   o  CCP  Call  Back.  There  will  be  a way for user
  208.                      CCP  Call  Back.
  209.                      CCP  Call  Back.
  210.  
  211.           programs to "call back" the CCP for various functions  (such
  212.  
  213.           as running a background task, etc.)
  214.  
  215.  
  216.                   o  Aliases.  User definable symbols for commands and
  217.                      Aliases.
  218.                      Aliases.
  219.  
  220.           CCP variables.
  221.  
  222.  
  223.                   o Program Search Path. A list of  drives  to  search
  224.                     Program Search Path.
  225.                     Program Search Path.
  226.  
  227.           for command and submit files.
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 3
  242.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  243.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  244.  
  245.  
  246.  
  247.  
  248.                         3: Forground/Background Tasks.
  249.                            Forground/Background Tasks.
  250.                            Forground/Background Tasks.
  251.  
  252.  
  253.                I  plan  to have the CCP divide the TPA into two parts:
  254.  
  255.           a forground part and a background part.  The relative  sizes
  256.  
  257.           will  be  determined  by the BIOS, through the use of global
  258.  
  259.           parameters, much like the auto start is  presently  handled.
  260.  
  261.           The  default  will  be to cut the TPA into two equal pieces.
  262.  
  263.           Normally,  keyboard  commands  will  be  executed   in   the
  264.  
  265.           forground TPA.   A user-program will be able to pass control
  266.  
  267.           to a background task with a CCP call  back  function.    The
  268.  
  269.           call  back  function  will take a CCP command line (or blank
  270.  
  271.           for an interactive background task) with optional  arguments
  272.  
  273.           for  a  conin  and  conout  functions  (this  allows  simple
  274.  
  275.           pipes).
  276.  
  277.  
  278.                             4: Command Line Recall.
  279.                                Command Line Recall.
  280.                                Command Line Recall.
  281.  
  282.  
  283.                I plan on implementing  something  like  VMS's  command
  284.  
  285.           line recall.   VMS implements command line recall by binding
  286.  
  287.           control characters to functions  which  recall  the  command
  288.  
  289.           line(s)  and allow for one-line "screen" editing (inserting,
  290.  
  291.           deleting, and replacing of characters).
  292.  
  293.  
  294.                             5: Nested Submit Files.
  295.                                Nested Submit Files.
  296.                                Nested Submit Files.
  297.  
  298.  
  299.                This is simply a matter of having  the  SUBMIT  command
  300.  
  301.           maintain a stack of pending submit file states.
  302.  
  303.  
  304.                        6: Flow Control in Submit Files.
  305.                           Flow Control in Submit Files.
  306.                           Flow Control in Submit Files.
  307.  
  308.  
  309.                This  will  consist  of  a  contitional command (IF), a
  310.  
  311.           branching command (GOTO),  and  allowing  for  command  line
  312.  
  313.           labels.  This is probably suffientent for most purposes.
  314.  
  315.  
  316.                              7: Lexical Functions.
  317.                                 Lexical Functions.
  318.                                 Lexical Functions.
  319.  
  320.  
  321.                I have these functions in mind:
  322.  
  323.  
  324.                   o  F$ACCESS(filename,mode)  - Just like the access()
  325.                      F$ACCESS(filename,mode)
  326.                      F$ACCESS(filename,mode)
  327.  
  328.           function. Returns a boolean  value  depending  on  the  file
  329.  
  330.           access.  Modes are:    READ, WRITE and SYSTEM.  Returns 1 if
  331.  
  332.           access is allowed (WRITE if RO bit clear, SYSTEM if SYS  bit
  333.  
  334.           set,  and  READ  if  file  exists)  or  0  if  access is not
  335.  
  336.           allowed.
  337.  
  338.  
  339.                   o F$SIZE(filename) - Returns the size  of  the  file
  340.                     F$SIZE(filename)
  341.                     F$SIZE(filename)
  342.  
  343.           in sectors.
  344.  
  345.  
  346.                   o  F$PARSE(filename,default,field) - Parses filename
  347.                      F$PARSE(filename,default,field)
  348.                      F$PARSE(filename,default,field)
  349.  
  350.           and optionally fills in missing  fields  (drive,  name,  and
  351.  
  352.           type) from  default.    Returns the whole file specification
  353.  
  354.           or selected parts (drive, name, or type) if  field  argument
  355.  
  356.           is non-empty.
  357.  
  358.  
  359.                   o  F$LOCATE(substring,string) - Returns the location
  360.                      F$LOCATE(substring,string)
  361.                      F$LOCATE(substring,string)
  362.  
  363.           of substring in string or the length of string if  substring
  364.  
  365.           is not in string.
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 4
  375.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  376.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  377.  
  378.  
  379.  
  380.  
  381.                   o  F$EXTRACT(start,length,string)  -  Returns length
  382.                      F$EXTRACT(start,length,string)
  383.                      F$EXTRACT(start,length,string)
  384.  
  385.           characters from string starting at start.
  386.  
  387.  
  388.                   o F$LENGTH(string)  -  Returns  the  length  of  the
  389.                     F$LENGTH(string)
  390.                     F$LENGTH(string)
  391.  
  392.           string.
  393.  
  394.  
  395.                   o F$USER() - Returns the current user number.
  396.                     F$USER()
  397.                     F$USER()
  398.  
  399.  
  400.                   o F$DRIVE() - Returns the current drive letter.
  401.                     F$DRIVE()
  402.                     F$DRIVE()
  403.  
  404.  
  405.                   o  F$BACKGROUNDP() - Returns TRUE (1) if executed in
  406.                      F$BACKGROUNDP()
  407.                      F$BACKGROUNDP()
  408.  
  409.           the context of the background task.
  410.  
  411.  
  412.  
  413.                The  arguments  (if  any)  to   these   functions   are
  414.  
  415.           considered expressions,  which are evaluated.  Alias symbols
  416.  
  417.           can be used as variables.    These  lexical  functions  will
  418.  
  419.           work,  along  with infix arithmetical operators (+, -, *, /,
  420.  
  421.           =, <>, <=, >=), only on IF, ALIAS, SETPROMPT,  SETECHO,  and
  422.  
  423.           USER commands, and in argument expressions.
  424.  
  425.  
  426.                            8: User Interface Hacks.
  427.                               User Interface Hacks.
  428.                               User Interface Hacks.
  429.  
  430.  
  431.                This will consist of the commands:
  432.  
  433.  
  434.                   o  SETPROMPT  string  -  set  the  command prompt to
  435.                      SETPROMPT  string
  436.                      SETPROMPT  string
  437.  
  438.           string.
  439.  
  440.  
  441.                   o SETECHO flag - set  submit  file  echoing  on  (if
  442.                     SETECHO flag
  443.                     SETECHO flag
  444.  
  445.           flag is non-zero) or off (if flag is zero).
  446.  
  447.  
  448.                   o SAVEECHO symbol - save echo state in symbol.
  449.                     SAVEECHO symbol
  450.                     SAVEECHO symbol
  451.  
  452.  
  453.                                9: CCP Call Back.
  454.                                   CCP Call Back.
  455.                                   CCP Call Back.
  456.  
  457.  
  458.                This  will  consist of some functions invoked with TRAP
  459.  
  460.           #1.  Included will be:
  461.  
  462.  
  463.                   o Start Background Task  -  start  up  a  background
  464.                     Start Background Task
  465.                     Start Background Task
  466.  
  467.           task. Takes  three  optional  arguments:    a pointer to the
  468.  
  469.           command line to execute (NULL meaning start  an  interactive
  470.  
  471.           background  task), and pointers to functions (to be executed
  472.  
  473.           in the foreground  context)  to  handle  console  input  and
  474.  
  475.           output functions (NULL meaning use standard console I/O).
  476.  
  477.  
  478.                   o  Get  Symbol  Alias  Value - fetch the value of an
  479.                      Get  Symbol  Alias  Value
  480.                      Get  Symbol  Alias  Value
  481.  
  482.           alias symbol.
  483.  
  484.  
  485.                   o Set Symbol Alias Value  -  set  the  value  of  an
  486.                     Set Symbol Alias Value
  487.                     Set Symbol Alias Value
  488.  
  489.           alias symbol.
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 5
  506.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  507.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  508.  
  509.  
  510.  
  511.  
  512.                                  10: Aliases.
  513.                                      Aliases.
  514.                                      Aliases.
  515.  
  516.  
  517.                This  will  be  some sort of hybred of C-Shell and DCL.
  518.  
  519.           Probably the  syntax  of  the  C-Shell  (sort  of)  and  the
  520.  
  521.           functionallity  of  DCL.  I haven't fully figured out what I
  522.  
  523.           will do here.  Need  to  maintain  some  sort  of  syntactic
  524.  
  525.           compatablity with DRI's CCP.
  526.  
  527.  
  528.                            11: Program Search Path.
  529.                                Program Search Path.
  530.                                Program Search Path.
  531.  
  532.  
  533.                There  will  be  commands  to  set,  show, and edit the
  534.  
  535.           command search path.  This path  is  a  list  of  drives  to
  536.  
  537.           search  for  commands  to  execute.  I  will  also implement
  538.  
  539.           command name abbreviation hacking (probably by  filling  out
  540.  
  541.           the command name in the FCB with '?' instead of blanks).
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.