Just a short add for completeness, because I had forgotten it in the first post:
The token code for EDIT is $45.
EDIT can be typed also as E<SHIFT+D>
(similar as nearly every Commodore BASIC command like L<SHIFT+I> for LIST etc.)
Just a short add for completeness, because I had forgotten it in the first post:
The token code for EDIT is $45.
EDIT can be typed also as E<SHIFT+D>
(similar as nearly every Commodore BASIC command like L<SHIFT+I> for LIST etc.)
In the latest available C65-ROM (911001.bin) I found a token for an EDIT command at address $127DB (75739 dec). In the usual manuals and documents about the C65 I didn't find anything about it.
Gladly I found a textfile "edit.man" (dated 1991/10/23) which I think it was from Fred Bowen or some colleague of him nowadays by Commodore.
In short: There is a build in simple linebased text editor in the C65.
In the direct mode you can switch it on with EDIT ON.
The prompt turns from "READY." to "OK.".
Now you can - after type in a line number (similar as in BASIC) - write a text, each line can be 160 characters long:
Bitte melde dich an, um diesen Anhang zu sehen.
The text ist sorted by the line numbers. You can even LIST the written text:
Bitte melde dich an, um diesen Anhang zu sehen.
Saving the text to disc with the DSAVE command:
Bitte melde dich an, um diesen Anhang zu sehen.
You can print the saved text to screen with the TYPE command. It is also possible to send it to a printer (see the manual text below).
Bitte melde dich an, um diesen Anhang zu sehen.
If you want to edit the text, you can load it with the DLOAD command in the memory again.
Bitte melde dich an, um diesen Anhang zu sehen.
If you have enough written, you can switch to BASIC mode again with EDIT OFF. The prompt turns to "READY." again.
Bitte melde dich an, um diesen Anhang zu sehen.
I just tested the EDIT command with the C65-ROM (911001.bin). The EDIT token is in the ROMs since version 910624.bin.
And here is the text of the mentioned "edit.man" file from (1991/10/23):
EDIT Mode
Edit mode is simply a poor man's word processor. Text is entered normally
as if you were typing in a program, but tokenization is turned off.
This affects only that text which follows a line number. Any commands which
specifically operate upon program lines (RUN, GOTO, LOAD, SAVE, etc.) test for
this mode and if it's enabled report ILLEGAL EDIT MODE ERROR. All other BASIC
Direct mode commands function as usual.
EDIT < ON | OFF >
When Edit mode is selected, the usual READY prompt is changed to OK. If
there is a BASIC program in memory, you should type NEW before entering new
text since memory is not automatically cleared when you enter Edit mode.
In Edit mode use DLOAD to load a text file into memory from disk and DSAVE to
save text in memory to a disk file. DLOADing a text file will automatically
add line numbers and remove nulls and carriage returns. DSAVEing a text file
will remove line numbers and add carriage returns at the end of each line.
DLOAD and DSAVE operate upon SEQuential files when in Edit mode.
In Edit mode you can use both text and graphic characters, but reverse
field characters not delimited by quotes will appear as normal, unreversed
characters. Blank lines can be entered only by typing an invisible shifted-
space character after the line number. As in Program mode, you can indent
lines with leading spaces. Editing features such as LIST, FIND, CHANGE, AUTO,
RENUMBER, and DELETE work as usual, as do functions such as Autoscroll, Word
Forward and Backward, and the function keys.
Note that text files which contain control characters like ESCAPE, TAB, Line
Feeds, Color Codes, and empty lines cannot be DLOADed and edited without losing
those characters. The maximum line length is 160 characters; lines longer than
this will be split into two or more lines when loaded into memory.
When you turn Edit mode off, the usual READY prompt reappears. If there is
a text file still in memory, you should type NEW before entering a new BASIC
program since memory is not automatically cleared when you leave Edit mode.
To display a text file from disk on the screen, use the TYPE "filename"
command. To print a text file from disk on a printer, use the command
sequence OPEN4,4,7: CMD4: TYPE "filename": CLOSE4. This assumes you have
a Commodore serial bus printer and are typing a letter in upper/lowercase
mode. If your text file is in uppercase/graphic mode, omit the ",7" parameter
from the OPEN command.
Alles anzeigen