home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / a / edit11.lbr / EDIT.DZC / EDIT.DOC
Encoding:
Text File  |  1993-10-26  |  12.1 KB  |  292 lines

  1.                  EDIT.COM Multiple Utility Program
  2.                  ---------------------------------
  3.  
  4. Version 1.1
  5. Introduction
  6.  
  7. EDIT is a utility program which performs many different functions 
  8. often  needed in daily computing,  put together in a single small 
  9. program  which is easy to use.  Functions include  text  editing,
  10. disk file size and free space reports,  file printing, file copy-
  11. ing,  'dumping'  of  a file in binary format,  and alteration  of 
  12. machine code files. Even if only one of EDIT's functions is used, 
  13. the  program  is still smaller  than  comparable  single-function 
  14. utilities.
  15.  
  16. An  example of a typical use is with dBase II.  EDIT will  enable 
  17. the user  to write  and modify command files,  check  on the disk 
  18. space left,  copy files  for backup,  list command  files  on his
  19. printer,  and  even  (assuming  enough knowledge)  examining  and
  20. repairing 'broken' files.
  21.  
  22. EDIT is unique in that all of these functions are within a single 
  23. program only 2K in length. Operation is fast and easy with single 
  24. letter commands for editing,  and prompting where required.  EDIT 
  25. will replace PIP, STAT, XDIR, and ED for most users needs.
  26.  
  27. One  of  the reasons for EDIT's small size and fast operation  is 
  28. its method of handling files. The entire file is read into memory 
  29. at  one time,  and re-written only after the desired changes  are 
  30. made.  For  safety EDIT never changes the original  file,  always 
  31. writing a new modified copy.  However,  the tradeoff is that  the 
  32. entire file must fit in the 'TPA' of your computer.  For most 64K 
  33. machines,  this  means that you can use EDIT on files up to about 
  34. 50K in size,  which is more than adequate for most  applications. 
  35. EDIT  won't  damage a file too large - it simply won't work  with 
  36. it.
  37.  
  38. System Requirements
  39.  
  40. EDIT will work with any CP/M 2.2 or 3.0 computer.  If the machine 
  41. is  a CP/M Plus system with bank switching,  the amount  of  disk 
  42. free  space reported will be incorrect,  but all other  functions 
  43. work normally. A specific amount of RAM is not required.
  44.  
  45.  
  46. Installation
  47.  
  48. EDIT  is  easily  installed using only EDIT  itself.  Follow  the 
  49. following steps.
  50.  
  51. 1.  Copy EDIT onto a disk with CP/M on it,  using whatever method 
  52. your computer outlines for copying files.  Put the original  EDIT 
  53. disk away with your backup disks.
  54.  
  55. 2.  Find  out  the 'hex code' your computer or terminal  uses  to 
  56. èclear its screen. If you don't know this or can't find it in your 
  57. manual,  ask your dealers technician. Be sure it is in 'hex'. For 
  58. example, an Osborne's code is '1A hex'. A Z-19 terminal would use 
  59. '1B hex, 45 hex', two codes.
  60.  
  61. 3.  With  your  EDIT disk in the computer type   EDIT EDIT.COM  C 
  62. <Return>.   EDIT  will  respond  with  the  question     ADDRESS?      
  63. which  you  answer    855 <Return>   .  EDIT  will  respond  with  
  64. BYTE=00h  CHANGE TO:    . Enter your first hex code. (For Osborne 
  65. this would be 1A.)
  66.  
  67. 4.  If you have more than one hex code to enter (each one is  two 
  68. digits)  repeat the above process for addresses 856,  and 857  if 
  69. needed. Then when you are done and EDIT is still asking ADDRESS?, 
  70. just hit <Return> and EDIT will rewrite the changed file, in this 
  71. case itself. 
  72.  
  73. Now  look  at the disk.  You should have EDIT.COM  and  EDIT.BAK. 
  74. EDIT.BAK  is the original file and EDIT.COM is your newly instal-
  75. led version.
  76.  
  77.  
  78.  
  79. Instruction
  80.  
  81. To get used to EDIT,  we suggest making a special disk for  prac-
  82. tice.  Prepare  yourself a work disk with CP/M on it (check  your 
  83. computer  manual if you don't know how to do this.) Then put your 
  84. empty work disk in drive A:  and a disk with EDIT on it in  drive 
  85. B:. 
  86.  
  87. 1. Copying files
  88.  
  89. First  we  will  learn how to copy files  using  EDIT.  Type   B: 
  90. <Return> so that we are on the B:  drive (where EDIT is now).  To 
  91. copy EDIT onto our work disk type   EDIT EDIT.COM A: <Return>   . 
  92. EDIT  will copy itself to drive A:.  Then we can type  A:<Return> 
  93. to go back to the A: drive. Type  DIR<Return> to see that EDIT is 
  94. there. Here is what we did:
  95.  
  96. EDIT             EDIT.COM              A:             <Return>
  97.  
  98. (starts EDIT) (tells EDIT what) (tells EDIT what) (tells EDIT to)
  99.               (  file to copy ) (drive to put it) (  get going! )
  100.                                 (       on      )
  101.  
  102. 2. Make a test file
  103.  
  104. Now we are going to make a test file for us to practice on.  Type 
  105. EDIT  TEST.TXT <Return>   .  EDIT will inform you that this is  a 
  106. new file and ask for a command.  We want to insert text, so press 
  107. I  for Insert.  (You don't have to hit Return!) Your screen  will 
  108. clear (if you installed EDIT properly).
  109.  
  110. Now type in whatever you want,  say part of the newspaper. Put in 
  111. èenough  so that you fill up more than the screen can  display  at 
  112. once.  When you are ready to stop inserting, type  /  <Return> at 
  113. the  beginning  of a new line.  When we do this character at  the 
  114. beginning  of a line EDIT knows that we want to  stop  inserting. 
  115. EDIT will now ask for another command.
  116.  
  117. We're  done for now so type  Q   for Quit.  (Again,  no  Return.) 
  118. EDIT  will save the file we made onto the disk.  When CP/M  gives 
  119. you  the  A> prompt,  type   TYPE TEST.TXT<Return>    ,  and  you 
  120. should see the words we just entered. Try copying TEST.TXT to the 
  121. B: drive (the command is  EDIT TEST.TXT B: <Return>    ).
  122.  
  123.  
  124. 3. File size and Free Space
  125.  
  126. Now try typing     EDIT <Return>   .  We should get a list of all 
  127. files (in this case just EDIT.COM and TEST.TXT) with their sizes, 
  128. and  a report on how much room is left on the disk.  Keep  trying 
  129. this  as  we create more files,  and see how useful  it  is.  Try 
  130. typing     EDIT B:  <Return> and you will get a list of files  on 
  131. the B: drive.
  132.  
  133.  
  134.  
  135. 4. Hex Dump
  136.  
  137. Many users won't have much need for this function, but it is fun. 
  138. A  'hex dump' is a display of the digital codes that are inside a 
  139. file.  Type   EDIT TEST.TXT D <Return>   . You should see on your 
  140. screen a complete list of all the digital codes inside  TEST.TXT. 
  141. Over  on  the right is a list of the letter that goes  with  that 
  142. code,  if  any.  (If no letter goes with that code we just put  a 
  143. period there.) It is easy to stop the display from scrolling when 
  144. you  want to examine something - just type a Control-S to  freeze 
  145. the  display.  Then when you are done,  type any key to start  it 
  146. again.  (A  CP/M  Plus computer needs Control-Q to start  again.) 
  147. While  this  function is mostly useful  to  programmers,  it  can 
  148. sometimes help to locate a bad byte in a 'broken' file. Try doing 
  149. a hex dump of other files and see whats inside them.
  150.  
  151. 5. Printing
  152.  
  153. EDIT  can  send files to the printer for you.  Get  your  printer 
  154. ready to go,  and type   EDIT TEST.TXT P <Return>  . The text you 
  155. entered earlier is now sent to the printer.  When the printing is 
  156. done  and you are back at the A> prompt,  type EDIT - <Return)  . 
  157. This will make you printer formfeed to the next page stop. (Some-
  158. times this can be easier than reaching your printer!)
  159.  
  160.  
  161. 6. Text editing
  162.  
  163. To edit our test file,  type  EDIT TEST.TXT <Return>  . EDIT will 
  164. load  TEST.TXT into memory and display the first 22 lines on  the 
  165. screen.
  166. è
  167. First  we will try the commands for moving around.  All of  these 
  168. commands are just one letter - no Return needed.
  169.  
  170. 'U' and 'D' are the commands for moving the text on the screen up 
  171. or  down  one line.  'H' is a  special kind of up that hops  five 
  172. lines.  'P' and 'N' will jump the screen to the previous or  next 
  173. whole screen.  Finally, 'B' or 'E' will move you to the beginning 
  174. or the end of the file. Try each one of these commands until they 
  175. are understood fully.
  176.  
  177. Now  we  will insert some text.  Push 'B' (to the beginning)  'H' 
  178. (hop  up five lines) and 'I' (insert).  Your screen  will  blank. 
  179. Type  some recognizable line such as 'This is the inserted text.' 
  180. and hit return.  Now type   / <Return>  to stop the insert  mode. 
  181. You  should  see the line you inserted at the top of the  screen. 
  182. Hit  'B'  (go to beginning) and you will see your  inserted  line 
  183. five lines down.
  184.  
  185. The  important thing to note here is that the text  was  inserted 
  186. before the line that was at the top of the screen when you pushed 
  187. 'I'  (insert).  The line at the top of the screen is the  'active 
  188. line', i.e., most things will happen at that place in the file.
  189.  
  190. Now  use  'U'  to move the line you inserted to the  top  of  the 
  191. screen.  Hit  'K' for kill.  This command deletes the line at the 
  192. top of the screen.  Hit 'B' (beginning) and you will see that the 
  193. inserted  line is now gone.  If you ever want to kill  an  entire 
  194. screen  of text,  use the 'Z' (zap) command.   Because deleting a 
  195. whole screen is pretty drastic, Zap will first ask you to confirm 
  196. your choice with a 'Y' or 'N'.
  197.  
  198. EDIT is what is called a 'line editor'; this means that you  must
  199. insert or delete an entire line when you  make  changes.  This is
  200. part of the reason why EDIT is so small.
  201.  
  202. One last word on inserting: If you ever have an entirely seperate 
  203. text  file  that  you would like to include in the  one  you  are 
  204. working on you can use the 'R' (read file) command. This will ask 
  205. you for a filename,  go get the file,  and insert the whole thing 
  206. at the top of the screen.
  207.  
  208. There  are two commands for you to use when you are done editing. 
  209. One  is 'Q' for quit.  This saves your edited file,  and  renames 
  210. your original file to filename.BAK, for backup. The other command 
  211. is for when you have decided not to save your work,  and want the 
  212. files  on the disk to remain just as they originally  were.  This 
  213. command is 'J', for 'junk changes'. Just as with the Zap command, 
  214. abandoning  a  file  can lose important work,  so  before  we  go 
  215. through  with a Junk you are asked to confirm the choice  with  a 
  216. 'Y' or a 'N'.
  217.  
  218. The last command to learn is the 'F' (find) command. This works a 
  219. little  differently  than  most other editors,  and  is  intended 
  220. primarily for programmers.
  221. è
  222. Look  ahead in your test file for a word which is the first  word 
  223. on a line.  Then use 'B' to move away from it.  Hit 'F' and  EDIT 
  224. will  ask you what label to find.  Give it the word you saw and a 
  225. <Return>. EDIT will search the file for a line starting with that 
  226. word and position that line at the top of the screen.  If no word 
  227. is found, EDIT positions the file at the beginning.
  228.  
  229. Caution: the word must match the case of the original - if one is 
  230. upper case and one is lower case, the word will not be found.
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.               Quick Reference - EDIT.COM  Version 1.1
  248.               ---------------------------------------
  249.  
  250. Function commands (entered at the A> and followed by Return)
  251. All commands can be upper or lower case
  252.  
  253. EDIT            - gives XDIR report for current disk
  254. EDIT B:            - gives XDIR report for specified disk
  255.  
  256. EDIT filename.typ       - Edits file, creates file if new
  257. EDIT B:filename.typ    - Edits file on specific drive, creates
  258.                           file if new
  259.  
  260. EDIT filename.typ C    - allows changing a byte in any file
  261.  
  262. EDIT filename.typ D    - dumps file to screen
  263.  
  264. EDIT filename.typ P     - Sends file to the printer
  265.                         - expands tabs and provides page breaks
  266.  
  267. EDIT -            - Sends formfeed to printer
  268.  
  269. EDIT filename.typ B:    - Copies file from current disk to B:
  270. EDIT A:filename.typ B:    - Copies file from A: to B:
  271. EDIT B:filename.typ A:    - Copies file from B: to A:
  272.  
  273.  
  274. Text editing commands (not followed by pressing Return)
  275.  
  276. è    U - moves text UP a line
  277.     H - HOPs text up 5 lines
  278.     D - moves text DOWN a line
  279.     P - moves to the PREVIOUS screen
  280.     N - moves to the NEXT screen
  281.     B - moves to the BEGINNING of the file
  282.     E - moves to the END of the file
  283.  
  284.     I - INSERT text mode
  285.     / - / <CR> at start of new line to stop inserting
  286.     R - READ in file and block insert into current file
  287.     K - KILL line at top of screen
  288.         T - TRUNCATE file from top of screen
  289.     Z - ZAP entire page
  290.     F - FIND line (asks for label to search for)
  291.     J - JUNK changes, leave disk file as it was
  292.     Q - QUIT and save file. original is named .BAK
  293.  
  294.  
  295. Install on specific machine by patching in clear screen codes in
  296. bytes 0855h - 0857h. Set unused bytes to 0.
  297.