<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://f256wiki.wildbitscomputing.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=91.17.17.231</id>
	<title>Foenix F256 / Wildbits/K2 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://f256wiki.wildbitscomputing.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=91.17.17.231"/>
	<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Special:Contributions/91.17.17.231"/>
	<updated>2026-04-16T06:18:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=16564</id>
		<title>Moreorless</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=16564"/>
		<updated>2024-12-24T11:40:11Z</updated>

		<summary type="html">&lt;p&gt;91.17.17.231: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is a text viewer and editor for the Foenix F256K and F256 Jr. modern&lt;br /&gt;
retro computers. It was written by Martin Grap (@mgr42 on the Foenix Discord&lt;br /&gt;
server) in 2024. Its source code and prebuilt binaries can be found on my &lt;br /&gt;
[https://github.com/rmsk2/moreorless GitHub] page. Its current version in 2.5.1.&lt;br /&gt;
&lt;br /&gt;
moreorless allows to view and edit files which are much larger than the 64K&lt;br /&gt;
base memory of the Foenix machines, because it dynamically manages all of the&lt;br /&gt;
RAM of the computers. The largest file I have successfully loaded had a size of&lt;br /&gt;
286KB. But be aware that in order to edit files of that size a RAM expansion is&lt;br /&gt;
needed. On an unexpanded machine the largest file I have tested had a size&lt;br /&gt;
of 124KB.&lt;br /&gt;
&lt;br /&gt;
Apart from writing text files like this one, moreorless also offers some&lt;br /&gt;
features for the BASIC programmer: If you refrain from using goto and gosub you&lt;br /&gt;
can create SuperBASIC programs without using the screen editor. moreorless&lt;br /&gt;
allows you to write your programs without line numbers and adds these either&lt;br /&gt;
when you save the program or when you write the program to RAM from where it&lt;br /&gt;
can be loaded by xload or run by xgo.&lt;br /&gt;
&lt;br /&gt;
moreorless can either be used in 80x60 or in 80x30 characters text mode and it&lt;br /&gt;
provides four different colour schemes which in addition to the usual Foenix&lt;br /&gt;
white on blue aim to emulate monochrome monitors of the 80&#039;s and 90&#039;s, i.e.&lt;br /&gt;
green on black, white on black and amber on black. For good measure there is&lt;br /&gt;
also a black on white mode.&lt;br /&gt;
&lt;br /&gt;
moreorless began as a simple text viewer and developed into an editor later.&lt;br /&gt;
The name moreorless has its roots in that time. I also hope that it turned out&lt;br /&gt;
to be a more or less usable editor.&lt;br /&gt;
&lt;br /&gt;
This document (in its original form) has been created using moreorless.&lt;br /&gt;
&lt;br /&gt;
= Starting moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is primarily distributed as a .pgz file (mless.pgz) which can be&lt;br /&gt;
executed from the BASIC screen or from DOS by typing &#039;&#039;/- mless&#039;&#039; after you have&lt;br /&gt;
saved it to the internal SD card. Alternatively it is possible to store&lt;br /&gt;
moreorless in the non volatile flash memory of your Fonix machine. More&lt;br /&gt;
information about how to do that can be found on my github page. In this case&lt;br /&gt;
you can omit the &#039;&#039;-&#039;&#039; from the command, i.e. you can use &#039;&#039;/mless&#039;&#039; to start the&lt;br /&gt;
program from flash.&lt;br /&gt;
&lt;br /&gt;
After starting the program you have to select the drive number(0, 1 or 2),&lt;br /&gt;
which will be used to load and save the current document.&lt;br /&gt;
&lt;br /&gt;
After that you can select the line ending character which is to be used when&lt;br /&gt;
loading or saving a file. The default is a single line feed (LF) character but&lt;br /&gt;
you can change that to a single carriage return (CR) character. In my&lt;br /&gt;
experience there are some SuperBASIC programs which use CR as their line ending&lt;br /&gt;
character. So if a file can not be loaded with LF as a line ending character&lt;br /&gt;
try to use CR and vice versa.&lt;br /&gt;
&lt;br /&gt;
Finally you have to enter the name of a file to load. If you want to create a&lt;br /&gt;
new document, leave the file name empty and simply press return. You will be&lt;br /&gt;
prompted for a file name when you save the new document for the first time.&lt;br /&gt;
&lt;br /&gt;
You can also start moreorless with additional command line parameters. I.e. you&lt;br /&gt;
could do &#039;&#039;/- mless file.txt&#039;&#039; which would then open the file &#039;&#039;file.txt&#039;&#039; on drive&lt;br /&gt;
0 with LF as line ending character. One can also specify a drive number in the&lt;br /&gt;
file name. For instance &#039;&#039;/- mless 1:test.txt&#039;&#039; would load the file &#039;&#039;test.txt&#039;&#039;&lt;br /&gt;
from drive 1. If moreorless is stored in flash memory then the &#039;-&#039; character&lt;br /&gt;
can be omitted. When using CLI parameters the line ending character is always&lt;br /&gt;
the default, i.e. LF.&lt;br /&gt;
&lt;br /&gt;
= Issuing commands, entering and deleting characters =&lt;br /&gt;
&lt;br /&gt;
moreorless currently offers 44 commands, which range from simply moving the&lt;br /&gt;
cursor on the screen to stuff like search and replace. All commands are bound&lt;br /&gt;
to certain key combinations and knowing these combinations is unfortunately&lt;br /&gt;
neccessary to use moreorless, but one could say this is in line with the retro&lt;br /&gt;
theme of the Foenix F256 platform ;-). If you press a key which is not bound to&lt;br /&gt;
a command then the character representing this key on the Foenix is printed to&lt;br /&gt;
the screen even if it is a graphics character.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; always delete the character left of the cursor. This&lt;br /&gt;
leads to an edge case in lines with 80 (or more) characters as the last character &lt;br /&gt;
can not be deleted directly using these keys. In lines with 79 characters&lt;br /&gt;
or less the cursor can be placed one column beyond the last character in order&lt;br /&gt;
to make deletion of this character possible.&lt;br /&gt;
&lt;br /&gt;
= Inserting and deleting lines =&lt;br /&gt;
&lt;br /&gt;
In order to insert a new line simply press return. This command splits the&lt;br /&gt;
current line at the column in which return was pressed and creates a new line.&lt;br /&gt;
This line contains the text that was under and to the right of the cursor when&lt;br /&gt;
return was pressed. This command preserves the current indentation level, i.e.&lt;br /&gt;
if the line that is split is indented n characters the new line will also be&lt;br /&gt;
indented to the same level.&lt;br /&gt;
&lt;br /&gt;
A line can be merged with the line above when &#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; is&lt;br /&gt;
pressed in the first column of a line. This command does nothing if the merged&lt;br /&gt;
line would contain more than 80 characters. Due to the merging of two lines the&lt;br /&gt;
overall number of lines in the document decreases, so in essence this command&lt;br /&gt;
can be used to delete one line at a time. Blocks of lines can also be cut from&lt;br /&gt;
the document as explained below.&lt;br /&gt;
&lt;br /&gt;
= Navigation in your document =&lt;br /&gt;
&lt;br /&gt;
When editing text moving the cursor in all four directions is the most basic&lt;br /&gt;
function of an editor. As one would expect these commands are bound to the&lt;br /&gt;
cursor keys. The movement of the cursor in the document is limited by the&lt;br /&gt;
length of the current line and the overall size of the document. This means you&lt;br /&gt;
can not move the cursor beyond the last line of the document and the cursor is&lt;br /&gt;
moved to the next line if you press &#039;&#039;crsr-right&#039;&#039; at the end of the current&lt;br /&gt;
line. The current line and column number are shown on the bottom left of the&lt;br /&gt;
screen.&lt;br /&gt;
&lt;br /&gt;
As one would expect pressing &#039;&#039;crsr up&#039;&#039; or &#039;&#039;crsr down&#039;&#039; at the top or the bottom&lt;br /&gt;
of the screen scrolls the contents of the currently visible section up or down.&lt;br /&gt;
&lt;br /&gt;
When moving the cursor vertically moreorless attempts to keep the column number&lt;br /&gt;
constant. This may not be possible if the line above or below the current line&lt;br /&gt;
has fewer characters than the current line but moreorless remembers this column&lt;br /&gt;
number and places the cursor on that column again if a line is reached which&lt;br /&gt;
has enough characters. This feature allows to keep the cursor on a certain&lt;br /&gt;
indentation level when navigating the document even if there are lines which&lt;br /&gt;
are shorter than this indentation level.&lt;br /&gt;
&lt;br /&gt;
When pressing &#039;&#039;clr home&#039;&#039; the cursor is placed at the beginning of the current&lt;br /&gt;
line and if you press &#039;&#039;Shift+clr home&#039;&#039; it is moved to the end of the current&lt;br /&gt;
line. &lt;br /&gt;
&lt;br /&gt;
Another possibility to move the cursor is to use &#039;&#039;Ctrl+crsr left&#039;&#039; and&lt;br /&gt;
&#039;&#039;Ctrl+crsr right&#039;&#039;. The commands bound to these keys move the cursor one word to&lt;br /&gt;
the left or the right, where a word is defined to be any string which does not&lt;br /&gt;
contain a space character.&lt;br /&gt;
&lt;br /&gt;
The cursor can be moved a whole screen width up or down by pressing&lt;br /&gt;
&#039;&#039;Foenix+crsr up&#039;&#039; or &#039;&#039;Foenix+crsr down&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Finally the cursor can be moved to a specific line number by pressing&lt;br /&gt;
&#039;&#039;Foenix+g&#039;&#039;. The user is then prompted for a line number and after pressing&lt;br /&gt;
return the cursor is moved to the entered line number in such a way that this&lt;br /&gt;
line appears in the first line on the screen. This command can be aborted by&lt;br /&gt;
pressing return without entering a number or by entering an invalid line&lt;br /&gt;
number.&lt;br /&gt;
&lt;br /&gt;
There are two other commands which do not move the cursor in the document but&lt;br /&gt;
the section of text which is visible on the screen. &#039;&#039;Ctrl+crsr up&#039;&#039; changes the&lt;br /&gt;
view in such a way that the current line is moved one line up in the visible&lt;br /&gt;
section. Correspondingly &#039;&#039;Ctrl+crsr down&#039;&#039; changes the view in such a way that&lt;br /&gt;
the current line is moved one line down. These commands do nothing if changing&lt;br /&gt;
the view would move the current line out of the visible section or if the view&lt;br /&gt;
already displays the first (in case of &#039;&#039;Ctrl+crsr down&#039;&#039;) or the last (in case&lt;br /&gt;
of &#039;&#039;Ctrl+crsr up&#039;&#039;) line of the document.&lt;br /&gt;
&lt;br /&gt;
= Saving a document, restarting and exiting moreorless =&lt;br /&gt;
&lt;br /&gt;
If you want to save your document to SD card or an IEC drive press &#039;&#039;Foenix+s&#039;&#039;.&lt;br /&gt;
If this is the first time you save a new document you are prompted for a file&lt;br /&gt;
name. The input routine is &amp;quot;drive aware&amp;quot;, i.e. if the file name you entered&lt;br /&gt;
starts with 0:, 1: or 2: then the digit is used as the drive number. If you&lt;br /&gt;
want to abort this command simply press return. If the document has been saved&lt;br /&gt;
before or has been loaded at program start &#039;&#039;Foenix+s&#039;&#039; simply saves the document&lt;br /&gt;
without any further interaction by the user using the previously established&lt;br /&gt;
name and drive.&lt;br /&gt;
&lt;br /&gt;
If you want to save a document under a new name press &#039;&#039;Alt+s&#039;&#039;. You will then&lt;br /&gt;
be prompted for a new name. As described above you can abort this command by&lt;br /&gt;
entering an empty string.&lt;br /&gt;
&lt;br /&gt;
moreorless can be exited by pressing &#039;&#039;Alt+x&#039;&#039;. If the document has unsaved&lt;br /&gt;
changes the user is prompted for a confirmation. Please enter a non empty&lt;br /&gt;
string to confirm quitting without saving or an empty string to continue to&lt;br /&gt;
edit the dcocument. The fact that the document has unsaved changes is&lt;br /&gt;
visualized by a &#039;&#039;*&#039;&#039; in the top right corner.&lt;br /&gt;
&lt;br /&gt;
If you want to stop editing a document and load or create a new one you can use&lt;br /&gt;
&#039;&#039;Alt+r&#039;&#039;. If it is detected that the current document has unsaved changes you&lt;br /&gt;
are prompted to confirm that these will be lost by this action in the same&lt;br /&gt;
fashion as described above.&lt;br /&gt;
&lt;br /&gt;
= Features for SuperBASIC programmers =&lt;br /&gt;
&lt;br /&gt;
If you refrain from using goto and gosub moreorless can be used to make creating&lt;br /&gt;
SuperBASIC programs more convenient. The idea is that you write your BASIC&lt;br /&gt;
program and format it to your liking, for instance using proper identation in&lt;br /&gt;
if, while, repeat or other blocks but without using line numbers. moreorless&lt;br /&gt;
then auto generates the line numbers for you when you instruct it to either&lt;br /&gt;
save a BASIC program to disk or to RAM (at location $028000).&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;Alt+b&#039;&#039; can be used to save a version of your document as a BASIC&lt;br /&gt;
program with auto generated line numbers. After issuing the command you are&lt;br /&gt;
prompted for a file name. If you want to abort the command you can enter an&lt;br /&gt;
empty string by simply pressing return.&lt;br /&gt;
&lt;br /&gt;
While you can load and edit the created BASIC program in moreorless it is&lt;br /&gt;
recommended that you treat the document without line numbers as the source code&lt;br /&gt;
of the program and the generated BASIC program as a sort of .exe file which&lt;br /&gt;
can be recreated from the source code at any time.&lt;br /&gt;
&lt;br /&gt;
Another way to create a SuperBASIC program from a document in moreorless is the&lt;br /&gt;
command &#039;&#039;F8&#039;&#039;. When pressing this key moreorless creates an auto generated BASIC&lt;br /&gt;
program in RAM from where it can be &amp;quot;loaded&amp;quot; via the BASIC statement xload or&lt;br /&gt;
started via the statement xgo after moreorless has been exited.&lt;br /&gt;
&lt;br /&gt;
= Using moreorless with a PS/2 keyboard =&lt;br /&gt;
&lt;br /&gt;
This document assumes that you use moreorless on a F256K which has a builtin&lt;br /&gt;
keyboard, but moreorless also runs on the F256 Jr. which has to be used with a&lt;br /&gt;
PS/2 keyboard. If your Foenix is used with a PS/2 keyboard the key bindings&lt;br /&gt;
are subtely different.&lt;br /&gt;
&lt;br /&gt;
The first reason is obvious: A standard keyboard has no Foenix key. The&lt;br /&gt;
solution to this problem is simple: Use the Windows key instead of the Foenix&lt;br /&gt;
key.&lt;br /&gt;
&lt;br /&gt;
Another problem arises with all command keys that require you to press the&lt;br /&gt;
shift key on the F256K but not on a PS/2 keyboard. These are&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;F2&#039;&#039;, i.e. &#039;&#039;Shift+F1&#039;&#039; on F256K but simply &#039;&#039;F2&#039;&#039; on a PS/2 keyboard &lt;br /&gt;
* &#039;&#039;F4&#039;&#039;, i.e. &#039;&#039;Shift+F3&#039;&#039; on F256K but simply &#039;&#039;F4&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;F8&#039;&#039;, i.e. &#039;&#039;Shift+F7&#039;&#039; on F256K but simply &#039;&#039;F8&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;Shift+clr home&#039;&#039; on F256K but simply &#039;&#039;Pos1&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
&lt;br /&gt;
One solution to this problem would be to build a version of moreorless which&lt;br /&gt;
detects if it is running on a Jr. and modifies its key bindings accordingly.&lt;br /&gt;
This would only put F256K users with PS/2 keyboards at a disadvantage. The&lt;br /&gt;
other solution would be to build a version with PS/2 specific key bindings. But&lt;br /&gt;
this would make distribution somewhat confusing.&lt;br /&gt;
&lt;br /&gt;
As a maybe temporary workaround you should use the &#039;&#039;Shift&#039;&#039; key with the above&lt;br /&gt;
key bindings when using a PS/2 keyboard. I.e. you should use &#039;&#039;Shift+F2&#039;&#039;,&lt;br /&gt;
&#039;&#039;Shift+F4&#039;&#039;, &#039;&#039;Shift+F8&#039;&#039; and &#039;&#039;Shift+Pos1&#039;&#039; instead of simply pressing the&lt;br /&gt;
corresponding keys.&lt;br /&gt;
&lt;br /&gt;
= Changing the appearance of moreorless =&lt;br /&gt;
&lt;br /&gt;
When you press &#039;&#039;F4&#039;&#039; you can change the colour scheme used by moreorless by&lt;br /&gt;
cycling through five alternatives:&lt;br /&gt;
&lt;br /&gt;
* White on blue&lt;br /&gt;
* Green on black&lt;br /&gt;
* Black on white&lt;br /&gt;
* White on black&lt;br /&gt;
* Amber on black&lt;br /&gt;
&lt;br /&gt;
Pressing F1 or F2 redraws the whole screen in either 80x60 (F1) or 80x30 (F2)&lt;br /&gt;
text mode and returns the view to the start of the document. You can also use&lt;br /&gt;
these commands to put the screen state management of moreorless in a known good&lt;br /&gt;
state when you are experiencing corresponding problems due to potential bugs in&lt;br /&gt;
the pogram.&lt;br /&gt;
&lt;br /&gt;
= Add indentation =&lt;br /&gt;
&lt;br /&gt;
If you press the &#039;&#039;Tab&#039;&#039; key two spaces are inserted and if you press &#039;&#039;Ctrl+Tab&#039;&#039;&lt;br /&gt;
four spaces are inserted. In many cases it is not neccessary to indent lines&lt;br /&gt;
manually as moreorless supports auto indentation, i.e. if a new line is&lt;br /&gt;
inserted it is indented to the same level as the preceeding line.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting and pasting simple text data = &lt;br /&gt;
&lt;br /&gt;
As a (mental) cost saving measure (for its programmer) moreorless differenti-&lt;br /&gt;
ates between a clipboard for simple text strings and a clipboard for blocks of&lt;br /&gt;
full lines. The clipboard for simple strings can be controlled via the key&lt;br /&gt;
bindings &#039;&#039;Ctrl+c&#039;&#039;, &#039;&#039;Ctrl+x&#039;&#039; and &#039;&#039;Ctrl+v&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
These commands make use of a so called mark which can be set by &#039;&#039;Foenix+space&#039;&#039;&lt;br /&gt;
or &#039;&#039;Foenix+m&#039;&#039;. If a mark is set this is visualized in the top right corner by&lt;br /&gt;
an &#039;&#039;M&#039;&#039; character. A mark is invalidated by any change to the document or at the&lt;br /&gt;
end of an operation which made use of that mark.&lt;br /&gt;
&lt;br /&gt;
In order to copy or cut a simple string you first have to set a mark at the&lt;br /&gt;
first character you want to select. You then move the cursor to the last&lt;br /&gt;
character you want to copy or cut and either press &#039;&#039;Ctrl+c&#039;&#039; or &#039;&#039;Ctrl+x&#039;&#039;. Both&lt;br /&gt;
of these characters have to be in the same line and are part of the selection.&lt;br /&gt;
This allows for copying or cutting a single character.&lt;br /&gt;
&lt;br /&gt;
In lines which are shorter than 80 characters you can move the cursor beyond&lt;br /&gt;
the last character. It has to be noted that this position is not a valid&lt;br /&gt;
position for copying and cutting of simple strings. After setting the mark it&lt;br /&gt;
is possibe to move the cursor either left or right to determine the last&lt;br /&gt;
character of the selection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ctrl+v&#039;&#039; can be used to insert a previously copied or cut text string into&lt;br /&gt;
the current line. It has to be noted that this command will do nothing if the&lt;br /&gt;
string which is currently in the clipboard would make the line longer than 80&lt;br /&gt;
characters.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting, pasting blocks of full lines =&lt;br /&gt;
&lt;br /&gt;
Copying and pasting simple strings is one way to make use of a mark. The second&lt;br /&gt;
way is to cut, copy and paste blocks of full lines. In order to select a block&lt;br /&gt;
of lines you have to set a mark as described above in the first line which you&lt;br /&gt;
want to select. After that you move the cursor to the last line of the block&lt;br /&gt;
which you intend to select and press either &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; to copy or&lt;br /&gt;
cut the block. The block includes the line where the mark has been set and the&lt;br /&gt;
line where &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; was pressed. It is therefore possible to&lt;br /&gt;
select a single line.&lt;br /&gt;
&lt;br /&gt;
In order to paste the previously copied or cut part of the document you have to&lt;br /&gt;
press &#039;&#039;Foenix+v&#039;&#039; at a position of your choice. The current contents of the&lt;br /&gt;
clipboard is then inserted after the current line.&lt;br /&gt;
&lt;br /&gt;
In contrast to the selection of simple strings any column in a line is valid&lt;br /&gt;
when copying or cutting blocks. It is not allowed to cut all lines in a&lt;br /&gt;
document as a document has to contain at least one line even if that line has a&lt;br /&gt;
length of zero characters.&lt;br /&gt;
&lt;br /&gt;
When you copy a block the selected part of the document is copied, which uses&lt;br /&gt;
up additional memory. When you cut a part of the document no additional memory&lt;br /&gt;
is used but no memory is freed either even though the corresponding lines have&lt;br /&gt;
vanished from the document. The memory used for storing the clipboard contents&lt;br /&gt;
is freed when the clipboard contents is either replaced by a different block or&lt;br /&gt;
explicitly cleared by pressing &#039;&#039;Alt+k&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When copying or pasting a block it is possible that the additonal memory needed&lt;br /&gt;
exceeds the amount of memory still available. moreoreless detects this&lt;br /&gt;
situation and if it is detected allows you to save the current file contents in&lt;br /&gt;
a file called &#039;&#039;mless~&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Transforming blocks of full lines = &lt;br /&gt;
&lt;br /&gt;
You also can use a mark for selecting a block of full lines which you want to&lt;br /&gt;
transform in some way. moreorless currently implements three types of &lt;br /&gt;
transformations:&lt;br /&gt;
&lt;br /&gt;
* Indent a block by two space characters (Press &#039;&#039;Foenix+Tab&#039;&#039;)&lt;br /&gt;
* Unindent a block by two space characters (Press &#039;&#039;Alt+Tab&#039;&#039;)&lt;br /&gt;
* reformat a block (Press &#039;&#039;Alt+f&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
In order to apply these transformations to a block of full lines you first set&lt;br /&gt;
a mark in one line and then press one of the key combinations shown above on&lt;br /&gt;
another line. After that all lines which are are part of the selection are&lt;br /&gt;
indented one level, unindented a level or transformed to be justified as far as&lt;br /&gt;
is possible on a fixed width text screen using a fixed width font. &lt;br /&gt;
&lt;br /&gt;
The reformat transformation is especially useful for writing texts like this&lt;br /&gt;
one (in contrast to writing source code). It allows to reformat a section in&lt;br /&gt;
such a way that it appears as justified as possible. This simplifies working on&lt;br /&gt;
documents which have been formatted to be justified but have to be changed&lt;br /&gt;
afterwards in such a way that the justification is destroyed. &#039;&#039;Alt+f&#039;&#039; can then&lt;br /&gt;
be used to automatically reformat the document again. Lines created by the&lt;br /&gt;
reformatting transformation are at most 79 characters long.&lt;br /&gt;
&lt;br /&gt;
= Search ... =&lt;br /&gt;
&lt;br /&gt;
In order to search in a document a search string has to be defined. This can be&lt;br /&gt;
done in two ways. Either by pressing &#039;&#039;Foenix+f&#039;&#039; or by pressing &#039;&#039;Foenix+t&#039;&#039;. In&lt;br /&gt;
the first case the user is prompted for a string and in the second case the&lt;br /&gt;
current contents of the simple string clipboard is set as a search string. That&lt;br /&gt;
a search string has been defined is visualized in the bottom right corner by&lt;br /&gt;
the text &#039;&#039;SRCH&#039;&#039;. When &#039;&#039;Foenix+f&#039;&#039; is used to enter a search string then a search&lt;br /&gt;
for this string in forward direction is immediately started after the user has&lt;br /&gt;
entered return. Searching is always performed in a case insensitive fashion.&lt;br /&gt;
&lt;br /&gt;
After setting a search string, pressing &#039;&#039;F3&#039;&#039; searches for the previous&lt;br /&gt;
occurrance of the search string in the text and &#039;&#039;F7&#039;&#039; searches for the next&lt;br /&gt;
occurrance. I.e. &#039;&#039;F3&#039;&#039; searches in backwards direction and &#039;&#039;F7&#039;&#039; in forwards&lt;br /&gt;
direction.&lt;br /&gt;
&lt;br /&gt;
While a search is in progress a * character is shown in the upper left corner.&lt;br /&gt;
If the search string is found then the text view is updated in such a way that&lt;br /&gt;
the line where the string was found is the first line shown and the cursor is&lt;br /&gt;
placed at the beginning of that occurance.&lt;br /&gt;
&lt;br /&gt;
If the search string is not found, then the text view is left unchanged after&lt;br /&gt;
the * character disappears. The search string can be cleared by entering an&lt;br /&gt;
empty string after typing &#039;&#039;Foenix+f&#039;&#039; or by typing &#039;&#039;Foenix+u&#039;&#039;. If the search&lt;br /&gt;
string is cleared the text &#039;&#039;SRCH&#039;&#039; in the bottom right corner disappears.&lt;br /&gt;
&lt;br /&gt;
= ... and replace =&lt;br /&gt;
&lt;br /&gt;
The command bound to &#039;&#039;F5&#039;&#039; first checks if the search string is found at the&lt;br /&gt;
current cursor position and if it is found it replaces it with the value of the&lt;br /&gt;
replace string. The replace string can be set by pressing &#039;&#039;Foenix+r&#039;&#039;. As usual&lt;br /&gt;
this command can be aborted by entering an empty string when prompted. As the&lt;br /&gt;
default replace string is the empty string you should make sure that a proper&lt;br /&gt;
replace string is set before using the &#039;&#039;F5&#039;&#039; command. The command does nothing&lt;br /&gt;
when no search string is set.&lt;br /&gt;
&lt;br /&gt;
To sum it up: In case you want to perform a search and replace operation you&lt;br /&gt;
should first set the search string and after that the replace string. You then&lt;br /&gt;
can then use &#039;&#039;F3&#039;&#039; and &#039;&#039;F7&#039;&#039; to search and if you want to replace a found&lt;br /&gt;
occurrance you press &#039;&#039;F5&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Lines longer than 80 characters =&lt;br /&gt;
&lt;br /&gt;
I have stated above that moreorless will not create lines which are longer than&lt;br /&gt;
80 characters, so why is this section here? The answer is that even though&lt;br /&gt;
moreorless does not allow to create new lines which are longer than 80 characters &lt;br /&gt;
it allows to load documents prepared by other means, maybe on your PC,&lt;br /&gt;
which have lines that are longer than that limit. In fact it can load documents&lt;br /&gt;
which have lines with a maximum length of up to 224 characters.&lt;br /&gt;
&lt;br /&gt;
If you browse such a document lines which are longer than 80 characters are&lt;br /&gt;
visualized by a * after the &#039;&#039;Col xxx&#039;&#039; text in the bottom line. Such lines can&lt;br /&gt;
only be edited in limited ways. To be more precise such lines can be&lt;br /&gt;
reformatted using &#039;&#039;Alt+f&#039;&#039;, they can be split by pressing &#039;&#039;return&#039;&#039; and they can&lt;br /&gt;
be shortened by pressing &#039;&#039;Inst del&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
All other edit operations are not allowed. On top of that search operations&lt;br /&gt;
will not find strings in those parts of the text which are not visible in&lt;br /&gt;
moreorless.&lt;/div&gt;</summary>
		<author><name>91.17.17.231</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=10176</id>
		<title>Moreorless</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=10176"/>
		<updated>2024-12-23T13:39:18Z</updated>

		<summary type="html">&lt;p&gt;91.17.17.231: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is a text viewer and editor for the Foenix F256K and F256 Jr. modern&lt;br /&gt;
retro computers. It was written by Martin Grap (@mgr42 on the Foenix Discord&lt;br /&gt;
server) in 2024. Its source code and prebuilt binaries can be found on my &lt;br /&gt;
[https://github.com/rmsk2/moreorless GitHub] page. Its current version in 2.5.0.&lt;br /&gt;
&lt;br /&gt;
moreorless allows to view and edit files which are much larger than the 64K&lt;br /&gt;
base memory of the Foenix machines, because it dynamically manages all of the&lt;br /&gt;
RAM of the computers. The largest file I have successfully loaded had a size of&lt;br /&gt;
286KB. But be aware that in order to edit files of that size a RAM expansion is&lt;br /&gt;
needed. On an unexpanded machine the largest file I have tested had a size&lt;br /&gt;
of 124KB.&lt;br /&gt;
&lt;br /&gt;
Apart from writing text files like this one, moreorless also offers some&lt;br /&gt;
features for the BASIC programmer: If you refrain from using goto and gosub you&lt;br /&gt;
can create SuperBASIC programs without using the screen editor. moreorless&lt;br /&gt;
allows you to write your programs without line numbers and adds these either&lt;br /&gt;
when you save the program or when you write the program to RAM from where it&lt;br /&gt;
can be loaded by xload or run by xgo.&lt;br /&gt;
&lt;br /&gt;
moreorless can either be used in 80x60 or in 80x30 characters text mode and it&lt;br /&gt;
provides four different colour schemes which in addition to the usual Foenix&lt;br /&gt;
white on blue aim to emulate monochrome monitors of the 80&#039;s and 90&#039;s, i.e.&lt;br /&gt;
green on black, white on black and amber on black. For good measure there is&lt;br /&gt;
also a black on white mode.&lt;br /&gt;
&lt;br /&gt;
moreorless began as a simple text viewer and developed into an editor later.&lt;br /&gt;
The name moreorless has its roots in that time. I also hope that it turned out&lt;br /&gt;
to be a more or less usable editor.&lt;br /&gt;
&lt;br /&gt;
This document (in its original form) has been created using moreorless.&lt;br /&gt;
&lt;br /&gt;
= Starting moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is primarily distributed as a .pgz file (mless.pgz) which can be&lt;br /&gt;
executed from the BASIC screen or from DOS by typing &#039;&#039;/- mless&#039;&#039; after you have&lt;br /&gt;
saved it to the internal SD card. Alternatively it is possible to store&lt;br /&gt;
moreorless in the non volatile flash memory of your Fonix machine. More&lt;br /&gt;
information about how to do that can be found on my github page. In this case&lt;br /&gt;
you can omit the &#039;&#039;-&#039;&#039; from the command, i.e. you can use &#039;&#039;/mless&#039;&#039; to start the&lt;br /&gt;
program from flash.&lt;br /&gt;
&lt;br /&gt;
After starting the program you have to select the drive number(0, 1 or 2),&lt;br /&gt;
which will be used to load and save the current document.&lt;br /&gt;
&lt;br /&gt;
After that you can select the line ending character which is to be used when&lt;br /&gt;
loading or saving a file. The default is a single line feed (LF) character but&lt;br /&gt;
you can change that to a single carriage return (CR) character. In my&lt;br /&gt;
experience there are some SuperBASIC programs which use CR as their line ending&lt;br /&gt;
character. So if a file can not be loaded with LF as a line ending character&lt;br /&gt;
try to use CR and vice versa.&lt;br /&gt;
&lt;br /&gt;
Finally you have to enter the name of a file to load. If you want to create a&lt;br /&gt;
new document, leave the file name empty and simply press return. You will be&lt;br /&gt;
prompted for a file name when you save the new document for the first time.&lt;br /&gt;
&lt;br /&gt;
You can also start moreorless with additional command line parameters. I.e. you&lt;br /&gt;
could do &#039;&#039;/- mless file.txt&#039;&#039; which would then open the file &#039;&#039;file.txt&#039;&#039; on drive&lt;br /&gt;
0 with LF as line ending character. One can also specify a drive number in the&lt;br /&gt;
file name. For instance &#039;&#039;/- mless 1:test.txt&#039;&#039; would load the file &#039;&#039;test.txt&#039;&#039;&lt;br /&gt;
from drive 1. If moreorless is stored in flash memory then the &#039;-&#039; character&lt;br /&gt;
can be omitted. When using CLI parameters the line ending character is always&lt;br /&gt;
the default, i.e. LF.&lt;br /&gt;
&lt;br /&gt;
= Issuing commands, entering and deleting characters =&lt;br /&gt;
&lt;br /&gt;
moreorless currently offers 44 commands, which range from simply moving the&lt;br /&gt;
cursor on the screen to stuff like search and replace. All commands are bound&lt;br /&gt;
to certain key combinations and knowing these combinations is unfortunately&lt;br /&gt;
neccessary to use moreorless, but one could say this is in line with the retro&lt;br /&gt;
theme of the Foenix F256 platform ;-). If you press a key which is not bound to&lt;br /&gt;
a command then the character representing this key on the Foenix is printed to&lt;br /&gt;
the screen even if it is a graphics character.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; always delete the character left of the cursor. This&lt;br /&gt;
leads to an edge case in lines with 80 (or more) characters as the last character &lt;br /&gt;
can not be deleted directly using these keys. In lines with 79 characters&lt;br /&gt;
or less the cursor can be placed one column beyond the last character in order&lt;br /&gt;
to make deletion of this character possible.&lt;br /&gt;
&lt;br /&gt;
= Inserting and deleting lines =&lt;br /&gt;
&lt;br /&gt;
In order to insert a new line simply press return. This command splits the&lt;br /&gt;
current line at the column in which return was pressed and creates a new line.&lt;br /&gt;
This line contains the text that was under and to the right of the cursor when&lt;br /&gt;
return was pressed. This command preserves the current indentation level, i.e.&lt;br /&gt;
if the line that is split is indented n characters the new line will also be&lt;br /&gt;
indented to the same level.&lt;br /&gt;
&lt;br /&gt;
A line can be merged with the line above when &#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; is&lt;br /&gt;
pressed in the first column of a line. This command does nothing if the merged&lt;br /&gt;
line would contain more than 80 characters. Due to the merging of two lines the&lt;br /&gt;
overall number of lines in the document decreases, so in essence this command&lt;br /&gt;
can be used to delete one line at a time. Blocks of lines can also be cut from&lt;br /&gt;
the document as explained below.&lt;br /&gt;
&lt;br /&gt;
= Navigation in your document =&lt;br /&gt;
&lt;br /&gt;
When editing text moving the cursor in all four directions is the most basic&lt;br /&gt;
function of an editor. As one would expect these commands are bound to the&lt;br /&gt;
cursor keys. The movement of the cursor in the document is limited by the&lt;br /&gt;
length of the current line and the overall size of the document. This means you&lt;br /&gt;
can not move the cursor beyond the last line of the document and the cursor is&lt;br /&gt;
moved to the next line if you press &#039;&#039;crsr-right&#039;&#039; at the end of the current&lt;br /&gt;
line. The current line and column number are shown on the bottom left of the&lt;br /&gt;
screen.&lt;br /&gt;
&lt;br /&gt;
As one would expect pressing &#039;&#039;crsr up&#039;&#039; or &#039;&#039;crsr down&#039;&#039; at the top or the bottom&lt;br /&gt;
of the screen scrolls the contents of the currently visible section up or down.&lt;br /&gt;
&lt;br /&gt;
When moving the cursor vertically moreorless attempts to keep the column number&lt;br /&gt;
constant. This may not be possible if the line above or below the current line&lt;br /&gt;
has fewer characters than the current line but moreorless remembers this column&lt;br /&gt;
number and places the cursor on that column again if a line is reached which&lt;br /&gt;
has enough characters. This feature allows to keep the cursor on a certain&lt;br /&gt;
indentation level when navigating the document even if there are lines which&lt;br /&gt;
are shorter than this indentation level.&lt;br /&gt;
&lt;br /&gt;
When pressing &#039;&#039;clr home&#039;&#039; the cursor is placed at the beginning of the current&lt;br /&gt;
line and if you press &#039;&#039;Shift+clr home&#039;&#039; it is moved to the end of the current&lt;br /&gt;
line. &lt;br /&gt;
&lt;br /&gt;
Another possibility to move the cursor is to use &#039;&#039;Ctrl+crsr left&#039;&#039; and&lt;br /&gt;
&#039;&#039;Ctrl+crsr right&#039;&#039;. The commands bound to these keys move the cursor one word to&lt;br /&gt;
the left or the right, where a word is defined to be any string which does not&lt;br /&gt;
contain a space character.&lt;br /&gt;
&lt;br /&gt;
The cursor can be moved a whole screen width up or down by pressing&lt;br /&gt;
&#039;&#039;Foenix+crsr up&#039;&#039; or &#039;&#039;Foenix+crsr down&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Finally the cursor can be moved to a specific line number by pressing&lt;br /&gt;
&#039;&#039;Foenix+g&#039;&#039;. The user is then prompted for a line number and after pressing&lt;br /&gt;
return the cursor is moved to the entered line number in such a way that this&lt;br /&gt;
line appears in the first line on the screen. This command can be aborted by&lt;br /&gt;
pressing return without entering a number or by entering an invalid line&lt;br /&gt;
number.&lt;br /&gt;
&lt;br /&gt;
There are two other commands which do not move the cursor in the document but&lt;br /&gt;
the section of text which is visible on the screen. &#039;&#039;Ctrl+crsr up&#039;&#039; changes the&lt;br /&gt;
view in such a way that the current line is moved one line up in the visible&lt;br /&gt;
section. Correspondingly &#039;&#039;Ctrl+crsr down&#039;&#039; changes the view in such a way that&lt;br /&gt;
the current line is moved one line down. These commands do nothing if changing&lt;br /&gt;
the view would move the current line out of the visible section or if the view&lt;br /&gt;
already displays the first (in case of &#039;&#039;Ctrl+crsr down&#039;&#039;) or the last (in case&lt;br /&gt;
of &#039;&#039;Ctrl+crsr up&#039;&#039;) line of the document.&lt;br /&gt;
&lt;br /&gt;
= Saving a document, restarting and exiting moreorless =&lt;br /&gt;
&lt;br /&gt;
If you want to save your document to SD card or an IEC drive press &#039;&#039;Foenix+s&#039;&#039;.&lt;br /&gt;
If this is the first time you save a new document you are prompted for a file&lt;br /&gt;
name. The input routine is &amp;quot;drive aware&amp;quot;, i.e. if the file name you entered&lt;br /&gt;
starts with 0:, 1: or 2: then the digit is used as the drive number. If you&lt;br /&gt;
want to abort this command simply press return. If the document has been saved&lt;br /&gt;
before or has been loaded at program start &#039;&#039;Foenix+s&#039;&#039; simply saves the document&lt;br /&gt;
without any further interaction by the user using the previously established&lt;br /&gt;
name and drive.&lt;br /&gt;
&lt;br /&gt;
If you want to save a document under a new name press &#039;&#039;Alt+s&#039;&#039;. You will then&lt;br /&gt;
be prompted for a new name. As described above you can abort this command by&lt;br /&gt;
entering an empty string.&lt;br /&gt;
&lt;br /&gt;
moreorless can be exited by pressing &#039;&#039;Alt+x&#039;&#039;. If the document has unsaved&lt;br /&gt;
changes the user is prompted for a confirmation. Please enter a non empty&lt;br /&gt;
string to confirm quitting without saving or an empty string to continue to&lt;br /&gt;
edit the dcocument. The fact that the document has unsaved changes is&lt;br /&gt;
visualized by a &#039;&#039;*&#039;&#039; in the top right corner.&lt;br /&gt;
&lt;br /&gt;
If you want to stop editing a document and load or create a new one you can use&lt;br /&gt;
&#039;&#039;Alt+r&#039;&#039;. If it is detected that the current document has unsaved changes you&lt;br /&gt;
are prompted to confirm that these will be lost by this action in the same&lt;br /&gt;
fashion as described above.&lt;br /&gt;
&lt;br /&gt;
= Features for SuperBASIC programmers =&lt;br /&gt;
&lt;br /&gt;
If you refrain from using goto and gosub moreorless can be used to make creating&lt;br /&gt;
SuperBASIC programs more convenient. The idea is that you write your BASIC&lt;br /&gt;
program and format it to your liking, for instance using proper identation in&lt;br /&gt;
if, while, repeat or other blocks but without using line numbers. moreorless&lt;br /&gt;
then auto generates the line numbers for you when you instruct it to either&lt;br /&gt;
save a BASIC program to disk or to RAM (at location $028000).&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;Alt+b&#039;&#039; can be used to save a version of your document as a BASIC&lt;br /&gt;
program with auto generated line numbers. After issuing the command you are&lt;br /&gt;
prompted for a file name. If you want to abort the command you can enter an&lt;br /&gt;
empty string by simply pressing return.&lt;br /&gt;
&lt;br /&gt;
While you can load and edit the created BASIC program in moreorless it is&lt;br /&gt;
recommended that you treat the document without line numbers as the source code&lt;br /&gt;
of the program and the generated BASIC program as a sort of .exe file which&lt;br /&gt;
can be recreated from the source code at any time.&lt;br /&gt;
&lt;br /&gt;
Another way to create a SuperBASIC program from a document in moreorless is the&lt;br /&gt;
command &#039;&#039;F8&#039;&#039;. When pressing this key moreorless creates an auto generated BASIC&lt;br /&gt;
program in RAM from where it can be &amp;quot;loaded&amp;quot; via the BASIC statement xload or&lt;br /&gt;
started via the statement xgo after moreorless has been exited.&lt;br /&gt;
&lt;br /&gt;
= Using moreorless with a PS/2 keyboard =&lt;br /&gt;
&lt;br /&gt;
This document assumes that you use moreorless on a F256K which has a builtin&lt;br /&gt;
keyboard, but moreorless also runs on the F256 Jr. which has to be used with a&lt;br /&gt;
PS/2 keyboard. If your Foenix is used with a PS/2 keyboard the key bindings&lt;br /&gt;
are subtely different.&lt;br /&gt;
&lt;br /&gt;
The first reason is obvious: A standard keyboard has no Foenix key. The&lt;br /&gt;
solution to this problem is simple: Use the Windows key instead of the Foenix&lt;br /&gt;
key.&lt;br /&gt;
&lt;br /&gt;
Another problem arises with all command keys that require you to press the&lt;br /&gt;
shift key on the F256K but not on a PS/2 keyboard. These are&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;F2&#039;&#039;, i.e. &#039;&#039;Shift+F1&#039;&#039; on F256K but simply &#039;&#039;F2&#039;&#039; on a PS/2 keyboard &lt;br /&gt;
* &#039;&#039;F4&#039;&#039;, i.e. &#039;&#039;Shift+F3&#039;&#039; on F256K but simply &#039;&#039;F4&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;F8&#039;&#039;, i.e. &#039;&#039;Shift+F7&#039;&#039; on F256K but simply &#039;&#039;F8&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;Shift+clr home&#039;&#039; on F256K but simply &#039;&#039;Pos1&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
&lt;br /&gt;
One solution to this problem would be to build a version of moreorless which&lt;br /&gt;
detects if it is running on a Jr. and modifies its key bindings accordingly.&lt;br /&gt;
This would only put F256K users with PS/2 keyboards at a disadvantage. The&lt;br /&gt;
other solution would be to build a version with PS/2 specific key bindings. But&lt;br /&gt;
this would make distribution somewhat confusing.&lt;br /&gt;
&lt;br /&gt;
As a maybe temporary workaround you should use the &#039;&#039;Shift&#039;&#039; key with the above&lt;br /&gt;
key bindings when using a PS/2 keyboard. I.e. you should use &#039;&#039;Shift+F2&#039;&#039;,&lt;br /&gt;
&#039;&#039;Shift+F4&#039;&#039;, &#039;&#039;Shift+F8&#039;&#039; and &#039;&#039;Shift+Pos1&#039;&#039; instead of simply pressing the&lt;br /&gt;
corresponding keys.&lt;br /&gt;
&lt;br /&gt;
= Changing the appearance of moreorless =&lt;br /&gt;
&lt;br /&gt;
When you press &#039;&#039;F4&#039;&#039; you can change the colour scheme used by moreorless by&lt;br /&gt;
cycling through five alternatives:&lt;br /&gt;
&lt;br /&gt;
* White on blue&lt;br /&gt;
* Green on black&lt;br /&gt;
* Black on white&lt;br /&gt;
* White on black&lt;br /&gt;
* Amber on black&lt;br /&gt;
&lt;br /&gt;
Pressing F1 or F2 redraws the whole screen in either 80x60 (F1) or 80x30 (F2)&lt;br /&gt;
text mode and returns the view to the start of the document. You can also use&lt;br /&gt;
these commands to put the screen state management of moreorless in a known good&lt;br /&gt;
state when you are experiencing corresponding problems due to potential bugs in&lt;br /&gt;
the pogram.&lt;br /&gt;
&lt;br /&gt;
= Add indentation =&lt;br /&gt;
&lt;br /&gt;
If you press the &#039;&#039;Tab&#039;&#039; key two spaces are inserted and if you press &#039;&#039;Ctrl+Tab&#039;&#039;&lt;br /&gt;
four spaces are inserted. In many cases it is not neccessary to indent lines&lt;br /&gt;
manually as moreorless supports auto indentation, i.e. if a new line is&lt;br /&gt;
inserted it is indented to the same level as the preceeding line.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting and pasting simple text data = &lt;br /&gt;
&lt;br /&gt;
As a (mental) cost saving measure (for its programmer) moreorless differenti-&lt;br /&gt;
ates between a clipboard for simple text strings and a clipboard for blocks of&lt;br /&gt;
full lines. The clipboard for simple strings can be controlled via the key&lt;br /&gt;
bindings &#039;&#039;Ctrl+c&#039;&#039;, &#039;&#039;Ctrl+x&#039;&#039; and &#039;&#039;Ctrl+v&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
These commands make use of a so called mark which can be set by &#039;&#039;Foenix+space&#039;&#039;&lt;br /&gt;
or &#039;&#039;Foenix+m&#039;&#039;. If a mark is set this is visualized in the top right corner by&lt;br /&gt;
an &#039;&#039;M&#039;&#039; character. A mark is invalidated by any change to the document or at the&lt;br /&gt;
end of an operation which made use of that mark.&lt;br /&gt;
&lt;br /&gt;
In order to copy or cut a simple string you first have to set a mark at the&lt;br /&gt;
first character you want to select. You then move the cursor to the last&lt;br /&gt;
character you want to copy or cut and either press &#039;&#039;Ctrl+c&#039;&#039; or &#039;&#039;Ctrl+x&#039;&#039;. Both&lt;br /&gt;
of these characters have to be in the same line and are part of the selection.&lt;br /&gt;
This allows for copying or cutting a single character.&lt;br /&gt;
&lt;br /&gt;
In lines which are shorter than 80 characters you can move the cursor beyond&lt;br /&gt;
the last character. It has to be noted that this position is not a valid&lt;br /&gt;
position for copying and cutting of simple strings. After setting the mark it&lt;br /&gt;
is possibe to move the cursor either left or right to determine the last&lt;br /&gt;
character of the selection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ctrl+v&#039;&#039; can be used to insert a previously copied or cut text string into&lt;br /&gt;
the current line. It has to be noted that this command will do nothing if the&lt;br /&gt;
string which is currently in the clipboard would make the line longer than 80&lt;br /&gt;
characters.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting, pasting blocks of full lines =&lt;br /&gt;
&lt;br /&gt;
Copying and pasting simple strings is one way to make use of a mark. The second&lt;br /&gt;
way is to cut, copy and paste blocks of full lines. In order to select a block&lt;br /&gt;
of lines you have to set a mark as described above in the first line which you&lt;br /&gt;
want to select. After that you move the cursor to the last line of the block&lt;br /&gt;
which you intend to select and press either &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; to copy or&lt;br /&gt;
cut the block. The block includes the line where the mark has been set and the&lt;br /&gt;
line where &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; was pressed. It is therefore possible to&lt;br /&gt;
select a single line.&lt;br /&gt;
&lt;br /&gt;
In order to paste the previously copied or cut part of the document you have to&lt;br /&gt;
press &#039;&#039;Foenix+v&#039;&#039; at a position of your choice. The current contents of the&lt;br /&gt;
clipboard is then inserted after the current line.&lt;br /&gt;
&lt;br /&gt;
In contrast to the selection of simple strings any column in a line is valid&lt;br /&gt;
when copying or cutting blocks. It is not allowed to cut all lines in a&lt;br /&gt;
document as a document has to contain at least one line even if that line has a&lt;br /&gt;
length of zero characters.&lt;br /&gt;
&lt;br /&gt;
When you copy a block the selected part of the document is copied, which uses&lt;br /&gt;
up additional memory. When you cut a part of the document no additional memory&lt;br /&gt;
is used but no memory is freed either even though the corresponding lines have&lt;br /&gt;
vanished from the document. The memory used for storing the clipboard contents&lt;br /&gt;
is freed when the clipboard contents is either replaced by a different block or&lt;br /&gt;
explicitly cleared by pressing &#039;&#039;Alt+k&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When copying or pasting a block it is possible that the additonal memory needed&lt;br /&gt;
exceeds the amount of memory still available. moreoreless detects this&lt;br /&gt;
situation and if it is detected allows you to save the current file contents in&lt;br /&gt;
a file called &#039;&#039;mless~&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Transforming blocks of full lines = &lt;br /&gt;
&lt;br /&gt;
You also can use a mark for selecting a block of full lines which you want to&lt;br /&gt;
transform in some way. moreorless currently implements three types of &lt;br /&gt;
transformations:&lt;br /&gt;
&lt;br /&gt;
* Indent a block by two space characters (Press &#039;&#039;Foenix+Tab&#039;&#039;)&lt;br /&gt;
* Unindent a block by two space characters (Press &#039;&#039;Alt+Tab&#039;&#039;)&lt;br /&gt;
* reformat a block (Press &#039;&#039;Alt+f&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
In order to apply these transformations to a block of full lines you first set&lt;br /&gt;
a mark in one line and then press one of the key combinations shown above on&lt;br /&gt;
another line. After that all lines which are are part of the selection are&lt;br /&gt;
indented one level, unindented a level or transformed to be justified as far as&lt;br /&gt;
is possible on a fixed width text screen using a fixed width font. &lt;br /&gt;
&lt;br /&gt;
The reformat transformation is especially useful for writing texts like this&lt;br /&gt;
one (in contrast to writing source code). It allows to reformat a section in&lt;br /&gt;
such a way that it appears as justified as possible. This simplifies working on&lt;br /&gt;
documents which have been formatted to be justified but have to be changed&lt;br /&gt;
afterwards in such a way that the justification is destroyed. &#039;&#039;Alt+f&#039;&#039; can then&lt;br /&gt;
be used to automatically reformat the document again. Lines created by the&lt;br /&gt;
reformatting transformation are at most 79 characters long.&lt;br /&gt;
&lt;br /&gt;
= Search ... =&lt;br /&gt;
&lt;br /&gt;
In order to search in a document a search string has to be defined. This can be&lt;br /&gt;
done in two ways. Either by pressing &#039;&#039;Foenix+f&#039;&#039; or by pressing &#039;&#039;Foenix+t&#039;&#039;. In&lt;br /&gt;
the first case the user is prompted for a string and in the second case the&lt;br /&gt;
current contents of the simple string clipboard is set as a search string. That&lt;br /&gt;
a search string has been defined is visualized in the bottom right corner by&lt;br /&gt;
the text &#039;&#039;SRCH&#039;&#039;. When &#039;&#039;Foenix+f&#039;&#039; is used to enter a search string then a search&lt;br /&gt;
for this string in forward direction is immediately started after the user has&lt;br /&gt;
entered return. Searching is always performed in a case insensitive fashion.&lt;br /&gt;
&lt;br /&gt;
After setting a search string, pressing &#039;&#039;F3&#039;&#039; searches for the previous&lt;br /&gt;
occurrance of the search string in the text and &#039;&#039;F7&#039;&#039; searches for the next&lt;br /&gt;
occurrance. I.e. &#039;&#039;F3&#039;&#039; searches in backwards direction and &#039;&#039;F7&#039;&#039; in forwards&lt;br /&gt;
direction.&lt;br /&gt;
&lt;br /&gt;
While a search is in progress a * character is shown in the upper left corner.&lt;br /&gt;
If the search string is found then the text view is updated in such a way that&lt;br /&gt;
the line where the string was found is the first line shown and the cursor is&lt;br /&gt;
placed at the beginning of that occurance.&lt;br /&gt;
&lt;br /&gt;
If the search string is not found, then the text view is left unchanged after&lt;br /&gt;
the * character disappears. The search string can be cleared by entering an&lt;br /&gt;
empty string after typing &#039;&#039;Foenix+f&#039;&#039; or by typing &#039;&#039;Foenix+u&#039;&#039;. If the search&lt;br /&gt;
string is cleared the text &#039;&#039;SRCH&#039;&#039; in the bottom right corner disappears.&lt;br /&gt;
&lt;br /&gt;
= ... and replace =&lt;br /&gt;
&lt;br /&gt;
The command bound to &#039;&#039;F5&#039;&#039; first checks if the search string is found at the&lt;br /&gt;
current cursor position and if it is found it replaces it with the value of the&lt;br /&gt;
replace string. The replace string can be set by pressing &#039;&#039;Foenix+r&#039;&#039;. As usual&lt;br /&gt;
this command can be aborted by entering an empty string when prompted. As the&lt;br /&gt;
default replace string is the empty string you should make sure that a proper&lt;br /&gt;
replace string is set before using the &#039;&#039;F5&#039;&#039; command. The command does nothing&lt;br /&gt;
when no search string is set.&lt;br /&gt;
&lt;br /&gt;
To sum it up: In case you want to perform a search and replace operation you&lt;br /&gt;
should first set the search string and after that the replace string. You then&lt;br /&gt;
can then use &#039;&#039;F3&#039;&#039; and &#039;&#039;F7&#039;&#039; to search and if you want to replace a found&lt;br /&gt;
occurrance you press &#039;&#039;F5&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Lines longer than 80 characters =&lt;br /&gt;
&lt;br /&gt;
I have stated above that moreorless will not create lines which are longer than&lt;br /&gt;
80 characters, so why is this section here? The answer is that even though&lt;br /&gt;
moreorless does not allow to create new lines which are longer than 80 characters &lt;br /&gt;
it allows to load documents prepared by other means, maybe on your PC,&lt;br /&gt;
which have lines that are longer than that limit. In fact it can load documents&lt;br /&gt;
which have lines with a maximum length of up to 224 characters.&lt;br /&gt;
&lt;br /&gt;
If you browse such a document lines which are longer than 80 characters are&lt;br /&gt;
visualized by a * after the &#039;&#039;Col xxx&#039;&#039; text in the bottom line. Such lines can&lt;br /&gt;
only be edited in limited ways. To be more precise such lines can be&lt;br /&gt;
reformatted using &#039;&#039;Alt+f&#039;&#039;, they can be split by pressing &#039;&#039;return&#039;&#039; and they can&lt;br /&gt;
be shortened by pressing &#039;&#039;Inst del&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
All other edit operations are not allowed. On top of that search operations&lt;br /&gt;
will not find strings in those parts of the text which are not visible in&lt;br /&gt;
moreorless.&lt;/div&gt;</summary>
		<author><name>91.17.17.231</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=10175</id>
		<title>Moreorless</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=10175"/>
		<updated>2024-12-23T13:38:46Z</updated>

		<summary type="html">&lt;p&gt;91.17.17.231: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is a text viewer and editor for the Foenix F256K and F256 Jr. modern&lt;br /&gt;
retro computers. It was written by Martin Grap (@mgr42 on the Foenix Discord&lt;br /&gt;
server) in 2024. Its source code and prebuilt binaries can be found on my &lt;br /&gt;
[https://github.com/rmsk2/moreorless GitHub] page. Its current version in 2.4.0.&lt;br /&gt;
&lt;br /&gt;
moreorless allows to view and edit files which are much larger than the 64K&lt;br /&gt;
base memory of the Foenix machines, because it dynamically manages all of the&lt;br /&gt;
RAM of the computers. The largest file I have successfully loaded had a size of&lt;br /&gt;
286KB. But be aware that in order to edit files of that size a RAM expansion is&lt;br /&gt;
needed. On an unexpanded machine the largest file I have tested had a size&lt;br /&gt;
of 124KB.&lt;br /&gt;
&lt;br /&gt;
Apart from writing text files like this one, moreorless also offers some&lt;br /&gt;
features for the BASIC programmer: If you refrain from using goto and gosub you&lt;br /&gt;
can create SuperBASIC programs without using the screen editor. moreorless&lt;br /&gt;
allows you to write your programs without line numbers and adds these either&lt;br /&gt;
when you save the program or when you write the program to RAM from where it&lt;br /&gt;
can be loaded by xload or run by xgo.&lt;br /&gt;
&lt;br /&gt;
moreorless can either be used in 80x60 or in 80x30 characters text mode and it&lt;br /&gt;
provides four different colour schemes which in addition to the usual Foenix&lt;br /&gt;
white on blue aim to emulate monochrome monitors of the 80&#039;s and 90&#039;s, i.e.&lt;br /&gt;
green on black, white on black and amber on black. For good measure there is&lt;br /&gt;
also a black on white mode.&lt;br /&gt;
&lt;br /&gt;
moreorless began as a simple text viewer and developed into an editor later.&lt;br /&gt;
The name moreorless has its roots in that time. I also hope that it turned out&lt;br /&gt;
to be a more or less usable editor.&lt;br /&gt;
&lt;br /&gt;
This document (in its original form) has been created using moreorless.&lt;br /&gt;
&lt;br /&gt;
= Starting moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is primarily distributed as a .pgz file (mless.pgz) which can be&lt;br /&gt;
executed from the BASIC screen or from DOS by typing &#039;&#039;/- mless&#039;&#039; after you have&lt;br /&gt;
saved it to the internal SD card. Alternatively it is possible to store&lt;br /&gt;
moreorless in the non volatile flash memory of your Fonix machine. More&lt;br /&gt;
information about how to do that can be found on my github page. In this case&lt;br /&gt;
you can omit the &#039;&#039;-&#039;&#039; from the command, i.e. you can use &#039;&#039;/mless&#039;&#039; to start the&lt;br /&gt;
program from flash.&lt;br /&gt;
&lt;br /&gt;
After starting the program you have to select the drive number(0, 1 or 2),&lt;br /&gt;
which will be used to load and save the current document.&lt;br /&gt;
&lt;br /&gt;
After that you can select the line ending character which is to be used when&lt;br /&gt;
loading or saving a file. The default is a single line feed (LF) character but&lt;br /&gt;
you can change that to a single carriage return (CR) character. In my&lt;br /&gt;
experience there are some SuperBASIC programs which use CR as their line ending&lt;br /&gt;
character. So if a file can not be loaded with LF as a line ending character&lt;br /&gt;
try to use CR and vice versa.&lt;br /&gt;
&lt;br /&gt;
Finally you have to enter the name of a file to load. If you want to create a&lt;br /&gt;
new document, leave the file name empty and simply press return. You will be&lt;br /&gt;
prompted for a file name when you save the new document for the first time.&lt;br /&gt;
&lt;br /&gt;
You can also start moreorless with additional command line parameters. I.e. you&lt;br /&gt;
could do &#039;&#039;/- mless file.txt&#039;&#039; which would then open the file &#039;&#039;file.txt&#039;&#039; on drive&lt;br /&gt;
0 with LF as line ending character. One can also specify a drive number in the&lt;br /&gt;
file name. For instance &#039;&#039;/- mless 1:test.txt&#039;&#039; would load the file &#039;&#039;test.txt&#039;&#039;&lt;br /&gt;
from drive 1. If moreorless is stored in flash memory then the &#039;-&#039; character&lt;br /&gt;
can be omitted. When using CLI parameters the line ending character is always&lt;br /&gt;
the default, i.e. LF.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Issuing commands, entering and deleting characters =&lt;br /&gt;
&lt;br /&gt;
moreorless currently offers 44 commands, which range from simply moving the&lt;br /&gt;
cursor on the screen to stuff like search and replace. All commands are bound&lt;br /&gt;
to certain key combinations and knowing these combinations is unfortunately&lt;br /&gt;
neccessary to use moreorless, but one could say this is in line with the retro&lt;br /&gt;
theme of the Foenix F256 platform ;-). If you press a key which is not bound to&lt;br /&gt;
a command then the character representing this key on the Foenix is printed to&lt;br /&gt;
the screen even if it is a graphics character.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; always delete the character left of the cursor. This&lt;br /&gt;
leads to an edge case in lines with 80 (or more) characters as the last character &lt;br /&gt;
can not be deleted directly using these keys. In lines with 79 characters&lt;br /&gt;
or less the cursor can be placed one column beyond the last character in order&lt;br /&gt;
to make deletion of this character possible.&lt;br /&gt;
&lt;br /&gt;
= Inserting and deleting lines =&lt;br /&gt;
&lt;br /&gt;
In order to insert a new line simply press return. This command splits the&lt;br /&gt;
current line at the column in which return was pressed and creates a new line.&lt;br /&gt;
This line contains the text that was under and to the right of the cursor when&lt;br /&gt;
return was pressed. This command preserves the current indentation level, i.e.&lt;br /&gt;
if the line that is split is indented n characters the new line will also be&lt;br /&gt;
indented to the same level.&lt;br /&gt;
&lt;br /&gt;
A line can be merged with the line above when &#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; is&lt;br /&gt;
pressed in the first column of a line. This command does nothing if the merged&lt;br /&gt;
line would contain more than 80 characters. Due to the merging of two lines the&lt;br /&gt;
overall number of lines in the document decreases, so in essence this command&lt;br /&gt;
can be used to delete one line at a time. Blocks of lines can also be cut from&lt;br /&gt;
the document as explained below.&lt;br /&gt;
&lt;br /&gt;
= Navigation in your document =&lt;br /&gt;
&lt;br /&gt;
When editing text moving the cursor in all four directions is the most basic&lt;br /&gt;
function of an editor. As one would expect these commands are bound to the&lt;br /&gt;
cursor keys. The movement of the cursor in the document is limited by the&lt;br /&gt;
length of the current line and the overall size of the document. This means you&lt;br /&gt;
can not move the cursor beyond the last line of the document and the cursor is&lt;br /&gt;
moved to the next line if you press &#039;&#039;crsr-right&#039;&#039; at the end of the current&lt;br /&gt;
line. The current line and column number are shown on the bottom left of the&lt;br /&gt;
screen.&lt;br /&gt;
&lt;br /&gt;
As one would expect pressing &#039;&#039;crsr up&#039;&#039; or &#039;&#039;crsr down&#039;&#039; at the top or the bottom&lt;br /&gt;
of the screen scrolls the contents of the currently visible section up or down.&lt;br /&gt;
&lt;br /&gt;
When moving the cursor vertically moreorless attempts to keep the column number&lt;br /&gt;
constant. This may not be possible if the line above or below the current line&lt;br /&gt;
has fewer characters than the current line but moreorless remembers this column&lt;br /&gt;
number and places the cursor on that column again if a line is reached which&lt;br /&gt;
has enough characters. This feature allows to keep the cursor on a certain&lt;br /&gt;
indentation level when navigating the document even if there are lines which&lt;br /&gt;
are shorter than this indentation level.&lt;br /&gt;
&lt;br /&gt;
When pressing &#039;&#039;clr home&#039;&#039; the cursor is placed at the beginning of the current&lt;br /&gt;
line and if you press &#039;&#039;Shift+clr home&#039;&#039; it is moved to the end of the current&lt;br /&gt;
line. &lt;br /&gt;
&lt;br /&gt;
Another possibility to move the cursor is to use &#039;&#039;Ctrl+crsr left&#039;&#039; and&lt;br /&gt;
&#039;&#039;Ctrl+crsr right&#039;&#039;. The commands bound to these keys move the cursor one word to&lt;br /&gt;
the left or the right, where a word is defined to be any string which does not&lt;br /&gt;
contain a space character.&lt;br /&gt;
&lt;br /&gt;
The cursor can be moved a whole screen width up or down by pressing&lt;br /&gt;
&#039;&#039;Foenix+crsr up&#039;&#039; or &#039;&#039;Foenix+crsr down&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Finally the cursor can be moved to a specific line number by pressing&lt;br /&gt;
&#039;&#039;Foenix+g&#039;&#039;. The user is then prompted for a line number and after pressing&lt;br /&gt;
return the cursor is moved to the entered line number in such a way that this&lt;br /&gt;
line appears in the first line on the screen. This command can be aborted by&lt;br /&gt;
pressing return without entering a number or by entering an invalid line&lt;br /&gt;
number.&lt;br /&gt;
&lt;br /&gt;
There are two other commands which do not move the cursor in the document but&lt;br /&gt;
the section of text which is visible on the screen. &#039;&#039;Ctrl+crsr up&#039;&#039; changes the&lt;br /&gt;
view in such a way that the current line is moved one line up in the visible&lt;br /&gt;
section. Correspondingly &#039;&#039;Ctrl+crsr down&#039;&#039; changes the view in such a way that&lt;br /&gt;
the current line is moved one line down. These commands do nothing if changing&lt;br /&gt;
the view would move the current line out of the visible section or if the view&lt;br /&gt;
already displays the first (in case of &#039;&#039;Ctrl+crsr down&#039;&#039;) or the last (in case&lt;br /&gt;
of &#039;&#039;Ctrl+crsr up&#039;&#039;) line of the document.&lt;br /&gt;
&lt;br /&gt;
= Saving a document, restarting and exiting moreorless =&lt;br /&gt;
&lt;br /&gt;
If you want to save your document to SD card or an IEC drive press &#039;&#039;Foenix+s&#039;&#039;.&lt;br /&gt;
If this is the first time you save a new document you are prompted for a file&lt;br /&gt;
name. The input routine is &amp;quot;drive aware&amp;quot;, i.e. if the file name you entered&lt;br /&gt;
starts with 0:, 1: or 2: then the digit is used as the drive number. If you&lt;br /&gt;
want to abort this command simply press return. If the document has been saved&lt;br /&gt;
before or has been loaded at program start &#039;&#039;Foenix+s&#039;&#039; simply saves the document&lt;br /&gt;
without any further interaction by the user using the previously established&lt;br /&gt;
name and drive.&lt;br /&gt;
&lt;br /&gt;
If you want to save a document under a new name press &#039;&#039;Alt+s&#039;&#039;. You will then&lt;br /&gt;
be prompted for a new name. As described above you can abort this command by&lt;br /&gt;
entering an empty string.&lt;br /&gt;
&lt;br /&gt;
moreorless can be exited by pressing &#039;&#039;Alt+x&#039;&#039;. If the document has unsaved&lt;br /&gt;
changes the user is prompted for a confirmation. Please enter a non empty&lt;br /&gt;
string to confirm quitting without saving or an empty string to continue to&lt;br /&gt;
edit the dcocument. The fact that the document has unsaved changes is&lt;br /&gt;
visualized by a &#039;&#039;*&#039;&#039; in the top right corner.&lt;br /&gt;
&lt;br /&gt;
If you want to stop editing a document and load or create a new one you can use&lt;br /&gt;
&#039;&#039;Alt+r&#039;&#039;. If it is detected that the current document has unsaved changes you&lt;br /&gt;
are prompted to confirm that these will be lost by this action in the same&lt;br /&gt;
fashion as described above.&lt;br /&gt;
&lt;br /&gt;
= Features for SuperBASIC programmers =&lt;br /&gt;
&lt;br /&gt;
If you refrain from using goto and gosub moreorless can be used to make creating&lt;br /&gt;
SuperBASIC programs more convenient. The idea is that you write your BASIC&lt;br /&gt;
program and format it to your liking, for instance using proper identation in&lt;br /&gt;
if, while, repeat or other blocks but without using line numbers. moreorless&lt;br /&gt;
then auto generates the line numbers for you when you instruct it to either&lt;br /&gt;
save a BASIC program to disk or to RAM (at location $028000).&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;Alt+b&#039;&#039; can be used to save a version of your document as a BASIC&lt;br /&gt;
program with auto generated line numbers. After issuing the command you are&lt;br /&gt;
prompted for a file name. If you want to abort the command you can enter an&lt;br /&gt;
empty string by simply pressing return.&lt;br /&gt;
&lt;br /&gt;
While you can load and edit the created BASIC program in moreorless it is&lt;br /&gt;
recommended that you treat the document without line numbers as the source code&lt;br /&gt;
of the program and the generated BASIC program as a sort of .exe file which&lt;br /&gt;
can be recreated from the source code at any time.&lt;br /&gt;
&lt;br /&gt;
Another way to create a SuperBASIC program from a document in moreorless is the&lt;br /&gt;
command &#039;&#039;F8&#039;&#039;. When pressing this key moreorless creates an auto generated BASIC&lt;br /&gt;
program in RAM from where it can be &amp;quot;loaded&amp;quot; via the BASIC statement xload or&lt;br /&gt;
started via the statement xgo after moreorless has been exited.&lt;br /&gt;
&lt;br /&gt;
= Using moreorless with a PS/2 keyboard =&lt;br /&gt;
&lt;br /&gt;
This document assumes that you use moreorless on a F256K which has a builtin&lt;br /&gt;
keyboard, but moreorless also runs on the F256 Jr. which has to be used with a&lt;br /&gt;
PS/2 keyboard. If your Foenix is used with a PS/2 keyboard the key bindings&lt;br /&gt;
are subtely different.&lt;br /&gt;
&lt;br /&gt;
The first reason is obvious: A standard keyboard has no Foenix key. The&lt;br /&gt;
solution to this problem is simple: Use the Windows key instead of the Foenix&lt;br /&gt;
key.&lt;br /&gt;
&lt;br /&gt;
Another problem arises with all command keys that require you to press the&lt;br /&gt;
shift key on the F256K but not on a PS/2 keyboard. These are&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;F2&#039;&#039;, i.e. &#039;&#039;Shift+F1&#039;&#039; on F256K but simply &#039;&#039;F2&#039;&#039; on a PS/2 keyboard &lt;br /&gt;
* &#039;&#039;F4&#039;&#039;, i.e. &#039;&#039;Shift+F3&#039;&#039; on F256K but simply &#039;&#039;F4&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;F8&#039;&#039;, i.e. &#039;&#039;Shift+F7&#039;&#039; on F256K but simply &#039;&#039;F8&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;Shift+clr home&#039;&#039; on F256K but simply &#039;&#039;Pos1&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
&lt;br /&gt;
One solution to this problem would be to build a version of moreorless which&lt;br /&gt;
detects if it is running on a Jr. and modifies its key bindings accordingly.&lt;br /&gt;
This would only put F256K users with PS/2 keyboards at a disadvantage. The&lt;br /&gt;
other solution would be to build a version with PS/2 specific key bindings. But&lt;br /&gt;
this would make distribution somewhat confusing.&lt;br /&gt;
&lt;br /&gt;
As a maybe temporary workaround you should use the &#039;&#039;Shift&#039;&#039; key with the above&lt;br /&gt;
key bindings when using a PS/2 keyboard. I.e. you should use &#039;&#039;Shift+F2&#039;&#039;,&lt;br /&gt;
&#039;&#039;Shift+F4&#039;&#039;, &#039;&#039;Shift+F8&#039;&#039; and &#039;&#039;Shift+Pos1&#039;&#039; instead of simply pressing the&lt;br /&gt;
corresponding keys.&lt;br /&gt;
&lt;br /&gt;
= Changing the appearance of moreorless =&lt;br /&gt;
&lt;br /&gt;
When you press &#039;&#039;F4&#039;&#039; you can change the colour scheme used by moreorless by&lt;br /&gt;
cycling through five alternatives:&lt;br /&gt;
&lt;br /&gt;
* White on blue&lt;br /&gt;
* Green on black&lt;br /&gt;
* Black on white&lt;br /&gt;
* White on black&lt;br /&gt;
* Amber on black&lt;br /&gt;
&lt;br /&gt;
Pressing F1 or F2 redraws the whole screen in either 80x60 (F1) or 80x30 (F2)&lt;br /&gt;
text mode and returns the view to the start of the document. You can also use&lt;br /&gt;
these commands to put the screen state management of moreorless in a known good&lt;br /&gt;
state when you are experiencing corresponding problems due to potential bugs in&lt;br /&gt;
the pogram.&lt;br /&gt;
&lt;br /&gt;
= Add indentation =&lt;br /&gt;
&lt;br /&gt;
If you press the &#039;&#039;Tab&#039;&#039; key two spaces are inserted and if you press &#039;&#039;Ctrl+Tab&#039;&#039;&lt;br /&gt;
four spaces are inserted. In many cases it is not neccessary to indent lines&lt;br /&gt;
manually as moreorless supports auto indentation, i.e. if a new line is&lt;br /&gt;
inserted it is indented to the same level as the preceeding line.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting and pasting simple text data = &lt;br /&gt;
&lt;br /&gt;
As a (mental) cost saving measure (for its programmer) moreorless differenti-&lt;br /&gt;
ates between a clipboard for simple text strings and a clipboard for blocks of&lt;br /&gt;
full lines. The clipboard for simple strings can be controlled via the key&lt;br /&gt;
bindings &#039;&#039;Ctrl+c&#039;&#039;, &#039;&#039;Ctrl+x&#039;&#039; and &#039;&#039;Ctrl+v&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
These commands make use of a so called mark which can be set by &#039;&#039;Foenix+space&#039;&#039;&lt;br /&gt;
or &#039;&#039;Foenix+m&#039;&#039;. If a mark is set this is visualized in the top right corner by&lt;br /&gt;
an &#039;&#039;M&#039;&#039; character. A mark is invalidated by any change to the document or at the&lt;br /&gt;
end of an operation which made use of that mark.&lt;br /&gt;
&lt;br /&gt;
In order to copy or cut a simple string you first have to set a mark at the&lt;br /&gt;
first character you want to select. You then move the cursor to the last&lt;br /&gt;
character you want to copy or cut and either press &#039;&#039;Ctrl+c&#039;&#039; or &#039;&#039;Ctrl+x&#039;&#039;. Both&lt;br /&gt;
of these characters have to be in the same line and are part of the selection.&lt;br /&gt;
This allows for copying or cutting a single character.&lt;br /&gt;
&lt;br /&gt;
In lines which are shorter than 80 characters you can move the cursor beyond&lt;br /&gt;
the last character. It has to be noted that this position is not a valid&lt;br /&gt;
position for copying and cutting of simple strings. After setting the mark it&lt;br /&gt;
is possibe to move the cursor either left or right to determine the last&lt;br /&gt;
character of the selection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ctrl+v&#039;&#039; can be used to insert a previously copied or cut text string into&lt;br /&gt;
the current line. It has to be noted that this command will do nothing if the&lt;br /&gt;
string which is currently in the clipboard would make the line longer than 80&lt;br /&gt;
characters.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting, pasting blocks of full lines =&lt;br /&gt;
&lt;br /&gt;
Copying and pasting simple strings is one way to make use of a mark. The second&lt;br /&gt;
way is to cut, copy and paste blocks of full lines. In order to select a block&lt;br /&gt;
of lines you have to set a mark as described above in the first line which you&lt;br /&gt;
want to select. After that you move the cursor to the last line of the block&lt;br /&gt;
which you intend to select and press either &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; to copy or&lt;br /&gt;
cut the block. The block includes the line where the mark has been set and the&lt;br /&gt;
line where &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; was pressed. It is therefore possible to&lt;br /&gt;
select a single line.&lt;br /&gt;
&lt;br /&gt;
In order to paste the previously copied or cut part of the document you have to&lt;br /&gt;
press &#039;&#039;Foenix+v&#039;&#039; at a position of your choice. The current contents of the&lt;br /&gt;
clipboard is then inserted after the current line.&lt;br /&gt;
&lt;br /&gt;
In contrast to the selection of simple strings any column in a line is valid&lt;br /&gt;
when copying or cutting blocks. It is not allowed to cut all lines in a&lt;br /&gt;
document as a document has to contain at least one line even if that line has a&lt;br /&gt;
length of zero characters.&lt;br /&gt;
&lt;br /&gt;
When you copy a block the selected part of the document is copied, which uses&lt;br /&gt;
up additional memory. When you cut a part of the document no additional memory&lt;br /&gt;
is used but no memory is freed either even though the corresponding lines have&lt;br /&gt;
vanished from the document. The memory used for storing the clipboard contents&lt;br /&gt;
is freed when the clipboard contents is either replaced by a different block or&lt;br /&gt;
explicitly cleared by pressing &#039;&#039;Alt+k&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When copying or pasting a block it is possible that the additonal memory needed&lt;br /&gt;
exceeds the amount of memory still available. moreoreless detects this&lt;br /&gt;
situation and if it is detected allows you to save the current file contents in&lt;br /&gt;
a file called &#039;&#039;mless~&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Transforming blocks of full lines = &lt;br /&gt;
&lt;br /&gt;
You also can use a mark for selecting a block of full lines which you want to&lt;br /&gt;
transform in some way. moreorless currently implements three types of &lt;br /&gt;
transformations:&lt;br /&gt;
&lt;br /&gt;
* Indent a block by two space characters (Press &#039;&#039;Foenix+Tab&#039;&#039;)&lt;br /&gt;
* Unindent a block by two space characters (Press &#039;&#039;Alt+Tab&#039;&#039;)&lt;br /&gt;
* reformat a block (Press &#039;&#039;Alt+f&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
In order to apply these transformations to a block of full lines you first set&lt;br /&gt;
a mark in one line and then press one of the key combinations shown above on&lt;br /&gt;
another line. After that all lines which are are part of the selection are&lt;br /&gt;
indented one level, unindented a level or transformed to be justified as far as&lt;br /&gt;
is possible on a fixed width text screen using a fixed width font. &lt;br /&gt;
&lt;br /&gt;
The reformat transformation is especially useful for writing texts like this&lt;br /&gt;
one (in contrast to writing source code). It allows to reformat a section in&lt;br /&gt;
such a way that it appears as justified as possible. This simplifies working on&lt;br /&gt;
documents which have been formatted to be justified but have to be changed&lt;br /&gt;
afterwards in such a way that the justification is destroyed. &#039;&#039;Alt+f&#039;&#039; can then&lt;br /&gt;
be used to automatically reformat the document again. Lines created by the&lt;br /&gt;
reformatting transformation are at most 79 characters long.&lt;br /&gt;
&lt;br /&gt;
= Search ... =&lt;br /&gt;
&lt;br /&gt;
In order to search in a document a search string has to be defined. This can be&lt;br /&gt;
done in two ways. Either by pressing &#039;&#039;Foenix+f&#039;&#039; or by pressing &#039;&#039;Foenix+t&#039;&#039;. In&lt;br /&gt;
the first case the user is prompted for a string and in the second case the&lt;br /&gt;
current contents of the simple string clipboard is set as a search string. That&lt;br /&gt;
a search string has been defined is visualized in the bottom right corner by&lt;br /&gt;
the text &#039;&#039;SRCH&#039;&#039;. When &#039;&#039;Foenix+f&#039;&#039; is used to enter a search string then a search&lt;br /&gt;
for this string in forward direction is immediately started after the user has&lt;br /&gt;
entered return. Searching is always performed in a case insensitive fashion.&lt;br /&gt;
&lt;br /&gt;
After setting a search string, pressing &#039;&#039;F3&#039;&#039; searches for the previous&lt;br /&gt;
occurrance of the search string in the text and &#039;&#039;F7&#039;&#039; searches for the next&lt;br /&gt;
occurrance. I.e. &#039;&#039;F3&#039;&#039; searches in backwards direction and &#039;&#039;F7&#039;&#039; in forwards&lt;br /&gt;
direction.&lt;br /&gt;
&lt;br /&gt;
While a search is in progress a * character is shown in the upper left corner.&lt;br /&gt;
If the search string is found then the text view is updated in such a way that&lt;br /&gt;
the line where the string was found is the first line shown and the cursor is&lt;br /&gt;
placed at the beginning of that occurance.&lt;br /&gt;
&lt;br /&gt;
If the search string is not found, then the text view is left unchanged after&lt;br /&gt;
the * character disappears. The search string can be cleared by entering an&lt;br /&gt;
empty string after typing &#039;&#039;Foenix+f&#039;&#039; or by typing &#039;&#039;Foenix+u&#039;&#039;. If the search&lt;br /&gt;
string is cleared the text &#039;&#039;SRCH&#039;&#039; in the bottom right corner disappears.&lt;br /&gt;
&lt;br /&gt;
= ... and replace =&lt;br /&gt;
&lt;br /&gt;
The command bound to &#039;&#039;F5&#039;&#039; first checks if the search string is found at the&lt;br /&gt;
current cursor position and if it is found it replaces it with the value of the&lt;br /&gt;
replace string. The replace string can be set by pressing &#039;&#039;Foenix+r&#039;&#039;. As usual&lt;br /&gt;
this command can be aborted by entering an empty string when prompted. As the&lt;br /&gt;
default replace string is the empty string you should make sure that a proper&lt;br /&gt;
replace string is set before using the &#039;&#039;F5&#039;&#039; command. The command does nothing&lt;br /&gt;
when no search string is set.&lt;br /&gt;
&lt;br /&gt;
To sum it up: In case you want to perform a search and replace operation you&lt;br /&gt;
should first set the search string and after that the replace string. You then&lt;br /&gt;
can then use &#039;&#039;F3&#039;&#039; and &#039;&#039;F7&#039;&#039; to search and if you want to replace a found&lt;br /&gt;
occurrance you press &#039;&#039;F5&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Lines longer than 80 characters =&lt;br /&gt;
&lt;br /&gt;
I have stated above that moreorless will not create lines which are longer than&lt;br /&gt;
80 characters, so why is this section here? The answer is that even though&lt;br /&gt;
moreorless does not allow to create new lines which are longer than 80 characters &lt;br /&gt;
it allows to load documents prepared by other means, maybe on your PC,&lt;br /&gt;
which have lines that are longer than that limit. In fact it can load documents&lt;br /&gt;
which have lines with a maximum length of up to 224 characters.&lt;br /&gt;
&lt;br /&gt;
If you browse such a document lines which are longer than 80 characters are&lt;br /&gt;
visualized by a * after the &#039;&#039;Col xxx&#039;&#039; text in the bottom line. Such lines can&lt;br /&gt;
only be edited in limited ways. To be more precise such lines can be&lt;br /&gt;
reformatted using &#039;&#039;Alt+f&#039;&#039;, they can be split by pressing &#039;&#039;return&#039;&#039; and they can&lt;br /&gt;
be shortened by pressing &#039;&#039;Inst del&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
All other edit operations are not allowed. On top of that search operations&lt;br /&gt;
will not find strings in those parts of the text which are not visible in&lt;br /&gt;
moreorless.&lt;/div&gt;</summary>
		<author><name>91.17.17.231</name></author>
	</entry>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=3782</id>
		<title>Moreorless</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Moreorless&amp;diff=3782"/>
		<updated>2024-12-22T12:31:13Z</updated>

		<summary type="html">&lt;p&gt;91.17.17.231: Add changes for version 2.4.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is a text viewer and editor for the Foenix F256K and F256 Jr. modern&lt;br /&gt;
retro computers. It was written by Martin Grap (@mgr42 on the Foenix Discord&lt;br /&gt;
server) in 2024. Its source code and prebuilt binaries can be found on my &lt;br /&gt;
[https://github.com/rmsk2/moreorless GitHub] page. Its current version in 2.4.0.&lt;br /&gt;
&lt;br /&gt;
moreorless allows to view and edit files which are much larger than the 64K&lt;br /&gt;
base memory of the Foenix machines, because it dynamically manages all of the&lt;br /&gt;
RAM of the computers. The largest file I have successfully loaded had a size of&lt;br /&gt;
286KB. But be aware that in order to edit files of that size a RAM expansion is&lt;br /&gt;
needed. On an unexpanded machine the largest file I have tested had a size&lt;br /&gt;
of 124KB.&lt;br /&gt;
&lt;br /&gt;
Apart from writing text files like this one, moreorless also offers some&lt;br /&gt;
features for the BASIC programmer: If you refrain from using goto and gosub you&lt;br /&gt;
can create SuperBASIC programs without using the screen editor. moreorless&lt;br /&gt;
allows you to write your programs without line numbers and adds these either&lt;br /&gt;
when you save the program or when you write the program to RAM from where it&lt;br /&gt;
can be loaded by xload or run by xgo.&lt;br /&gt;
&lt;br /&gt;
moreorless can either be used in 80x60 or in 80x30 characters text mode and it&lt;br /&gt;
provides four different colour schemes which in addition to the usual Foenix&lt;br /&gt;
white on blue aim to emulate monochrome monitors of the 80&#039;s and 90&#039;s, i.e.&lt;br /&gt;
green on black, white on black and amber on black. For good measure there is&lt;br /&gt;
also a black on white mode.&lt;br /&gt;
&lt;br /&gt;
moreorless began as a simple text viewer and developed into an editor later.&lt;br /&gt;
The name moreorless has its roots in that time. I also hope that it turned out&lt;br /&gt;
to be a more or less usable editor.&lt;br /&gt;
&lt;br /&gt;
This document (in its original form) has been created using moreorless.&lt;br /&gt;
&lt;br /&gt;
= Starting moreorless =&lt;br /&gt;
&lt;br /&gt;
moreorless is primarily distributed as a .pgz file (mless.pgz) which can be&lt;br /&gt;
executed from the BASIC screen or from DOS by typing &#039;&#039;/- mless&#039;&#039; after you have&lt;br /&gt;
saved it to the internal SD card. Alternatively it is possible to store&lt;br /&gt;
moreorless in the non volatile flash memory of your Fonix machine. More&lt;br /&gt;
information about how to do that can be found on my github page. In this case&lt;br /&gt;
you can omit the &#039;&#039;-&#039;&#039; from the command, i.e. you can use &#039;&#039;/mless&#039;&#039; to start the&lt;br /&gt;
program from flash.&lt;br /&gt;
&lt;br /&gt;
After starting the program you have to select the drive number(0, 1 or 2),&lt;br /&gt;
which will be used to load and save the current document.&lt;br /&gt;
&lt;br /&gt;
After that you can select the line ending character which is to be used when&lt;br /&gt;
loading or saving a file. The default is a single line feed (LF) character but&lt;br /&gt;
you can change that to a single carriage return (CR) character. In my&lt;br /&gt;
experience there are some SuperBASIC programs which use CR as their line ending&lt;br /&gt;
character. So if a file can not be loaded with LF as a line ending character&lt;br /&gt;
try to use CR and vice versa.&lt;br /&gt;
&lt;br /&gt;
Finally you have to enter the name of a file to load. If you want to create a&lt;br /&gt;
new document, leave the file name empty and simply press return. You will be&lt;br /&gt;
prompted for a file name when you save the new document for the first time.&lt;br /&gt;
&lt;br /&gt;
= Issuing commands, entering and deleting characters =&lt;br /&gt;
&lt;br /&gt;
moreorless currently offers 44 commands, which range from simply moving the&lt;br /&gt;
cursor on the screen to stuff like search and replace. All commands are bound&lt;br /&gt;
to certain key combinations and knowing these combinations is unfortunately&lt;br /&gt;
neccessary to use moreorless, but one could say this is in line with the retro&lt;br /&gt;
theme of the Foenix F256 platform ;-). If you press a key which is not bound to&lt;br /&gt;
a command then the character representing this key on the Foenix is printed to&lt;br /&gt;
the screen even if it is a graphics character.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; always delete the character left of the cursor. This&lt;br /&gt;
leads to an edge case in lines with 80 (or more) characters as the last character &lt;br /&gt;
can not be deleted directly using these keys. In lines with 79 characters&lt;br /&gt;
or less the cursor can be placed one column beyond the last character in order&lt;br /&gt;
to make deletion of this character possible.&lt;br /&gt;
&lt;br /&gt;
= Inserting and deleting lines =&lt;br /&gt;
&lt;br /&gt;
In order to insert a new line simply press return. This command splits the&lt;br /&gt;
current line at the column in which return was pressed and creates a new line.&lt;br /&gt;
This line contains the text that was under and to the right of the cursor when&lt;br /&gt;
return was pressed. This command preserves the current indentation level, i.e.&lt;br /&gt;
if the line that is split is indented n characters the new line will also be&lt;br /&gt;
indented to the same level.&lt;br /&gt;
&lt;br /&gt;
A line can be merged with the line above when &#039;&#039;inst del&#039;&#039; or &#039;&#039;left arrow&#039;&#039; is&lt;br /&gt;
pressed in the first column of a line. This command does nothing if the merged&lt;br /&gt;
line would contain more than 80 characters. Due to the merging of two lines the&lt;br /&gt;
overall number of lines in the document decreases, so in essence this command&lt;br /&gt;
can be used to delete one line at a time. Blocks of lines can also be cut from&lt;br /&gt;
the document as explained below.&lt;br /&gt;
&lt;br /&gt;
= Navigation in your document =&lt;br /&gt;
&lt;br /&gt;
When editing text moving the cursor in all four directions is the most basic&lt;br /&gt;
function of an editor. As one would expect these commands are bound to the&lt;br /&gt;
cursor keys. The movement of the cursor in the document is limited by the&lt;br /&gt;
length of the current line and the overall size of the document. This means you&lt;br /&gt;
can not move the cursor beyond the last line of the document and the cursor is&lt;br /&gt;
moved to the next line if you press &#039;&#039;crsr-right&#039;&#039; at the end of the current&lt;br /&gt;
line. The current line and column number are shown on the bottom left of the&lt;br /&gt;
screen.&lt;br /&gt;
&lt;br /&gt;
As one would expect pressing &#039;&#039;crsr up&#039;&#039; or &#039;&#039;crsr down&#039;&#039; at the top or the bottom&lt;br /&gt;
of the screen scrolls the contents of the currently visible section up or down.&lt;br /&gt;
&lt;br /&gt;
When moving the cursor vertically moreorless attempts to keep the column number&lt;br /&gt;
constant. This may not be possible if the line above or below the current line&lt;br /&gt;
has fewer characters than the current line but moreorless remembers this column&lt;br /&gt;
number and places the cursor on that column again if a line is reached which&lt;br /&gt;
has enough characters. This feature allows to keep the cursor on a certain&lt;br /&gt;
indentation level when navigating the document even if there are lines which&lt;br /&gt;
are shorter than this indentation level.&lt;br /&gt;
&lt;br /&gt;
When pressing &#039;&#039;clr home&#039;&#039; the cursor is placed at the beginning of the current&lt;br /&gt;
line and if you press &#039;&#039;Shift+clr home&#039;&#039; it is moved to the end of the current&lt;br /&gt;
line. &lt;br /&gt;
&lt;br /&gt;
Another possibility to move the cursor is to use &#039;&#039;Ctrl+crsr left&#039;&#039; and&lt;br /&gt;
&#039;&#039;Ctrl+crsr right&#039;&#039;. The commands bound to these keys move the cursor one word to&lt;br /&gt;
the left or the right, where a word is defined to be any string which does not&lt;br /&gt;
contain a space character.&lt;br /&gt;
&lt;br /&gt;
The cursor can be moved a whole screen width up or down by pressing&lt;br /&gt;
&#039;&#039;Foenix+crsr up&#039;&#039; or &#039;&#039;Foenix+crsr down&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Finally the cursor can be moved to a specific line number by pressing&lt;br /&gt;
&#039;&#039;Foenix+g&#039;&#039;. The user is then prompted for a line number and after pressing&lt;br /&gt;
return the cursor is moved to the entered line number in such a way that this&lt;br /&gt;
line appears in the first line on the screen. This command can be aborted by&lt;br /&gt;
pressing return without entering a number or by entering an invalid line&lt;br /&gt;
number.&lt;br /&gt;
&lt;br /&gt;
There are two other commands which do not move the cursor in the document but&lt;br /&gt;
the section of text which is visible on the screen. &#039;&#039;Ctrl+crsr up&#039;&#039; changes the&lt;br /&gt;
view in such a way that the current line is moved one line up in the visible&lt;br /&gt;
section. Correspondingly &#039;&#039;Ctrl+crsr down&#039;&#039; changes the view in such a way that&lt;br /&gt;
the current line is moved one line down. These commands do nothing if changing&lt;br /&gt;
the view would move the current line out of the visible section or if the view&lt;br /&gt;
already displays the first (in case of &#039;&#039;Ctrl+crsr down&#039;&#039;) or the last (in case&lt;br /&gt;
of &#039;&#039;Ctrl+crsr up&#039;&#039;) line of the document.&lt;br /&gt;
&lt;br /&gt;
= Saving a document, restarting and exiting moreorless =&lt;br /&gt;
&lt;br /&gt;
If you want to save your document to SD card or an IEC drive press &#039;&#039;Foenix+s&#039;&#039;.&lt;br /&gt;
If this is the first time you save a new document you are prompted for a file&lt;br /&gt;
name. The input routine is &amp;quot;drive aware&amp;quot;, i.e. if the file name you entered&lt;br /&gt;
starts with 0:, 1: or 2: then the digit is used as the drive number. If you&lt;br /&gt;
want to abort this command simply press return. If the document has been saved&lt;br /&gt;
before or has been loaded at program start &#039;&#039;Foenix+s&#039;&#039; simply saves the document&lt;br /&gt;
without any further interaction by the user using the previously established&lt;br /&gt;
name and drive.&lt;br /&gt;
&lt;br /&gt;
If you want to save a document under a new name press &#039;&#039;Alt+s&#039;&#039;. You will then&lt;br /&gt;
be prompted for a new name. As described above you can abort this command by&lt;br /&gt;
entering an empty string.&lt;br /&gt;
&lt;br /&gt;
moreorless can be exited by pressing &#039;&#039;Alt+x&#039;&#039;. If the document has unsaved&lt;br /&gt;
changes the user is prompted for a confirmation. Please enter a non empty&lt;br /&gt;
string to confirm quitting without saving or an empty string to continue to&lt;br /&gt;
edit the dcocument. The fact that the document has unsaved changes is&lt;br /&gt;
visualized by a &#039;&#039;*&#039;&#039; in the top right corner.&lt;br /&gt;
&lt;br /&gt;
If you want to stop editing a document and load or create a new one you can use&lt;br /&gt;
&#039;&#039;Alt+r&#039;&#039;. If it is detected that the current document has unsaved changes you&lt;br /&gt;
are prompted to confirm that these will be lost by this action in the same&lt;br /&gt;
fashion as described above.&lt;br /&gt;
&lt;br /&gt;
= Features for SuperBASIC programmers =&lt;br /&gt;
&lt;br /&gt;
If you refrain from using goto and gosub moreorless can be used to make creating&lt;br /&gt;
SuperBASIC programs more convenient. The idea is that you write your BASIC&lt;br /&gt;
program and format it to your liking, for instance using proper identation in&lt;br /&gt;
if, while, repeat or other blocks but without using line numbers. moreorless&lt;br /&gt;
then auto generates the line numbers for you when you instruct it to either&lt;br /&gt;
save a BASIC program to disk or to RAM (at location $028000).&lt;br /&gt;
&lt;br /&gt;
The command &#039;&#039;Alt+b&#039;&#039; can be used to save a version of your document as a BASIC&lt;br /&gt;
program with auto generated line numbers. After issuing the command you are&lt;br /&gt;
prompted for a file name. If you want to abort the command you can enter an&lt;br /&gt;
empty string by simply pressing return.&lt;br /&gt;
&lt;br /&gt;
While you can load and edit the created BASIC program in moreorless it is&lt;br /&gt;
recommended that you treat the document without line numbers as the source code&lt;br /&gt;
of the program and the generated BASIC program as a sort of .exe file which&lt;br /&gt;
can be recreated from the source code at any time.&lt;br /&gt;
&lt;br /&gt;
Another way to create a SuperBASIC program from a document in moreorless is the&lt;br /&gt;
command &#039;&#039;F8&#039;&#039;. When pressing this key moreorless creates an auto generated BASIC&lt;br /&gt;
program in RAM from where it can be &amp;quot;loaded&amp;quot; via the BASIC statement xload or&lt;br /&gt;
started via the statement xgo after moreorless has been exited.&lt;br /&gt;
&lt;br /&gt;
= Using moreorless with a PS/2 keyboard =&lt;br /&gt;
&lt;br /&gt;
This document assumes that you use moreorless on a F256K which has a builtin&lt;br /&gt;
keyboard, but moreorless also runs on the F256 Jr. which has to be used with a&lt;br /&gt;
PS/2 keyboard. If your Foenix is used with a PS/2 keyboard the key bindings&lt;br /&gt;
are subtely different.&lt;br /&gt;
&lt;br /&gt;
The first reason is obvious: A standard keyboard has no Foenix key. The&lt;br /&gt;
solution to this problem is simple: Use the Windows key instead of the Foenix&lt;br /&gt;
key.&lt;br /&gt;
&lt;br /&gt;
Another problem arises with all command keys that require you to press the&lt;br /&gt;
shift key on the F256K but not on a PS/2 keyboard. These are&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;F2&#039;&#039;, i.e. &#039;&#039;Shift+F1&#039;&#039; on F256K but simply &#039;&#039;F2&#039;&#039; on a PS/2 keyboard &lt;br /&gt;
* &#039;&#039;F4&#039;&#039;, i.e. &#039;&#039;Shift+F3&#039;&#039; on F256K but simply &#039;&#039;F4&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;F8&#039;&#039;, i.e. &#039;&#039;Shift+F7&#039;&#039; on F256K but simply &#039;&#039;F8&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
* &#039;&#039;Shift+clr home&#039;&#039; on F256K but simply &#039;&#039;Pos1&#039;&#039; on a PS/2 keyboard&lt;br /&gt;
&lt;br /&gt;
One solution to this problem would be to build a version of moreorless which&lt;br /&gt;
detects if it is running on a Jr. and modifies its key bindings accordingly.&lt;br /&gt;
This would only put F256K users with PS/2 keyboards at a disadvantage. The&lt;br /&gt;
other solution would be to build a version with PS/2 specific key bindings. But&lt;br /&gt;
this would make distribution somewhat confusing.&lt;br /&gt;
&lt;br /&gt;
As a maybe temporary workaround you should use the &#039;&#039;Shift&#039;&#039; key with the above&lt;br /&gt;
key bindings when using a PS/2 keyboard. I.e. you should use &#039;&#039;Shift+F2&#039;&#039;,&lt;br /&gt;
&#039;&#039;Shift+F4&#039;&#039;, &#039;&#039;Shift+F8&#039;&#039; and &#039;&#039;Shift+Pos1&#039;&#039; instead of simply pressing the&lt;br /&gt;
corresponding keys.&lt;br /&gt;
&lt;br /&gt;
= Changing the appearance of moreorless =&lt;br /&gt;
&lt;br /&gt;
When you press &#039;&#039;F4&#039;&#039; you can change the colour scheme used by moreorless by&lt;br /&gt;
cycling through five alternatives:&lt;br /&gt;
&lt;br /&gt;
* White on blue&lt;br /&gt;
* Green on black&lt;br /&gt;
* Black on white&lt;br /&gt;
* White on black&lt;br /&gt;
* Amber on black&lt;br /&gt;
&lt;br /&gt;
Pressing F1 or F2 redraws the whole screen in either 80x60 (F1) or 80x30 (F2)&lt;br /&gt;
text mode and returns the view to the start of the document. You can also use&lt;br /&gt;
these commands to put the screen state management of moreorless in a known good&lt;br /&gt;
state when you are experiencing corresponding problems due to potential bugs in&lt;br /&gt;
the pogram.&lt;br /&gt;
&lt;br /&gt;
= Add indentation =&lt;br /&gt;
&lt;br /&gt;
If you press the &#039;&#039;Tab&#039;&#039; key two spaces are inserted and if you press &#039;&#039;Ctrl+Tab&#039;&#039;&lt;br /&gt;
four spaces are inserted. In many cases it is not neccessary to indent lines&lt;br /&gt;
manually as moreorless supports auto indentation, i.e. if a new line is&lt;br /&gt;
inserted it is indented to the same level as the preceeding line.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting and pasting simple text data = &lt;br /&gt;
&lt;br /&gt;
As a (mental) cost saving measure (for its programmer) moreorless differenti-&lt;br /&gt;
ates between a clipboard for simple text strings and a clipboard for blocks of&lt;br /&gt;
full lines. The clipboard for simple strings can be controlled via the key&lt;br /&gt;
bindings &#039;&#039;Ctrl+c&#039;&#039;, &#039;&#039;Ctrl+x&#039;&#039; and &#039;&#039;Ctrl+v&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
These commands make use of a so called mark which can be set by &#039;&#039;Foenix+space&#039;&#039;&lt;br /&gt;
or &#039;&#039;Foenix+m&#039;&#039;. If a mark is set this is visualized in the top right corner by&lt;br /&gt;
an &#039;&#039;M&#039;&#039; character. A mark is invalidated by any change to the document or at the&lt;br /&gt;
end of an operation which made use of that mark.&lt;br /&gt;
&lt;br /&gt;
In order to copy or cut a simple string you first have to set a mark at the&lt;br /&gt;
first character you want to select. You then move the cursor to the last&lt;br /&gt;
character you want to copy or cut and either press &#039;&#039;Ctrl+c&#039;&#039; or &#039;&#039;Ctrl+x&#039;&#039;. Both&lt;br /&gt;
of these characters have to be in the same line and are part of the selection.&lt;br /&gt;
This allows for copying or cutting a single character.&lt;br /&gt;
&lt;br /&gt;
In lines which are shorter than 80 characters you can move the cursor beyond&lt;br /&gt;
the last character. It has to be noted that this position is not a valid&lt;br /&gt;
position for copying and cutting of simple strings. After setting the mark it&lt;br /&gt;
is possibe to move the cursor either left or right to determine the last&lt;br /&gt;
character of the selection.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Ctrl+v&#039;&#039; can be used to insert a previously copied or cut text string into&lt;br /&gt;
the current line. It has to be noted that this command will do nothing if the&lt;br /&gt;
string which is currently in the clipboard would make the line longer than 80&lt;br /&gt;
characters.&lt;br /&gt;
&lt;br /&gt;
= Copying, cutting, pasting blocks of full lines =&lt;br /&gt;
&lt;br /&gt;
Copying and pasting simple strings is one way to make use of a mark. The second&lt;br /&gt;
way is to cut, copy and paste blocks of full lines. In order to select a block&lt;br /&gt;
of lines you have to set a mark as described above in the first line which you&lt;br /&gt;
want to select. After that you move the cursor to the last line of the block&lt;br /&gt;
which you intend to select and press either &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; to copy or&lt;br /&gt;
cut the block. The block includes the line where the mark has been set and the&lt;br /&gt;
line where &#039;&#039;Foenix+c&#039;&#039; or &#039;&#039;Foenix+x&#039;&#039; was pressed. It is therefore possible to&lt;br /&gt;
select a single line.&lt;br /&gt;
&lt;br /&gt;
In order to paste the previously copied or cut part of the document you have to&lt;br /&gt;
press &#039;&#039;Foenix+v&#039;&#039; at a position of your choice. The current contents of the&lt;br /&gt;
clipboard is then inserted after the current line.&lt;br /&gt;
&lt;br /&gt;
In contrast to the selection of simple strings any column in a line is valid&lt;br /&gt;
when copying or cutting blocks. It is not allowed to cut all lines in a&lt;br /&gt;
document as a document has to contain at least one line even if that line has a&lt;br /&gt;
length of zero characters.&lt;br /&gt;
&lt;br /&gt;
When you copy a block the selected part of the document is copied, which uses&lt;br /&gt;
up additional memory. When you cut a part of the document no additional memory&lt;br /&gt;
is used but no memory is freed either even though the corresponding lines have&lt;br /&gt;
vanished from the document. The memory used for storing the clipboard contents&lt;br /&gt;
is freed when the clipboard contents is either replaced by a different block or&lt;br /&gt;
explicitly cleared by pressing &#039;&#039;Alt+k&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
When copying or pasting a block it is possible that the additonal memory needed&lt;br /&gt;
exceeds the amount of memory still available. moreoreless detects this&lt;br /&gt;
situation and if it is detected allows you to save the current file contents in&lt;br /&gt;
a file called &#039;&#039;mless~&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Transforming blocks of full lines = &lt;br /&gt;
&lt;br /&gt;
You also can use a mark for selecting a block of full lines which you want to&lt;br /&gt;
transform in some way. moreorless currently implements three types of &lt;br /&gt;
transformations:&lt;br /&gt;
&lt;br /&gt;
* Indent a block by two space characters (Press &#039;&#039;Foenix+Tab&#039;&#039;)&lt;br /&gt;
* Unindent a block by two space characters (Press &#039;&#039;Alt+Tab&#039;&#039;)&lt;br /&gt;
* reformat a block (Press &#039;&#039;Alt+f&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
In order to apply these transformations to a block of full lines you first set&lt;br /&gt;
a mark in one line and then press one of the key combinations shown above on&lt;br /&gt;
another line. After that all lines which are are part of the selection are&lt;br /&gt;
indented one level, unindented a level or transformed to be justified as far as&lt;br /&gt;
is possible on a fixed width text screen using a fixed width font. &lt;br /&gt;
&lt;br /&gt;
The reformat transformation is especially useful for writing texts like this&lt;br /&gt;
one (in contrast to writing source code). It allows to reformat a section in&lt;br /&gt;
such a way that it appears as justified as possible. This simplifies working on&lt;br /&gt;
documents which have been formatted to be justified but have to be changed&lt;br /&gt;
afterwards in such a way that the justification is destroyed. &#039;&#039;Alt+f&#039;&#039; can then&lt;br /&gt;
be used to automatically reformat the document again. Lines created by the&lt;br /&gt;
reformatting transformation are at most 79 characters long.&lt;br /&gt;
&lt;br /&gt;
= Search ... =&lt;br /&gt;
&lt;br /&gt;
In order to search in a document a search string has to be defined. This can be&lt;br /&gt;
done in two ways. Either by pressing &#039;&#039;Foenix+f&#039;&#039; or by pressing &#039;&#039;Foenix+t&#039;&#039;. In&lt;br /&gt;
the first case the user is prompted for a string and in the second case the&lt;br /&gt;
current contents of the simple string clipboard is set as a search string. That&lt;br /&gt;
a search string has been defined is visualized in the bottom right corner by&lt;br /&gt;
the text &#039;&#039;SRCH&#039;&#039;. When &#039;&#039;Foenix+f&#039;&#039; is used to enter a search string then a search&lt;br /&gt;
for this string in forward direction is immediately started after the user has&lt;br /&gt;
entered return. Searching is always performed in a case insensitive fashion.&lt;br /&gt;
&lt;br /&gt;
After setting a search string, pressing &#039;&#039;F3&#039;&#039; searches for the previous&lt;br /&gt;
occurrance of the search string in the text and &#039;&#039;F7&#039;&#039; searches for the next&lt;br /&gt;
occurrance. I.e. &#039;&#039;F3&#039;&#039; searches in backwards direction and &#039;&#039;F7&#039;&#039; in forwards&lt;br /&gt;
direction.&lt;br /&gt;
&lt;br /&gt;
While a search is in progress a * character is shown in the upper left corner.&lt;br /&gt;
If the search string is found then the text view is updated in such a way that&lt;br /&gt;
the line where the string was found is the first line shown and the cursor is&lt;br /&gt;
placed at the beginning of that occurance.&lt;br /&gt;
&lt;br /&gt;
If the search string is not found, then the text view is left unchanged after&lt;br /&gt;
the * character disappears. The search string can be cleared by entering an&lt;br /&gt;
empty string after typing &#039;&#039;Foenix+f&#039;&#039; or by typing &#039;&#039;Foenix+u&#039;&#039;. If the search&lt;br /&gt;
string is cleared the text &#039;&#039;SRCH&#039;&#039; in the bottom right corner disappears.&lt;br /&gt;
&lt;br /&gt;
= ... and replace =&lt;br /&gt;
&lt;br /&gt;
The command bound to &#039;&#039;F5&#039;&#039; first checks if the search string is found at the&lt;br /&gt;
current cursor position and if it is found it replaces it with the value of the&lt;br /&gt;
replace string. The replace string can be set by pressing &#039;&#039;Foenix+r&#039;&#039;. As usual&lt;br /&gt;
this command can be aborted by entering an empty string when prompted. As the&lt;br /&gt;
default replace string is the empty string you should make sure that a proper&lt;br /&gt;
replace string is set before using the &#039;&#039;F5&#039;&#039; command. The command does nothing&lt;br /&gt;
when no search string is set.&lt;br /&gt;
&lt;br /&gt;
To sum it up: In case you want to perform a search and replace operation you&lt;br /&gt;
should first set the search string and after that the replace string. You then&lt;br /&gt;
can then use &#039;&#039;F3&#039;&#039; and &#039;&#039;F7&#039;&#039; to search and if you want to replace a found&lt;br /&gt;
occurrance you press &#039;&#039;F5&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Lines longer than 80 characters =&lt;br /&gt;
&lt;br /&gt;
I have stated above that moreorless will not create lines which are longer than&lt;br /&gt;
80 characters, so why is this section here? The answer is that even though&lt;br /&gt;
moreorless does not allow to create new lines which are longer than 80 characters &lt;br /&gt;
it allows to load documents prepared by other means, maybe on your PC,&lt;br /&gt;
which have lines that are longer than that limit. In fact it can load documents&lt;br /&gt;
which have lines with a maximum length of up to 224 characters.&lt;br /&gt;
&lt;br /&gt;
If you browse such a document lines which are longer than 80 characters are&lt;br /&gt;
visualized by a * after the &#039;&#039;Col xxx&#039;&#039; text in the bottom line. Such lines can&lt;br /&gt;
only be edited in limited ways. To be more precise such lines can be&lt;br /&gt;
reformatted using &#039;&#039;Alt+f&#039;&#039;, they can be split by pressing &#039;&#039;return&#039;&#039; and they can&lt;br /&gt;
be shortened by pressing &#039;&#039;Inst del&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
All other edit operations are not allowed. On top of that search operations&lt;br /&gt;
will not find strings in those parts of the text which are not visible in&lt;br /&gt;
moreorless.&lt;/div&gt;</summary>
		<author><name>91.17.17.231</name></author>
	</entry>
</feed>