home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / do11.lbr / DO.DZC / DO.DOC
Encoding:
Text File  |  1993-10-26  |  3.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                              DO
  9.  
  10.  
  11.     Copyright 1982, 1983 William G. Hutchison, Jr.
  12.  
  13.  
  14.  
  15.           TYPE MULTIPLE CP/M COMMANDS ON ONE LINE
  16.  
  17.  
  18.     "DO"  is  a C program designed to make it easier to type
  19. in short commands at the CP/M console. (CP/M is a  trademark
  20. of  Digital  Research, Inc.) Like the program "/.COM" in the
  21. CP/M users group collection, it allows the operator to enter
  22. more than one command on one line, separated  by  semicolons
  23. (;).
  24.     It  works by imitating some of the functions of the CP/M
  25. SUBMIT program. It makes a stack of command lines in reverse
  26. order,  terminating  each  line  whenever  a  semicolon   is
  27. encountered. For those with terminals that allow input lines
  28. longer than 80 characters, it also starts a new command line
  29. whenever  the  current  line  would become filled. It breaks
  30. command lines only at semicolons or spaces, thus  DIR  would
  31. never  be  separated  into  D  IR.  DO  uses  dynamic memory
  32. allocation to store the lines. Thus you  might  run  out  of
  33. memory if you type in a great many lines. In most cases, the
  34. CP/M command line input processor will not allow you to type
  35. anyway  near  this limit, so the error message "Do is out of
  36. memory!" should never appear.
  37.     After creating the list of commands,  DO  traverses  the
  38. list   in  reverse  order,  writing  it  to  a  file  called
  39. A:$$$.SUB. This is  a  temporary  file  used  by  CP/M  upon
  40. restarting  ("Warm  Boot").  It  precedes  each  line by the
  41. length of the line and follows each line by null  characters
  42. up  to  128 bytes. Finally, DO does a call to a "subroutine"
  43. at location 0, which restarts  CP/M.  At  this  point,  CP/M
  44. reads  the commands in A:$$$.SUB. It reverses the order once
  45. again, so they come out right.
  46.     If the A: disk is full before you run DO, it  will  fail
  47. to  create  the  file  A:$$$.SUB. If this happens, CP/M will
  48. probably say "Write error - Disk  full".  If  you  get  this
  49. error  message,  please use STAT on the A: disk to see if it
  50. is really out of space. If you can delete something from A:,
  51. you can try DO again and it should work.
  52.     To run the program, you need a compiled  and  loaded  or
  53. linked  version  of  DO called DO.COM. You must prepare this
  54. with your own C compiler. Next, just type
  55.  
  56.           DO
  57.  
  58.     This will make DO type out a brief  description  of  its
  59. operation:
  60.  
  61.         Usage: DO COM1; COM2; ... COMN
  62.         where COM1 ... COMN are valid CP/M commands
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. DO.C                                         page 2
  70.  
  71.     Here are some more examples of using DO:
  72.  
  73.  
  74.         DO A:; STAT *.*; B:; STAT *.*
  75.  
  76. will  list files and sizes on both the A: and B: disks, then
  77. leave you logged in to the B: disk.
  78.         DO A:PIP PRN:=DO.C; A:C DO >LST:; A:AS DO; ERA DO.ASM; A:STAT *.*
  79.  
  80. will print DO.C, compile it, assemble  the  output  from  C,
  81. erase the intermediate assembly language file, then tell you
  82. how much space is left on the current disk.
  83.     If  you  want  to  do  these sequences repeatedly, it is
  84. better to use SUBMIT. But for improvisation, use DO!
  85.     DO is written in a subset of C called  C/80  version  2.
  86. C/80   is  available  from  the  Software  Toolworks,  14478
  87. Glorietta Drive, Sherman Oaks,  CA  94123,  (213)  986-4885,
  88. CompuServe 70305,170.
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.