home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / CPM68K / CPX2PLUS.DOC < prev    next >
Text File  |  2000-06-30  |  15KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                    CCPx2+ - An alternitive CCP for CP/M-68K                   CCPx2+ - An alternitive CCP for CP/M-68K                   CCPx2+ - An alternitive CCP for CP/M-68K
  11.  
  12.                                  Robert Heller                                 Robert Heller                                 Robert Heller
  13.                       Sun Feb 15, 1987 ***First Draft***                      Sun Feb 15, 1987 ***First Draft***                      Sun Feb 15, 1987 ***First Draft***
  14.  
  15.                 (c) 1987 By Robert Heller. All rights reserved.                (c) 1987 By Robert Heller. All rights reserved.                (c) 1987 By Robert Heller. All rights reserved.
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                ABSTRACT.  This  document  describes  design notes               ABSTRACT.               ABSTRACT.
  25.                for CCPx2+, an alternitive CCP for CP/M-68K.
  26.  
  27.  
  28.  
  29.  
  30.                CONTACT INFO. I can be reached as follows:               CONTACT INFO.               CONTACT INFO.
  31.  
  32.                ARAPNet:      Heller@UMass.CS.EDU
  33.                BITNET:       Heller@UMass.BITNET
  34.                BIX:          heller
  35.                GEnie:        RHELLER
  36.                FidoNet:      101/27 (Dave's Fido)
  37.                           or 101/147 (Orange Fido)
  38.                CompuServe:   71450,3432
  39.                U.S. Mail:    Robert Heller
  40.                              Star Route Box 51A
  41.                              Wendell, MA 01379
  42.                Voice Phone:  617-544-6933, early evenings
  43.                                            (before 7:30 PM
  44.                                            Eastern), and
  45.                                            weekends.
  46.                              413-545-0528, Monday to Friday
  47.                                            8:00 AM to 4:00 PM
  48.                                            Eastern.
  49.                Data Phone:   617-544-6933, 7:30 PM to 7:00 AM
  50.                                            Eastern.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 2        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  69.  
  70.  
  71.                                1: Introduction.                                  Introduction.                                  Introduction.
  72.  
  73.                These design notes are intended to put  in  writing  my
  74.           ideas  for  an  improved CCP (Console Command Processor) for
  75.           CP/M-68K.  I'd like to circulate  these  ideas  through  the
  76.           CP/M-68K  user  community  and  get  some  feedback on these
  77.           ideas.  I don't know if I will implement all  of  the  ideas
  78.           presented   here,   but  I  indend  to  implement  the  more
  79.           important ones.    I  intend  to  produce   this   code   as
  80.           shareware,  with  object  code  and  documentation available
  81.           free, with source code available for a small fee.
  82.  
  83.                               2: Major Features.                                 Major Features.                                 Major Features.
  84.  
  85.                The major features of CCPx2+ are:
  86.  
  87.                   o Forground/Backgound Tasks.  The  main  feature  of                    Forground/Backgound Tasks.                    Forground/Backgound Tasks.
  88.           CCPx2+   will   be   a   dual   TPA   system,  allowing  two
  89.           core-resident tasks  to  be  run.     It   won't   be   true
  90.           multi-tasking,  just a way to suspend a forground task (such
  91.           as an editor) and run a background task (such as  getting  a
  92.           directory listing or compiling a program).
  93.  
  94.                   o  Command Line Recall. A history mechanism, simular                     Command Line Recall.                     Command Line Recall.
  95.           to VMS's DCL - will use control  characters  to  recall  and
  96.           edit (as a one-line screen editor) previous command lines.
  97.  
  98.                   o  Nested  Submit  Files.  This  simply  means  that                     Nested  Submit  Files.                     Nested  Submit  Files.
  99.           submit  files  will  behave  like  subroutines,   with   the
  100.           neccessary context saved on a pushdown stack in the CCP.
  101.  
  102.                   o   Flow  Control  in  Submit  Files.  Simple  "if",                      Flow  Control  in  Submit  Files.                      Flow  Control  in  Submit  Files.
  103.           "goto", and labels.  Should be enough for most purposes.
  104.  
  105.                   o "Lexical Functions". These  will  be  builtin  CCP                    "Lexical Functions".                    "Lexical Functions".
  106.           commands with  a  functional  syntax.  Things like file name
  107.           parsing,  file  tests  (exists,  size,  etc.)   and   system
  108.           interegation (user number, current drive, etc.)
  109.  
  110.                   o  User  Interface  Hacks.  Things  like  control of                     User  Interface  Hacks.                     User  Interface  Hacks.
  111.           command  line  echoing  while  executing  submit  files  and
  112.           command prompt.
  113.  
  114.                   o  CCP  Call  Back.  There  will  be  a way for user                     CCP  Call  Back.                     CCP  Call  Back.
  115.           programs to "call back" the CCP for various functions  (such
  116.           as running a background task, etc.)
  117.  
  118.                   o  Aliases.  User definable symbols for commands and                     Aliases.                     Aliases.
  119.           CCP variables.
  120.  
  121.                   o Program Search Path. A list of  drives  to  search                    Program Search Path.                    Program Search Path.
  122.           for command and submit files.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 3        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  135.  
  136.  
  137.                         3: Forground/Background Tasks.                           Forground/Background Tasks.                           Forground/Background Tasks.
  138.  
  139.                I  plan  to have the CCP divide the TPA into two parts:
  140.           a forground part and a background part.  The relative  sizes
  141.           will  be  determined  by the BIOS, through the use of global
  142.           parameters, much like the auto start is  presently  handled.
  143.           The  default  will  be to cut the TPA into two equal pieces.
  144.           Normally,  keyboard  commands  will  be  executed   in   the
  145.           forground TPA.   A user-program will be able to pass control
  146.           to a background task with a CCP call  back  function.    The
  147.           call  back  function  will take a CCP command line (or blank
  148.           for an interactive background task) with optional  arguments
  149.           for  a  conin  and  conout  functions  (this  allows  simple
  150.           pipes).
  151.  
  152.                             4: Command Line Recall.                               Command Line Recall.                               Command Line Recall.
  153.  
  154.                I plan on implementing  something  like  VMS's  command
  155.           line recall.   VMS implements command line recall by binding
  156.           control characters to functions  which  recall  the  command
  157.           line(s)  and allow for one-line "screen" editing (inserting,
  158.           deleting, and replacing of characters).
  159.  
  160.                             5: Nested Submit Files.                               Nested Submit Files.                               Nested Submit Files.
  161.  
  162.                This is simply a matter of having  the  SUBMIT  command
  163.           maintain a stack of pending submit file states.
  164.  
  165.                        6: Flow Control in Submit Files.                          Flow Control in Submit Files.                          Flow Control in Submit Files.
  166.  
  167.                This  will  consist  of  a  contitional command (IF), a
  168.           branching command (GOTO),  and  allowing  for  command  line
  169.           labels.  This is probably suffientent for most purposes.
  170.  
  171.                              7: Lexical Functions.                                Lexical Functions.                                Lexical Functions.
  172.  
  173.                I have these functions in mind:
  174.  
  175.                   o  F$ACCESS(filename,mode)  - Just like the access()                     F$ACCESS(filename,mode)                     F$ACCESS(filename,mode)
  176.           function. Returns a boolean  value  depending  on  the  file
  177.           access.  Modes are:    READ, WRITE and SYSTEM.  Returns 1 if
  178.           access is allowed (WRITE if RO bit clear, SYSTEM if SYS  bit
  179.           set,  and  READ  if  file  exists)  or  0  if  access is not
  180.           allowed.
  181.  
  182.                   o F$SIZE(filename) - Returns the size  of  the  file                    F$SIZE(filename)                    F$SIZE(filename)
  183.           in sectors.
  184.  
  185.                   o  F$PARSE(filename,default,field) - Parses filename                     F$PARSE(filename,default,field)                     F$PARSE(filename,default,field)
  186.           and optionally fills in missing  fields  (drive,  name,  and
  187.           type) from  default.    Returns the whole file specification
  188.           or selected parts (drive, name, or type) if  field  argument
  189.           is non-empty.
  190.  
  191.                   o  F$LOCATE(substring,string) - Returns the location                     F$LOCATE(substring,string)                     F$LOCATE(substring,string)
  192.           of substring in string or the length of string if  substring
  193.           is not in string.
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 4        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  201.  
  202.  
  203.                   o  F$EXTRACT(start,length,string)  -  Returns length                     F$EXTRACT(start,length,string)                     F$EXTRACT(start,length,string)
  204.           characters from string starting at start.
  205.  
  206.                   o F$LENGTH(string)  -  Returns  the  length  of  the                    F$LENGTH(string)                    F$LENGTH(string)
  207.           string.
  208.  
  209.                   o F$USER() - Returns the current user number.                    F$USER()                    F$USER()
  210.  
  211.                   o F$DRIVE() - Returns the current drive letter.                    F$DRIVE()                    F$DRIVE()
  212.  
  213.                   o  F$BACKGROUNDP() - Returns TRUE (1) if executed in                     F$BACKGROUNDP()                     F$BACKGROUNDP()
  214.           the context of the background task.
  215.  
  216.  
  217.                The  arguments  (if  any)  to   these   functions   are
  218.           considered expressions,  which are evaluated.  Alias symbols
  219.           can be used as variables.    These  lexical  functions  will
  220.           work,  along  with infix arithmetical operators (+, -, *, /,
  221.           =, <>, <=, >=), only on IF, ALIAS, SETPROMPT,  SETECHO,  and
  222.           USER commands, and in argument expressions.
  223.  
  224.                            8: User Interface Hacks.                              User Interface Hacks.                              User Interface Hacks.
  225.  
  226.                This will consist of the commands:
  227.  
  228.                   o  SETPROMPT  string  -  set  the  command prompt to                     SETPROMPT  string                     SETPROMPT  string
  229.           string.
  230.  
  231.                   o SETECHO flag - set  submit  file  echoing  on  (if                    SETECHO flag                    SETECHO flag
  232.           flag is non-zero) or off (if flag is zero).
  233.  
  234.                   o SAVEECHO symbol - save echo state in symbol.                    SAVEECHO symbol                    SAVEECHO symbol
  235.  
  236.                                9: CCP Call Back.                                  CCP Call Back.                                  CCP Call Back.
  237.  
  238.                This  will  consist of some functions invoked with TRAP
  239.           #1.  Included will be:
  240.  
  241.                   o Start Background Task  -  start  up  a  background                    Start Background Task                    Start Background Task
  242.           task. Takes  three  optional  arguments:    a pointer to the
  243.           command line to execute (NULL meaning start  an  interactive
  244.           background  task), and pointers to functions (to be executed
  245.           in the foreground  context)  to  handle  console  input  and
  246.           output functions (NULL meaning use standard console I/O).
  247.  
  248.                   o  Get  Symbol  Alias  Value - fetch the value of an                     Get  Symbol  Alias  Value                     Get  Symbol  Alias  Value
  249.           alias symbol.
  250.  
  251.                   o Set Symbol Alias Value  -  set  the  value  of  an                    Set Symbol Alias Value                    Set Symbol Alias Value
  252.           alias symbol.
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.         CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        Page 5        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***        CCPx2+ - An Alternitive CCP for CP/M-68K ***First Draft***
  267.  
  268.  
  269.                                  10: Aliases.                                     Aliases.                                     Aliases.
  270.  
  271.                This  will  be  some sort of hybred of C-Shell and DCL.
  272.           Probably the  syntax  of  the  C-Shell  (sort  of)  and  the
  273.           functionallity  of  DCL.  I haven't fully figured out what I
  274.           will do here.  Need  to  maintain  some  sort  of  syntactic
  275.           compatablity with DRI's CCP.
  276.  
  277.                            11: Program Search Path.                               Program Search Path.                               Program Search Path.
  278.  
  279.                There  will  be  commands  to  set,  show, and edit the
  280.           command search path.  This path  is  a  list  of  drives  to
  281.           search  for  commands  to  execute.  I  will  also implement
  282.           command name abbreviation hacking (probably by  filling  out
  283.           the command name in the FCB with '?' instead of blanks).
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.