[comp.binaries.apple2] freewriter.doc ALL ]['s

nakada@husc7.HARVARD.EDU (Paul Nakada) (04/19/88)

***
THE EXECUTABLE CODE WILL BE POSTED SEPARATELY
***

Reply-To: Apple II List <APPLE2-L@brownvm>
Sender: Apple II List <APPLE2-L@brownvm>
Comments:     Resent-From: Christopher Chung <CHRIS@BROWNVM>
Comments:     Originally-From: Grant Delaney <delaney@wnre.aecl.cdn>
From: Christopher Chung <CHRIS@brownvm>
Subject:      Prodos word processor for 64K II+
To: Paul Nakada <NAKADA@harvunxu>
Status: R



Instructions for FREEWRITER, by Eric Schechter

===========================



FreeWriter is a ProDOS-based public domain word-processor.  It runs

most easily on an Apple //e or //c.  It also runs on a 64K Apple II+

(but see special instructions, below).  It is fairly good -- in fact,

for public domain, it's excellent.  Its chief defect is that it

doesn't print out files; but it can save them to disk, and then

another program can be used to send them to the printer.  In fact,

FreeWriter's author, Paul Lutus, has also supplied such a

printer-driver program.



Our local Apple club obtained FreeWriter from IAC's disk #43.  A few

of the instructions below were also included on that disk. ...

Technically, FreeWriter is not public domain.  Rather, it is a

copyrighted program for which the author has given permission for

noncommercial distribution.  That's almost the same thing, except that

the author retains commercial rights.  And in this case, he certainly

has good reason to.  FreeWriter is essentially a scaled-down, "trial

size" version of the Lutus's ProDOS-based AppleWriter 2.0. That is, it

has some of the ame commands as AppleWriter.  I presume that

FreeWriter was made available to try to get more people interested in

buying AppleWriter.



Any user familiar with AppleWriter II, II+, or //e will have no

difficulty learning to use FreeWriter.  But other users won't have

much difficulty either -- the program contains a built-in tutorial.

However, the tutorial is brief, and it doesn't cover everything;

FreeWriter is even more powerful than the tutorial would indicate.  In

the following documentation, I'll try to discuss the most important

features of FreeWriter which were not mentioned in the built-in

tutorial.



In case you're wondering, here's a brief comparison:



Included only in FreeWriter:



   [W] set screen display width





Included in both programs, essentially the same:



   [B] jump to beginning

   [E] jump to end

   [F] find/replace

   [L] load part or all of file from disk

   [N] new --- clear editor buffer

   [S] save part or all of file to disk

   [T] tutorial (in AppleWriter, it's open-Apple-?)

   [V] insert control letters into text (displayed inverse)





Included in AppleWriter; omitted from FreWriter:



   [A]

   [C] change case

   [D] change direction

*  [G] glossary of macros

   [I] tab

   [O] DOS commands -- rename, delete, etc.

*  [P] print/ program

   [Q] additional menu (tabs, glossaries, etc.)

   [R] retype

   [T] tab settings

*  [W] retrievably delete a word

*  [X] retrievably delete a paragraph

   [Y] split screen display

   [Z] turn wordwrap on/off

   [_] preview output location



I've marked four of the commands with an asterisk, to point them out

-- I think those four are the most important ones omitted from

FreeWriter.  The [W] and [X] commands save a lot of tedious LEFT- and

RIGHT- ARROW or DELETE keystrokes.  The [G]lossary takes a little bit

of programming, but it's fairly easy to learn to use, and in the long

run it saves lots of keystrokes too.  The [P]rint command obviously is

important -- you can't do much without printouts.



The [P]rogram command is AppleWriter's most interesting and unusual --

and least used -- feature.  AppleWriter is a very good word-processor

even without WPL, and most owners of AppleWriter have never touched

WPL.  Surely WPL was intended for hackers and fanatics like me, a

dying breed.  Who ever heard of programming a word-processor?  The WPL

("Word Programming Language") performs a role for AppleWriter,

somewhat analogous to the role that EXEC files handle in an Applesoft

setting.  Almost any oft-repeated procedure that you're accustomed to

doing "manually" by typing, can be automated using WPL.  WPL can

handle several variables, and it can do loops and subroutines; so it

adds a lot of flexibility to AppleWriter.  But it has its drawbacks,

too: (1) It's not easy to learn.  In fact, it has a lot of the flavor

of assembly language, with the AppleWriter acting as a very good

editor/assembler.  You have to b a programmer at heart, not a "user".

WPL i useful, but it's more fun than useful.  (2) WPL is not quite as

fast as assembly language, though.  When they run, the WPL programs

run about as fast as BASIC, I think.  I guess that the AppleWriter

acts as an interpreter for the programs, not a compiler.  (3) The

programs are limited to 2048 characters in length.  That's enough to

do interesting things, but not extraordinary things.  True, you can

chain together as many of these 2048-character programs as you like;

but then you have to wait for the disk drive each time one of them

loads another.



Enough digression.



=======================================================================





GETTING STARTED



FreeWriter is all in one SYS file, which can be started from Basic by

using the "-" command.



When you first enter FreeWriter, you'll see a title screen, with a

copyright message.  B patient; it will disappear after a few seconds.

There doesn't seem to be any way to make it disappear faster.



In much of the documentation for FreeWriter (or for AppleWriter), a

pair of brackets is used to denote a control-letter.  For instance,

[T] would mean control-T.  In such a case, you should NOT actually

type brackets.  You should just hold down the CONTROL key and press

the 'T' key.



After you enter FreeWriter, press [T] to read the built-in tutorial.



All four arrow keys can be used to move the cursor.  An Apple II+ does

not have down- and up- arrows; but [J] and [K] can be used to move in

those directions.  (As usual, [H] is the same as the leftarrow, and

[U] is the right arrow.)



You'll need to set the screen margins, by typing [W] and then a

number, and then pressing RETURN.  Some recommended numbers are 78, if

you have an 80-column card; or 39, if you don't.  If you use all 80

columns (or all 40 columns), or more, FreeWriter's display will hide

some text, or jump around in a distracting fashion, or both.  ...

Occasionally you may want to use some other width number, to preview a

printout -- i.e., to see what the text will look like with various

choices of margins.



FreeWriter has two different ways to erase unwanted characters.  Place

the cursor to the right of the unwanted character.  To irretrievably

erase the character, press the DELETE key; this method is not

available on an Apple II+.  To erase retrievably the character, hold

down the open-Apple button (or game-paddle #0) and press the

left-arrow key.



Text erased in the latter fashion can be retrieved by holding down the

open-Apple button (or game-paddle #0) and pressing the RIGHT-arrow

key.  You can move the cursor before retrieving the text; this

provides an easy method for relocating small blocks of text.  However,

the buffer in which the retrievable text is stored will only hold

around 256 characters -- that's a little more than 3 lines, if you're

using 78 columns; or a little more than 6 lins, if you're using 39

columns.



=======================================================================





FREEWRITER'S USE OF PREFIXES



FreeWriter's [L]oad and [S]ave commands offer you the option of

displaying a catalog, but they require that you specify the "volume"

(or, more precisely, the prefix).  If you just press RETURN when asked

for the "volume", FreeWriter will use whatever prefix was last used.

(But it will give an error message if NO prefix has ever been

specified.)



FreeWriter does not offer any way of checking to see what are the

prefixes on the disks.  This is one of FreeWriter's drawbacks; you

have to remember the prefixes you're working with.  That can be a

bothersome chore.



But there are a couple of ways to get around that drawback.  If you

type in a period (.) and then press RETURN, FreeWriter will take the

disk name (i.e., the main directory) as Prefix, and will proceed to

show you a list of all the textfiles in the main directory.  So one

solution is to not bother with prefixes; just do everything in the

main directory.  ... But then you're missing out on ProDOS's wonderful

hierarchical directory structure, which really can be useful.



Another method you can use: specify a prefix immediately before

entering FreeWriter.  It does NOT have to be the same prefix as

FreeWriter's.  For instance, if your copy of FreeWriter is in

"/MY.UTILITIES/TEXT.STUFF/", and the textfiles you want to work on are

all in "/MY.TEXTS/ABOUT.IIC/", then type:



    PREFIX /MY.TEXTS/ABOUT.IIC/

    -/MY.UTILITIES/TEXT.STUFF/FREEWRITER



This will start up FreeWriter, but the default prefix which FreeWriter

will use is "/MY.TEXTS/ABOUT.IIC/".  --- That might all seem like a

lot of typing.  But it can be handled automatically, with just a few

keystrokes, by the LONG.MENU program which I wrote; you may find it

elsewhere in this database.  Just set the menu's exit prefix to

/MY.TEXTS/ABOUT.IIC/, and then move the menu to

/MY.UTILITIES/TEXT.STUFF/ and run FreeWriter.





=======================================================================







FREEWRITER'S [S]ave COMMAND



When you press control-S, you will be asked for the filename under

which you want to save the file.  If you have been revising a file

which you loaded from disk, then the name of that file will be

displayed.  To save under a new but similar filename, trace the right

arrow key over the parts of the filenam that you want to keep.





To save under precisely the same filename as that displayed, you can

just press the equals sign (=) and then RETURN. ... In this case you

will NOT be asked whether you want to delete the old version of the

file. FreeWriter will just go ahead and delete the old version, and

replace it with the new version.





The tutorial gives the exclamation point as an example of a delimiter.

Other punctuation marks can be used as well, and some other may be

more convenient.  Criteria to follow:  the mark chosen should not be

one which occurs in the the endmark, nor should it be a letter,

numeral, period, or slash (since those characters could be part of a

pathname).





The tutorial mentions that you can create a new file, from either all

or part of the text which is currently in FreeWriter's memory.  But

the tutorial doesn't mention that you can also APPEND either all or

part of the current text to the end of a pre-existing file.  To append

all of the current text, type:



   [S]old.file!+



To append part of the current text, move the cursor to the beginning

of the desired portion, and then type:



   [S]old.file!end!+





=======================================================================







FREEWRITER'S [L]oad COMMAND





This command has some of the same conventions as the Save command.

When you press control-L, a filename may be displayed, if it was

recently used and hasn't yet been removed from memory by one means or

another.  In that case, pressing equal-sign and then RETURN will load

the file specified by that name.





The tutorial mentions how to load part of a file by using a beginning

marker and an end marker.  It does not mention that you can leave one

of the markers empty, to specify the beginning or end of a file.

Thus,



   [L]this.file!mark!



will load all of "this.file" from "mark" to the end of the file.  On

the other hand,



   [L]this.file!!mark!



will load all of "this.file" from the beginning of the file to "mark".





The symbol "#" means "whatever is currently in memory".  Using this,

you can copy a portion of the current text into another location in

the current text, as follows:



   [L]#!start!end!



This command will copy, to the location where the cursor currently is,

that portion of text which begins with "start" and ends with "end".

(One or both of the start and end markers can be omitted if the

portion you wish to copy begins at the beginning of current text

memory or ends at the end of current memory.)





You can use the load command to "peek" at a disk file without actually

loading it, and thus without affecting the text which is currently in

memory.  Simply end the filename with a backslash (/).  For instance,

to peek at a file named "other.file", type



   [L]other.file\



The "other.file" will scroll rapidly upward over the screen.  To make

it pause so that you can look at it more carefully, type control-S.

To resume scrolling, press any key.



=======================================================================





FREEWRITER'S [F]ind/replace COMMAND





This command has different effects when different delimiters are used,

making it extremely powerful.  Here is the delimiter chart from my

AppleWriter //e  manual (DOS 3.3 version):





Delimiter   /  <  #  &  !  *

Any length     =  $  '  "  +

Cg. Return     >  %  (  #  '

Any char.      ?  &  )  $  -





When / is used as a delimiter, then there is no "any length",

"carriage return", or "any character" symbol.  But with any of < # & !

* used as a delimiter, the other features are available.  The several

different choices of delimiter are available so that you can use a

column of the chart which doesn't use any symbols appearing in your

text.





Here's an example:  suppose you want to remove all trailing blanks in

your file -- i.e., whenever you have a space immediately preceding a

carriage return, you want to remove the space.  One way to do this is

to type control-B to move the cursor to the top of memory, and then

type



   [F]# %#%#A



Here # is used as the delimiter, and % is used to represent carriage

returns.  The "A" at the end of the command means "all of them" -- but

it might not actually get all of them.  If you have several spaces

immediately preceding a carriage return, this method will only remove

the last of those spaces.



What to do?  Well, type control-F followed by an equals sign, to

repeat the same substitution command.  Do that several times.  Then

type



  [F]# %#%#



This time we've omitted the "A", so we'll actually see where the

remaining substitutions are needed.





Another example -- suppose you want to delete the last few sentences

-- or the last few paragraphs, or whatever -- of the text you've been

working on.  You could just use the DELETE key, but it's a little slow

and tedious.  Here's a faster method.  Place the cursor at the

beginning of the portion that you want to delete.  Then type



   [F]#&##A



-- that's control-F, pound, ampersand, pound, pound, A, return.  Here

the ampersand acts as an "any character" symbol.  After yoou press

RETURN, you'll have to wait a few seconds -- substitutions like this

take a little while, but it's still faster than using the delete key.





Finally, here's one more example.  Suppose you want to delete several

long paragraphs from the MIDDLE (not the end) of an extremely long

file.  Again, using the delete key would take a while.  A slightly

faster method is as follows:  Put the cursor at the beginning of the

portion to be deleted, and then type



   [F]#&&&&&&&&&&&&&&&&&&&&&&&&&##



That's control-F, followed by a pound sign, followed by some large

number of ampersands, followed by two pound signs, followed by RETURN.

Then press 'Y' as many times as necessary.





=======================================================================







FREEWRITER'S [Q]uit COMMAND





This command actually does work; but it is so bothersome to use that

in most cases, if you want to leave FreeWriter and use some other

program, you may as well just reboot.



However, the [Q]uit command does have at least one use.  Rebooting

destroys whatever is in the /RAM/disk.  Occasionally it is useful to

leave FreeWriter without destroying the contents of the /RAM/disk.

One such application, for relocating textfiles, is described later in

this article.



So, here's how to use [Q]uit.  First, press control-Q.  When

FreeWriter asks if you're sure, press 'Y' and then RETURN.



The computer will then display the Prefix which was current when you

entered FreeWriter.  The computer will ask you to press RETURN if that

Prefix is still acceptable, or else to specify a new Prefix.  You

should specify a prefix that contains a SYSTEM file.  In most cases,

this will be the prefix which is the main directory of a bootup disk.



Next, the computer will ask for the pathname of the next

"application".  This means a file of type 'SYS' whose name ends in

".SYSTEM".  For instance, this might be "BASIC.SYSTEM".



After you've done that, the computer will set the prefix as you've

specified, reload the ProDOS supplement to Basic, and look for

whatever is the STARTUP program on your disk -- all without altering

/RAM/.



=======================================================================



End of file.