
   --------------------------------------------------------------------
             Ctype 1.0     Bill Nelson - Midnight Logic Software
   --------------------------------------------------------------------

                THIS IS A FREELY REDISTRIBUTABLE PROGRAM


             This means that it *IS* copyrighted, but it may be
             distributed without charge other than for media. It
             may be placed on BBS's, it may be kept in User Group
             Libraries, and of course (a SPECIAL CASE) it may be
             used by Fred Fish as he might decide!  Enjoy...

   ---------------------------------------------------------------------

   Any questions, suggestions, or neat stuff of your own may be sent to:

                              Bill Nelson
                           8D-2310 Gaetz Ave
                           Red Deer, Alberta
                                CANADA
                               T4R  1C5

                             or to SYSOP at

                            Fly-By-Wire BBS
                             403-346-9965

                          300/1200/2400 24 hrs

   ----------------------------------------------------------------------
   
      The Amiga is a wonderful machine, but it is NOT the most accessible to
   those just trying to learn to program it (especially in Assembly!).  Most
   of the source code out there is in C, and is thus mostly inscrutable- and
   the machine is QUITE complicated enough (with its rich environment of
   System routines) without one also needing a translator for the examples!
 
      So - as a result of that, I decided to attempt a small, useful program
   in Assembly - figuring that by the time it was running as desired, I
   would know a great deal more.  The next problem, of course, was WHAT to 
   write! The sheer volume of Freely Redistributable software (especially 
   utilities!) is almost overwhelming - and there aren't many gaping holes
   anymore!  However, ONE thing I hadn't seen done in a way I liked was a
   TEXT FILE READER.

   What?  ANOTHER Text Reader program?  What about MORE - LESS - VIEWER -
   RD - READER and others?  'Fraid so - another one - here are the reasons.
 
   1) Many of the likely candidates have insisted on a certain size of 
      screen, or font, or number of lines, or something.

   2) Many of them made multiple invocations difficult (by opening their
      own screens, CHIP RAM soon becomes a vanishing commodity!)
 
   3) Few of them did anything ELSE with the file except display it - and
      those that did insisted on doing it only one way (or to the whole
      thing!).
 
 
   So - Presenting CTYPE (or CT, when installed in your C: directory?)

   ----------------------------------------------------------------------

             Features:
             ---------

   1) Opens a window on your WorkBench screen, using the current settings
      from YOUR preferences (including any MoreRows'd additions).


   2) Does not disturb, and will USE the font YOU have chosen (for instance
      with SetFont) [thanks Dave Haynie!]


   3) Have you ever been annoyed at a file that was written to be a LITTLE
      wider than YOUR screen defaults?  I do a (primitive!) word-wrap for
      you - at least you'll have the whole WORD on the next line!


   4) Will allow progress through the file by PAGE or LINE in any direction.
      When displaying by PAGE will clear the screen (leading to a consider-
      able speed-up on LARGE screens).


   5) Will facilitate moving through a file by allowing both CASE SenSitIve
      and non sensitive searches.  A touch of the "N" key will repeat the
      last search command (maintaining the state of case sensitivity).


   6) Allows the reading of files to be broken up into convenient sessions,
      by supporting a "goto this place" function - or more accurately, goto
      a given percentage.


   7) If you find something interesting, you can get hardcopy at any time,
      either of the whole file, or of the currently displayed screen.  Of
      course, YOU define WHERE the printing goes, any valid AmigaDOS file
      or port will be accepted (with PRT: the default of course).


   8) Will work from either the CLI or the WorkBench - because the Amiga 
      has BOTH for a good reason :-)


   9) Always has HELP available, and the basic prompts are always displayed.
      Yes, and the help is actually selected by the HELP key!  


  10) If all this is NOT enough - I will capitulate.... and call your own
      EDITOR for you.  This assumes that you have an entry in your environ-
      ment that tells me WHAT your editor's name is, of course!  Anything,
      in fact, that is found in a file ENV:EDITOR I will attempt to execute
      for you...


   -------------------------------------------------------------------------


   USING THE PROGRAM


   Not too much to say here - it is NOT a fancy user interface, but I like
   to think it IS an effective one.  Rather than stick with one person's
   idea of the "right" keys to use for a given result, I have attempted to 
   allow the use of ALL the keys that make ANY sense at all, or have been
   expected by convention.  In particular this meant that the Page Down 
   function (for instance) can be called by ANY of the following:

   the SPACE bar      - by convention in countless MORE-type programs
   shifted cursor key - by logic
   PgDn Key (num pad) - so people who have to work on PC's can use it too!

   Most of the rest of the commands are implemented in a similar way, so
   pretty much anything can be done the way you like it.  Those commands
   (such as Search and Goto %) that require input are activated in the same
   way as they are on Commodore's MORE 3.27 program.  

   By the way, the number pad commands (PgDn, PgUp, Home etc) were
   implemented the "cheap" way, so that the number that is on the top of the
   key will work as an alternative input.  In particular that means that
   A1000 users can also hit the "3" key, even though their keyboard doesn't
   SAY it calls PageDown!  Of course, as an A1000 does not HAVE a PrtSc key
   (based on the number pad's * key) - they will have to call that function
   from the top row of the main keyboard, or perhaps from the F7 key if they
   prefer.

   If a command requires more input from the user, the prompt line at the
   bottom of the screen is cleared, the keystroke is echoed, and the cursor
   is turned on.  Hopefully this will be clear to you when you try out the
   different features!

   By the way, if the search string you have specified IS located, the line
   it is contained in will be displayed at the top of the screen.  There is
   no other highlighting done to it - but hopefully this will be enough
   information for you to find it on your screen.

   One final note on usage - I have this program in the C: directory as CT,
   and hiding in the S: directory is a little script file (included in the
   archive, but easily duplicated!) I call HT; which makes a RAM: copy of
   the output of the TYPE OPT H command, and feeds THAT to CType.  This
   enables this program to handle binary files too! :-)   Of course, under
   1.3 you can have the script bit set, and make the file automatically
   executable when you enter its name - without having to type "EXECUTE HT"
   to make it run....


   -------------------------------------------------------------------------


   LAST THOUGHTS

   
   I had a LOT of fun writing this program (and yes, I think I *DID* learn
   something).  In hopes of making it easier for someone else just learning
   Assembly on the Amiga, the source code is included.  Perhaps SOME of the
   code (and comments) will make it easier to see how it all works.  PLEASE
   feel free to use any of the code you wish in programs of your own that
   are intended for free distribution - but include a reference in your docs
   or source to the person who sweated it out first, OK?  I retain the
   copyright to the code as whole, and do not wish any commercial use to be
   made of the program (not that any of the code is that good, probably, 
   anyway :-) unless I am contacted first...

   Finally  - many thanks to the Beta testers (OK - entymologists!) who both
   helped squash the bugs, and pestered me for improvements where they were
   sorely needed!

                             Michael Velez
                             Rob Zelt
                             Brad Nelson
                             Niel Ericson
                             Doug McNeil

   and others from 

                        Amiga User's of Calgary
                              (A.M.U.C.) 

   and the               

                   Central Alberta Amiga Owner's Society
                             (C.A.A.O.S.)



   who also contributed.  Thank you one and all!!


   Bill Nelson       00:00:01  8 August, 1989

   -------------------------------------------------------------------------
