home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol245 / abstract.245 < prev    next >
Encoding:
Text File  |  1986-02-13  |  10.7 KB  |  231 lines

  1.  
  2.     The disk SIG/M 245, in addition to the usual ancillary files for
  3. verifying the checksum, unsqueezing files and unpacking libraries, contains
  4. the following new files:
  5.  
  6.         FYNDE.COM    search files and libraries of files
  7.         HJELP.COM    read HELP files, execute sample programs
  8.         HJELP.LBR    documentation for HJELP.COM
  9.         MAZE.LBR    maze running example for CONVERT
  10.         TOUR.LBR    maze examples in assembly language
  11.  
  12.  
  13.     - - - - - FYNDE.COM - - - - -
  14.  
  15.  
  16.     Ward Christensen's original FIND.COM has been extended several
  17. times, by programs which can be found in several SIG/M volumes. Our version
  18. FYNDE.COM resembles Unix's "grep" in that a regular expression can be used
  19. as a search pattern. Extended once to allow searching through squeezed as
  20. well as normal files, it has been extended again to allow searching through
  21. library files.
  22.  
  23.     A request had been made to incorporate the name of a default search
  24. family which would be used when FYNDE was invoked with an empty command line.
  25. Presumably the attractive feature of this usage was not so much the default
  26. file specification as the fact that the program would then go into a loop,
  27. so that the files could be browsed with several search patterns without the
  28. need to reenter the file name.
  29.  
  30.     Finally, unless one is searching for only one or two items, has a
  31. prodigous memory, pencil and paper handy, uses ^P, or has MicroShell in his
  32. (her) system, one quickly wishes that there were some way to make a permanent
  33. record of a search. A disk file can now be selected to hold the results of
  34. browsing through the disk, and is even protected against self-browsing.
  35.  
  36.     For lack of space, only the object program for FYNDE.COM is included
  37. in this volume, and only the version for the Intel 8080. More through an
  38. oversight, library search can only be made in the browsing mode, and not
  39. from the command line.
  40.  
  41.     When the simple command line
  42.  
  43.         FYNDE
  44.  
  45. is typed, SIG*.CAT will be taken as the default specification of the files
  46. to be searched, and will respond with a logo and a menu. The menu listing
  47. can be refreshed anytime that FYNDE is soliciting options by typing carriage
  48. return. Otherwise a letter is expected followed by parameters. Options are
  49.  
  50.         H to get a resume of search pattern syntax
  51.         D FILENAME.EXT to activate an output file
  52.         S FILENAME.EXT to search a new family of files
  53.         P LABEL!PATTERN to indicate what to search for
  54.         Q to quit (^C will not close the output file)
  55.  
  56. D or S file definitions remain active until superseded by a new use of their
  57. option. However, D always erases an old file before opening a new one of the
  58. same name. Thus if one wants to start over again, the earlier file name may
  59. be repeated, but if not the result may be quite distressing. Any change of
  60. output file closes the previous file. Q is the only way to quit and ensure
  61. that an output file which was in use will be closed.
  62.  
  63. D or S can be followed immediately by their parameter, but there MUST be a
  64. space between P and its pattern. This is because P does not use delimiters
  65. and spaces quickly become invisible once written. Thus, P followed by TWO
  66. spaces will search for text beginning with ONE space. Likewise, spaces at
  67. the end of the pattern and before the carriage return count even if that
  68. was not intended. In short, P is not free-form; the other options are.
  69.  
  70.     Some examples:
  71.  
  72.         D FOO.FAW    selects FOO.FAW as output file
  73.         D F*.FAW    gives an error message
  74.         D (FOO) FAW    gives an error message
  75.         D        closes output file, stops further output
  76.  
  77.         S *.ASM        searches assembly sources
  78.         S (X) *.ASM    assembly sources in X.LBR
  79.         S (X) *.A?M    sources might be squeezed
  80.         S (*) *.*    anything that's in a library
  81.         S (B:X) FOO    FOO, member of X.LBR, on disk B
  82.         S B:(X) FOO    no, it's library on disk, not disk w/library
  83.         S FOO.FAW    won't work if FOO.FAW is output file
  84.         S *.COM        will simply skip all those files
  85.         S        ought to return to SIG*.CAT but won't
  86.  
  87.         P {?}        lists everything (good way to read a file)
  88.         P        (how many spaces was that?)
  89.         P .        lists ends of all sentences, etc
  90.         P.        produces an error message
  91.  
  92.  
  93.     - - - - - HJELP.COM, HJELP.LBR - - - - -
  94.  
  95.  
  96.     HJELP.COM is an outgrowth of the program HELP.COM, whose variants
  97. can be found in many SIG/M volumes and elsewhere. The most recent reference
  98. is SIG/M 206.02, which could access HELP files irrespective of whether they
  99. were squeezed or embedded in libraries. This new version is a very slight
  100. but nevertheless extremely useful extension of 206.02, in the sense that
  101. binary object programs can be included in the HELP tree structure, and
  102. executed as part of the script.
  103.  
  104.     Among the many possible applications for this new alternative, we
  105. can only regret that our disk is so small that a HELP file explaining the
  106. use of FYNDE could not be included. Had this been possible, all the various
  107. options, capabilities, and error conditions of FYNDE could be tried out as
  108. their description was being read. As it is now, one has to first list this
  109. documentation file on the printer, then load and execute FYNDE while reading
  110. the listing. That is, if one really bothered to make the listing. Or knew
  111. that this file existed!
  112.  
  113.     In order to execute the .COM files that one finds in any CP/M
  114. system (which means they are all based on an origin 0100H), HJELP must
  115. move itself out of the way, just as DDT and some other programs must do.
  116. This in turn means that modifications to HJELP must have the same property.
  117. The whole process of preparing self-translating programs is cumbersome.
  118. For this reason, the file HJELP.LBR contains a submit file HJELP.SUB and
  119. a program to execute it, RUN.COM.  The details are similar to those of
  120. SIG/M 215.04 in which RUN was first introduced.
  121.  
  122.     Because of the space reserved to load and execute programs (16K),
  123. the space reserved for color images (3x8K), and the size of HJELP.COM itself
  124. (4K), there is little space for HELP files (6K maximum). This means that text
  125. ought to be quite concise, and that liberal usage of the tree structure of
  126. HJELP should be made, and that many small overlays should be planned.
  127.  
  128.     It gradually (maybe even rapidly) becomes apparent that HJELP files
  129. and their object programs have to be tailored for each other to get the best
  130. use out of the combination.
  131.  
  132.     Whatever the intrinsic merit of HJELP.COM, its inclusion in this
  133. volume allows the file TOUR.LBR to be used interactively to illustrate
  134. several applications of Convert. It will be readily apparent to those who
  135. study TOUR.LBR carefully that there will be an extensive evolution of
  136. programs like HJELP.COM in the presentation of interactive descriptions
  137. of existing programs, and the evolution of interactive programs illustrating
  138. existing text.
  139.  
  140.  
  141.     - - - - - MAZE.LBR - - - - -
  142.  
  143.  
  144.     The principal motivation for this volume was to present some
  145. applications for the programming language Convert, for which SIG/M volumes
  146. 213, 214, and 215 are the best current references. Historically, maze
  147. problems have been more accessible to list processing languages, especially
  148. those with symbol manipulation characteristics, than to languages based on
  149. arrays, such as Fortran or its successors. The reason is that only special
  150. mazes have regular, array-like structures. As it happens our examples have
  151. such regularity, but it is not essential for the techniques which are to be
  152. illustrated.
  153.  
  154.     MAZE.LBR will have to be unpacked to be used. The reason is that
  155. RUN only intercepts CP/M buffered input calls, but not calls directly to
  156. BIOS. So that REC programs can generate their own echos to their input,
  157. and since CP/M (as opposed to MS/DOS) does not permit echo-free input, REC
  158. uses direct BIOS calls to read characters. Until this awkward inconsistency
  159. is resolved, REC cannot be RUN from within libraries.
  160.  
  161.     MAZE.LBR contains a recent version of REC80 (simply called REC)
  162. and a correspondingly updated CNVRT incorporating a superior treatment of
  163. CNVRT's runtime library. This deviation from the above mentioned SIG/M
  164. volumes is necessitated by the fact that the runtime library was otherwise
  165. too large to use REC80 with the 64K of memory of the Intel 8080. In turn
  166. our examples feature a CNVRT compiler of Intel 8080 code, which is the
  167. reason that none of the programs in this volume have been written for the
  168. Intel 8086.
  169.  
  170.     Returning to the substantive content of MAZE.LBR, there are two
  171. versions of a CNVRT example - a maze running program. The program is simple,
  172. and is explained by documentation within MAZE.LBR, save that the CNVRT
  173. programs themselves will have to be studied with some care, with reference
  174. to previously presented HELP files describing CNVRT.
  175.  
  176.         CNVRT.HLP    SIG/M =
  177.         CNVPRG.HLP    SIG/M 173.07
  178.         CNVADV.HLP    SIG/M 203.02
  179.  
  180.     The first version is MAZE.CNV, which compiles into MAZE.REC and
  181. can be executed by typing
  182.  
  183.         REC MAZE
  184.  
  185. and responding to the moderately cryptic prompt with a list defining the
  186. maze. It is completely interactive; rather than preparing the connection
  187. list of the maze with an editor and leaving it on a disk, it has to be
  188. carefully typed in by hand. This is not the great drawback that it might
  189. seem, because MAZE is not practical for mazes with a large number (>10)
  190. of nodes. Nevertheless the CNVRT program is short and elegant.
  191.  
  192.     The second version, TOUR.CNV, which compiles into TOUR.REC, expects
  193. to find its data in a disk file, and creates an assembly listing which will
  194. examine the maze about as efficiently as it is possible to do so using an
  195. Intel 8080 CPU. It is not possible to HJELP or RUN TOUR either, but HJELP
  196. can be used to examine some of the mazes produced by TOUR.REC.
  197.  
  198.     Of course, it would be possible to enter into an enormous digression
  199. describing the merits of the particular mazes selected, namely Hamilton's
  200. dodecahedron problem and the knight's tour on some small chessboards.
  201. Suffice it to say that these are interesting problems in and of themselves,
  202. and that once the difficulties of programming them are out of the way, it
  203. is possible to concentrate on some of the aspects of maze theory.
  204.  
  205.  
  206.     - - - - - TOUR.LBR - - - - -
  207.  
  208.  
  209.     For someone who wants to play with a few mazes, and is not
  210. particularly interested in Convert or how the mazes came into existence,
  211. the best thing to do is to type
  212.  
  213.         HJELP (TOUR)
  214.  
  215. which will gain entrance to a fairly elaborate structure of HELP files
  216. and programs to execute.  Those who have never seen anything like it
  217. before will be impressed, but those who are accustomed to better things
  218. (Mammoth Cave and the like --- see SIG/M volume 1 and other early volumes)
  219. will quickly realize that there are vast opportunities for those who now
  220. want to write interactive scripts and design programs to be exploited by
  221. them.  HJELP could develop an internal RUN or evolve into a complete
  222. operating system without much trouble at all.
  223.  
  224.     In the meantime, it will be necessary to read the instructions
  225. which TOUR.LBR will proffer concerning the printing of a map, readying
  226. pen or pencil, and unlimbering the fingers to have them poised to strike
  227. ^S with appropriate rhythm.
  228.  
  229. [end]
  230. [Harold V.McIntosh, 20 July 1985]
  231.