English
Language : 

NSB8 Datasheet, PDF (120/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
grifo®
ITALIAN TECHNOLOGY
THE LINE EDITOR
Never forget that NSB8 is capable to load and save ascii source BASIC program that can be edited
through an external ascii editor. So if you retain that the internal editor is poor and uncomfortable
you are free to use your favourite editor ensuring that the ascii source file length is a multiple of 128
bytes (use GDOS 80 program utility DOS2GDOS or the GET80 integrated editor).
NSB8 INTERNAL EDITOR
Anyone who has used the NSB8 system for any length of time is already aware of the delete character
function performed by the underline, RUB/DEL, and backspace keys, as well as the cancel line
function of the at sign (@) key. These are two features of the larger line editor, which allows you to
modify, quickly and efficiently, lines of information which you type into NSB8. Mostly, people use
the line editor to change or correct program text, a line at a time. However, the editor may also be
used on commands and responses to INPUT or INPUT1 statements. Because the program development
aspect of the editor is by far the most important to the average BASIC user, this purpose will be
emphasized here.
The character delete and line cancel functions of the editor permit instantaneous correction of typing
errors as they are made during the entry of a line. The editor also allows the correction and
modification of program lines which have already been typed into the system. For example, after
scratching the program/data area, type the following PRINT statement into BASIC:
10 PRINT “TOTAL RECEIPTS TO DATE: “,T1
As soon as you strike the <CR>, and this line becomes part of your current program, pretend that you
have made a mistake: the variable to be printed should actually be T2, not T1. In BASICs without
a line editor facility, you would be forced to retype the entire line in order to correct the one erroneous
character. However, NSB8 always remembers the last line you type to it. This, for discussion
purposes, will be called the old line. As a rule of thumb, whenever you strike the <CR> to terminate
a line of input to BASIC, that line immediately becomes the old line (there is one exception to this
rule, which will be discussed in a moment). Utilizing the higher functions of the line editor, you can
convert the old line into a correct new line which will then replace its predecessor in the program. For
now, to prove to yourself that BASIC indeed remembers the old line, type <control-G>. Notice that
the line you just typed reappears. The cursor or print head on your terminal will sit just at the end of
the line. By striking <control-G> before typing anything else, you have instructed the line editor to
take the old line from the beginning to the end, and treat it as a new line of input, copying the line
to the terminal as it does so. In effect, by using just one control character, you have retyped the old
line. If you now strike <CR>, the new line will replace line 10 but since the new line is identical to
the old, no net improvement will result: T1 should still be changed to T2. However, suppose you
strike the underline key. Now, the last character in the new line (the 1 that should be a 2) is erased,
and you may type the correct one. If you strike <CR> at this point, the correct line will replace its
faulty predecessor. To correct the reasonably long line 10, all that was required was to strike four
keys: control-G, underline, the “2” key, and <CR>.
When one is used to such a procedure, it is much faster and less tedious than retyping the whole line,
although, for this introductory example, you probably spent more time being careful, reading
directions, and observing results, than you would if you had just retyped the whole thing to start
with. Practice with the editor, your speed will improve tremendously. Even after just an hour or so
Page 108
NSB8
Rel. 5.10