home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_200 / 208_01 / e.doc < prev    next >
Text File  |  1987-10-13  |  46KB  |  1,300 lines

  1. The  e     screen editor                   Page 1
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.                   eeeee
  14.                  ee    ee
  15.                 ee    ee
  16.                    eeeeeeeeeee
  17.                    ee
  18.                 ee
  19.                  eeeeeeeee
  20.  
  21.  
  22.           TUTORIAL GUIDE AND IMPLEMENTATION MANUAL
  23.  
  24.  
  25.  
  26.  
  27.  
  28. The   e   screen  editor  is full-screen editor designed  for  creating  and
  29. modifying the source text of programs.    It is not, and it is not intended to
  30. be, a word processor.
  31.  
  32.  
  33.  
  34.  
  35.  
  36. It is released through the C Users Group for private non-profitmaking use by
  37.  
  38.                   G. Nigel Gilbert
  39.                  MICROLOGY
  40.  
  41.  
  42.  
  43.  
  44.             Version 4.8    October 1984
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. The  e     screen editor                   Page 2
  72.  
  73.  
  74. Contents
  75.  
  76. 1.   Prerequisites
  77.  
  78. 2.   Introduction
  79.  
  80. 3.   Development history
  81.  
  82. 4.   Why  e  was written
  83.  
  84. 5.   How  e  works
  85.  
  86. 6.   Using  e
  87.  
  88. 7.   Implementing  e  on your terminal
  89.  
  90. 8.   Changing the default settings of the options
  91.  
  92. 9.   Compiling and loading  e
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.                   1. Prerequisites
  102.  
  103. The  editor is written in the programming language C and the source code  is
  104. available  in the public domain for non-profit use.   It is recommended that
  105. you also have to hand a copy of the BDS C compiler,  version 1.50 or  later,
  106. if  you need to reconfigure the editor to suit your terminal and your choice
  107. of default option settings.
  108.  
  109. The  editor can be configured simply to run under CP/M with  any  moderately
  110. sophisticated  terminal.   The    following screen control functions  must  be
  111. available  with the terminal:  clear to end of line,  clear to end of  page,
  112. line insert, and line delete.  It is probably not worth using or adapting  e
  113. to run on terminals that do not support these functions (among the terminals
  114. which  DO support these functions are:    the TVI  910,  912,  920,  925,  950
  115. series,  Hazeltine 1420,  1500, Executive and Esprit series, ADM-31 (but not
  116. the  ADM-3a),  DEC VT52 and VT100,  ADDS range,  Visual 50 and 55 and  other
  117. terminals which offer emulations of these).
  118.  
  119. Also required is CP/M,    version 2, or CP/M 3.1 (CP/M Plus), and at least 48K
  120. (and preferably 56K) of RAM.  Other versions of CP/M might well do.
  121.  
  122.  
  123.  
  124.                   2. Introduction
  125.  
  126. This document has sections on:
  127.  
  128.      the  'philosophy'    of e - why it was written to work the  way  it    does
  129.       (sections 3, 4 and 5)
  130.      using e (section 6)
  131.      implementing  e (sections 7, 8, and 9)
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. The  e     screen editor                   Page 3
  142.  
  143.  
  144.  
  145.  
  146.  
  147.                3. Development history
  148.  
  149. e was written over a period of about two years to satisfy my own need for  a
  150. decent    screen editor to use for programming,  primarily in C,    but also  in
  151. FORTRAN  and Pascal.   During that time,  it has developed and    changed.   I
  152. expect    that it will continue to do so,  and hope that other users will keep
  153. in contact with me about what they think of it, what changes they make to it
  154. and how it could be improved.
  155.  
  156. I can be contacted at:
  157.  
  158.       G. Nigel Gilbert
  159.       MICROLOGY
  160.       4 Deanery Road
  161.       Godalming GU7 2PQ
  162.       Surrey
  163.       England
  164.  
  165.  
  166.  
  167.                4. Why  e was written
  168.  
  169. The design of e was determined largely by my own specific needs.   I already
  170. possessed  a  copy  of    WordStar,  the    well-known,  massive  and  generally
  171. excellent  word processing package.    I also possessed a copy of the  well-
  172. known and entirely excellent BDS C compiler.   Unfortunately, the two do not
  173. mesh well together.  In practice, programming in C (or in any other compiled
  174. language)  requires  one to edit a program file,  run the file    through  the
  175. compiler,  locate  errors,  then re-edit the file to make  corrections,  and
  176. repeat all this a large number of times.   The faster the cycle can proceed,
  177. the faster is program development.   However,  because WordStar is a big and
  178. powerful  package,  with two overlays to read off disk into memory,  it  can
  179. take over 25 seconds from the moment the command line is typed to being able
  180. to  edit  the program text.   Moreover,  the C compiler,  like many  others,
  181. reports  syntax errors by line number;    WordStar has no command to move  the
  182. cursor to a specified line number.   All in all, WordStar is great for text,
  183. and not much good for programs.
  184.  
  185. I resolved, therefore, to write an editor more adapted to my needs.  Such an
  186. editor    would  have  the  following  characteristics  (in  rough  order   of
  187. priority):
  188.  
  189.     Small run file, with no overlays
  190.     No initial menu - one would go straight into editing the text
  191.     A command to jump to a given line number
  192.     Random access to the text;    as far as possible, it should be as quick to
  193.      move from line 500 to line 1 as from line 1 to line 500
  194.     As few 'modes' as possible - I don't like editors (such as, for instance
  195.      the  UCSD editor) where one can only insert in the 'insert'  mode,  and
  196.      only delete in the 'delete' mode
  197.     No (unreasonable) limit on the size of files which can be edited
  198.     As    crash proof as possible - including guards against BDOS  errors  and
  199.      disk and directory full errors
  200.     Auto-indent feature for structured programming languages
  201.     Capability    of  listing  selcted portions of programs  to  the  printer,
  202.      whilst remaining inside the editor
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211. The  e     screen editor                   Page 4
  212.  
  213.  
  214.  
  215. e  does all of these.    On the other hand,  there are a number of facilities
  216. which  other  editors possess,    but which  e  does not have.   They are  all
  217. features which, if implemented, would conflict with one or more of the above
  218. 'desirables'.    An  editors  is  the kind of the thing    for  which  personal
  219. preferences are important and varied,  and thus your favorite feature may be
  220. in the list below, rather than the list above.    If so, you can always have a
  221. go implementing it.  (If you do, I'd be glad to have a copy, and so probably
  222. would the User Group).
  223.  
  224.     Macros and multiple commands executed repeatedly (in my view,  these are
  225.      more  appropriate to a batch,  rather than an interactive editor;    and,
  226.      anyway,  such  commands  are  difficult to formulate so  that  they  do
  227.      exactly what is wanted and neither more nor less)
  228.     Wild  characters and regular expressions in defining search strings  for
  229.      the  Find and Alter commands (possible to implement,  but would  reduce
  230.      the searching speed significantly)
  231.     An    'Overwrite'  mode  as well as an 'Insert' mode (see  comments  above
  232.      about modes)
  233.     Word processing capabilities,  such as word wrap and re-formating (I use
  234.      WordStar)
  235.     Block  moves  of arbitrary blocks,    rather than just blocks of  complete
  236.      lines (fine, but the coding is hair-raising)
  237.  
  238. At one time or another, I've tried all these latter features, but eventually
  239. given up or thrown them out as unnecessary or unproductive.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281. The  e     screen editor                   Page 5
  282.  
  283.  
  284.                   5. How  e  works
  285.  
  286. The  above  list  of  desirables more or  less    dictated  the  basic  design
  287. principles  of     e.   For  instance,  the need to get to a  particular    line
  288. suggested  that  the  text being edited should be  organised  in  lines  (as
  289. opposed to a continuous block of text,    including end-of-line markers).  The
  290. former    organisation is that adopted by  e  (and by EDIT-80);  the latter by
  291. ED  and  WordStar.   The choice has a profound impact on the  style  of  the
  292. resulting editor.
  293.  
  294. Since  text lines are of variable length,  it would not be sensible to store
  295. then in fixed length 'holes'.    e therefore keeps a list,  in line order, of
  296. pointers to the text itself,  which is kept packed in no particular order in
  297. a  large  block  of memory.   Text moving commands therefore  have  only  to
  298. manipulate  the pointers,  not the text itself.   Deleting a line just means
  299. deleting  a  pointer,  by  shifting the following line    pointers  down    one.
  300. Inserting a line requires adding the text to the block of memory and  making
  301. room in the list of pointers for a new one, to point to the new text.
  302.  
  303. In  fact,  things are rather more complicated because it is not possible  to
  304. keep  all  the text of large files in memory.    When e runs  out  of  memory
  305. space, it switches to using 'virtual memory'.  The block of real memory used
  306. to  store text is divided logically into 1K byte 'pages'.   When there is no
  307. more  room,  the  least recently used page is written to a scratch  file  on
  308. disk,  thus making available another 1K bytes.    e  keeps track of where each
  309. page is located - in memory or on disk - and if the text of a line on a page
  310. which  is  currently not in memory is required (to display  or    change,  for
  311. instance),  another  page is swapped out to disk,  and the required page  is
  312. swapped  in.    This  technique means that any line can be  accessed  either
  313. immediately  (if its text is already in memory),  or in the time  needed  to
  314. write  out  a 1K block and read in another.   It might appear that the    only
  315. file  size  limitation that this would impose would be the  amount  of    disk
  316. space available,  but in fact one needs to keep all the line pointers in RAM
  317. for  the sake of reasonable speed of line insertion and deletion.  Thus  the
  318. limitation  is not in the size of the file which can be edited,  but in  the
  319. number    of lines (the limit is quite large - about 4000 lines in a 56K    CP/M
  320. system).
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351. The  e     screen editor                   Page 6
  352.  
  353.  
  354.                  6. Using e
  355.  
  356. This section describes how one uses e.     It assumes that you have it already
  357. implemented for your terminal.    Guidance on how to do that is to be found in
  358. sections 7 to 9.
  359.  
  360. This  section  is  organised as a tutorial.   It is best to  carry  out  the
  361. operations  on    your own terminal as they are described.   The notes in  the
  362. left hand margin are provided for quick reference.
  363.  
  364. Start up      a)  Login to a drive (say, drive B:) containing a disk holding
  365.           (at  least)  the    files  e.com (the editor)  and    e.doc  (this
  366.           document), and type
  367.  
  368.            e
  369.  
  370.           b)  This will start the editor.  You should see a screen which
  371.           is  blank except for the message '1:1' near the middle of  the
  372. Status line   top line, and the cursor at the start of the second line.  The
  373.           top  line  is  used  by  e  as  its  'Status  Line',   showing
  374.           information about what it is doing.   The '1:1' shows that the
  375.           cursor is on line 1, at column 1.
  376.  
  377.           c)  Type
  378.  
  379.            I am using the e screen editor
  380.  
  381.           You  will see what you type appearing on the screen,  and  the
  382.           cursor keeping ahead of the characters you type.
  383.  
  384.           d)  Now hold down the control (CTRL) key, and type V  (ie type
  385.           ^V).   The  top few lines will be filled by the  'help  menu',
  386. Help menu     guidance    on the commands e will accept.     The line you typed,
  387.           and the cursor, will have moved down to make room for the help
  388.           menu.
  389.  
  390.           e)   The keys you press to issue commands to e will  generally
  391.           be  either control keys (ie the 'control' key  in  combination
  392.           with  one of the letter keys),  or special keys particular  to
  393. Key-command   the terminal you are using.   For instance, to move the cursor
  394. assignments   to the end of the text using a TeleVideo terminal, one presses
  395.           the key marked HOME.  Other terminals may not have such a key,
  396.           and  would use a control key instead.   The following tutorial
  397.           uses  the  key assignments used with  the  TeleVideo  terminal
  398.           range,  but  remember  that there may be differences for    your
  399.           terminal.   The help menu will tell you which particular    keys
  400.           you should be using.
  401.  
  402.           f)   Press  the  left arrow key.     The cursor  will  move  one
  403.           position    to  the  left,    so that it is on top of the  'r'  of
  404. left arrow    'editor'
  405. key
  406.           g)  Type ^S.   The cursor will jump leftwards to the beginning
  407. left word     of the previous word,  'screen'.     Type ^D, and it will jump a
  408.           word to the right,  back to the 'e' of 'editor'. Now press the
  409. right arrow   right  arrow  key several times to move the cursor  along  the
  410.           word 'editor' to the end of the sentence.   Note that when the
  411.           cursor reaches the end,  it will not move any further, even if
  412.           you keep pressing the right arrow key.
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421. The  e     screen editor                   Page 7
  422.  
  423.  
  424.  
  425. beginning of  h)  Type ^B.   The cursor jumps to the Beginning of the  line.
  426. line          ^E takes it to the End of the line.   Try it.   Type ^B again,
  427. end of line   and then type
  428.  
  429.             Now
  430.  
  431.           followed by a space.   See how the new word is inserted before
  432.           what you had there.   This editor is always in 'insert' mode -
  433.           whatever    you type (that isn't a command) goes into the  text,
  434.           pushing aside anything already there.
  435.  
  436.           i) Press the Return key.     This puts the cursor,    and whatever
  437. Return          is  under and following it on a new line.   On terminals which
  438.           support  the  feature,  only the line on which the  cursor  is
  439.           resting will be in 'bright' characters;  the rest of the    text
  440.           will be dimmer.  Type
  441.  
  442.             at this moment
  443.  
  444. new line      and  then type ^N.   Note how,  like Return,  ^N inserts a new
  445.           line,  but this time,  the cursor has stayed where it was, and
  446.           did not move down to the new line.
  447.  
  448.           j)  Using the up arrow and down arrow keys,  and the keys  you
  449. up arrow      have used before,  'steer' your way round the text, noting how
  450. down arrow    you  can't escape the invisible boundaries which surround  it.
  451. end of text   The HOME key will take you to the end of the text,  and the ^U
  452. beginning     key will take you to the beginning.
  453. of text
  454.           Move to the end of the text, and type Return to bring you onto
  455.           the next line.   Now type a tab (ie press the key marked    Tab,
  456.           or if there isn't one, type ^I).     The cursor will have jumped
  457.           across to column 8.  Type the word
  458. auto indent
  459.              Auto
  460.  
  461.           Now  press Return again.     The cursor moves to the next  line,
  462.           but not at the beginning but under the A of Auto.   Type a tab
  463.           and then the word
  464.  
  465.              indent
  466.  
  467.           and press Return.   This time,  the cursor is positioned under
  468.           the  i  of indent.   This is the auto indent feature at  work:
  469.           whenever    you  type Return and the previous line    begins    with
  470.           'white space' (blanks or tabs), the cursor is left immediately
  471.           under the first non-blank and non-tab character of that  line.
  472.           It  is  very  useful when writing programs  that    are  'block-
  473.           structured'  (such  as C and Pascal) as it helps line  up  the
  474.           indentations  of each block without you having to worry  about
  475.           counting    tabs or spaces.   If you need to 'un-indent',  it is
  476.           easy to delete the unwanted spaces and tabs (we'll see how  in
  477.           a moment).
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491. The  e     screen editor                   Page 8
  492.  
  493.  
  494.           k)  Move to the beginning of the text and type ^F.   A  prompt
  495. find          under the menu will ask
  496.  
  497.            Find?
  498.  
  499.           Type
  500.  
  501.            ito
  502.  
  503.           and press Return.  A second prompt will ask
  504.  
  505.            Search Backwards/Ignore case/number of time?
  506.  
  507.           Just  press  Return.   The cursor will jump to the  characters
  508. find options  'ito',  in  the middle of the word 'editor',  and the  prompts
  509.           will disappear.  You have found 'ito'.  Now move the cursor to
  510.           the  end of the text (HOME),  and press ^F again.   After  the
  511.           prompt has appeared, type ^R.  The previous characters to find
  512.           ('ito') will be Retrieved.  Press Return, to get the
  513.  
  514.            Search Backwards/Ignore case/number of times?
  515.  
  516.           prompt.    This time,  type 'b' (or 'B',  or '^B',  it  doesn't
  517.           matter)  to mean that the search is to go backwards,  and then
  518.           press Return.  The cursor will once again be positioned on the
  519.           'ito' of 'editor'.
  520.  
  521.           l)  Type ^R.   e will repeat the last Find command, attempting
  522.           to  find another 'ito',  again  working  backwards.   However,
  523. repeat          since  there  is no other 'ito' in the text,  the search    will
  524. last find/    fail,  and  a message to say that appears on the status  line.
  525. alter          The cursor remains where it is.  This is what happens whenever
  526.           you ask  e  to search for something it cannot find.
  527.  
  528.           m)   Now    type  ^A.   This is the command  to  Alter  (change,
  529.           exchange) one set of charactacters (string) for another.     The
  530. alter          familiar Find?  prompt will appear.   Type the letter e.     You
  531.           will be asking  e  to change all the 'e's in the text to 'z's.
  532.           Press Return, to get another prompt:
  533.  
  534.            Alter to?
  535.  
  536.           Type z, and press Return.  Then comes the third prompt:
  537.  
  538.           Back/Global/To end (start)/Ignore case/Without asking/number?
  539. alter
  540. options       You can now enter one or more of the initial letters - B G T I
  541.           or W - of these options, and/or a number.  The options mean:
  542. Back      search  backwards,  towards  the beginning of the  file  from  the
  543.       current cursor position
  544. Global      replace  all occurences of the specified string wherever they  are
  545.       in the text
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561. The  e     screen editor                   Page 9
  562.  
  563.  
  564. To end      replace  all    occurences of the specified string from  the  cursor
  565.    start  position  to    the end of the file (or the beginning  if  the    Back
  566.       option is also chosen)
  567. Ignore      search  for the find string without regard to the case,  upper  or
  568. case      lower, of the characters
  569. Without   replace without first verifying that the replacement is desired
  570. asking
  571. number      find the next (number) occurences of the string
  572.  
  573.           To change all the 'e's in the text to 'z's, type
  574.  
  575.            g
  576.  
  577.           and Return.  e  will find the first 'e', place the cursor over
  578.           it, and then ask, on the status line, whether a replacement of
  579.           this  'e' is required.   Type Y (or  y  or ^y) to  effect  the
  580.           replacement.  The cursor will move on to the next 'e'.  Type N
  581.           to skip replacing this one.  Then the next ... please yourself
  582. Escape          whether you change this one.  And the next... press the Escape
  583. key          (ESC)  key this time,  and the Alter command will be  aborted,
  584.           without making this change.
  585.  
  586.           This  is the first use you have made of the Escape key,  which
  587.           plays an important role with  e.      The Escape key will almost
  588.           always  either abort the current command or skip some part  of
  589.           it.  Another example of the useful Escape key:
  590.  
  591.           Move the cursor to the beginning of the file (^U).   Type  ^F,
  592.           and ask to find 'ito'.   Of course, you have done this before.
  593.           But instead of pressing the Return key (and getting the Search
  594.           Backwards/Ignore    case/number  prompt),    press  Escape.     The
  595.           cursor  skips  straight  to the desired  string  in  the    word
  596.           'editor', using the default options: search forwards, once.
  597.  
  598.           n)   Your  text  is probably getting to be a bit    of  a  mess.
  599. delete left   Let's  delete  it.    Press  the    DEL  key  (RUBOUT  on    some
  600.           keyboards).   The  character  to the left of the    cursor    gets
  601. delete right  erased.     Now  type  ^G.   The  character  under  the  cursor
  602.           disappears.   Move  the  cursor to the beginning of  the    file
  603. delete word   again (^U),  and type ^T.  The word to the right of the cursor
  604.           (it  should be Now,  if you've followed all these instructions
  605.           exactly) is rubbed out.    Try ^T again - nothing happens.   ^T
  606.           will not erase newlines.     ^Y will, though.  ^Y will erase the
  607. delete line   whole of the line containing the cursor,    and put  the  cursor
  608.           on the first character of the next line.    Move the cursor onto
  609.           the  line containing the    word 'using' and type ^Y.   It    will
  610.           disappear.
  611.  
  612.           Move  the  cursor to the end of the  text  (HOME),  and  press
  613. delete space  Return.  The auto indent will leave the cursor in column 16 on
  614. provided by   the next line.  Press DEL (RUBOUT) once,    and note how the Tab
  615. auto indent   provided by the auto indent is deleted, moving the cursor back
  616.           to column 8.   Press DEL again,  and the cursor is back at the
  617.           left hand margin, in column 1.
  618.  
  619.           Sometimes  you might erase a  word (or make other changes)  by
  620. undo          accident,  or as an experiment to see how things look.   e has
  621.           an  'undo' key which will put the text back into    the  exactly
  622.           the  state  it  was in before the last  change.    In  fact,  e
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631. The  e     screen editor                   Page 10
  632.  
  633.  
  634.           remembers  the last 40 text changing commands you  have  made,
  635.           and  pressing the 'undo' key repeatedly will undo each of them
  636.           in  turn.   Position the cursor at the beginning of  the    word
  637.           'this'  and type ^T.   'this' will disappear.   Now press  the
  638.           'undo' key (^\).     'this' reappears.  Keep pressing the 'undo'
  639.           key, and watch the changes you made being undone.  When all is
  640.           undone, the message, 'Nothing to undo' will appear.
  641.  
  642.           o) Type ^Q, to get the prompt
  643. quit
  644.            Write edited text to file, Abandon all edits, or Return?
  645.  
  646.           R,  for  Return,    will get you back into editing,  and W,  for
  647.           Write,  will ask for a name to file the text under.   But  you
  648.           will probably not want to save your work this time,  so type A
  649. quit options  (or a or ^A).  This results in:
  650.  
  651.            Exit to CP/M, Return to this file, or edit Another file?
  652.  
  653.           E,  for  exit,  will put you back into CP/M.   R is the  panic
  654.           button to return you to the text you were editing, in case you
  655.           decided  you didn't really mean that you wanted to abandon all
  656.           that  you had done.   A,    for another file,  is the one  we'll
  657.           choose this time.  Type A.
  658.  
  659.           (Incidentally,  suppose  you had wanted to file your text  and
  660.           exit to CP/M - the most common sequence.     You would type Q  W
  661.           E,  to quit, write and exit, a quick and easy set of commands,
  662.           since Q W and E are the top left keys on a QWERTY keyboard)
  663.  
  664.           p)   The    screen will change to a display of the directory  of
  665.           the   currently logged in directory.   See that the amount  of
  666.           room  you  have left on the disk is displayed  at  the  bottom
  667. changing      righthand corner of the screen.  To look at another directory,
  668. drive or      type  the drive letter,  followed by a colon and Return.     For
  669. user area     instance, try typing
  670.  
  671.             A:
  672.           followed by pressing Return.   This now becomes the  'default'
  673.           drive  for  reading and writing files.   You can also can  the
  674.           user  area you are logged into by typing the user area  number
  675.           followed by a / and Return.
  676.         /*
  677.          * in CP/M68K directories assume the form like 3a where
  678.          * 3 stands for user number and a for drive 0.
  679.          */
  680.           Now get back to the original directory,  and type E.DOC as the
  681.           file to edit.  We shall be trying out some editing commands on
  682.           this document file.  Press Return.
  683.  
  684.           q)   You    should now be looking at the first sixteen lines  of
  685.           this  document.    There  are a few more  commands  for  moving
  686. down screen   around the text.    ^Z (try it!) moves you down a 'screen full';
  687. up screen     ^W moves up a screen full.  (These letters were chosen because
  688.           they  are near the control key,  and therefore easy to  type).
  689.           ^W at the top of the keyboard takes you up the file, ^Z on the
  690.           bottom  row  takes you down the file.   The last command    that
  691.           moves  you  around  the text is ^X.   This is  a    most  useful
  692. jump          command,    because  it lets you jump straight to  a  particular
  693.           line.  Typing ^X gives the prompt
  694.  
  695.           Jump to?
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704. The  e     screen editor                   Page 11
  705.  
  706.  
  707.  
  708.           Enter 72, and press Return.  The cursor moves to line 72.
  709.  
  710.           r)   All this time,  you will have had the help menu displayed
  711.           on  the  screen.     Once you have got the hang of    the  various
  712.           commands,  (and  that takes a surprisingly short time)  you'll
  713.           probably want to get rid of it,  and use the screen space  for
  714. help menu     text.  Typing ^V (for Viewing the menu) will make it disappear
  715. switch          - another ^V will make the menu appear again, but leave it off
  716.           for the moment.
  717.  
  718.           s)   Now you can try out the block commands.   These allow you
  719.           to manipulate a whole block of lines of text as a  body.     The
  720. block          block  will start with the line on which the cursor lies    when
  721. commands      you type the block command,  ^O,    and will extend either above
  722.           or  below the cursor line as you choose.
  723.  
  724.           Type  ^O,  and  you  should get a line across the top  of  the
  725.           screen, below the Status Line, saying:
  726.  
  727.          Write to file,  Print, Shift, Move, Copy, or Delete block ?
  728.  
  729.           To  choose one of these options,    you type its initial letter.
  730.           A copy of the block may written out to a file,  may be printed
  731.           on your printer,    may be bodily shifted to the left or to  the
  732.           right  relative  to  the margins,  the block may be  moved  to
  733.           another  position  in the text,  a copy of the  block  may  be
  734.           inserted elsewhere into the text, or the block may be deleted.
  735.            To  start with,  try deleting a block - type D to  select
  736.           the Delete option.   The further prompt:
  737. delete block
  738.            Put cursor on line ending block and press [return]
  739.  
  740.           will  appear.   You  can    now  use any of  the  cursor  moving
  741.           commands (left,  up,  right and down arrow,  left word,  right
  742.           word,  beginning or end of line,    up or down a screen, as well
  743.           as  jump to a line,  and find a character string) to move  the
  744.           cursor.  Move it to the line where you would like the block to
  745.           end  - either above or below the line where  you    started.  If
  746.           your terminal has this feature, you will see the block you are
  747.           selecting illuminated more brightly than the surrounding text.
  748.           When  you have chosen the block ending line (it doesn't matter
  749.           where  this is for the purposes of this tutorial),  press  the
  750.           Return key,  and the marked block will disappear;  it has been
  751.           deleted.    The cursor finishes up on the line below the deleted
  752.           block.   If needed,  the 'undo' key will restore the block you
  753.           have just deleted.
  754.  
  755.           The other block commands behave similarly.  Move the cursor to
  756.           the beginning of the block,  type ^O to start a block command,
  757.           select the approriate option,  then mark the end of the block.
  758.  
  759. write block   The 'Write to a file' option will next ask for the name of the
  760. to file       file  to    write to (and ask for confirmation if the  name  you
  761.           give is that of an already existing file) before a copy of the
  762.           block  is written to the file.
  763.  
  764. print block   The 'Print' option prints as soon as you define the end of the
  765.           block.
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774. The  e     screen editor                   Page 12
  775.  
  776.  
  777.  
  778. move block    The  'Move' and 'Copy' options both request  that,  after  the
  779. copy block    block  has been defined,    the cursor be moved to the  position
  780.           where  the block itself (or with the 'Copy' option,  a copy of
  781.           the block) is to go.
  782.  
  783.           The 'Shift' option is a little more complicated.     It is meant
  784.           particularly  for occasions when you want to move a  block  of
  785. shift block   text  'sideways',  ie by adding or deleting spaces or tabs  at
  786.           the  beginning  of each line in the block (useful to  preserve
  787.           the  indentation    pattern when modifying programs  written  in
  788.           block-structured    languages).   After  you  have    defined  the
  789.           block, the cursor will be placed at the beginning of the first
  790.           line of the block.   You can then type spaces or tabs,  or use
  791.           the  DEL    (RUBOUT) key to delete tabs or spaces,    to  get  the
  792.           first line in its right position.   Then press Return, and the
  793.           other lines in the block will follow suit,  moving to the left
  794.           or right in parallel with the first line.
  795. Escape and       Have  a  go    on a piece of the text and  experiment    will
  796. block          these  block  commands.    If  you change your  mind  half  way
  797. commands      through  a block command,  press the Escape  key.   This    will
  798.           interrupt the command, and return you to ordinary editing.
  799.  
  800.           t)  The command ^C allows you to examine and change the 'Edit'
  801. context       and the 'File' contexts.     Type ^C, and the text on the screen
  802.           will be replaced by a screen showing the current Edit context.
  803.           The current settings of a number of options are shown, and you
  804.           can  change these now you are in the Edit context.   You    have
  805.           already  come across the Auto Indent feature,  which  provides
  806.           the indentation useful for block structured languages.
  807. auto indent   Typing   A    will  change the  Auto  indent  option  setting,
  808.           turning it on or off.
  809.           Similarly,  typing B will change the Backup option.   When you
  810. backup          file  the  text you are editing,    if this option    is  on,  any
  811.           previously  existing version of the file you have been editing
  812.           will have its name changed so that it ends with the  extension
  813.           ".BAK"  (if a ".BAK" file already existed,  it will be deleted
  814.           first),  so that you always have the last version of your text
  815.           as  a backup to the current version.   With the backup  option
  816.           off,  the  new  text  simply replaces the  old  text  in    your
  817.           existing file.
  818.  
  819.           The  Tab    stops  option  allows you to change  the  number  of
  820. tab stops     columns  skipped for every tab (usually it is 8).   Type T  to
  821.           change it;  you will then be asked for the new setting.    Note
  822.           that this option only changes the number of columns skipped by
  823.           e ,  and it will have no effect on,  for instance, the display
  824.           produced by the CP/M utility TYPE.
  825.            Normally, e ignores any trailing (right hand edge) spaces
  826.           or  tabs    that you might stick on the end of a line  of  text,
  827. strip          since  such 'white space' is usually no more than a  nuisance.
  828. trailing      But  sometimes it is useful to be able to enter such  trailing
  829. blanks          white  space,  and the Strip option can be changed (type S) to
  830.           allow this.
  831.            You    will have seen that the cursor    position,  line  and
  832.           column  number,  is displayed at the top of the screen.    Some
  833. display of    people find the constant updating of this position  disturbing
  834. cursor          or irritating, so the L option is provided to turn off (or on)
  835. position      this display.
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844. The  e     screen editor                   Page 13
  845.  
  846.  
  847.            When a line is too long to display it all on the  screen,
  848.           only  the first part is shown.   If you move the cursor on  to
  849.           the  'hidden'  part  of  the line,  e shifts  the  whole    line
  850. horizontal    leftwards,  thus    ensuring that the part of the line on  which
  851. scrolling     the  cursor rests is displayed.    This is known as  horizontal
  852. by line or    scrolling.  Usually, the scroll affects only the current line,
  853. page          the  rest of the screen being displayed as  normal.   Changing
  854.           the  H option,  however,    makes the whole screen    scroll as  a
  855.           unit.   This  has the advantage that you can see more  clearly
  856.           what  you are doing in relation to the rest of the  text,  and
  857.           the  disadvantage that the scroll operaton has to rewrite  the
  858.           whole screen, which takes time.
  859.            Finally,  the display shows you how many lines of text  e
  860.           can hold.  As explained in the section above on how  e  works,
  861. max size of   there  is  no limit on the amount of text  e   can  handle  at
  862. file          once,  but  there is a (large) limit on the number of lines of
  863.           text.   What  the limit is depends on the setting of  the  'x'
  864.           command line option (see below) and on the amount of memory in
  865.           your computer.   With the 'x' option on,    or with more memory,
  866.           the limit is larger.
  867.  
  868.           There are two more options you may choose in the Edit context:
  869.           typing Return takes you back to normal editing;    and F  takes
  870. file          you into the File context.  So, for now, type F.
  871. context
  872.            The File context will be displayed.     It is a list of the
  873.           files on the currently logged-in disk,  with an indication  of
  874.           how  much free space there is left on the disk.    There are  a
  875. file context  number of further commands available here:
  876. commands       V lets you look at another directory's files.
  877.            R allows you to change the name of a file, other than the
  878.              one you are currently editing.
  879.            D will delete a file.
  880.            C enables you to change the name of the file in which the
  881.              text you are editing will eventually be saved.
  882.            [return] will take you back to editing your text.
  883.  
  884.           u)   That more or less concludes our tour through   e.   There
  885. entering      are one or two extras to mention.  Escape has one more use, to
  886. control       enter control characters into the text.    Type Escape and then
  887. characters    a  letter  of  the alphabet.   If your terminal  supports  the
  888.           feature,    the  letter will appear dimmer than the rest of  the
  889.           line,  to indicate that it is not an ordinary character, but a
  890.           control character.
  891.  
  892.           Now type ^Q,  ^A,  and ^E to exit from  e , without saving the
  893.           results of your practice editing.
  894.           There remains only the command line options to describe.     All
  895.           the  Edit context options and a number of further options  can
  896. command       be  set by adding single letter 'flags',    each preceded  by  a
  897. line          dash,  on  the command line when you start up e.     The options
  898. option flags  available are:
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914. The  e     screen editor                   Page 14
  915.  
  916.  
  917. -A   change  the  setting  of the Auto indent option from that    set  as  the
  918.      default  (see  below for how to establish the default settings for  all
  919.      these options).
  920.  
  921. -B   change the setting of the Backup option from the deafult
  922.  
  923. -D   this  flag  should be followed by a letter,  in the range A  to  P,  to
  924.      indicate  the  drive  on  which  e  temporary  buffer  file  should  be
  925.      created,  if one is needed.   If this flag is not given on the  command
  926.      line,  the  currently  logged-in disk is used to keep the buffer  file.
  927.      The buffer file is only created if the file being edited is too big  to
  928.      fit  into    memory,  and it is always deleted automatically  before  you
  929.      leave the editor.     If created,  the buffer file will be visible as the
  930.      file e$$$.$$$ in the directory displayed by the File context.
  931.  
  932.      Example:     A> e myfile -d b
  933.  
  934. -S   change  the setting of the Strip trailing blanks and tabs    option    from
  935.      the default.
  936.  
  937. -T   this  option should be followed a space and then a number    to  indicate
  938.      the  tab  stop  width desired.   It changes the tab setting  from    that
  939.      established by default.
  940.  
  941.      Example:     A> e myfile -t 6
  942.  
  943. -V   if  by default the editor starts with the help menu  displayed,  giving
  944.      this  option on the command line will cause it to start with  the    help
  945.      menu not displayed, and vice versa.
  946.  
  947. -X   normally,    e  saves  time by using a trick to avoid CP/M doing a  'warm
  948.      boot' each time you leave e.    However,  this takes up memory.  Giving
  949.      the  -X flag on the command line instructs  e  to maximise  its  memory
  950.      usage,  and  it will therefore exit with a warm boot.   Setting the  -X
  951.      option allows an additional 700 lines or so of text to be edited.
  952.  
  953. -99  a    dash followed by a number (rather than a letter,  as with the  other
  954.      options)  tells 'e' to start with the current line set to that  number.
  955.      For instance, if you edit a file using the command line
  956.  
  957.      Example:    A> e myprogram -34
  958.  
  959.      the  cursor will be placed on line 34 when you start editing.   This is
  960.      useful if a compiler has reported that there is a bug on that line, for
  961.      example.
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984. The  e     screen editor                   Page 15
  985.  
  986.  
  987.  
  988.             7. Implementing  e    on your terminal
  989.  
  990. e    has to be configured for the characteristics of,  and the control codes
  991. used by, your terminal.  This section describes how to do so.
  992.  
  993. Implementation is straightforward for TeleVideo 912/920, Hazeltine 14xx, and
  994. ADDS terminals,  and the KayPro portable computer, since the requisite files
  995. are provided as part of the  e    package.     If you have a terminal made  by
  996. Televideo  or  one  which can emulate a Televideo  terminal,  you  can    pass
  997. straight  on  to  the next section of this manual,  which describes  how  to
  998. establish the default option settings.     If you have an ADM-31, you are also
  999. in luck,  because the terminal control codes this terminal uses are the same
  1000. as those of the TeleVideo range - pass straight on to the next section.   If
  1001. your terminal is one of the others mentioned (or offers an emulation of  one
  1002. of them) you need to take the following two steps:
  1003.  
  1004.      1.   Change  the name of the file 'eterm' supplied on the    distribution
  1005. disk to 'etvi', using the CP/M command:
  1006.  
  1007.       ren etvi=eterm
  1008.  
  1009.      2.    Change the name of the supplied file 'ehaze', 'eadds', or 'ekay',
  1010. as appropriate, to 'eterm', thus:
  1011.  
  1012.       ren eterm=ehaze
  1013.  
  1014. Now proceed to the next section on setting default options.
  1015.  
  1016.  
  1017. Implementation    on  other  terminals requires a  passing  knowledge  of  the
  1018. programming  language C,  since you will have to modify one of the e program
  1019. files.    You will also need an editor of some kind to do the modifications.
  1020.  
  1021. The  interface    between  the terminal and the rest of the  editor  is  coded
  1022. entirely  in the supplied file 'eterm',  and this is probably the only    file
  1023. which  will  need  modification to suit e  to  your  terminal.     'eterm'  is
  1024. supplied  configured for a TeleVideo.    'eterm' includes extensive  comments
  1025. describing the terminal interface to help you with any changes which may  be
  1026. needed.
  1027.  
  1028. Before    starting configuring 'eterm',  you should have to hand the  terminal
  1029. manual to guide you on the control codes to use.  You will need to establish
  1030. what  codes  should  be  sent  to the  terminal  to  perform  the  following
  1031. functions:
  1032. *    put  the  cursor  on  any specified position  on  the  screen  ('cursor
  1033.      addressing')
  1034. *    clear  the line from the cursor position to the right hand edge of  the
  1035.      screen to spaces (clear to end of line)
  1036. *    delete  the  line on which the cursor is resting,    and  move  following
  1037.      lines up one (delete line)
  1038. *    delete the line containing the cursor and all the lines below it to the
  1039.      end of the screen (delete to end of page)
  1040. *    insert  a    blank line at the cursor line,    moving the cursor  line  and
  1041.      lines below down one (insert line)
  1042. *    if  available - start and stop displaying characters in 'dim' or  half-
  1043.      intensity    mode  (note  that these are optional,  and  will  only    work
  1044.      properly with  e if they do not themselves take up space on the screen).
  1045. The conventional names for these operations are those given in brackets.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054. The  e     screen editor                   Page 16
  1055.  
  1056.  
  1057. Using  the  C functions provided in 'eterm' as a  guide,  new  functions  to
  1058. implement these terminal control sequences should be written and edited into
  1059. 'eterm'.
  1060.  
  1061. Next, you need to determine which keys should be used to request each of e's
  1062. commands.   It    is  as    well to keep to the  command  - key  correspondences
  1063. normally  used by e,  at least to start with,  although you may want to take
  1064. adavantage  of    any special keys offered on your terminal's  keyboard.     The
  1065. first  step is to alter the help menu so that it is appropriate to your  key
  1066. selections.
  1067.  
  1068. At  the  end of the file 'eterm' is the C function which provides  the    help
  1069. menu.  Edit this to make it correspond to your selected command-key choices.
  1070. Note  that the vertical bar included in the help menu text is not  displayed
  1071. as part of the menu - it is used to signal a change from dim to bright (half
  1072. to  full  intensity) text and vice versa (if you have  not  implemented  the
  1073. codes  to  change  intensity,  the  vertical bar  character  is  ignored  in
  1074. displaying the help menu).
  1075.  
  1076. Finally,  modify  the  key  translation  table to be  found  in  C  function
  1077. keytransalate  (located  immediately above the help  menu  function).    This
  1078. table  converts  the  codes  sent  by  your  terminal  in  response  to  key
  1079. depressions into the internal codes used by e to represent editing commands.
  1080. Some  terminals send two codes when certain keys are depressed:  a 'lead in'
  1081. character, followed by a character to indicate which key was pressed.  There
  1082. are comments in the keytranslate function about how to deal with such cases.
  1083.  
  1084. e assumes that the terminal's display screen is 80 columns wide and 24    rows
  1085. deep.    If  your screen is smaller (eg 64 by 16),  you will need to (a) edit
  1086. the help menu to fit it into the smaller width; (b) reduce the width of some
  1087. of the command prompts (these are scattered about the program text); and (c)
  1088. change    the values of the defined constants SWIDTH and SHEIGHT.   These  two
  1089. constants  are    defined in the header file 'e.h',  and should be set to  one
  1090. less than the terminal screen width,  in columns,  and height,    in rows.  If
  1091. your   screen  is  larger  than  80  by  24,   adjust  SWIDTH  and   SHEIGHT
  1092. appropriately.    The help menu will probably not need changing.    Note that  e
  1093. has not been tested with screens of size other than 80 by 24.
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.           8. Changing the default settings of the options
  1100.  
  1101. The  options  settable using flags on the command line each have  a  default
  1102. value defined in the 'main' function of  e.  This function is to be found in
  1103. the supplied file 'e',    and is clearly commented and marked out.   You    will
  1104. probably  not  need to change any of the default option settings,  at  least
  1105. until you have got used to using the editor.
  1106.  
  1107. You amy also want to set the value of CURSORWAIT, defined at the top of file
  1108. e.h,  to suit the clock rate of your microprocessor.   This just affects the
  1109. speed  at  which the cursor flips between brackets and between the  Replace?
  1110. prompt and the string to replace in the Alter command, so getting CURSORWAIT
  1111. right is not vital for the operation of the editor.
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124. The  e     screen editor                   Page 17
  1125.  
  1126.  
  1127.              9. Compiling and loading e
  1128.  
  1129. e  is written in the programming language C, and was developed using the BDS
  1130. C  compiler  for CP/M,    version 1.50a.    It is not recommended that  you  use
  1131. versions of BDS C earlier than 1.46 - e uses facilities that were introduced
  1132. with  1.46.   With other C compilers,  you will need to do some  preliminary
  1133. work  to  make the source code compatible.   There may be trouble  with  the
  1134. setjmp()  and longjmp() library functions,  and with the file i/o.   You are
  1135. warned!
  1136.  
  1137. The following files make up the  e  package:
  1138.  
  1139.      e.doc        this file
  1140.      e.sub        a command file to compile and load e
  1141.      l2.com        Mark of the Unicorn's space saving loader (included here
  1142.             for convenience - e MUST be loaded with this loader, not
  1143.             with the standard BDS C loader, clink)
  1144.      e            the  first    program  source file for  e  - contains  the
  1145.             'main' function (and others)
  1146.      e1..e10        the rest of the source code
  1147.      eterm        the terminal interface functions (supplied set up for  a
  1148.             TeleVideo terminal)
  1149.      ehaze        the same as eterm, but set up for a Hazeltine terminal
  1150.      eadds        ... for the ADDS range of terminals
  1151.      ekay        ... for the KayPro portable computer
  1152.      e.com        the  e  editor,  compiled and loaded,  for    a  TeleVideo
  1153.             terminal
  1154.  
  1155. To  compile  and  load the editor,  it is best to PIP the  following  BDS  C
  1156. compiler  files onto the disk containing the above files (only    these  files
  1157. are needed):
  1158.      cc.com
  1159.      cc2.com
  1160.      c.ccc
  1161.      deff.crl
  1162.      deff2.crl
  1163.  
  1164. Then put the disk in drive A: and use CP/M's SUBMIT utility with e.sub to do
  1165. all  the  work.   The compilation and loading will need about 300K  of    disk
  1166. space.     If you don't have that much to spare,    you can move e.doc elsewhere
  1167. first, to save about 40K.
  1168.  
  1169. The  e.sub  file  specifies  the address the C compiler is  to    use  as  the
  1170. location of the bottom of the external data area,  and the address where the
  1171. stack  is to start.   These addresses should allow about 400 bytes of  stack
  1172. space (which is just enough).    The stack space is reported by the L2 linker
  1173. at the end of the link.  The remaining memory from the stack top to the base
  1174. of CP/M is used as work space to store pages of the text being    edited.   If
  1175. you  are  using other versions of BDS C,  a complex 'eterm' file,  or  other
  1176. compilers,  you will probably have to change these addresses.    Try to    keep
  1177. them  as  low as possible,  whilst still not allowing the data    and  program
  1178. areas to overlap, and keeping about 400 bytes of stack space.
  1179.  
  1180. The addresses are defined in the '-e' option to the cc compiler, in the '-t'
  1181. option to the L2 loader, and in the header file 'e.h'.
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194. The  e     screen editor                   Page 18
  1195.  
  1196.  
  1197. If  you  need to change these addresses,  be sure to make all the  following
  1198. amendments:
  1199.  .   change the address of the external data area specified to the compiler,
  1200. by altering the -e option setting for all cc compiler comands in the command
  1201. file 'e.sub'.
  1202.  .    change the address of the 'top' of the data area,  specified in the -t
  1203. option to L2 in the file 'e.sub'.
  1204.  .    change  the value of the #defined constant TOP in file 'e.h' to  match
  1205. the L2 -t option
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  option
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.