[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help ME! Apple IIc



Mike Malek (mike_malek@hotmail.com) wrote:
: Thanks for your reply Volkmar (and also Rick earlier!)

: >> know how to use a  text editor to write my programs and if I would
: >> need other supporting programs or files.
: >
: >Sorry, can't help on that - Applesoft's own editing features are enough
: >for me.

: What do you mean by that last statements?  Do you program and if you
: do, how do you use a word processor on my Apple II (I have several) to
: save as a BASIC program.  Dennis K. told me about saving the file,
: exiting to ProDOS and then EXECuting the file and SAVEing it to
: memory?  Other way?  Thanks a lot!

I've tried using a text editor on BASIC programs and found it needlessly
cumbersome (had the same reaction when I wrote a couple of programs in
QBASIC on a PC under MS-DOS...).  One must boot the word processor, edit
the code, exit to ProDOS or DOS 3.3, EXEC the text file, and hope there
are no typos.  Too much like Apple PASCAL for my liking.

I had much the same opinion of Program Writer, even though Program Writer
remains memory resident.

Now, GPLE, on the other hand, is a darned nice editor.  You hit ^E, then
the line number, and you're off and editing.  Very handy.  But ever since
I started writing programs that fire off the 80-column display (and
disable GPLE in the process), I've gotten used to not using it.

Applesoft has rudementary text editing built in.  Here are the basics...

When you are entering text, characters are copied into the input buffer as
you type them.  Most of the time.  You can also copy characters off of the
screen using the "-->" key.  Of course, most of the time, your cursor is
on a blank line, so pressing "-->" will only copy spaces.  But if you
could move the cursor elsewhere on the screen, you could copy those
characters.  It just so happens that you can do exactly that, and it is
very handy.

NOTE:  The following instructions will work on any Apple ][+, ][e, //c, or
IIgs.  There is a slightly different procedure for the Apple ][.

Okay, try this.  Load the program you want to edit, then list the section
that has problems:

]LIST

10 NORMAL:TEXT:PRINT CHR$(21):PRINT:HOME
20 VTAB 1:POKE 36,16:PRINT "APPLE ][";CHR$(7)
30 PRINT : PRIMT "]"; : INPUT "";Q1$

]

OKAY.  As you can see, there is a typo on Line #30, which will result in a
"?SYNTAX ERROR^G" if the program is run.  You can easily correct this
without retyping the line.  Your cursor should be sitting next to the
Applesoft prompt.

Press {ESC}.  If you are using a ][e, //c, or IIgs AND you are looking at
the 80-column firmware (your cursor is a solid inverse block), your cursor
will turn into a "+".  Otherwise you will see no change at all.

Now, use the I, J, K, and M keys to move the cursor around the screen.  I
moves up, J moves left, K moves right, and M moves down.  On the ][e, //c,
and IIgs, you can also use the arrow keys, but I find that to be confusing
because if you are looking at the 40-column screen, you can't tell whether
you are moving or copying characters.  If you use I, J, K, and M, you can
tell:  if you are moving, your cursor moves.  If not, letters appear.

Anyway, using the I, J, K, and M keys, you can position your cursor over
the first character of the line you want to change.  In this case, it is
the "3" in line 30.

Now press {ESC} again, or press the space bar.  If you are looking at the
80-column firmware, your cursor will return to the familiar inverse block.
Now you can use the right-arrow key {-->} to copy the characters already
displayed on the screen, and type the letter "N" to fix the typo.  When
you get to the end of the line, press RETURN.  LISTing that line then will
verify that the changes stuck.

A couple of caveats--
1.  Pressing the LEFT ARROW {<--} removes the last character from the
    input buffer.  Note that is not necessarily the character to the left
    of the cursor!

2.  To insert characters into a line, you can hit ESC again and move the
    cursor elsewhere on the screen, then type the text to be inserted, then
    return to the line you are editing and complete the copy process.

3.  Remember to copy the whole line!  If you fail to "-->" your way to the end
    of the text you want to include on the edited line before you hit RETURN,
    anything to the right of the cursor will be lost!

4.  The input buffer only holds 238 characters.  Because the LIST command will
    add extra spaces between tokens and expand "?" into "PRINT", if you use
    lots of concatenated instructions on a program line (as I do), you
    could end up trying to copy a program line that exceeds the length of
    the buffer.  You can use the 'cursor movement' mode as described above to
    move over spaces without copying them into the buffer.  It looks a
    little strange on the screen when you get lines that say things like, 
    30 ?RINT :?PRINT "]";: INPUT "";Q1$
    but listing the line after editing will verify that you did it right.

More questions?  Just ask!

Happy ][ year!
--Dave Althoff, ][.
-- 
    /-\        _       _               _ ***  Merry Christmas!!!  ***
   /XXX\      /X\     /X\       _     /X\__      _               ____  
  /XXXXX\    /XXX\   /XXXX     /X\   /XXXXX\    /X\    X\       XXXXX
_/XXXXXXX\__/XXXXX\ XXXXXXXX _/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX