<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Befehlsliste</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>Recent changes to Befehlsliste</description><atom:link href="https://sourceforge.net/p/basicshell/wiki/Befehlsliste/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 12 Jun 2026 14:46:53 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/basicshell/wiki/Befehlsliste/feed" rel="self" type="application/rss+xml"/><item><title>Befehlsliste modified by Dietmar Schmidt</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1087,7 +1087,7 @@
 ### **|GUI** 
 execte CPCdisplay[.exe] to communicate with it. CPCdisplay shows all the graphics and plays sound, which the terminal cannot do. (Show |SIXELMODE)

-### **|JSON** NEW|LOAD|PARSE|GET|COUNT|TYPE|SET|ADD|ADDNUM|APPEND|ADDOBJECT|DELETE|SAVE|FREE
+### **|JSON** NEW|LOAD|PARSE|GET|COUNT|TYPE|SET|ADD|ADDNUM|APPEND|ADDOBJECT|DELETE|SAVE|PRINT|FREE
 |JSON Command Reference


 - NEW
@@ -1118,6 +1118,8 @@
   Delete field or element
 - SAVE "file.json"
   Save JSON to file
+- PRINT
+   Prints the JSON file to screen or stdout
 - FREE
   Release JSON from memory

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dietmar Schmidt</dc:creator><pubDate>Fri, 12 Jun 2026 14:46:53 -0000</pubDate><guid>https://sourceforge.net19a8085154f9eaf36662305790824ebc2f28a5f0</guid></item><item><title>Befehlsliste modified by Dietmar Schmidt</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -389,15 +389,15 @@
 30 CLEAR INPUT
 run
     The state of [SHIFT] and [CONTROL] in conjunction with the key specified in the &amp;lt;integer expression&amp;gt; is identified as follows:
-==============================================================================
+
 |Value returned          |[SHIFT]        |[CTRL]       |Specified key        |
-==============================================================================
+
 |-1                      |ignored        |ignored      |up                   |
 |0                       |up             |up           |down                 |
 |32                      |down           |up           |down                 |
 |128                     |up             |down         |down                 |
 |160                     |down           |down         |down                 |
-==============================================================================
+
 Hint: instead of the CPC key code you can use a char or string, to see the corresponding key or a stream (e.g. #16 for P or "P") for a PC Linux scan code

 ### **INKEY$** 
@@ -682,6 +682,16 @@
 Renumbers the lines of the current program or range.
 By default, the whole program is renumbered starting at line 10 with multiples of ten. Any parameter that is left out defaults to 10. It is important to note that jumps (GOTO, GOSUB and the like) are automatically converted to the new line numbers.
 The whole set of parameters can be used to renumber only the last part of a program.
+
+### **REPEAT** 
+Defines a loop with UNTIL &amp;lt;expression&amp;gt;. The loop continues, until the expression is true. This is not a standard Locomotive command.

+    10 i=0
+    20 REPEAT
+    30 PRINT i:i=i+1
+    40 UNTIL i&amp;gt;=3
+    0
+    1
+    2

 ### **REPLACE$** (&amp;lt;search-string&amp;gt;,&amp;lt;replace-string&amp;gt;,&amp;lt;string&amp;gt;)
 FUNCTION: replaces all occourence of &amp;lt;search-string&amp;gt; with &amp;lt;replace-string&amp;gt; in the given &amp;lt;string&amp;gt;. This function does not exist in original BASIC.
@@ -917,6 +927,9 @@
 Example:
 PRINT UNT(&amp;amp;FF66)
 -154

+    
+### **UNTIL** &amp;lt;expression&amp;gt;
+REPEAT:UNTIL... loop: see HELP REPEAT. This is not a standard Locomotive command.

 ### **TRON** 
 Turns on the program flow trace for debugging. Causes the line number of each statement executed to be displayed.
&amp;lt;/expression&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dietmar Schmidt</dc:creator><pubDate>Fri, 12 Jun 2026 05:21:01 -0000</pubDate><guid>https://sourceforge.net1dca3b21a51119fdc26adc5d755ac0d78a3c5dca</guid></item><item><title>Befehlsliste modified by Dietmar Schmidt</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -1,14 +1,25 @@
 ### **ABS** (&amp;lt;numeric expression&amp;gt;)
-FUNCTION: Returns the ABSolute value of the given numeric expression (n). This means that negative numbers are returned as positive. Associated keywords: SGN Example: PRINT ABS(-67.98) 67.98
+FUNCTION: Returns the ABSolute value of the given numeric expression (n). This means that negative numbers are returned as positive.
+Associated keywords: SGN
+Example:
+PRINT ABS(-67.98)
+67.98

 ### **AFTER** &amp;lt;time delay&amp;gt;\[,&amp;lt;timer number&amp;gt;\] GOSUB &amp;lt;line number&amp;gt;
 Waits for &amp;lt;time delay&amp;gt;/50 seconds and then jumps NON-RECURRING to the subroutine at &amp;lt;line number&amp;gt; (see also "EVERY i[,t] GOSUB line").

 ### **ALIAS** &amp;lt;alias&amp;gt;=&amp;lt;command&amp;gt;|PRINT
-defines an alias as a shortcut of any command. The command is the coplete rest of the line. Aliases are stored in ~/.basicsh_aliases and permanent To unalias, just define an empty command. ALIAS PRINT shows all aliases.
+defines an alias as a shortcut of any command. The command is the coplete rest of the line. Aliases are stored in ~/.basicsh_aliases and permanent
+To unalias, just define an empty command.
+ALIAS PRINT shows all aliases.

 ### **ASC** (&amp;lt;string expression&amp;gt;)
-FUNCTION: Returns the numeric value of the first character in the &amp;lt;string expression&amp;gt; (s). Associated keywords: CHR$ Example: PRINT ASC("x") 120 Hint:in other languages this is the ord() function
+FUNCTION: Returns the numeric value of the first character in the &amp;lt;string expression&amp;gt; (s).
+Associated keywords: CHR$
+Example:
+PRINT ASC("x")
+120
+Hint:in other languages this is the ord() function

 ### **ATN** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Calculates the Real value for the Arc-TaNgent of &amp;lt;numeric expression&amp;gt;, (n) to a real number ranging from -PI/2 to +PI/2 of the value specified.
@@ -17,7 +28,13 @@
 Creates automatically numbers for programming code

 ### **BIN$** (&amp;lt;unsigned integer expression&amp;gt;\[,&amp;lt;integer expression&amp;gt;\])
-FUNCTION: Produces a string of BINary digits respresenting the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of binary digits instruced by the second &amp;lt;integer expression&amp;gt; (in the range of 0 to 16).  If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will produced in as many digits as are required. The &amp;lt;unsigned integer expression&amp;gt; to be converted into binary form must yield a value in the range -32768 to 65535. Associated keywords: DEC$, HEX$, STR$ Example: PRINT BIN$(66,8) 01000000
+FUNCTION: Produces a string of BINary digits respresenting the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of binary digits instruced by the second &amp;lt;integer expression&amp;gt; (in the range of 0 to 16). 
+If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will produced in as many digits as are required.
+The &amp;lt;unsigned integer expression&amp;gt; to be converted into binary form must yield a value in the range -32768 to 65535.
+Associated keywords: DEC$, HEX$, STR$
+Example:
+PRINT BIN$(66,8)
+01000000

 ### **BORDER** i1\[,i2\]
 Sets the Border color to i1. If i2 is given, the border is flashing. Instead color index number (0..28) you can use RGB colors (#123456)
@@ -26,7 +43,10 @@
 exits the BASIC interpreter. With i=0 no message appears

 ### **CALL** &amp;lt;address expression&amp;gt;\[,&amp;lt;list of: parameter&amp;gt;\]
-Allows a machine code routine to be called by BASIC. CALL 0:REM resets the computer completely CALL &amp;amp;BB18:REM wait until any key is pressed CALL &amp;amp;BD19:REM same as FRAME
+Allows a machine code routine to be called by BASIC.
+CALL 0:REM resets the computer completely
+CALL &amp;amp;BB18:REM wait until any key is pressed
+CALL &amp;amp;BD19:REM same as FRAME

 ### **CAT** 
 Displays the names of the files on the tape or disc.
@@ -35,7 +55,13 @@
 Change Directory (not in originally Locomotive BASIC)

 ### **CINT** (&amp;lt;numeric expression&amp;gt;)
-FUNCTION: Returns the value of the &amp;lt;numeric expression&amp;gt; (n), Converting it to a rounded INTeger in the range -32768 to 32767 (or more in this interpreter). Associated keywords: CREAL, FIX, INT, ROUND, UNT Example: 10 n=-2.6 20 PRINT CINT(n) run -3
+FUNCTION: Returns the value of the &amp;lt;numeric expression&amp;gt; (n), Converting it to a rounded INTeger in the range -32768 to 32767 (or more in this interpreter).
+Associated keywords: CREAL, FIX, INT, ROUND, UNT
+Example:
+10 n=-2.6
+20 PRINT CINT(n)
+run
+-3

 ### **CIRCLE** &amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;lt;radius&amp;gt;\[,&amp;lt;color&amp;gt;\[,&amp;lt;fill color&amp;gt;\]\]
 Draws a circle on the screen
@@ -47,7 +73,9 @@
 Loads the specified program from tape or disc, merges it into the program in memory, and starts execution of the merged program. The parameter DELETE &amp;lt;line number range&amp;gt; is used to delete part of the original program before running it, if required.

 ### **CLEAR** \[INPUT\]
-CLEAR Clears all variables from memory, leaving the program in memory unchanged. All open files are abandoned. The command clear inside a subroutine (GOSUB... RETURN) will also clear the "stack pointer" address of the gosub heap. That means that a RETURN won't work and a GOTO has to be used instead. CLEAR INPUT clears the key buffer.
+CLEAR Clears all variables from memory, leaving the program in memory unchanged. All open files are abandoned.
+The command clear inside a subroutine (GOSUB... RETURN) will also clear the "stack pointer" address of the gosub heap. That means that a RETURN won't work and a GOTO has to be used instead.
+CLEAR INPUT clears the key buffer.

 ### **CLG** \[&amp;lt;masked ink&amp;gt;\]
 Clears the graphics screen to colour specified by &amp;lt;masked ink&amp;gt;. If parameter &amp;lt;masked ink&amp;gt; is not specified then the graphics screen is cleared to the colour specified by the GRAPHICS PAPER statement.
@@ -77,16 +105,37 @@
 enables (1) or disables (0) the cursor.

 ### **DATA** x1\[,x2,x3...\]
-Defines a data section to be used by READ calls. Data values can be of any type (integer, real or string) as long as the corresponding READ calls use a variable of the right type. Example: 10 DATA "Hello, world!", 42 20 READ message$:PRINT message$ 30 READ answer:PRINT "The answer is:";answer See also: READ, RESTORE
+Defines a data section to be used by READ calls.
+Data values can be of any type (integer, real or string) as long as the corresponding READ calls use a variable of the right type.
+Example:
+10 DATA "Hello, world!", 42
+20 READ message$:PRINT message$
+30 READ answer:PRINT "The answer is:";answer
+See also: READ, RESTORE

 ### **DEC$** &amp;lt;numeric expression&amp;gt;,&amp;lt;format template&amp;gt;
-FUNCTIION: Returns a DECimal string representation of the &amp;lt;numeric expression&amp;gt; (n), using the specified &amp;lt;format template&amp;gt; to control the print format of the resulting string. The format template may contain ONLY the characters:     + - $ £ * # , . ^ The use of these 'format field specifiers' is described under the keyword PRINT USING. Example: PRINT DEC$(10^7,"££########,.##") £10,000,000.00
+FUNCTIION: Returns a DECimal string representation of the &amp;lt;numeric expression&amp;gt; (n), using the specified &amp;lt;format template&amp;gt; to control the print format of the resulting string.
+The format template may contain ONLY the characters:

+    + - $ £ * # , . ^
+The use of these 'format field specifiers' is described under the keyword PRINT USING.
+Example:
+PRINT DEC$(10^7,"££########,.##")
+£10,000,000.00

 ### **DEF** 
-DEF means "define" and comes along with defining a function in case of DEF FN or defining variables in case of DEFREAL, DEFINT or DEFSTR. DEF FN must come before using the statement FN. DEF with a variable declaration should come before using a variable. (see also FN)
+DEF means "define" and comes along with defining a function in case of DEF FN or defining variables in case of DEFREAL, DEFINT or DEFSTR.
+DEF FN must come before using the statement FN.
+DEF with a variable declaration should come before using a variable.
+(see also FN)

 ### **DEFINT** &amp;lt;letter range&amp;gt;
-Forces all variables(s) starting with the specified letter(s) to be integer variables. Singular letters could be defined or a range by a minus symbol between two letters. Examples: 20 DEFINT a-z: sets all variables starting with an A until Z as integer. or 10 DEFINT F,S ..... (or 10 DEFINT A-Z) 20 FIRST=111.11:SECOND=22.2 30 PRINT FIRST,SECOND:' prints out 111      22
+Forces all variables(s) starting with the specified letter(s) to be integer variables. Singular letters could be defined or a range by a minus symbol between two letters.
+Examples:
+20 DEFINT a-z: sets all variables starting with an A until Z as integer.
+or
+10 DEFINT F,S ..... (or 10 DEFINT A-Z)
+20 FIRST=111.11:SECOND=22.2
+30 PRINT FIRST,SECOND:' prints out 111      22

 ### **DEFREAL** &amp;lt;letter range&amp;gt;
 Sets the default for variable(s) with the specified first letter(s) to a floating point figure.
@@ -98,19 +147,35 @@
 Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: RAD

 ### **DELETE** \[first line\]\[-\[last line\]\]
-Deletes the current program completely (without arguments) or only the given line or line range. Even DELETE - is legal, it has the same effect as DELETE The lines specified do not have to exist, all lines matching the range will be deleted and having no matches does not cause an error.
+Deletes the current program completely (without arguments) or only the given line or line range. Even
+DELETE -
+is legal, it has the same effect as
+DELETE
+The lines specified do not have to exist, all lines matching the range will be deleted and having no matches does not cause an error.

 ### **DI** 
 Disables interrupts until re-enabled by EI command or by RETURN at end of an interrupts service routine.

 ### **DIM** a\[%|!|$\](d1\[,d2\[,...\]\])
-Creates array a with single or multiple dimensions. You may optionally specify integer (%), real (!) or string ($) type otherwise it defaults to the current type set for the first letter of the array name. d1 is size of first dimension-1, d2 is size of second dimension-1 and so on. DIM x(10) will create an array with 11 elements, x(0) is the first element, x(10) is the eleventh and last. You can specify as many dimensions as will fit on one 255 character line, which is a maximum of 125. Trying to create an array that already exists will generate an Array already dimensioned error. If an array is not specified by DIM before being accessed, each dimension value defaults to 10. The maximum dimensions that can be created this way is three. NEW: In this interpreter you can resize arrays without destroying the content.
+Creates array a with single or multiple dimensions. You may optionally specify integer (%), real (!) or string ($) type otherwise it defaults to the current type set for the first letter of the array name.
+d1 is size of first dimension-1, d2 is size of second dimension-1 and so on. DIM x(10) will create an array with 11 elements, x(0) is the first element, x(10) is the eleventh and last.
+You can specify as many dimensions as will fit on one 255 character line, which is a maximum of 125. Trying to create an array that already exists will generate an Array already dimensioned error.
+If an array is not specified by DIM before being accessed, each dimension value defaults to 10. The maximum dimensions that can be created this way is three.
+NEW: In this interpreter you can resize arrays without destroying the content.

 ### **EDIT** &amp;lt;line&amp;gt;
-Display 1 program line for editing. The following keys can be used in editing mode, or during typing in BASIC: CTRL+CURSOR LEFT - go to start of line CTRL+CURSOR RIGHT - go to end of line
+Display 1 program line for editing.
+The following keys can be used in editing mode, or during typing in BASIC:
+CTRL+CURSOR LEFT - go to start of line
+CTRL+CURSOR RIGHT - go to end of line

 ### **DRAW** x,y\[,\[i1\]\[,i2\]\]
-Draws a line from the current cursor position to position x,y. i1 specifies colour, i2 is the drawing style. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour
+Draws a line from the current cursor position to position x,y. i1 specifies colour, i2 is the drawing style.
+4 drawing styles:
+i2 = 0 normal colour
+i2 = 1 XOR colour
+i2 = 2 AND colour
+i2 = 3 OR colour

 ### **DRAWR** xr,yr\[,\[i1\]\[,i2\]\]
 Draws a line from current graphics cursor position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as DRAW.
@@ -122,13 +187,36 @@
 Indicates end of program

 ### **ENT** &amp;lt;tone envelope number&amp;gt;\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]
-The ENT command define the TONE shape of a sound which means manipulating the frequency in a certain range. The command could looks like: ENT NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255) 
+The ENT command define the TONE shape of a sound which means manipulating the frequency in a certain range.
+The command could looks like:
+ENT NUMBER,STEPS?,VERTICAL?,HORIZONTAL?
+It is possible to define 15 different envelope shapes. So NUMBER could be 1-15.
+Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together.
+STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second!
+VERTICAL: means how big is the step size from bottom to top (-128 to 127)
+HORIZONTAL: means how big is the step size from left to right (0-255)
+

 ### **ENV** &amp;lt;volume envelope number&amp;gt;\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]
-The ENV command define the VOLUME shape of a sound which means manipulating the loudness in a certain range. The command could looks like: ENV NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255)
+The ENV command define the VOLUME shape of a sound which means manipulating the loudness in a certain range.
+The command could looks like:
+ENV NUMBER,STEPS?,VERTICAL?,HORIZONTAL?
+It is possible to define 15 different envelope shapes. So NUMBER could be 1-15.
+Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together.
+STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second!
+VERTICAL: means how big is the step size from bottom to top (-128 to 127)
+HORIZONTAL: means how big is the step size from left to right (0-255)

 ### **EOF** 
-FUNCTION: Checks to see if end of specified file has been reached during input. Returns 0 (false) until the end of file, then -1 (true). Associated keywords: OPENIN, CLOSEIN This example reads a file from disc and print it out on screen. Like the "TYPE" command in CP/M 10 OPENIN "text.txt" 20 WHILE NOT EOF 30 LINE INPUT#9,a$ 40 PRINT a$ 50 WEND 60 CLOSEIN
+FUNCTION: Checks to see if end of specified file has been reached during input. Returns 0 (false) until the end of file, then -1 (true).
+Associated keywords: OPENIN, CLOSEIN
+This example reads a file from disc and print it out on screen. Like the "TYPE" command in CP/M
+10 OPENIN "text.txt"
+20 WHILE NOT EOF
+30 LINE INPUT#9,a$
+40 PRINT a$
+50 WEND
+60 CLOSEIN

 ### **ERASE** v1\[% | ! | $\]\[,v2\[% | ! | $\]\[,...\]\]
 Erases the specified array(s) or variables and frees the memory used.
@@ -146,25 +234,96 @@
 In Graphic-Mode: chr$(&amp;amp;C3)+chr$(&amp;amp;80). In Text-Mode: chr$($E2)+chr$($82)+chr$($AC) (UTF8-Euro). This is the Euro Sign (new in this interpreter)

 ### **EVERY** i\[,t\] GOSUB ln
-BASIC branches to the subroutine at line ln EVERY (reccuring) i/50 seconds. (see also "AFTER i[,t] GOSUB line") There are 4 delay timers from 0 to 9 (in CPC onlc 0 to 3) which can be specified with &amp;lt;timer number&amp;gt;. If omitted &amp;lt;timer number&amp;gt; defaults to 0. In the case of parallel task has 3 the highest and 0 the lowest priority. With DI or EI you can disable or enable the timing interrupt. With REMAIN &amp;lt;timer number&amp;gt; you can also disable an AFTER or EVERY construct and stores the "remaining" time (&amp;gt; REMAIN) Interrupts run as long as the main loop / program runs, even the main programm is paused &amp;gt; press ESC only once not twice for a break. It is important to know or realise that low-priority-interrupts which occurs simultanously to higher-priority-interrupts are not lost. Their task remains or handled again after finishing the higher-prio interrupt.10 REM &amp;gt; interrupts 20 EVERY 50,0 GOSUB 100: REM &amp;gt; lowest priority 30 EVERY 100,1 GOSUB 200 40 EVERY 200,2 GOSUB 300: 50 AFTER 1000,3 GOSUB 400: REM &amp;gt; highest priority 60 WHILE flag=0 70 a=a+1:print a 80 WEND 90 END 100 REM #0 110 PEN 2:PRINT "timer 0":PEN 1 120 RETURN 200 REM #1 210 PEN 2:PRINT "timer 1":PEN 1 220 RETURN 300 REM #2 310 PEN 2:PRINT "timer 2":PEN 1 320 RETURN 400 REM #3 410 flag=1:PEN 2:PRINT "no more interrupts..." 420 RETURN Hint: Timing with interrupts is important, especially if more than one interrupts run. If the interval of a subroutine driven by an interrupt is too long than the processor can never get back to deal the main program again.
+BASIC branches to the subroutine at line ln EVERY (reccuring) i/50 seconds. (see also "AFTER i[,t] GOSUB line")
+There are 4 delay timers from 0 to 9 (in CPC onlc 0 to 3) which can be specified with &amp;lt;timer number&amp;gt;. If omitted &amp;lt;timer number&amp;gt; defaults to 0.
+In the case of parallel task has 3 the highest and 0 the lowest priority.
+With DI or EI you can disable or enable the timing interrupt. With REMAIN &amp;lt;timer number&amp;gt; you can also disable an AFTER or EVERY construct and stores the "remaining" time (&amp;gt; REMAIN)
+Interrupts run as long as the main loop / program runs, even the main programm is paused &amp;gt; press ESC only once not twice for a break.
+It is important to know or realise that low-priority-interrupts which occurs simultanously to higher-priority-interrupts are not lost. Their task remains or handled again after finishing the higher-prio interrupt.10 REM &amp;gt; interrupts
+20 EVERY 50,0 GOSUB 100: REM &amp;gt; lowest priority
+30 EVERY 100,1 GOSUB 200
+40 EVERY 200,2 GOSUB 300:
+50 AFTER 1000,3 GOSUB 400: REM &amp;gt; highest priority
+60 WHILE flag=0
+70 a=a+1:print a
+80 WEND
+90 END
+100 REM #0
+110 PEN 2:PRINT "timer 0":PEN 1
+120 RETURN
+200 REM #1
+210 PEN 2:PRINT "timer 1":PEN 1
+220 RETURN
+300 REM #2
+310 PEN 2:PRINT "timer 2":PEN 1
+320 RETURN
+400 REM #3
+410 flag=1:PEN 2:PRINT "no more interrupts..."
+420 RETURN
+Hint: Timing with interrupts is important, especially if more than one interrupts run. If the interval of a subroutine driven by an interrupt is too long than the processor can never get back to deal the main program again.

 ### **EXP** (&amp;lt;float expression&amp;gt;)
-FUNCTION: Calculates "e" to the power given in the &amp;lt;numeric expression&amp;gt; (i), where "e" is approximately 2,7182818-the number whose natural logarithm is 1. Associated keywords: LOG Example: PRINT EXP(6.876) 968.743625
+FUNCTION: Calculates "e" to the power given in the &amp;lt;numeric expression&amp;gt; (i), where "e" is approximately 2,7182818-the number whose natural logarithm is 1.
+Associated keywords: LOG
+Example:
+PRINT EXP(6.876)
+968.743625

 ### **FILL** i
 Fills an area of a graphics screen i colour i (0-15). Default value of i is the current graphics pen colour.

 ### **FIX** (&amp;lt;numeric expression&amp;gt;)
-FUNCTION: Unlike CINT, FIX merely removes the part of the numeric expression, to the right of the decimal point, and leaves an integer result, rounding towards zero. Associated keywords: CINT, INT, ROUND Example: PRINT FIX(9.99999) 9
+FUNCTION: Unlike CINT, FIX merely removes the part of the numeric expression, to the right of the decimal point, and leaves an integer result, rounding towards zero.
+Associated keywords: CINT, INT, ROUND
+Example:
+PRINT FIX(9.99999)
+9

 ### **FN** 
-BASIC allows the program to define and use simple value returning functions. DEF FuNction is the definition part of this mechanism and creates program-specific function which works within the program in the same way as a function such a COS operates as a built-in function of BASIC. It may be invoked throughout the program. Variable types must be consistent and the DEF FN command should be written in part of the program outside the execution loop. Syntax : DEF FN&amp;lt;name&amp;gt;[(&amp;lt;formal parameters&amp;gt;)]=&amp;lt;general expression&amp;gt; Example: "with the definition of..." 10 gn=9.80665 20 DEF FNgrv=s0+v0*t+0.5*gn*t^2 30 s0=0:v0=0:t=5 40 PRINT "...after";t;"seconds your dropped stone falls";FNgrv;"metres" "the results are..." :...after 5 seconds your dropped stone falls 122.58315 metres
+BASIC allows the program to define and use simple value returning functions.
+DEF FuNction is the definition part of this mechanism and creates program-specific function which works within the program in the same way as a function such a COS operates as a built-in function of BASIC.
+It may be invoked throughout the program. Variable types must be consistent and the DEF FN command should be written in part of the program outside the execution loop.
+Syntax : DEF FN&amp;lt;name&amp;gt;[(&amp;lt;formal parameters&amp;gt;)]=&amp;lt;general expression&amp;gt;
+Example: "with the definition of..."
+10 gn=9.80665
+20 DEF FNgrv=s0+v0*t+0.5*gn*t^2
+30 s0=0:v0=0:t=5
+40 PRINT "...after";t;"seconds your dropped stone falls";FNgrv;"metres"
+"the results are..."
+:...after 5 seconds your dropped stone falls 122.58315 metres

 ### **FOR** TO STEP NEXT

- Creating a counting loop (control strucutre) with a starting condition. Inside the counting loop one or more commands will be executed.     The loop consists of of following specifications:     1. FOR     2. a control variable     3. =     4. starting value     5. TO     6. target value     7. STEP [optional]     8. increment / step size     ... instructions between     9. NEXT 10. control variable [optional] You have to use the command STEP if you wish to count backwards. It's good to name the control variable after NEXT for readability and better program style.     After each loop the computer checks internaly if the target value has been reached (like an IF ... THEN ... ELSE instruction).  If the target value is reached NEXT closes the loop and calculates another step, so the control variable will be changed last time.     The default STEP value - if not specified - is one (1).      Example: 10 FOR I=1 TO 10 20 PRINT I; 30 NEXT I 40 PRINT I RUN 1   2   3   4   5   6   7   8   9   10   11 READY
+ Creating a counting loop (control strucutre) with a starting condition. Inside the counting loop one or more commands will be executed.
+    The loop consists of of following specifications:
+    1. FOR
+    2. a control variable
+    3. =
+    4. starting value
+    5. TO
+    6. target value
+    7. STEP [optional]
+    8. increment / step size
+    ... instructions between
+    9. NEXT
+10. control variable [optional]
+You have to use the command STEP if you wish to count backwards. It's good to name the control variable after NEXT for readability and better program style.
+    After each loop the computer checks internaly if the target value has been reached (like an IF ... THEN ... ELSE instruction). 
+If the target value is reached NEXT closes the loop and calculates another step, so the control variable will be changed last time.
+    The default STEP value - if not specified - is one (1).
+
+    Example:
+10 FOR I=1 TO 10
+20 PRINT I;
+30 NEXT I
+40 PRINT I
+RUN
+1   2   3   4   5   6   7   8   9   10   11
+READY

 ### **FRACTION$** (&amp;lt;number&amp;gt;)
-prints the fraction of an number PRINT FRRACTON$(0.33333333333) 1/3
+prints the fraction of an number
+PRINT FRRACTON$(0.33333333333)
+1/3

 ### **FRAME** 
 Smooths character and graphics movement and reduces flicker (waits for a VSYNC signal every 20 ms).
@@ -173,67 +332,159 @@
 FUNCTION: Establishes how much FREe memory remains unused by BASIC.

 ### **GOSUB** i
-Jumps to subroutine which is given as argument.     Example:10 PRINT "Calling subroutine" 20 GOSUB 100 30 PRINT "Back from subroutine" 40 END 100 REM Begin of the subroutine 110 PRINT "Subroutine started" 120 RETURN
+Jumps to subroutine which is given as argument.

+    Example:10 PRINT "Calling subroutine"
+20 GOSUB 100
+30 PRINT "Back from subroutine"
+40 END
+100 REM Begin of the subroutine
+110 PRINT "Subroutine started"
+120 RETURN

 ### **GOTO** i
 Jumps to the line number which is given as argument. Combine the GOTO command with an IF...THEN...ELSE instruction for creating a condition-controlled loop. With this interpreter you can use a variable instead a number, too.

 ### **GRAPHICS** PEN|PAPER &amp;lt;color&amp;gt;
-...works only in combination with the command PEN or PAPER to set the plotting/drawing pen or background colour. If the TAG command is used to set text at the graphics cursor GRAPHICS PEN or GRAPHICS PAPER instead of the regular PEN or PAPERis necessary to colour the text.
+...works only in combination with the command PEN or PAPER to set the plotting/drawing pen or background colour.
+If the TAG command is used to set text at the graphics cursor GRAPHICS PEN or GRAPHICS PAPER instead of the regular PEN or PAPERis necessary to colour the text.

 ### **HELP** \[&amp;lt;command&amp;gt;|"search string"\]
 displays the help page of all commands of only one &amp;lt;command&amp;gt; or searches for a expression.

 ### **IF** THEN ELSE
-Asks for a choice with the IF...THEN...ELSE statement.     IF compares the entry condition in a logical way     THEN contains instruction if the comparison is true     ELSE contains instruction if it's false.Example: 10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE GOTO 10     In case of nested choices there's a possibility to that with an IF...THEN instruction but not very recommended:10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE IF f&amp;lt;10 THEN PRINT "too small" ELSE PRINT "too big"   30 GOTO 10Other nested structures like IF...THEN...ELSE...ELSE won't work first because the Locomotive Basic only looks after the first ELSE instruction found and can't execute more single commands as a block  for a certain condition in comparision to e.g. "PASCAL" &amp;gt; begin...end-block, "C" &amp;gt; {...}-block. After a THEN or ELSE you don't need to type GOTO. The following two examples are the same: IF -1 THEN GOTO 30 ELSE GOTO 40 IF -1 THEN 30 ELSE 40
+Asks for a choice with the IF...THEN...ELSE statement.

+    IF compares the entry condition in a logical way
+    THEN contains instruction if the comparison is true
+    ELSE contains instruction if it's false.Example:
+10 INPUT "guess a figure:",f
+20 IF f=10 THEN PRINT "right": END: ELSE GOTO 10
+    In case of nested choices there's a possibility to that with an IF...THEN instruction but not very recommended:10 INPUT "guess a figure:",f
+20 IF f=10 THEN PRINT "right": END: ELSE IF f&amp;lt;10 THEN PRINT "too small" ELSE PRINT "too big" 
+ 30 GOTO 10Other nested structures like IF...THEN...ELSE...ELSE won't work first because the Locomotive Basic only looks after the first ELSE instruction found and can't execute more single commands as a block 
+for a certain condition in comparision to e.g. "PASCAL" &amp;gt; begin...end-block, "C" &amp;gt; {...}-block.
+After a THEN or ELSE you don't need to type GOTO. The following two examples are the same:
+IF -1 THEN GOTO 30 ELSE GOTO 40
+IF -1 THEN 30 ELSE 40

 ### **HEX$** (&amp;lt;unsigned integer expression&amp;gt;\[,&amp;lt;field width&amp;gt;\])
-FUNCTION: Produces a $tring of HEXadecimal digits representing the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of hexadecimal digits. If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will be produced in as many digits as are required. Accociated keywords: BIN$, DEC$, STR$, UNT Example: PRINT HEX$(255,4) 00FF
+FUNCTION: Produces a $tring of HEXadecimal digits representing the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of hexadecimal digits.
+If the number of digits instructed is too great, the resulting expression will be filled with leading zeros;
+if the number of digits instructed is too small, the resulting expression will be produced in as many digits as are required.
+Accociated keywords: BIN$, DEC$, STR$, UNT
+Example:
+PRINT HEX$(255,4)
+00FF

 ### **INK** i1\[,i2\]
 Sets the color with given number to i1. If i2 is given, the color is flashing. Instead color index number (0..28) you can use RGB colors (#123456)

 ### **INKEY** (&amp;lt;integer expression&amp;gt;)
-FUNCTION: INterrogates the KEYboard to report which keys are being pressed. The keyboard is scanned every 0.02 (1/50) second.     The function is useful for spotting whether a certain key is down or up, by detecting the returned value of -1 (which occurs regardless of [SHIFT] and [CONTROL] key status).     The example below detects when [SHIFT] and V (key number 55) are pressed together, then ends the program. Refer the manual for the key numbers.     Associated keywords: CLEAR INPUT, INKEY$, JOY     Example: 10 IF INKEY(55)&amp;lt;&amp;gt;32 THEN 10 20 PRINT "You have pressed [SHIFT] and V" 30 CLEAR INPUT run     The state of [SHIFT] and [CONTROL] in conjunction with the key specified in the &amp;lt;integer expression&amp;gt; is identified as follows: ============================================================================== |Value returned          |[SHIFT]        |[CTRL]       |Specified key        | ============================================================================== |-1                      |ignored        |ignored      |up                   | |0                       |up             |up           |down                 | |32                      |down           |up           |down                 | |128                     |up             |down         |down                 | |160                     |down           |down         |down                 | ============================================================================== Hint: instead of the CPC key code you can use a char or string, to see the corresponding key or a stream (e.g. #16 for P or "P") for a PC Linux scan code
+FUNCTION: INterrogates the KEYboard to report which keys are being pressed. The keyboard is scanned every 0.02 (1/50) second.

+    The function is useful for spotting whether a certain key is down or up, by detecting the returned value of -1 (which occurs regardless of [SHIFT] and [CONTROL] key status).
+    The example below detects when [SHIFT] and V (key number 55) are pressed together, then ends the program. Refer the manual for the key numbers.
+    Associated keywords: CLEAR INPUT, INKEY$, JOY
+    Example:
+10 IF INKEY(55)&amp;lt;&amp;gt;32 THEN 10
+20 PRINT "You have pressed [SHIFT] and V"
+30 CLEAR INPUT
+run
+    The state of [SHIFT] and [CONTROL] in conjunction with the key specified in the &amp;lt;integer expression&amp;gt; is identified as follows:
+==============================================================================
+|Value returned          |[SHIFT]        |[CTRL]       |Specified key        |
+==============================================================================
+|-1                      |ignored        |ignored      |up                   |
+|0                       |up             |up           |down                 |
+|32                      |down           |up           |down                 |
+|128                     |up             |down         |down                 |
+|160                     |down           |down         |down                 |
+==============================================================================
+Hint: instead of the CPC key code you can use a char or string, to see the corresponding key or a stream (e.g. #16 for P or "P") for a PC Linux scan code

 ### **INKEY$** 
-FUNCTION: Interrogates the KEYboard, returning the current $string reflecting any key that is pressed. It provides operator interaction without hitting [ENTER] after every answer. If there is a key pressed, then the function responds. If no key is pressed, INKEY$ returns an empty string.
+FUNCTION: Interrogates the KEYboard, returning the current $string reflecting any key that is pressed.
+It provides operator interaction without hitting [ENTER] after every answer.
+If there is a key pressed, then the function responds. If no key is pressed, INKEY$ returns an empty string.

 ### **INP** (&amp;lt;port number&amp;gt;)
-FUNCTION: Returns the INPut value from the I/O address specified in the &amp;lt;port number&amp;gt;. Associated keywords: OUT, WAIT
+FUNCTION: Returns the INPut value from the I/O address specified in the &amp;lt;port number&amp;gt;.
+Associated keywords: OUT, WAIT

 ### **INPUT** \[#stream,\]\["&amp;lt;String&amp;gt;"\[;|,\]&amp;lt;variable&amp;gt;\[,&amp;lt;variable&amp;gt;\[,&amp;lt;variable&amp;gt;\]...\]
-Reads a value from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to LINE INPUT
+Reads a value from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string
+similar to LINE INPUT

 ### **INSTR** (\[&amp;lt;startposition&amp;gt;,\]&amp;lt;searched string&amp;gt;,&amp;lt;searched for string&amp;gt;)
-FUNCTION: Searches the first &amp;lt;searched string&amp;gt; expression to find the first occurance of the &amp;lt;searched for string expression&amp;lt;, and reports the position of its occurance within the &amp;lt;searched string&amp;gt;. If the &amp;lt;searched for string&amp;gt; does not occur within the &amp;lt;searched string&amp;gt;, then 0 is reported. The position at which to start searching the &amp;lt;searched string&amp;gt; is optionally specifiable using the &amp;lt;start position&amp;gt; parameter which must yield an integer number in the range 1 to 255. Associated keywords: none 1. Example: a$="ABCD":PRINT INSTR(a$,"C") 3 Ready 2. Example: a$="Hello":IF INSTR(a$,"i")&amp;lt;&amp;gt;0 THEN PRINT "no" else a$ no Ready 3. Example: 10 CLS 20 alphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" 30 INPUT "Enter a letter";a$ 40 b$=UPPER$(a$) 50 PRINT b$;" is number"; 60 PRINT INSTR(alphabet$,b$); 70 PRINT "in the alphabet.":PRINT 80 GOTO 40 run
+FUNCTION: Searches the first &amp;lt;searched string&amp;gt; expression to find the first occurance of the &amp;lt;searched for string expression&amp;lt;, and reports the position of its occurance within the &amp;lt;searched string&amp;gt;.
+If the &amp;lt;searched for string&amp;gt; does not occur within the &amp;lt;searched string&amp;gt;, then 0 is reported.
+The position at which to start searching the &amp;lt;searched string&amp;gt; is optionally specifiable using the &amp;lt;start position&amp;gt; parameter which must yield an integer number in the range 1 to 255.
+Associated keywords: none
+1. Example:
+a$="ABCD":PRINT INSTR(a$,"C")
+3
+Ready
+2. Example:
+a$="Hello":IF INSTR(a$,"i")&amp;lt;&amp;gt;0 THEN PRINT "no" else a$
+no
+Ready
+3. Example:
+10 CLS
+20 alphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+30 INPUT "Enter a letter";a$
+40 b$=UPPER$(a$)
+50 PRINT b$;" is number";
+60 PRINT INSTR(alphabet$,b$);
+70 PRINT "in the alphabet.":PRINT
+80 GOTO 40
+run

 ### **INT** (&amp;lt;value&amp;gt;)
 Get the integer part of a number. This is to round down a number

 ### **LABEL** &amp;lt;name&amp;gt;
-at the begining of any line you can label this line with a name to jump to it with GOTO or GOSUB and so on. This is nor a standard Locomotive BASIC command 10 LABEL start 20 PRINT i:i=i+1 30 IF i&amp;lt;4 THEN GOTO start
+at the begining of any line you can label this line with a name to jump to it with GOTO or GOSUB and so on. This is nor a standard Locomotive BASIC command
+10 LABEL start
+20 PRINT i:i=i+1
+30 IF i&amp;lt;4 THEN GOTO start

 ### **LEFT$** (&amp;lt;string expression&amp;gt;, &amp;lt;required length&amp;gt;)
-FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;required length&amp;gt; parameter (&amp;lt;integer expression&amp;gt;), after extracting them from the LEFT of the &amp;lt;string expression&amp;gt;. If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;required length&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.
+FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;required length&amp;gt; parameter (&amp;lt;integer expression&amp;gt;), after extracting them from the LEFT of the &amp;lt;string expression&amp;gt;.
+If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;required length&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.

 ### **LEN** (&amp;lt;string expression&amp;gt;)
-FUNCTION: Returns the total number of characters (i.e. the LENgth) of the &amp;lt;string expression&amp;gt;. See SIZEOF
+FUNCTION: Returns the total number of characters (i.e. the LENgth) of the &amp;lt;string expression&amp;gt;.
+See SIZEOF

 ### **LET** 
 Was used to define variables. You don't need to use the LET command because it is just a command which was added for compatibility reasons.

 ### **LINE INPUT** \[#stream,\]\["&amp;lt;String&amp;gt;"\[;|,\]&amp;lt;variable$&amp;gt;
-Reads a line as a whole string from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to INPUT
+Reads a line as a whole string from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string
+similar to INPUT

 ### **LIST** \[&amp;lt;line number&amp;gt;\]\[-\[&amp;lt;line number&amp;gt;\]\], \[#&amp;lt;stream expression&amp;gt;\]
-A command for listing the Basic program code.  Possibility for manipulating display is using line numbers with a minus symbol.  Example: LIST 100- List every line after line number 100. LIST -100  List every line until line number 100 has reached. LIST 100-200     List every line between line number 100 and 200 included With the help of separate window definitions it is possible to print out long listings, better differentiate parts / slices of it into different window predefined Example: LIST 1000-1100,#1 LIST 3000-3100,#2  ...prints out two parts of one program out into two windows (if they are defined well)
+A command for listing the Basic program code.

+ Possibility for manipulating display is using line numbers with a minus symbol.
+ Example:
+LIST 100-
+List every line after line number 100.
+LIST -100
+ List every line until line number 100 has reached.
+LIST 100-200
+    List every line between line number 100 and 200 included
+With the help of separate window definitions it is possible to print out long listings, better differentiate parts / slices of it into different window predefined
+Example:
+LIST 1000-1100,#1
+LIST 3000-3100,#2
+ ...prints out two parts of one program out into two windows (if they are defined well)

 ### **LOAD** &amp;lt;file name&amp;gt;
-With this directive you may load any file in memory Basic files (extension .bas) are loaded in Basic memory, you cannot choose loading address
+With this directive you may load any file in memory
+Basic files (extension .bas) are loaded in Basic memory, you cannot choose loading address

 ### **LOCATE** \[#&amp;lt;stream expression&amp;gt;\]\[,\] x,y
-Moves the text cursor to the x,y location. x starts at 1 on the left and goes up to 20 (in mode 0), 40 (in mode 1) or 80 (in mode 2). y starts at 1 at the top and ends at 25 at the bottom.
+Moves the text cursor to the x,y location.
+x starts at 1 on the left and goes up to 20 (in mode 0), 40 (in mode 1) or 80 (in mode 2).
+y starts at 1 at the top and ends at 25 at the bottom.

 ### **LOG** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Calculates the natural LOGarithm (base of e) of &amp;lt;numeric expression&amp;gt; which mustbe greater than zero.
@@ -242,10 +493,15 @@
 FUNCTION: Calculates the logarithm (base of 10) of &amp;lt;numeric expression&amp;gt; which mustbe greater than zero.

 ### **LOWER$** (&amp;lt;string expression&amp;gt;)
-FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to lower case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: UPPER$
+FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to lower case.
+Useful for processing input where the answers may come in mixed upper/lower case.
+Associated keywords: UPPER$

 ### **MASK** \[i1\]\[,i2\]
-Sets bits in each adjacent group of 8 pixel on (1) or off (0) according to binary value of i1 (0-255). i2 determines whether the first point of the line is to plotted (1) or not (0). Example: 10 CLG 2:MASK 1:MOVE 0,0:DRAW 500,400 20 MASK 15:MOVE 0,0:DRAW 500,400
+Sets bits in each adjacent group of 8 pixel on (1) or off (0) according to binary value of i1 (0-255). i2 determines whether the first point of the line is to plotted (1) or not (0).
+Example:
+10 CLG 2:MASK 1:MOVE 0,0:DRAW 500,400
+20 MASK 15:MOVE 0,0:DRAW 500,400

 ### **MAX** (&amp;lt;list of: numeric expression&amp;gt;)
 FUNCTION: Returns the MAXimum value from the &amp;lt;list of: numeric expressions&amp;gt;
@@ -254,16 +510,44 @@
 You don't need to use the command because it is just a command which was added for compatibility reasons.

 ### **MID$** (&amp;lt;string&amp;gt;,&amp;lt;start position&amp;gt;\[,&amp;lt;length of substring&amp;gt;\[,0|-1\]\])
-With the MID$ command there are two applications possible: 1. MID$ creates a new substring out of the give &amp;lt;string&amp;gt; and starts at the defined position &amp;lt;start position&amp;gt; and print the number of given characters by &amp;lt;length of substring&amp;gt;. If no length is defined every character from &amp;lt;start position&amp;gt; will be printed out. If a higher value of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; than the real length of the initial string is defined a blank string will be printed. The range of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; is from 0 up to 255 characters.  2. With MID$ you're able to manipulates given strings by inserting a new string. Take care of the two different applications and using in BASIC. The optional last parameter does not exist in original Locomotive Basic. if this parameter is -1 (true) the part of the first string will be replaced with the replacement string, inimportant how long it is.  Example for the 1. application: 10 a$="Hello" 20 PRINT MID$(a$,2,2) run el Ready  Example for the 2. application 10 a$="Hello" 20 MID$(a$,2,3)="ipp" 30 PRINT a$ run Hippo Ready
+With the MID$ command there are two applications possible:
+1. MID$ creates a new substring out of the give &amp;lt;string&amp;gt; and starts at the defined position &amp;lt;start position&amp;gt; and print the number of given characters by &amp;lt;length of substring&amp;gt;.
+If no length is defined every character from &amp;lt;start position&amp;gt; will be printed out.
+If a higher value of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; than the real length of the initial string is defined a blank string will be printed.
+The range of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; is from 0 up to 255 characters.
+
+2. With MID$ you're able to manipulates given strings by inserting a new string.
+Take care of the two different applications and using in BASIC. The optional last parameter does not exist in original Locomotive Basic. if this parameter is -1 (true) the part of the first string will be replaced with the replacement string, inimportant how long it is.
+
+Example for the 1. application:
+10 a$="Hello"
+20 PRINT MID$(a$,2,2)
+run
+el
+Ready
+
+Example for the 2. application
+10 a$="Hello"
+20 MID$(a$,2,3)="ipp"
+30 PRINT a$
+run
+Hippo
+Ready

 ### **MIN** (&amp;lt;list of: numeric expression&amp;gt;)
 FUNCTION: Returns the MINimum value from the &amp;lt;list of: numeric expressions&amp;gt;

 ### **MODE** m\[,x,y\]
-Changes the screen mode: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 640×400 in 4 colours. (only text mode in the GUI, graphic mode is always 640x400) When x,y is given, the resolution is set to x,y - so you can use a larger or smaller window than in original CPC.
+Changes the screen mode: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 640×400 in 4 colours. (only text mode in the GUI, graphic mode is always 640x400)
+When x,y is given, the resolution is set to x,y - so you can use a larger or smaller window than in original CPC.

 ### **MOVE** x,y\[,\[i1\]\[,i2\]\]
-Moves the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour
+Moves the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW.
+4 drawing styles:
+i2 = 0 normal colour
+i2 = 1 XOR colour
+i2 = 2 AND colour
+i2 = 3 OR colour

 ### **MOVER** xr,yr\[,\[i1\]\[,i2\]\]
 moves the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.
@@ -272,7 +556,35 @@
 Clears BASIC RAM which means program and variables. Keeps symbol defintion (if defined) and screen mode without clearing.

 ### **ON** ...

-    ON BREAK CONT Prevents the interruption of program execution by the ESC key.      ON BREAK GOSUB ln Passes control to subroutine at line ln when ESC ESC pressed.      ON BREAK STOP Restores normal function of ESC key during program execution.      ON ERROR GOTO ln Passes the control to line ln if an error is detected in the program.      ON ERROR GOTO 0 Turns of the error trap, and restores normal error processing.      ON variable GOTO ln x1, x2, x3, x4, ... In case of passing more choices ON variable GOTO ln x1, x2, x3, x4, ... points to a table with the jumping target. Example: 10 PRINT "1. LOAD - 2. SAVE - 3. EXIT" 20 INPUT choice 30 ON choice GOTO 1000, 2000, 3000 40 CLS: GOTO 10 1000 PRINT "1. LOAD":END 2000 PRINT "2. SAVE":END 3000 END In case that the variable choice won't fullfil the condition (in a range between line 0 and 65535) the next instruction will be executed (here: Line 40). If "choice" is smaller than 0 an error will occur.      ON variable GOSUB ln x1, x2, x3, x4, ... In case of passing more choices targeting to SUBROUTINES ON variable GOSUB ln x1, x2, x3, x4, ... points to a jumping table. If the number is too large, the program continues normally.
+    ON BREAK CONT
+Prevents the interruption of program execution by the ESC key.
+
+    ON BREAK GOSUB ln
+Passes control to subroutine at line ln when ESC ESC pressed.
+
+    ON BREAK STOP
+Restores normal function of ESC key during program execution.
+
+    ON ERROR GOTO ln
+Passes the control to line ln if an error is detected in the program.
+
+    ON ERROR GOTO 0
+Turns of the error trap, and restores normal error processing.
+
+    ON variable GOTO ln x1, x2, x3, x4, ...
+In case of passing more choices ON variable GOTO ln x1, x2, x3, x4, ... points to a table with the jumping target.
+Example:
+10 PRINT "1. LOAD - 2. SAVE - 3. EXIT"
+20 INPUT choice
+30 ON choice GOTO 1000, 2000, 3000
+40 CLS: GOTO 10
+1000 PRINT "1. LOAD":END
+2000 PRINT "2. SAVE":END
+3000 END
+In case that the variable choice won't fullfil the condition (in a range between line 0 and 65535) the next instruction will be executed (here: Line 40). If "choice" is smaller than 0 an error will occur.
+
+    ON variable GOSUB ln x1, x2, x3, x4, ...
+In case of passing more choices targeting to SUBROUTINES ON variable GOSUB ln x1, x2, x3, x4, ... points to a jumping table. If the number is too large, the program continues normally.

 ### **OPENIN** &amp;lt;filename&amp;gt;
 Opens the specified data file for reading. It has to be an ASCII file. (The command CLOSEIN closes reading data file.) Read from the file using INPUT #9
@@ -281,10 +593,19 @@
 Opens the specified data file for writing. It writes an ASCII file. (To close writing use the command closeout.)

 ### **ORIGIN** x,y\[,l,r,t,b\]
-The command defines the origin (world reference point) for the graphics coordinate system. Normally the reference origin is in the left, bottom corner of the default screen and has 0,0. So the most left coordinate value could be by default 639 and the most top value 399. Independent from the actual modus (2, 1 or 0) the range for the x coordinate are always 640 points and for the y coordinate 400 points. In theory you are able to address 256,000 pixel but only 128,000 are visible due to the maximal resolution of the hardware. x,y are the the new coordinates for the 'world reference'. l,r,t,b are optional and set the borders for the new graphical window (works in the same way like the WINDOW command for a text window). l,r,t,b means left, right, tob and bottom coordinates. If a new graphical window (borders) is defined every point or drawn line won't be plotted (clipped internally). Example (the line drawn will be cutted): ORIGIN 320,200,250,450,100,300 DRAW 0,200
+The command defines the origin (world reference point) for the graphics coordinate system. Normally the reference origin is in the left, bottom corner of the default screen and has 0,0.
+So the most left coordinate value could be by default 639 and the most top value 399. Independent from the actual modus (2, 1 or 0) the range for the x coordinate are always 640 points and for the y coordinate 400 points.
+In theory you are able to address 256,000 pixel but only 128,000 are visible due to the maximal resolution of the hardware.
+x,y are the the new coordinates for the 'world reference'.
+l,r,t,b are optional and set the borders for the new graphical window (works in the same way like the WINDOW command for a text window). l,r,t,b means left, right, tob and bottom coordinates.
+If a new graphical window (borders) is defined every point or drawn line won't be plotted (clipped internally).
+Example (the line drawn will be cutted):
+ORIGIN 320,200,250,450,100,300
+DRAW 0,200

 ### **OUT** &amp;lt;port number&amp;gt;,&amp;lt;value&amp;gt;
-Sets the value to the I/O address specified in the &amp;lt;port number&amp;gt;. Associated keywords: INP, WAIT
+Sets the value to the I/O address specified in the &amp;lt;port number&amp;gt;.
+Associated keywords: INP, WAIT

 ### **PAPER** \[#&amp;lt;stream expression&amp;gt;\]\[,\]
 sets the background color
@@ -293,16 +614,31 @@
 sets the text color

 ### **PLOT** x,y\[,\[i1\]\[,i2\]\]
-Plots a point at the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour
+Plots a point at the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW.
+4 drawing styles:
+i2 = 0 normal colour
+i2 = 1 XOR colour
+i2 = 2 AND colour
+i2 = 3 OR colour

 ### **PLOTR** xr,yr\[,\[i1\]\[,i2\]\]
 Plots a point at the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.

 ### **POS** (#&amp;lt;stream expression&amp;gt;)
-FUNCTION: Reports the current horizontal POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression&amp;gt; MUST be specified, and does NOT default to #0. POS(#8) reports the current horizontal carriage position for the printer, where 1 is the extreme left hand edge. POS(#9) reports the logical position in the disc file stream, i.e. the number of printing characters sent to the stream since the last carriage return.
+FUNCTION: Reports the current horizontal POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression&amp;gt; MUST be specified, and does NOT default to #0.
+POS(#8) reports the current horizontal carriage position for the printer, where 1 is the extreme left hand edge.
+POS(#9) reports the logical position in the disc file stream, i.e. the number of printing characters sent to the stream since the last carriage return.

 ### **PRINT** \[#&amp;lt;channel number&amp;gt;\]\[&amp;lt;list of:&amp;lt;article to print&amp;gt;\]\[;\]\[USING&amp;lt;format model&amp;gt;\]\[&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;\]\[;|&amp;lt;Space&amp;gt;\]
-prints content to the screen. If it ends with an ;, there will be no new line at the end. Within the command a ; or &amp;lt;space&amp;gt; lets print the next operand, with a comma (,) the cursor will be set to the next tab position (defined with ZONE) stream#8 is the printer stream#9 is the disc.  SPC(&amp;lt;count&amp;gt;) prints count spaces TAB(&amp;lt;position&amp;gt;) sets the cursor to the correct x-position. See USING command. Do not forget the separator (e.g. space or semikolon) after a string. PRINT "TEST"SPC(2) without separator does not work!
+prints content to the screen. If it ends with an ;, there will be no new line at the end.
+Within the command a ; or &amp;lt;space&amp;gt; lets print the next operand, with a comma (,) the cursor will be set to the next tab position (defined with ZONE)
+stream#8 is the printer
+stream#9 is the disc.
+
+SPC(&amp;lt;count&amp;gt;) prints count spaces
+TAB(&amp;lt;position&amp;gt;) sets the cursor to the correct x-position.
+See USING command.
+Do not forget the separator (e.g. space or semikolon) after a string. PRINT "TEST"SPC(2) without separator does not work!

 ### **?** 
 same as PRINT
@@ -314,7 +650,9 @@
 Resets the pseudo-random generator. The optional parameter TIME does nothing and is implemented because of compatbility issues.

 ### **READ** &amp;lt;variable&amp;gt;
-Gets the next data item (from DATA commands), stores it in the given variable and moves to the next item. The variable must be of the correct type. See also: DATA, RESTORE
+Gets the next data item (from DATA commands), stores it in the given variable and moves to the next item.
+The variable must be of the correct type.
+See also: DATA, RESTORE

 ### **RECTANGLE** &amp;lt;left&amp;gt;,&amp;lt;right&amp;gt;,&amp;lt;top&amp;gt;,&amp;lt;bottom&amp;gt;\[,&amp;lt;color&amp;gt;\[,&amp;lt;fill color&amp;gt;\]\]
 Draws a rectangle on the screen
@@ -326,10 +664,24 @@
 same as REM

 ### **RELEASE** &amp;lt;channel&amp;gt;
-Releases a sound which was hold on (by a SOUND command) before. It uses the same bit matrix like the SOUND command for the first parameter (&amp;amp;x00000001) releases chanel A (&amp;amp;x00000010) releases chanel B (&amp;amp;x00000011) releases chanel A and B (&amp;amp;x00000100) releases chanel C (&amp;amp;x00000101) releases chanel A and C (&amp;amp;x00000110) releases chanel B and C (&amp;amp;x00000111) releases chanel A, B and C Example: 10 SOUND 65,1000,100 20 PRINT"PRESS R TO LET IT SOUND" 30 IF INKEY(50)=-1 THEN 30 40 RELEASE 1
+Releases a sound which was hold on (by a SOUND command) before. It uses the same bit matrix like the SOUND command for the first parameter
+(&amp;amp;x00000001) releases chanel A
+(&amp;amp;x00000010) releases chanel B
+(&amp;amp;x00000011) releases chanel A and B
+(&amp;amp;x00000100) releases chanel C
+(&amp;amp;x00000101) releases chanel A and C
+(&amp;amp;x00000110) releases chanel B and C
+(&amp;amp;x00000111) releases chanel A, B and C
+Example:
+10 SOUND 65,1000,100
+20 PRINT"PRESS R TO LET IT SOUND"
+30 IF INKEY(50)=-1 THEN 30
+40 RELEASE 1

 ### **RENUM** \[‹newLine›\[,‹first oldLine›\[-&amp;lt;last oldline&amp;gt;\]\[,‹step›\]\]\]
-Renumbers the lines of the current program or range. By default, the whole program is renumbered starting at line 10 with multiples of ten. Any parameter that is left out defaults to 10. It is important to note that jumps (GOTO, GOSUB and the like) are automatically converted to the new line numbers. The whole set of parameters can be used to renumber only the last part of a program.
+Renumbers the lines of the current program or range.
+By default, the whole program is renumbered starting at line 10 with multiples of ten. Any parameter that is left out defaults to 10. It is important to note that jumps (GOTO, GOSUB and the like) are automatically converted to the new line numbers.
+The whole set of parameters can be used to renumber only the last part of a program.

 ### **REPLACE$** (&amp;lt;search-string&amp;gt;,&amp;lt;replace-string&amp;gt;,&amp;lt;string&amp;gt;)
 FUNCTION: replaces all occourence of &amp;lt;search-string&amp;gt; with &amp;lt;replace-string&amp;gt; in the given &amp;lt;string&amp;gt;. This function does not exist in original BASIC.
@@ -338,22 +690,69 @@
 Resets the data pointer used by READ. When used without parameters, resets the pointer to the first data in the program. Otherwise, resets the pointer to the given line number.

 ### **RESUME** \[line\] or NEXT
-Command causes the program to resume after an error code and if it is interrupted by an ON ERROR GOTO jump So it can either resume (if there is no line number stated) at the same line after error code (and if there are more statements in one line) or at the line number stated (optional) or with the NEXT parameter (optional) ... at the line followed by the error line
+Command causes the program to resume after an error code and if it is interrupted by an ON ERROR GOTO jump
+So it can either resume
+(if there is no line number stated) at the same line after error code (and if there are more statements in one line)
+or
+at the line number stated (optional)
+or
+with the NEXT parameter (optional) ... at the line followed by the error line

 ### **RETURN** 
 Terminates a subroutine and returns control to the line following the GOSUB call (see GOSUB)

 ### **RIGHT$** (&amp;lt;string expression&amp;gt;,&amp;lt;integer expression&amp;gt;)
-FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;integer expression&amp;gt; (=required length) parameter, after extracting them from the RIGHT of the &amp;lt;string expression&amp;gt;. If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;integer expression&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.
+FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;integer expression&amp;gt; (=required length) parameter, after extracting them from the RIGHT of the &amp;lt;string expression&amp;gt;.
+If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;integer expression&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.

 ### **RND** \[(&amp;lt;numeric expression&amp;gt;)\]

-    FUNCTION: Returns the next RaNDom number in sequence if the &amp;lt;numeric expression&amp;gt; has a positive value or is not specified.     If the &amp;lt;numeric expression&amp;gt; yields a value of zero, RND returns a copy of the last random number generated. Associated keywords: RANDOMIZE     1. Example: PRINT RND(0)\”0.536703827 Ready PRINT RND(1) 0.271940658\”Ready PRINT RND(0) 0.271940658 Ready     2. Example:     Example for generating an integer random number between 1 and 1000 10 A=INT((RND(1)*1000)+1) 20 PRINT A 30 GOTO 10     3. Example:     For generating a random number between a lower and higher border 10 INPUT "Low border",low 20 INPUT "High border",high 30 A=INT(RND(1)*(high-low))+low 40 PRINT A     4. Example: 10 RANDOMIZE\”20 FOR x=1 TO -1 STEP -1 30 PRINT "rnd parameter=";x 40 FOR n=1 TO 6 50 PRINT RND(x) 60 NEXT n,x\”run
+    FUNCTION: Returns the next RaNDom number in sequence if the &amp;lt;numeric expression&amp;gt; has a positive value or is not specified.
+    If the &amp;lt;numeric expression&amp;gt; yields a value of zero, RND returns a copy of the last random number generated.
+Associated keywords: RANDOMIZE
+    1. Example:
+PRINT RND(0)\”0.536703827
+Ready
+PRINT RND(1)
+0.271940658\”Ready
+PRINT RND(0)
+0.271940658
+Ready
+    2. Example:
+    Example for generating an integer random number between 1 and 1000
+10 A=INT((RND(1)*1000)+1)
+20 PRINT A
+30 GOTO 10
+    3. Example:
+    For generating a random number between a lower and higher border
+10 INPUT "Low border",low
+20 INPUT "High border",high
+30 A=INT(RND(1)*(high-low))+low
+40 PRINT A
+    4. Example:
+10 RANDOMIZE\”20 FOR x=1 TO -1 STEP -1
+30 PRINT "rnd parameter=";x
+40 FOR n=1 TO 6
+50 PRINT RND(x)
+60 NEXT n,x\”run

 ### **ROUND** (&amp;lt;numeric expression&amp;gt;\[,&amp;lt;integer expression&amp;gt;\])
-FUNCTION: Rounds &amp;lt;numeric expression&amp;gt; to a number of decimal places or to the power of ten specified by &amp;lt;integer expression&amp;gt;.  If &amp;lt;integer expression&amp;gt; less than zero, the &amp;lt;numeric expression&amp;gt; is rounded to give an absolute integer with &amp;lt;integer expression&amp;gt; number of zeros before the decimal point. Associated keywords: ABS, CINT, FIX, INT 1. Example: PRINT ROUND(1562.357,2),ROUND(1562.375,-2) 1562.36     1600 2. Example: 10 FOR n=4 TO -4 STEP -1 20 PRINT ROUND (1234.5678,n) 30 PRINT "with integer expression";n 40 NEXT run
+FUNCTION: Rounds &amp;lt;numeric expression&amp;gt; to a number of decimal places or to the power of ten specified by &amp;lt;integer expression&amp;gt;. 
+If &amp;lt;integer expression&amp;gt; less than zero, the &amp;lt;numeric expression&amp;gt; is rounded to give an absolute integer with &amp;lt;integer expression&amp;gt; number of zeros before the decimal point.
+Associated keywords: ABS, CINT, FIX, INT
+1. Example:
+PRINT ROUND(1562.357,2),ROUND(1562.375,-2)
+1562.36     1600
+2. Example:
+10 FOR n=4 TO -4 STEP -1
+20 PRINT ROUND (1234.5678,n)
+30 PRINT "with integer expression";n
+40 NEXT
+run

 ### **RUN** \[&amp;lt;line&amp;gt; or &amp;lt;filename&amp;gt;\]

-    Runs the current program, optionally starting at a given line. If no line number is given, starts at the first line. If a string is used after RUN command a programm will be loaded and executed from storage medium (e.g. Tape, Disc). With that command protected BASIC programs can be executed.Example: RUN"disc"
+    Runs the current program, optionally starting at a given line. If no line number is given, starts at the first line.
+If a string is used after RUN command a programm will be loaded and executed from storage medium (e.g. Tape, Disc). With that command protected BASIC programs can be executed.Example:
+RUN"disc"

 ### **SAVE** SAVE "filename"
 Command saves the current BASIC program / content from RAM onto a storage medium (e.g. Tape, Disc)
@@ -362,16 +761,44 @@
 FUNCTION: Calculates the Real value for the Sine of &amp;lt;numeric expression&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.

 ### **SIZEOF** (&amp;lt;array&amp;gt;)
-Gets the size (number of rows) of an array 10 DIM a$(15),b(4,4) 20 PRINT SIZEOF(a$),SIZEOF(b) RUN 16      25
+Gets the size (number of rows) of an array
+10 DIM a$(15),b(4,4)
+20 PRINT SIZEOF(a$),SIZEOF(b)
+RUN
+16      25

 ### **SGN** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Determines the SiGN of the &amp;lt;numeric expression&amp;gt;. Returns -1 if &amp;lt;numeric expression&amp;gt; is less than 0, returns 0 if &amp;lt;numeric expression&amp;gt; = 0, and returns 1 if &amp;lt;numeric expression&amp;gt; is greater than zero.

 ### **SOUND** &amp;lt;C&amp;gt;,&amp;lt;P&amp;gt;\[,&amp;lt;D&amp;gt;\[,&amp;lt;V&amp;gt;\[,&amp;lt;Env&amp;gt;\[,&amp;lt;Ent&amp;gt;\]\]\]\]
-SOUND does only work with running and connected CPCmonitor! the SOUND command has following shape: SOUND Channel,Period,Duration,Volume,Volume-Envelope,Tone-Envelope,Noise C: Selecting channel is done bitwise (combinations are possible of course): (Bit 0) &amp;amp;x00000001 = 1 = channel A (middle) (Bit 1) &amp;amp;x00000010 = 2 = channel B (left) (Bit 2) &amp;amp;x00000100 = 4 = channel C (right) more function about channel are (Bit 3) &amp;amp;x00001000 = 8 = Rendezvous with channel A (Bit 4) &amp;amp;x00010000 = 16 = Rendesvous with channel B (Bit 5) &amp;amp;x00100000 = 32 = Rendesvous with channel C (Bit 6) &amp;amp;x01000000 = 64 = Hold (Bit 7) &amp;amp;x10000000 = 128 = Flush P: the period number can be a figure between 0 and 4095 (2^12-1... 12 means that we have 12 tones (inclusive half-tones) in nine octaves on the CPC in sum and their distance between is the twelves square root of two), where 8 octaves are available. E.g. Octave 0 starts on middle C with number 478. To calculate the period you can use following formula: period=1,000,000/(16*frequency) or in short period=(62,500/frequency) (e.g. the note "A" with the frequency 440 Hz has the period 142 on the CPC) In This emulator you can use strings containing the tone name, e.g. t$="db5":SOUND 1,c,25:SOUND 1,d,25:SOUND 1,t$,25:SOUND 1,db5,25:SOUND 1,"db5",25:REM the last three are the same D: the duration of the note is measured in 1/100th of a second and can be any positive number in the range 1-32,767. 0 and negative number are in combination with ENT and ENV commands usefull. A negative number means repititions. V: the volume number range from 0-15 on a CPC664/6128 ENV: and ENT: For shaping the sound ENV (Volume) and ENT (Frequency) commands are available. The relation between SOUND and those commands comes with a figure between 1 to 15 for ENV (5th parameter) and 1 to 15 for ENT (6th parameter). N: the seventh parameter can be used for blending in noise between the range of 0-15 (BASIC 1.0) or 0-30 (BASIC 1.1). The higher the number the 'deeper' or 'dirty' is the noise.
+SOUND does only work with running and connected CPCmonitor!
+the SOUND command has following shape:
+SOUND Channel,Period,Duration,Volume,Volume-Envelope,Tone-Envelope,Noise
+C: Selecting channel is done bitwise (combinations are possible of course):
+(Bit 0) &amp;amp;x00000001 = 1 = channel A (middle)
+(Bit 1) &amp;amp;x00000010 = 2 = channel B (left)
+(Bit 2) &amp;amp;x00000100 = 4 = channel C (right)
+more function about channel are
+(Bit 3) &amp;amp;x00001000 = 8 = Rendezvous with channel A
+(Bit 4) &amp;amp;x00010000 = 16 = Rendesvous with channel B
+(Bit 5) &amp;amp;x00100000 = 32 = Rendesvous with channel C
+(Bit 6) &amp;amp;x01000000 = 64 = Hold
+(Bit 7) &amp;amp;x10000000 = 128 = Flush
+P: the period number can be a figure between 0 and 4095 (2^12-1... 12 means that we have 12 tones (inclusive half-tones) in nine octaves on the CPC in sum and their distance between is the twelves square root of two), where 8 octaves are available. E.g. Octave 0 starts on middle C with number 478.
+To calculate the period you can use following formula: period=1,000,000/(16*frequency) or in short period=(62,500/frequency)
+(e.g. the note "A" with the frequency 440 Hz has the period 142 on the CPC)
+In This emulator you can use strings containing the tone name, e.g.
+t$="db5":SOUND 1,c,25:SOUND 1,d,25:SOUND 1,t$,25:SOUND 1,db5,25:SOUND 1,"db5",25:REM the last three are the same
+D: the duration of the note is measured in 1/100th of a second and can be any positive number in the range 1-32,767. 0 and negative number are in combination with ENT and ENV commands usefull. A negative number means repititions.
+V: the volume number range from 0-15 on a CPC664/6128
+ENV: and ENT: For shaping the sound ENV (Volume) and ENT (Frequency) commands are available. The relation between SOUND and those commands comes with a figure between 1 to 15 for ENV (5th parameter) and 1 to 15 for ENT (6th parameter).
+N: the seventh parameter can be used for blending in noise between the range of 0-15 (BASIC 1.0) or 0-30 (BASIC 1.1). The higher the number the 'deeper' or 'dirty' is the noise.

 ### **SPC** &amp;lt;n&amp;gt;
-in conjunction with PRINT the SPC command prints out a certain number (n) of spaces. Example: PRINT "Hello";SPC(10);"World"; Hello          World
+in conjunction with PRINT the SPC command prints out a certain number (n) of spaces.
+Example:
+PRINT "Hello";SPC(10);"World";
+Hello          World

 ### **SPEED INK** &amp;lt;n1,n2&amp;gt;
 SPEED INK command defines the frequency of colour changes if a colour change was defined. The duration is calculated by n1=... or n2 =duration/50 seconds
@@ -383,13 +810,25 @@
 SPEED WRITE command sets the speed in baud to write on tape (or the wav-file). 0=1000 Baud, 1=2000 Baud, 2=4000 Baud, 3=8192 Baud.

 ### **SQR** (&amp;lt;numeric expression&amp;gt;)
-FUNCTION: Returns the SQuare Root of the specified &amp;lt;numeric expression&amp;gt;.  Associated keywords: none Example: PRINT SQR(9) 3
+FUNCTION: Returns the SQuare Root of the specified &amp;lt;numeric expression&amp;gt;.
+
+Associated keywords: none
+Example:
+PRINT SQR(9)
+3

 ### **SPACE$** (&amp;lt;count&amp;gt;)
 Gets &amp;lt;count&amp;gt; spaces

 ### **SYMBOL** n,i1\[,i2\[,i3\[,i4\[,i5\[,i6\[,i7\[,i8\]\]\]\]\]\]\]
-Redefines the appearance of the character at index n. Each of the following eight integers defines the contents of one pixel row, starting at the top of the character. Each character fits in an 8x8 pixel grid. Missing lines are considered as empty. Example: SYMBOL 255,255,129,129,129,129,129,129,255 PRINT CHR$(255) Defines character 255 to look like an empty square and prints it.
+Redefines the appearance of the character at index n.
+Each of the following eight integers defines the contents of one pixel row, starting at the top of the character.
+Each character fits in an 8x8 pixel grid.
+Missing lines are considered as empty.
+Example:
+SYMBOL 255,255,129,129,129,129,129,129,255
+PRINT CHR$(255)
+Defines character 255 to look like an empty square and prints it.

 ### **SYMBOL** AFTER n
 no operation, only for compatibility.
@@ -398,37 +837,71 @@
 Breaks program execution at line containing the STOP statement. The message BREAK in is output with the line number.

 ### **STR$** (&amp;lt;numeric expression&amp;gt;)
-FUNCTION: Converts the &amp;lt;numeric expression&amp;gt; to a decimal STRing representation. Useful for converting a number to a string in case of string manipulation. E.g. after converting a figure to a string then the most left character holds the sign: a minus in case the figure is negative and a space in case the figure is positiv. Associated keywords: BIN$, DEC$, HEX$, VAL Example: 10 FIGURE=-1599 20 FIGURE$=STR$(FIGURE) 30 PRINT FIGURE$ -1599
+FUNCTION: Converts the &amp;lt;numeric expression&amp;gt; to a decimal STRing representation.
+Useful for converting a number to a string in case of string manipulation. E.g. after converting a figure to a string then the most left character holds the sign: a minus in case the figure is negative and a space in case the figure is positiv.
+Associated keywords: BIN$, DEC$, HEX$, VAL
+Example:
+10 FIGURE=-1599
+20 FIGURE$=STR$(FIGURE)
+30 PRINT FIGURE$
+-1599

 ### **STRING$** (&amp;lt;length&amp;gt;,&amp;lt;character specifier&amp;gt;)
-FUNCTION: Returns a string expression consisting of the &amp;lt;character specifier&amp;gt; repeated the number of time (in the range 0 to 255) specified in the &amp;lt;length&amp;gt;.     Associated keywords: SPACE$ 1. Example: PRINT STRING$(40,"+") ++++++++++++++++++++++++++++++++++++++++ 2. Example: PRINT STRING$(40,64) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@     NOTE: the &amp;lt;character specifier&amp;gt; 64 refers to the ASCII value of the character '@' and is also equivalent to PRINT STRING$(40,CHR$(64))
+FUNCTION: Returns a string expression consisting of the &amp;lt;character specifier&amp;gt; repeated the number of time (in the range 0 to 255) specified in the &amp;lt;length&amp;gt;.

+    Associated keywords: SPACE$
+1. Example:
+PRINT STRING$(40,"+")
+++++++++++++++++++++++++++++++++++++++++
+2. Example:
+PRINT STRING$(40,64)
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+    NOTE: the &amp;lt;character specifier&amp;gt; 64 refers to the ASCII value of the character '@' and is also equivalent to PRINT STRING$(40,CHR$(64))

 ### **SWAP** 
-WINDOW SWAP works in combination with the window command. Every error or status messages from the operating system will be displayed normaly on WINDOW#0 (=main window). WINDOW SWAP changes the main window to the desired target window. Example (if a window with number 4 was defined before...): WINDOW SWAP 0,4  SWAP &amp;lt;var1&amp;gt;,&amp;lt;var2&amp;gt; swaps the content of two variables (no standard BASIC)
+WINDOW SWAP works in combination with the window command. Every error or status messages from the operating system will be displayed normaly on WINDOW#0 (=main window). WINDOW SWAP changes the main window to the desired target window.
+Example (if a window with number 4 was defined before...):
+WINDOW SWAP 0,4
+
+SWAP &amp;lt;var1&amp;gt;,&amp;lt;var2&amp;gt; swaps the content of two variables (no standard BASIC)

 ### **TAB** &amp;lt;n&amp;gt;
-in conjunction with PRINT the TAB command sets the x position of the cursor to the given position Example: PRINT "Hello";TAB(10);"World"; Hello    World
+in conjunction with PRINT the TAB command sets the x position of the cursor to the given position
+Example:
+PRINT "Hello";TAB(10);"World";
+Hello    World

 ### **TABDOT** (&amp;lt;x&amp;gt;,&amp;lt;real&amp;gt;,&amp;lt;decimal figures&amp;gt;)
-in conjunction with PRINT the TABDOT command sets the decimal point of the value to x position of the cursor to the given position Example: PRINT "Hi";TABDOT(10,123.45,2);"World"; Hi    123.45 THIS COMMAND DOES NOT EXIST IN THE ORINAL LOCOMOTIVE BASIC!
+in conjunction with PRINT the TABDOT command sets the decimal point of the value to x position of the cursor to the given position
+Example:
+PRINT "Hi";TABDOT(10,123.45,2);"World";
+Hi    123.45
+THIS COMMAND DOES NOT EXIST IN THE ORINAL LOCOMOTIVE BASIC!

 ### **TAG** \[#st\]
-Allows text to print at graphics cursor position. (#st does not work, yet). see TAGOFF
+Allows text to print at graphics cursor position. (#st does not work, yet).
+see TAGOFF

 ### **TAGOFF** \[#st\]
 Directs text to stream st printing it at previous text cursor position. (#st does not work, yet)

 ### **TAN** (&amp;lt;numeric expression&amp;gt;)
-FUNCTION: Calculates the TANgent of the &amp;lt;numeric expression&amp;gt;, which must be in the range -200,000 to +200,000.  NOTE: DEG and RAD can be used to force the result of the calculation to degrees or radians respectively.Associated keywords: ATN, COS, DEG, RAD, SIN Example: PRINT TAN(45) 1.61977519
+FUNCTION: Calculates the TANgent of the &amp;lt;numeric expression&amp;gt;, which must be in the range -200,000 to +200,000.
+
+NOTE: DEG and RAD can be used to force the result of the calculation to degrees or radians respectively.Associated keywords: ATN, COS, DEG, RAD, SIN
+Example:
+PRINT TAN(45)
+1.61977519

 ### **TEST** (&amp;lt;x co-ordinate&amp;gt;,&amp;lt;y co-ordinate&amp;gt;)
-FUNCTION: Moves the graphics cursor to the absolute position specified by the &amp;lt;x&amp;gt; and &amp;lt;y co-ordinate&amp;gt;s, and reports the value of the ink at the new location. Associated keywords: MOVE, MOVER, TESTR, XPOS, YPOS
+FUNCTION: Moves the graphics cursor to the absolute position specified by the &amp;lt;x&amp;gt; and &amp;lt;y co-ordinate&amp;gt;s, and reports the value of the ink at the new location.
+Associated keywords: MOVE, MOVER, TESTR, XPOS, YPOS

 ### **TESTR** (&amp;lt;x offset&amp;gt;,&amp;lt;y offset&amp;gt;)
 FUNCTION: Moves the graphics cursor by the amount specified in the &amp;lt;x&amp;gt; and &amp;lt;y offset&amp;gt;s relative to its current position, and reports the value of the ink at the new location.

 ### **TIME** 

-   FUNCTION: Reports the elapsed time since the computer was last switched-on or reset, (excluding periods when reading or writing to disc).     Each second of real time is equal to the returned value = TIME/300.
+   FUNCTION: Reports the elapsed time since the computer was last switched-on or reset, (excluding periods when reading or writing to disc).
+    Each second of real time is equal to the returned value = TIME/300.

 ### **TIME$** (\[format\])
 gives the actual date/time either in hh:mm:ss format or in the given format
@@ -440,16 +913,73 @@
 Turns off the program flow trace (see TRON)

 ### **UNT** (&amp;lt;address&amp;gt;)
-FUNCTION: Return an integer in the range -32768 to +32767 which is the twos-complement equivalent of the unsigned value of the &amp;lt;address expression&amp;gt;. Example: PRINT UNT(&amp;amp;FF66) -154
+FUNCTION: Return an integer in the range -32768 to +32767 which is the twos-complement equivalent of the unsigned value of the &amp;lt;address expression&amp;gt;.
+Example:
+PRINT UNT(&amp;amp;FF66)
+-154

 ### **TRON** 
 Turns on the program flow trace for debugging. Causes the line number of each statement executed to be displayed.

 ### **UPPER$** (&amp;lt;string expression&amp;gt;)
-FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to UPPER case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: LOWER$
+FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to UPPER case.
+Useful for processing input where the answers may come in mixed upper/lower case.
+Associated keywords: LOWER$

 ### **USING** 
-PRINT USING makes it possible to define the print format of an expression transmitted by the command PRINT. One defines for that the &amp;lt;format model&amp;gt; with which one wishes to appear the expression. One uses as &amp;lt;separator&amp;gt; either a comma, or a semicolon. The &amp;lt;format model&amp;gt; is a character string made up with the following « field indicators »: Numericals formats In a number: #  Each sign # indicate the site of a figure.     Example: ###### .   Indicate the site of the decimal point (equivalent with our comma).     Example:######.## ,   (Reserve a space). This sign, being able to appear only immediately before the decimal point, indicates that the figures located on the left of the decimal point will be laid out by groups of three (corresponding to the thousands) separate between them by a comma    Example:######,.## Framing of a number: ££   (Reserve two spaces). Indicate that the sign £ will appear immediately before the first digit or the decimal point, i.e. on one of the sites reserved for digits.        Example: ££######,.## **   (Reserve two spaces). Indicate that all the empty spaces located before the number will be filled by asterisks.       Example: **######,.## **£   (Reserve three spaces). Add the options ** and ££, i.e. the asterisks at the head and the sign £ preceding immediately the number.          Example: **£######,.## $$    (Reserve two spaces). Indicate that the sign $ will appear immediately on the left than the first digit or decimal point, i.e. on sites reserved to digits.        Example:$$######,.## **$  (Reserve three spaces). Add the options ** and $$, i.e. the asterisks at the head and the sign $ preceding immediately the number.        Example: **$######,.## +      Indicate that one wishes to see appearing the sign of the number. This sign will appear before the number if the + is located at the beginning of the &amp;lt;model of format&amp;gt; and after the number if it is located to the end.         Example: +####.#### -       The sign - can appear only TO THE END of the mask. It asks the presence of the sign - after any negative number or any negative exponent. In the absence of this specification, the sign - appears by defect before the negative number.         Example:####.####- ^^^^  Indicate that the number must appear with exponent. The signs ^^^^ are placed AFTER the last site of digits, but BEFORE any final sign + or -          Example: #.####^^^^+ The maximum length of the &amp;lt;model of format&amp;gt; of a number is 20 characters. The numbers are rounded with the number of signs indicated. If a format is too small to contain the expression:     PRINT USING "####";12345678 ... this one is not truncated, but appears in its entirety, preceded by the sign % indicating a «erroneous format». Format of an alphanumeric chain     10 CLS:a$="abcdefghijklmnopqrst"     20 PRINT"alphanumeric chain= ";a$     30 PRINT:PRINT"With  !  =  ";     40 PRINT USING "!";a$     50 PRINT:PRINT"With  \espaces\  =  ";     60 PRINT USING "\           \";a$     70 PRINT:PRINT"With  &amp;amp;  =  ";     80 PRINT USING "&amp;amp;";a$     90 GOTO 90     run !   indicate that only the first character of the chain must appear.     Example: ! \&amp;lt;espaces&amp;gt;\     Indicate that only the x first characters of the chain must appear, x being equal to the length of the format (bars included).     Example:\            \ &amp;amp;   Indicate that the chain must appear «just as it is».       Example: &amp;amp; The &amp;lt;model of format&amp;gt; of a chain cannot exceed 255 characters. Any &amp;lt;model of format &amp;gt; can be represented by an alphanumeric variable, as shows it the following example:     10 a$="FF######,.##"     20 b$="!"     30 PRINT USING a$;12345.6789;     40 PRINT USING b$;"cents"     run
+PRINT USING makes it possible to define the print format of an expression transmitted by the command PRINT. One defines for that the &amp;lt;format model&amp;gt; with which one wishes to appear the expression. One uses as &amp;lt;separator&amp;gt; either a comma, or a semicolon. The &amp;lt;format model&amp;gt; is a character string made up with the following « field indicators »:
+Numericals formats
+In a number:
+#  Each sign # indicate the site of a figure.

+    Example: ######
+.   Indicate the site of the decimal point (equivalent with our comma).
+    Example:######.##
+,   (Reserve a space). This sign, being able to appear only immediately before the decimal point, indicates that the figures located on the left of the decimal point will be laid out by groups of three (corresponding to the thousands) separate between them by a comma    Example:######,.##
+Framing of a number:
+££   (Reserve two spaces). Indicate that the sign £ will appear immediately before the first digit or the decimal point, i.e. on one of the sites reserved for digits.
+       Example: ££######,.##
+**   (Reserve two spaces). Indicate that all the empty spaces located before the number will be filled by asterisks.       Example: **######,.##
+**£   (Reserve three spaces). Add the options ** and ££, i.e. the asterisks at the head and the sign £ preceding immediately the number.
+         Example: **£######,.##
+$$    (Reserve two spaces). Indicate that the sign $ will appear immediately on the left than the first digit or decimal point, i.e. on sites reserved to digits.
+       Example:$$######,.##
+**$  (Reserve three spaces). Add the options ** and $$, i.e. the asterisks at the head and the sign $ preceding immediately the number.
+       Example: **$######,.##
++      Indicate that one wishes to see appearing the sign of the number. This sign will appear before the number if the + is located at the beginning of the &amp;lt;model of format&amp;gt; and after the number if it is located to the end.
+        Example: +####.####
+-       The sign - can appear only TO THE END of the mask. It asks the presence of the sign - after any negative number or any negative exponent. In the absence of this specification, the sign - appears by defect before the negative number.
+        Example:####.####-
+^^^^  Indicate that the number must appear with exponent. The signs ^^^^ are placed AFTER the last site of digits, but BEFORE any final sign + or -
+         Example: #.####^^^^+
+The maximum length of the &amp;lt;model of format&amp;gt; of a number is 20 characters. The numbers are rounded with the number of signs indicated.
+If a format is too small to contain the expression:
+    PRINT USING "####";12345678
+... this one is not truncated, but appears in its entirety, preceded by the sign % indicating a «erroneous format».
+Format of an alphanumeric chain
+    10 CLS:a$="abcdefghijklmnopqrst"
+    20 PRINT"alphanumeric chain= ";a$
+    30 PRINT:PRINT"With  !  =  ";
+    40 PRINT USING "!";a$
+    50 PRINT:PRINT"With  \espaces\  =  ";
+    60 PRINT USING "\           \";a$
+    70 PRINT:PRINT"With  &amp;amp;  =  ";
+    80 PRINT USING "&amp;amp;";a$
+    90 GOTO 90
+    run
+!   indicate that only the first character of the chain must appear.
+    Example: !
+\&amp;lt;espaces&amp;gt;\
+    Indicate that only the x first characters of the chain must appear, x being equal to the length of the format (bars included).
+    Example:\            \
+&amp;amp;   Indicate that the chain must appear «just as it is».
+      Example: &amp;amp;
+The &amp;lt;model of format&amp;gt; of a chain cannot exceed 255 characters.
+Any &amp;lt;model of format &amp;gt; can be represented by an alphanumeric variable, as shows it the following example:
+    10 a$="FF######,.##"
+    20 b$="!"
+    30 PRINT USING a$;12345.6789;
+    40 PRINT USING b$;"cents"
+    run

 ### **VAL** (&amp;lt;string expression&amp;gt;)
 FUNCTION: Returns the numeric VALue, (including any negative sign and decimal point) of the first character(s) in the specified &amp;lt;string expression&amp;gt;.
@@ -464,13 +994,26 @@
 repeats this loop until the expression is false

 ### **WIDTH** \[#&amp;lt;stream expression&amp;gt;,\]&amp;lt;integer expression&amp;gt;
-The WIDTH command defines the maximum number of characters per output line for a specific stream. Once the specified width is reached, Locomotive BASIC automatically inserts a carriage return (line break). This prevents long lines from being truncated or wrapping incorrectly on the printer or screen. It is most commonly used with the printer (stream #8), but can also be applied to the screen (stream #0) or any other open stream.
+The WIDTH command defines the maximum number of characters per output line for a specific stream.
+Once the specified width is reached, Locomotive BASIC automatically inserts a carriage return (line break). This prevents long lines from being truncated or wrapping incorrectly on the printer or screen.
+It is most commonly used with the printer (stream #8), but can also be applied to the screen (stream #0) or any other open stream.

 ### **WINDOW** \[#&amp;lt;stream expression&amp;gt;,\]&amp;lt;L&amp;gt;,&amp;lt;R&amp;gt;,&amp;lt;T&amp;gt;,&amp;lt;B&amp;gt;
-It is possible to define in BASIC eight (8) independent windows for text output. Overlapping is possible.#STREAM: eight window are possible. No. zero (0) is the main window where error or status messages were put out by default. each position is included inside the windowL = left column / R = right column (dependent of the mode 0 = 20 / 1 = 40 / 2 = 80) T = top row / B = bottom row (always from 1 to 25) Example: MODE 1 WINDOW#1,1,40,1,6 ...defines the first top quarter of the screen for window No. 1 ===&amp;gt; if R or B has value of 999, this means the maximum size of the console screen! &amp;lt;===
+It is possible to define in BASIC eight (8) independent windows for text output. Overlapping is possible.#STREAM: eight window are possible. No. zero (0) is the main window where error or status messages were put out by default.
+each position is included inside the windowL = left column / R = right column (dependent of the mode 0 = 20 / 1 = 40 / 2 = 80)
+T = top row / B = bottom row (always from 1 to 25)
+Example:
+MODE 1
+WINDOW#1,1,40,1,6
+...defines the first top quarter of the screen for window No. 1
+===&amp;gt; if R or B has value of 999, this means the maximum size of the console screen! &amp;lt;===

 ### **WRITE** \[#&amp;lt;channel number&amp;gt;\]\[&amp;lt;list of:&amp;lt;article to print&amp;gt;\]\[;\]\[USING&amp;lt;format model&amp;gt;\]\[&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;\]\[;|&amp;lt;Space&amp;gt;\]
-The same as PRINT, but strings are printed in "" 10 a$="Hello" 20 WRITE 100,a$ RUN 100          "Hello"
+The same as PRINT, but strings are printed in ""
+10 a$="Hello"
+20 WRITE 100,a$
+RUN
+100          "Hello"

 ### **XPOS** 
 FUNCTION: Reports the current horizontal (X)POSition of the graphics cursor.
@@ -479,7 +1022,22 @@
 FUNCTION: Reports the current vertical (Y)POSition of the graphics cursor.

 ### **ZONE** i
-Changes the width of the print zone. Default is 13.     Example: 10 MODE 2 20 PRINT"normal zone (13)" 30 PRINT 1,2,3,4 RUN normal zone(13) 1           2            3            4 Ready 20 PRINT"now with different zone(5)" 30 ZONE 5 40 PRINT 1,2,3,4 RUN now with different zone(5) 1     2     3     4 Ready
+Changes the width of the print zone. Default is 13.

+    Example:
+10 MODE 2
+20 PRINT"normal zone (13)"
+30 PRINT 1,2,3,4
+RUN
+normal zone(13)
+1           2            3            4
+Ready
+20 PRINT"now with different zone(5)"
+30 ZONE 5
+40 PRINT 1,2,3,4
+RUN
+now with different zone(5)
+1     2     3     4
+Ready

 ### **|BITMAP** \[l,r,t,b\[,bmp\]\]
 creates a bitmap in base64-format to insert into an img-html-tag (&amp;lt;img src="data:image/png;base64,Base64String alt="Embedded Image"/&amp;gt;) from the screen. You can use a rect of the screen. If bmp=-1 then the bitmap is not encoded as base64 to realize a bitmap download
@@ -497,28 +1055,78 @@
 In a Webserver environment prints the very first header before &amp;lt;html&amp;gt; and new cookie declarations.

 ### **|COOKIE** 
-In a Webserver environment this command reads all COOKIE variables and stores them in the corresponding string variables with the same name.  e.g. 10 |COOKIE 20 PRINT foo$ test Ready
+In a Webserver environment this command reads all COOKIE variables and stores them in the corresponding string variables with the same name. 
+e.g. 10 |COOKIE
+20 PRINT foo$
+test
+Ready

 ### **|GET** 
-In a Webserver environment this command reads all GET variables and stores them in the corresponding string variables with the same name. Hint: requesturi$ is set to the active url. e.g. &amp;lt;input name="foo" value="test" /&amp;gt; ... 10 |GET 20 PRINT foo$ test Ready
+In a Webserver environment this command reads all GET variables and stores them in the corresponding string variables with the same name.
+Hint: requesturi$ is set to the active url.
+e.g. &amp;lt;input name="foo" value="test" /&amp;gt;
+...
+10 |GET
+20 PRINT foo$
+test
+Ready

 ### **|GUI** 
 execte CPCdisplay[.exe] to communicate with it. CPCdisplay shows all the graphics and plays sound, which the terminal cannot do. (Show |SIXELMODE)

 ### **|JSON** NEW|LOAD|PARSE|GET|COUNT|TYPE|SET|ADD|ADDNUM|APPEND|ADDOBJECT|DELETE|SAVE|FREE
-|JSON Command Reference  - NEW   Create new empty JSON {} - LOAD "file.json"   Load JSON from file - PARSE "jsonstring$"   Parse JSON string - GET "path", var   Read value into variable - COUNT "path", var%   Count array items or object keys - TYPE "path", var$   Get type (object/array/string/number/boolean/null) - SET "path", "value"   Change existing string - SETNUM "path", num   Change existing number - ADD "path", "value"   Add new string field - ADDNUM "path", num   Add new numeric field - APPEND "path", "value"   Append value to array - ADDOBJECT "path"   Add new empty object to array - DELETE "path"   Delete field or element - SAVE "file.json"   Save JSON to file - FREE   Release JSON from memory  Path examples: kunden[3].name kunden[0].hobbies[2] kunden[-1]
+|JSON Command Reference
+
+- NEW

+  Create new empty JSON {}
+- LOAD "file.json"
+  Load JSON from file
+- PARSE "jsonstring$"
+  Parse JSON string
+- GET "path", var
+  Read value into variable
+- COUNT "path", var%
+  Count array items or object keys
+- TYPE "path", var$
+  Get type (object/array/string/number/boolean/null)
+- SET "path", "value"
+  Change existing string
+- SETNUM "path", num
+  Change existing number
+- ADD "path", "value"
+  Add new string field
+- ADDNUM "path", num
+  Add new numeric field
+- APPEND "path", "value"
+  Append value to array
+- ADDOBJECT "path"
+  Add new empty object to array
+- DELETE "path"
+  Delete field or element
+- SAVE "file.json"
+  Save JSON to file
+- FREE
+  Release JSON from memory
+
+Path examples:
+kunden[3].name
+kunden[0].hobbies[2]
+kunden[-1]

 ### **|LOADENVIRONMENT** 
 loads the previosly saved BASIC environment.

 ### **|MYSQL** CONNECT|QUERY|CLOSE\[&amp;lt;variable|string&amp;gt;\]\[,&amp;lt;array&amp;gt;\]
-plase refer |SQLITE for details. |MYSQL works exactly identically, but to connect to have to use it in this way: |MYSQL CONNECT "localhost;meinuser;meinpass;meinedb"
+plase refer |SQLITE for details. |MYSQL works exactly identically, but to connect to have to use it in this way:
+|MYSQL CONNECT "localhost;meinuser;meinpass;meinedb"

 ### **|SAVEENVIRONMENT** 
 Saves the complete BASIC Environment (program, variables) to default.basicsh.json

 ### **|SETCOOKIE** ,&amp;lt;name&amp;gt;,&amp;lt;value&amp;gt;\[,&amp;lt;expires in minutes&amp;gt;\]
-In a Webserver environment this command sets a COOKIE variables and stores it in the buffer. |HTMLSTART makes it permanent. e.g.: |SETCOOKIE,"foo","content",60 THIS COMMAND MUST BE USED BEFORE |HTMLSTART!
+In a Webserver environment this command sets a COOKIE variables and stores it in the buffer. |HTMLSTART makes it permanent.
+e.g.: |SETCOOKIE,"foo","content",60
+THIS COMMAND MUST BE USED BEFORE |HTMLSTART!

 ### **|PARAMCOUNT** \[,&amp;lt;variable&amp;gt;\]
 prints the number of parameters or puts it into &amp;lt;variable&amp;gt;
@@ -548,7 +1156,25 @@
 Lists all possible POSIX Shell commands

 ### **|SQLITE** CONNECT|QUERY|CLOSE\[&amp;lt;variable|string&amp;gt;\]\[,&amp;lt;array&amp;gt;\]
-Use of a SQlite database |Create or open an database:  |SQLITE CONNECT &amp;lt;database name&amp;gt; Executes an query:  |SQLITE QUERY "create table test(name:varchar(255))" or to put a result into an array a$:  |SQLTE QUERY "select * from test",a$ Close the database: |SQLITE CLOSE  Example: 10 |SQLITE CONNECT "zl.db" 20 |SQLITE QUERY "create table test(name varchar(80))" 30 |SQLITE QUERY "insert into test (name) values (""Klaus""),(""Xaver""),(""Anton""),(""Dietmar"")" 40 |SQLITE QUERY "select * from test order by name",a$ 50 FOR i=0 TO SIZEOF(a$)-1 60 PRINT a$(i) 70 NEXT 90 |SQLITE CLOSE
+Use of a SQlite database
+|Create or open an database:

+ |SQLITE CONNECT &amp;lt;database name&amp;gt;
+Executes an query:
+ |SQLITE QUERY "create table test(name:varchar(255))"
+or to put a result into an array a$:
+ |SQLTE QUERY "select * from test",a$
+Close the database:
+|SQLITE CLOSE
+
+Example:
+10 |SQLITE CONNECT "zl.db"
+20 |SQLITE QUERY "create table test(name varchar(80))"
+30 |SQLITE QUERY "insert into test (name) values (""Klaus""),(""Xaver""),(""Anton""),(""Dietmar"")"
+40 |SQLITE QUERY "select * from test order by name",a$
+50 FOR i=0 TO SIZEOF(a$)-1
+60 PRINT a$(i)
+70 NEXT
+90 |SQLITE CLOSE

 ### **|TAPE** 
 Files are written to a wav file in Amstrad CPC Tape format
@@ -563,11 +1189,18 @@
 Any command that is not part of the BASIC language will be passed to the operating system for execution. If it fails, you get a "Syntax error".

 ### **Zahlen (Schreibweise)** 
-Dezimal: 123 Hexadezimal: &amp;amp;C9 Binär: &amp;amp;x10101001 Exponential: 3.2e4 = 32000 TRUE=-1, FALSE=0
+Dezimal: 123
+Hexadezimal: &amp;amp;C9
+Binär: &amp;amp;x10101001
+Exponential: 3.2e4 = 32000
+TRUE=-1, FALSE=0

 ### **Zeichen** (Codierung im Grafikmodus)
-Der Normale ASCII-Zeichensatz des Schneider CPC wurde implementiert, jedoch im grafischen Textmodus werden die UTF8-Zeichen für die deutschen Umlaute äöüÄÖÜß korrekt umgesetzt. ein doppeltes "" im String wird dann als CHR$(34) umgedeutet, um die Eingabe zu vereinfachen. Mit der Taste "Einfg" (insert) wird im Grafikmodus das unter dem Cursor liegende Zeichen kopiert (COPY beim CPC)
+Der Normale ASCII-Zeichensatz des Schneider CPC wurde implementiert, jedoch im grafischen Textmodus werden die UTF8-Zeichen für die deutschen Umlaute äöüÄÖÜß korrekt umgesetzt.
+ein doppeltes "" im String wird dann als CHR$(34) umgedeutet, um die Eingabe zu vereinfachen.
+Mit der Taste "Einfg" (insert) wird im Grafikmodus das unter dem Cursor liegende Zeichen kopiert (COPY beim CPC)

 ### **Rechnen** 
-Wenn die Kommandozeile mit +,-,*,/,^,= anfängt, so wird das letzte numerische Ergebnis vorangesetzt und mann kann sich das PRINT sparen. Damit Kann die Shell leichter als Taschenrechner verwendet werden Der Operator = am Anfang bewirkt somit das gleiche wie PRINT, das Ergebnis wird aber nicht in dezimalschreibweise, sondern als Bruch ausgegeben.
-
+Wenn die Kommandozeile mit +,-,*,/,^,= anfängt, so wird das letzte numerische Ergebnis vorangesetzt und mann kann sich das PRINT sparen. Damit Kann die Shell leichter als Taschenrechner verwendet werden
+Der Operator = am Anfang bewirkt somit das gleiche wie PRINT, das Ergebnis wird aber nicht in dezimalschreibweise, sondern als Bruch ausgegeben.
+
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dietmar Schmidt</dc:creator><pubDate>Sat, 06 Jun 2026 14:03:30 -0000</pubDate><guid>https://sourceforge.net5f3b51d1fa80ccd02d6b865129426992e6377062</guid></item><item><title>Befehlsliste modified by Dietmar Schmidt</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,7 +1,7 @@
 ### **ABS** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Returns the ABSolute value of the given numeric expression (n). This means that negative numbers are returned as positive. Associated keywords: SGN Example: PRINT ABS(-67.98) 67.98

-### **AFTER** &amp;lt;time delay&amp;gt;[,&amp;lt;timer number&amp;gt;] GOSUB &amp;lt;line number&amp;gt;
+### **AFTER** &amp;lt;time delay&amp;gt;\[,&amp;lt;timer number&amp;gt;\] GOSUB &amp;lt;line number&amp;gt;
 Waits for &amp;lt;time delay&amp;gt;/50 seconds and then jumps NON-RECURRING to the subroutine at &amp;lt;line number&amp;gt; (see also "EVERY i[,t] GOSUB line").

 ### **ALIAS** &amp;lt;alias&amp;gt;=&amp;lt;command&amp;gt;|PRINT
@@ -13,19 +13,19 @@
 ### **ATN** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Calculates the Real value for the Arc-TaNgent of &amp;lt;numeric expression&amp;gt;, (n) to a real number ranging from -PI/2 to +PI/2 of the value specified.

-### **AUTO** [&amp;lt;start line&amp;gt;[,&amp;lt;line step&amp;gt;]]
+### **AUTO** \[&amp;lt;start line&amp;gt;\[,&amp;lt;line step&amp;gt;\]\]
 Creates automatically numbers for programming code

-### **BIN$** (&amp;lt;unsigned integer expression&amp;gt;[,&amp;lt;integer expression&amp;gt;])
+### **BIN$** (&amp;lt;unsigned integer expression&amp;gt;\[,&amp;lt;integer expression&amp;gt;\])
 FUNCTION: Produces a string of BINary digits respresenting the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of binary digits instruced by the second &amp;lt;integer expression&amp;gt; (in the range of 0 to 16).  If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will produced in as many digits as are required. The &amp;lt;unsigned integer expression&amp;gt; to be converted into binary form must yield a value in the range -32768 to 65535. Associated keywords: DEC$, HEX$, STR$ Example: PRINT BIN$(66,8) 01000000

-### **BORDER** i1[,i2]
+### **BORDER** i1\[,i2\]
 Sets the Border color to i1. If i2 is given, the border is flashing. Instead color index number (0..28) you can use RGB colors (#123456)

-### **BYE** [i]
+### **BYE** \[i\]
 exits the BASIC interpreter. With i=0 no message appears

-### **CALL** &amp;lt;address expression&amp;gt;[,&amp;lt;list of: parameter&amp;gt;]
+### **CALL** &amp;lt;address expression&amp;gt;\[,&amp;lt;list of: parameter&amp;gt;\]
 Allows a machine code routine to be called by BASIC. CALL 0:REM resets the computer completely CALL &amp;amp;BB18:REM wait until any key is pressed CALL &amp;amp;BD19:REM same as FRAME

 ### **CAT** 
@@ -37,19 +37,19 @@
 ### **CINT** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Returns the value of the &amp;lt;numeric expression&amp;gt; (n), Converting it to a rounded INTeger in the range -32768 to 32767 (or more in this interpreter). Associated keywords: CREAL, FIX, INT, ROUND, UNT Example: 10 n=-2.6 20 PRINT CINT(n) run -3

-### **CIRCLE** &amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;lt;radius&amp;gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color&amp;gt;]]
+### **CIRCLE** &amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;lt;radius&amp;gt;\[,&amp;lt;color&amp;gt;\[,&amp;lt;fill color&amp;gt;\]\]
 Draws a circle on the screen

-### **CHAIN** &amp;lt;file name&amp;gt;[,&amp;lt;line number expression&amp;gt;]
+### **CHAIN** &amp;lt;file name&amp;gt;\[,&amp;lt;line number expression&amp;gt;\]
 Enables the specified program to be loaded and RUN automatically. If the optional parameter &amp;lt;line number expression&amp;gt; is specified, the program execution will commence from that line.

-### **CHAIN MERGE** &amp;lt;file name&amp;gt;[,&amp;lt;line number expression&amp;gt; | [,[&amp;lt;line number expression&amp;gt;],DELETE &amp;lt;line number range&amp;gt;]]
+### **CHAIN MERGE** &amp;lt;file name&amp;gt;\[,&amp;lt;line number expression&amp;gt; | \[,\[&amp;lt;line number expression&amp;gt;\],DELETE &amp;lt;line number range&amp;gt;\]\]
 Loads the specified program from tape or disc, merges it into the program in memory, and starts execution of the merged program. The parameter DELETE &amp;lt;line number range&amp;gt; is used to delete part of the original program before running it, if required.

-### **CLEAR** [INPUT]
+### **CLEAR** \[INPUT\]
 CLEAR Clears all variables from memory, leaving the program in memory unchanged. All open files are abandoned. The command clear inside a subroutine (GOSUB... RETURN) will also clear the "stack pointer" address of the gosub heap. That means that a RETURN won't work and a GOTO has to be used instead. CLEAR INPUT clears the key buffer.

-### **CLG** [&amp;lt;masked ink&amp;gt;]
+### **CLG** \[&amp;lt;masked ink&amp;gt;\]
 Clears the graphics screen to colour specified by &amp;lt;masked ink&amp;gt;. If parameter &amp;lt;masked ink&amp;gt; is not specified then the graphics screen is cleared to the colour specified by the GRAPHICS PAPER statement.

 ### **CLOSEIN** 
@@ -58,7 +58,7 @@
 ### **CLOSEOUT** 
 Closes any output file

-### **CLS** [#&amp;lt;stream expression&amp;gt;]
+### **CLS** \[#&amp;lt;stream expression&amp;gt;\]
 Clears the window specified by &amp;lt;stream expression&amp;gt;. If &amp;lt;stream expression&amp;gt; is omitted it defaults to #0 (usually the whole screen). The text cursor of the stream is moved to the upper left corner.

 ### **CONT** 
@@ -76,7 +76,7 @@
 ### **CURSOR** &amp;lt;num&amp;gt;
 enables (1) or disables (0) the cursor.

-### **DATA** x1[,x2,x3...]
+### **DATA** x1\[,x2,x3...\]
 Defines a data section to be used by READ calls. Data values can be of any type (integer, real or string) as long as the corresponding READ calls use a variable of the right type. Example: 10 DATA "Hello, world!", 42 20 READ message$:PRINT message$ 30 READ answer:PRINT "The answer is:";answer See also: READ, RESTORE

 ### **DEC$** &amp;lt;numeric expression&amp;gt;,&amp;lt;format template&amp;gt;
@@ -97,22 +97,22 @@
 ### **DEG** 
 Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: RAD

-### **DELETE** [first line][-[last line]]
+### **DELETE** \[first line\]\[-\[last line\]\]
 Deletes the current program completely (without arguments) or only the given line or line range. Even DELETE - is legal, it has the same effect as DELETE The lines specified do not have to exist, all lines matching the range will be deleted and having no matches does not cause an error.

 ### **DI** 
 Disables interrupts until re-enabled by EI command or by RETURN at end of an interrupts service routine.

-### **DIM** a[%|!|$](d1[,d2[,...]])
+### **DIM** a\[%|!|$\](d1\[,d2\[,...\]\])
 Creates array a with single or multiple dimensions. You may optionally specify integer (%), real (!) or string ($) type otherwise it defaults to the current type set for the first letter of the array name. d1 is size of first dimension-1, d2 is size of second dimension-1 and so on. DIM x(10) will create an array with 11 elements, x(0) is the first element, x(10) is the eleventh and last. You can specify as many dimensions as will fit on one 255 character line, which is a maximum of 125. Trying to create an array that already exists will generate an Array already dimensioned error. If an array is not specified by DIM before being accessed, each dimension value defaults to 10. The maximum dimensions that can be created this way is three. NEW: In this interpreter you can resize arrays without destroying the content.

 ### **EDIT** &amp;lt;line&amp;gt;
 Display 1 program line for editing. The following keys can be used in editing mode, or during typing in BASIC: CTRL+CURSOR LEFT - go to start of line CTRL+CURSOR RIGHT - go to end of line

-### **DRAW** x,y[,[i1][,i2]]
+### **DRAW** x,y\[,\[i1\]\[,i2\]\]
 Draws a line from the current cursor position to position x,y. i1 specifies colour, i2 is the drawing style. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour

-### **DRAWR** xr,yr[,[i1][,i2]]
+### **DRAWR** xr,yr\[,\[i1\]\[,i2\]\]
 Draws a line from current graphics cursor position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as DRAW.

 ### **EI** 
@@ -121,16 +121,16 @@
 ### **END** 
 Indicates end of program

-### **ENT** &amp;lt;tone envelope number&amp;gt;[,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;]
+### **ENT** &amp;lt;tone envelope number&amp;gt;\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]\[,&amp;lt;tone env. section&amp;gt;\]
 The ENT command define the TONE shape of a sound which means manipulating the frequency in a certain range. The command could looks like: ENT NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255) 

-### **ENV** &amp;lt;volume envelope number&amp;gt;[,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;]
+### **ENV** &amp;lt;volume envelope number&amp;gt;\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]\[,&amp;lt;volume env. section&amp;gt;\]
 The ENV command define the VOLUME shape of a sound which means manipulating the loudness in a certain range. The command could looks like: ENV NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255)

 ### **EOF** 
 FUNCTION: Checks to see if end of specified file has been reached during input. Returns 0 (false) until the end of file, then -1 (true). Associated keywords: OPENIN, CLOSEIN This example reads a file from disc and print it out on screen. Like the "TYPE" command in CP/M 10 OPENIN "text.txt" 20 WHILE NOT EOF 30 LINE INPUT#9,a$ 40 PRINT a$ 50 WEND 60 CLOSEIN

-### **ERASE** v1[% | ! | $][,v2[% | ! | $][,...]]
+### **ERASE** v1\[% | ! | $\]\[,v2\[% | ! | $\]\[,...\]\]
 Erases the specified array(s) or variables and frees the memory used.

 ### **ERL** 
@@ -145,7 +145,7 @@
 ### **EURO$** 
 In Graphic-Mode: chr$(&amp;amp;C3)+chr$(&amp;amp;80). In Text-Mode: chr$($E2)+chr$($82)+chr$($AC) (UTF8-Euro). This is the Euro Sign (new in this interpreter)

-### **EVERY** i[,t] GOSUB ln
+### **EVERY** i\[,t\] GOSUB ln
 BASIC branches to the subroutine at line ln EVERY (reccuring) i/50 seconds. (see also "AFTER i[,t] GOSUB line") There are 4 delay timers from 0 to 9 (in CPC onlc 0 to 3) which can be specified with &amp;lt;timer number&amp;gt;. If omitted &amp;lt;timer number&amp;gt; defaults to 0. In the case of parallel task has 3 the highest and 0 the lowest priority. With DI or EI you can disable or enable the timing interrupt. With REMAIN &amp;lt;timer number&amp;gt; you can also disable an AFTER or EVERY construct and stores the "remaining" time (&amp;gt; REMAIN) Interrupts run as long as the main loop / program runs, even the main programm is paused &amp;gt; press ESC only once not twice for a break. It is important to know or realise that low-priority-interrupts which occurs simultanously to higher-priority-interrupts are not lost. Their task remains or handled again after finishing the higher-prio interrupt.10 REM &amp;gt; interrupts 20 EVERY 50,0 GOSUB 100: REM &amp;gt; lowest priority 30 EVERY 100,1 GOSUB 200 40 EVERY 200,2 GOSUB 300: 50 AFTER 1000,3 GOSUB 400: REM &amp;gt; highest priority 60 WHILE flag=0 70 a=a+1:print a 80 WEND 90 END 100 REM #0 110 PEN 2:PRINT "timer 0":PEN 1 120 RETURN 200 REM #1 210 PEN 2:PRINT "timer 1":PEN 1 220 RETURN 300 REM #2 310 PEN 2:PRINT "timer 2":PEN 1 320 RETURN 400 REM #3 410 flag=1:PEN 2:PRINT "no more interrupts..." 420 RETURN Hint: Timing with interrupts is important, especially if more than one interrupts run. If the interval of a subroutine driven by an interrupt is too long than the processor can never get back to deal the main program again.

 ### **EXP** (&amp;lt;float expression&amp;gt;)
@@ -181,16 +181,16 @@
 ### **GRAPHICS** PEN|PAPER &amp;lt;color&amp;gt;
 ...works only in combination with the command PEN or PAPER to set the plotting/drawing pen or background colour. If the TAG command is used to set text at the graphics cursor GRAPHICS PEN or GRAPHICS PAPER instead of the regular PEN or PAPERis necessary to colour the text.

-### **HELP** [&amp;lt;command&amp;gt;|"search string"]
+### **HELP** \[&amp;lt;command&amp;gt;|"search string"\]
 displays the help page of all commands of only one &amp;lt;command&amp;gt; or searches for a expression.

 ### **IF** THEN ELSE
 Asks for a choice with the IF...THEN...ELSE statement.     IF compares the entry condition in a logical way     THEN contains instruction if the comparison is true     ELSE contains instruction if it's false.Example: 10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE GOTO 10     In case of nested choices there's a possibility to that with an IF...THEN instruction but not very recommended:10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE IF f&amp;lt;10 THEN PRINT "too small" ELSE PRINT "too big"   30 GOTO 10Other nested structures like IF...THEN...ELSE...ELSE won't work first because the Locomotive Basic only looks after the first ELSE instruction found and can't execute more single commands as a block  for a certain condition in comparision to e.g. "PASCAL" &amp;gt; begin...end-block, "C" &amp;gt; {...}-block. After a THEN or ELSE you don't need to type GOTO. The following two examples are the same: IF -1 THEN GOTO 30 ELSE GOTO 40 IF -1 THEN 30 ELSE 40

-### **HEX$** (&amp;lt;unsigned integer expression&amp;gt;[,&amp;lt;field width&amp;gt;])
+### **HEX$** (&amp;lt;unsigned integer expression&amp;gt;\[,&amp;lt;field width&amp;gt;\])
 FUNCTION: Produces a $tring of HEXadecimal digits representing the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of hexadecimal digits. If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will be produced in as many digits as are required. Accociated keywords: BIN$, DEC$, STR$, UNT Example: PRINT HEX$(255,4) 00FF

-### **INK** i1[,i2]
+### **INK** i1\[,i2\]
 Sets the color with given number to i1. If i2 is given, the color is flashing. Instead color index number (0..28) you can use RGB colors (#123456)

 ### **INKEY** (&amp;lt;integer expression&amp;gt;)
@@ -202,10 +202,10 @@
 ### **INP** (&amp;lt;port number&amp;gt;)
 FUNCTION: Returns the INPut value from the I/O address specified in the &amp;lt;port number&amp;gt;. Associated keywords: OUT, WAIT

-### **INPUT** [#stream,]["&amp;lt;String&amp;gt;"[;|,]&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;]...]
+### **INPUT** \[#stream,\]\["&amp;lt;String&amp;gt;"\[;|,\]&amp;lt;variable&amp;gt;\[,&amp;lt;variable&amp;gt;\[,&amp;lt;variable&amp;gt;\]...\]
 Reads a value from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to LINE INPUT

-### **INSTR** ([&amp;lt;startposition&amp;gt;,]&amp;lt;searched string&amp;gt;,&amp;lt;searched for string&amp;gt;)
+### **INSTR** (\[&amp;lt;startposition&amp;gt;,\]&amp;lt;searched string&amp;gt;,&amp;lt;searched for string&amp;gt;)
 FUNCTION: Searches the first &amp;lt;searched string&amp;gt; expression to find the first occurance of the &amp;lt;searched for string expression&amp;lt;, and reports the position of its occurance within the &amp;lt;searched string&amp;gt;. If the &amp;lt;searched for string&amp;gt; does not occur within the &amp;lt;searched string&amp;gt;, then 0 is reported. The position at which to start searching the &amp;lt;searched string&amp;gt; is optionally specifiable using the &amp;lt;start position&amp;gt; parameter which must yield an integer number in the range 1 to 255. Associated keywords: none 1. Example: a$="ABCD":PRINT INSTR(a$,"C") 3 Ready 2. Example: a$="Hello":IF INSTR(a$,"i")&amp;lt;&amp;gt;0 THEN PRINT "no" else a$ no Ready 3. Example: 10 CLS 20 alphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" 30 INPUT "Enter a letter";a$ 40 b$=UPPER$(a$) 50 PRINT b$;" is number"; 60 PRINT INSTR(alphabet$,b$); 70 PRINT "in the alphabet.":PRINT 80 GOTO 40 run

 ### **INT** (&amp;lt;value&amp;gt;)
@@ -223,16 +223,16 @@
 ### **LET** 
 Was used to define variables. You don't need to use the LET command because it is just a command which was added for compatibility reasons.

-### **LINE INPUT** [#stream,]["&amp;lt;String&amp;gt;"[;|,]&amp;lt;variable$&amp;gt;
+### **LINE INPUT** \[#stream,\]\["&amp;lt;String&amp;gt;"\[;|,\]&amp;lt;variable$&amp;gt;
 Reads a line as a whole string from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to INPUT

-### **LIST** [&amp;lt;line number&amp;gt;][-[&amp;lt;line number&amp;gt;]], [#&amp;lt;stream expression&amp;gt;]
+### **LIST** \[&amp;lt;line number&amp;gt;\]\[-\[&amp;lt;line number&amp;gt;\]\], \[#&amp;lt;stream expression&amp;gt;\]
 A command for listing the Basic program code.  Possibility for manipulating display is using line numbers with a minus symbol.  Example: LIST 100- List every line after line number 100. LIST -100  List every line until line number 100 has reached. LIST 100-200     List every line between line number 100 and 200 included With the help of separate window definitions it is possible to print out long listings, better differentiate parts / slices of it into different window predefined Example: LIST 1000-1100,#1 LIST 3000-3100,#2  ...prints out two parts of one program out into two windows (if they are defined well)

 ### **LOAD** &amp;lt;file name&amp;gt;
 With this directive you may load any file in memory Basic files (extension .bas) are loaded in Basic memory, you cannot choose loading address

-### **LOCATE** [#&amp;lt;stream expression&amp;gt;][,] x,y
+### **LOCATE** \[#&amp;lt;stream expression&amp;gt;\]\[,\] x,y
 Moves the text cursor to the x,y location. x starts at 1 on the left and goes up to 20 (in mode 0), 40 (in mode 1) or 80 (in mode 2). y starts at 1 at the top and ends at 25 at the bottom.

 ### **LOG** (&amp;lt;numeric expression&amp;gt;)
@@ -244,7 +244,7 @@
 ### **LOWER$** (&amp;lt;string expression&amp;gt;)
 FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to lower case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: UPPER$

-### **MASK** [i1][,i2]
+### **MASK** \[i1\]\[,i2\]
 Sets bits in each adjacent group of 8 pixel on (1) or off (0) according to binary value of i1 (0-255). i2 determines whether the first point of the line is to plotted (1) or not (0). Example: 10 CLG 2:MASK 1:MOVE 0,0:DRAW 500,400 20 MASK 15:MOVE 0,0:DRAW 500,400

 ### **MAX** (&amp;lt;list of: numeric expression&amp;gt;)
@@ -253,19 +253,19 @@
 ### **MEMORY** &amp;lt;memory address&amp;gt;
 You don't need to use the command because it is just a command which was added for compatibility reasons.

-### **MID$** (&amp;lt;string&amp;gt;,&amp;lt;start position&amp;gt;[,&amp;lt;length of substring&amp;gt;[,0|-1]])
+### **MID$** (&amp;lt;string&amp;gt;,&amp;lt;start position&amp;gt;\[,&amp;lt;length of substring&amp;gt;\[,0|-1\]\])
 With the MID$ command there are two applications possible: 1. MID$ creates a new substring out of the give &amp;lt;string&amp;gt; and starts at the defined position &amp;lt;start position&amp;gt; and print the number of given characters by &amp;lt;length of substring&amp;gt;. If no length is defined every character from &amp;lt;start position&amp;gt; will be printed out. If a higher value of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; than the real length of the initial string is defined a blank string will be printed. The range of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; is from 0 up to 255 characters.  2. With MID$ you're able to manipulates given strings by inserting a new string. Take care of the two different applications and using in BASIC. The optional last parameter does not exist in original Locomotive Basic. if this parameter is -1 (true) the part of the first string will be replaced with the replacement string, inimportant how long it is.  Example for the 1. application: 10 a$="Hello" 20 PRINT MID$(a$,2,2) run el Ready  Example for the 2. application 10 a$="Hello" 20 MID$(a$,2,3)="ipp" 30 PRINT a$ run Hippo Ready

 ### **MIN** (&amp;lt;list of: numeric expression&amp;gt;)
 FUNCTION: Returns the MINimum value from the &amp;lt;list of: numeric expressions&amp;gt;

-### **MODE** m[,x,y]
+### **MODE** m\[,x,y\]
 Changes the screen mode: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 640×400 in 4 colours. (only text mode in the GUI, graphic mode is always 640x400) When x,y is given, the resolution is set to x,y - so you can use a larger or smaller window than in original CPC.

-### **MOVE** x,y[,[i1][,i2]]
+### **MOVE** x,y\[,\[i1\]\[,i2\]\]
 Moves the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour

-### **MOVER** xr,yr[,[i1][,i2]]
+### **MOVER** xr,yr\[,\[i1\]\[,i2\]\]
 moves the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.

 ### **NEW** 
@@ -280,28 +280,28 @@
 ### **OPENOUT** &amp;lt;filename&amp;gt;
 Opens the specified data file for writing. It writes an ASCII file. (To close writing use the command closeout.)

-### **ORIGIN** x,y[,l,r,t,b]
+### **ORIGIN** x,y\[,l,r,t,b\]
 The command defines the origin (world reference point) for the graphics coordinate system. Normally the reference origin is in the left, bottom corner of the default screen and has 0,0. So the most left coordinate value could be by default 639 and the most top value 399. Independent from the actual modus (2, 1 or 0) the range for the x coordinate are always 640 points and for the y coordinate 400 points. In theory you are able to address 256,000 pixel but only 128,000 are visible due to the maximal resolution of the hardware. x,y are the the new coordinates for the 'world reference'. l,r,t,b are optional and set the borders for the new graphical window (works in the same way like the WINDOW command for a text window). l,r,t,b means left, right, tob and bottom coordinates. If a new graphical window (borders) is defined every point or drawn line won't be plotted (clipped internally). Example (the line drawn will be cutted): ORIGIN 320,200,250,450,100,300 DRAW 0,200

 ### **OUT** &amp;lt;port number&amp;gt;,&amp;lt;value&amp;gt;
 Sets the value to the I/O address specified in the &amp;lt;port number&amp;gt;. Associated keywords: INP, WAIT

-### **PAPER** [#&amp;lt;stream expression&amp;gt;][,]
+### **PAPER** \[#&amp;lt;stream expression&amp;gt;\]\[,\]
 sets the background color

-### **PEN** [#&amp;lt;stream expression&amp;gt;][,]
+### **PEN** \[#&amp;lt;stream expression&amp;gt;\]\[,\]
 sets the text color

-### **PLOT** x,y[,[i1][,i2]]
+### **PLOT** x,y\[,\[i1\]\[,i2\]\]
 Plots a point at the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour

-### **PLOTR** xr,yr[,[i1][,i2]]
+### **PLOTR** xr,yr\[,\[i1\]\[,i2\]\]
 Plots a point at the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.

 ### **POS** (#&amp;lt;stream expression&amp;gt;)
 FUNCTION: Reports the current horizontal POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression&amp;gt; MUST be specified, and does NOT default to #0. POS(#8) reports the current horizontal carriage position for the printer, where 1 is the extreme left hand edge. POS(#9) reports the logical position in the disc file stream, i.e. the number of printing characters sent to the stream since the last carriage return.

-### **PRINT** [#&amp;lt;channel number&amp;gt;][&amp;lt;list of:&amp;lt;article to print&amp;gt;][;][USING&amp;lt;format model&amp;gt;][&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;][;|&amp;lt;Space&amp;gt;]
+### **PRINT** \[#&amp;lt;channel number&amp;gt;\]\[&amp;lt;list of:&amp;lt;article to print&amp;gt;\]\[;\]\[USING&amp;lt;format model&amp;gt;\]\[&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;\]\[;|&amp;lt;Space&amp;gt;\]
 prints content to the screen. If it ends with an ;, there will be no new line at the end. Within the command a ; or &amp;lt;space&amp;gt; lets print the next operand, with a comma (,) the cursor will be set to the next tab position (defined with ZONE) stream#8 is the printer stream#9 is the disc.  SPC(&amp;lt;count&amp;gt;) prints count spaces TAB(&amp;lt;position&amp;gt;) sets the cursor to the correct x-position. See USING command. Do not forget the separator (e.g. space or semikolon) after a string. PRINT "TEST"SPC(2) without separator does not work!

 ### **?** 
@@ -310,16 +310,16 @@
 ### **RAD** 
 Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: DEG

-### **RANDOMIZE** [TIME]
+### **RANDOMIZE** \[TIME\]
 Resets the pseudo-random generator. The optional parameter TIME does nothing and is implemented because of compatbility issues.

 ### **READ** &amp;lt;variable&amp;gt;
 Gets the next data item (from DATA commands), stores it in the given variable and moves to the next item. The variable must be of the correct type. See also: DATA, RESTORE

-### **RECTANGLE** &amp;lt;left&amp;gt;,&amp;lt;right&amp;gt;,&amp;lt;top&amp;gt;,&amp;lt;bottom&amp;gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color&amp;gt;]]
+### **RECTANGLE** &amp;lt;left&amp;gt;,&amp;lt;right&amp;gt;,&amp;lt;top&amp;gt;,&amp;lt;bottom&amp;gt;\[,&amp;lt;color&amp;gt;\[,&amp;lt;fill color&amp;gt;\]\]
 Draws a rectangle on the screen

-### **REM** [&amp;lt;text&amp;gt;]
+### **REM** \[&amp;lt;text&amp;gt;\]
 Remark without any operation. The rest of the line is handled by this command.

 ### **'** (semicolon)
@@ -328,7 +328,7 @@
 ### **RELEASE** &amp;lt;channel&amp;gt;
 Releases a sound which was hold on (by a SOUND command) before. It uses the same bit matrix like the SOUND command for the first parameter (&amp;amp;x00000001) releases chanel A (&amp;amp;x00000010) releases chanel B (&amp;amp;x00000011) releases chanel A and B (&amp;amp;x00000100) releases chanel C (&amp;amp;x00000101) releases chanel A and C (&amp;amp;x00000110) releases chanel B and C (&amp;amp;x00000111) releases chanel A, B and C Example: 10 SOUND 65,1000,100 20 PRINT"PRESS R TO LET IT SOUND" 30 IF INKEY(50)=-1 THEN 30 40 RELEASE 1

-### **RENUM** [‹newLine›[,‹first oldLine›[-&amp;lt;last oldline&amp;gt;][,‹step›]]]
+### **RENUM** \[‹newLine›\[,‹first oldLine›\[-&amp;lt;last oldline&amp;gt;\]\[,‹step›\]\]\]
 Renumbers the lines of the current program or range. By default, the whole program is renumbered starting at line 10 with multiples of ten. Any parameter that is left out defaults to 10. It is important to note that jumps (GOTO, GOSUB and the like) are automatically converted to the new line numbers. The whole set of parameters can be used to renumber only the last part of a program.

 ### **REPLACE$** (&amp;lt;search-string&amp;gt;,&amp;lt;replace-string&amp;gt;,&amp;lt;string&amp;gt;)
@@ -337,7 +337,7 @@
 ### **RESTORE** &amp;lt;line&amp;gt;
 Resets the data pointer used by READ. When used without parameters, resets the pointer to the first data in the program. Otherwise, resets the pointer to the given line number.

-### **RESUME** [line] or NEXT
+### **RESUME** \[line\] or NEXT
 Command causes the program to resume after an error code and if it is interrupted by an ON ERROR GOTO jump So it can either resume (if there is no line number stated) at the same line after error code (and if there are more statements in one line) or at the line number stated (optional) or with the NEXT parameter (optional) ... at the line followed by the error line

 ### **RETURN** 
@@ -346,13 +346,13 @@
 ### **RIGHT$** (&amp;lt;string expression&amp;gt;,&amp;lt;integer expression&amp;gt;)
 FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;integer expression&amp;gt; (=required length) parameter, after extracting them from the RIGHT of the &amp;lt;string expression&amp;gt;. If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;integer expression&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.

-### **RND** [(&amp;lt;numeric expression&amp;gt;)]
+### **RND** \[(&amp;lt;numeric expression&amp;gt;)\]
     FUNCTION: Returns the next RaNDom number in sequence if the &amp;lt;numeric expression&amp;gt; has a positive value or is not specified.     If the &amp;lt;numeric expression&amp;gt; yields a value of zero, RND returns a copy of the last random number generated. Associated keywords: RANDOMIZE     1. Example: PRINT RND(0)\”0.536703827 Ready PRINT RND(1) 0.271940658\”Ready PRINT RND(0) 0.271940658 Ready     2. Example:     Example for generating an integer random number between 1 and 1000 10 A=INT((RND(1)*1000)+1) 20 PRINT A 30 GOTO 10     3. Example:     For generating a random number between a lower and higher border 10 INPUT "Low border",low 20 INPUT "High border",high 30 A=INT(RND(1)*(high-low))+low 40 PRINT A     4. Example: 10 RANDOMIZE\”20 FOR x=1 TO -1 STEP -1 30 PRINT "rnd parameter=";x 40 FOR n=1 TO 6 50 PRINT RND(x) 60 NEXT n,x\”run

-### **ROUND** (&amp;lt;numeric expression&amp;gt;[,&amp;lt;integer expression&amp;gt;])
+### **ROUND** (&amp;lt;numeric expression&amp;gt;\[,&amp;lt;integer expression&amp;gt;\])
 FUNCTION: Rounds &amp;lt;numeric expression&amp;gt; to a number of decimal places or to the power of ten specified by &amp;lt;integer expression&amp;gt;.  If &amp;lt;integer expression&amp;gt; less than zero, the &amp;lt;numeric expression&amp;gt; is rounded to give an absolute integer with &amp;lt;integer expression&amp;gt; number of zeros before the decimal point. Associated keywords: ABS, CINT, FIX, INT 1. Example: PRINT ROUND(1562.357,2),ROUND(1562.375,-2) 1562.36     1600 2. Example: 10 FOR n=4 TO -4 STEP -1 20 PRINT ROUND (1234.5678,n) 30 PRINT "with integer expression";n 40 NEXT run

-### **RUN** [&amp;lt;line&amp;gt; or &amp;lt;filename&amp;gt;]
+### **RUN** \[&amp;lt;line&amp;gt; or &amp;lt;filename&amp;gt;\]
     Runs the current program, optionally starting at a given line. If no line number is given, starts at the first line. If a string is used after RUN command a programm will be loaded and executed from storage medium (e.g. Tape, Disc). With that command protected BASIC programs can be executed.Example: RUN"disc"

 ### **SAVE** SAVE "filename"
@@ -367,7 +367,7 @@
 ### **SGN** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Determines the SiGN of the &amp;lt;numeric expression&amp;gt;. Returns -1 if &amp;lt;numeric expression&amp;gt; is less than 0, returns 0 if &amp;lt;numeric expression&amp;gt; = 0, and returns 1 if &amp;lt;numeric expression&amp;gt; is greater than zero.

-### **SOUND** &amp;lt;C&amp;gt;,&amp;lt;P&amp;gt;[,&amp;lt;D&amp;gt;[,&amp;lt;V&amp;gt;[,&amp;lt;Env&amp;gt;[,&amp;lt;Ent&amp;gt;]]]]
+### **SOUND** &amp;lt;C&amp;gt;,&amp;lt;P&amp;gt;\[,&amp;lt;D&amp;gt;\[,&amp;lt;V&amp;gt;\[,&amp;lt;Env&amp;gt;\[,&amp;lt;Ent&amp;gt;\]\]\]\]
 SOUND does only work with running and connected CPCmonitor! the SOUND command has following shape: SOUND Channel,Period,Duration,Volume,Volume-Envelope,Tone-Envelope,Noise C: Selecting channel is done bitwise (combinations are possible of course): (Bit 0) &amp;amp;x00000001 = 1 = channel A (middle) (Bit 1) &amp;amp;x00000010 = 2 = channel B (left) (Bit 2) &amp;amp;x00000100 = 4 = channel C (right) more function about channel are (Bit 3) &amp;amp;x00001000 = 8 = Rendezvous with channel A (Bit 4) &amp;amp;x00010000 = 16 = Rendesvous with channel B (Bit 5) &amp;amp;x00100000 = 32 = Rendesvous with channel C (Bit 6) &amp;amp;x01000000 = 64 = Hold (Bit 7) &amp;amp;x10000000 = 128 = Flush P: the period number can be a figure between 0 and 4095 (2^12-1... 12 means that we have 12 tones (inclusive half-tones) in nine octaves on the CPC in sum and their distance between is the twelves square root of two), where 8 octaves are available. E.g. Octave 0 starts on middle C with number 478. To calculate the period you can use following formula: period=1,000,000/(16*frequency) or in short period=(62,500/frequency) (e.g. the note "A" with the frequency 440 Hz has the period 142 on the CPC) In This emulator you can use strings containing the tone name, e.g. t$="db5":SOUND 1,c,25:SOUND 1,d,25:SOUND 1,t$,25:SOUND 1,db5,25:SOUND 1,"db5",25:REM the last three are the same D: the duration of the note is measured in 1/100th of a second and can be any positive number in the range 1-32,767. 0 and negative number are in combination with ENT and ENV commands usefull. A negative number means repititions. V: the volume number range from 0-15 on a CPC664/6128 ENV: and ENT: For shaping the sound ENV (Volume) and ENT (Frequency) commands are available. The relation between SOUND and those commands comes with a figure between 1 to 15 for ENV (5th parameter) and 1 to 15 for ENT (6th parameter). N: the seventh parameter can be used for blending in noise between the range of 0-15 (BASIC 1.0) or 0-30 (BASIC 1.1). The higher the number the 'deeper' or 'dirty' is the noise.

 ### **SPC** &amp;lt;n&amp;gt;
@@ -388,7 +388,7 @@
 ### **SPACE$** (&amp;lt;count&amp;gt;)
 Gets &amp;lt;count&amp;gt; spaces

-### **SYMBOL** n,i1[,i2[,i3[,i4[,i5[,i6[,i7[,i8]]]]]]]
+### **SYMBOL** n,i1\[,i2\[,i3\[,i4\[,i5\[,i6\[,i7\[,i8\]\]\]\]\]\]\]
 Redefines the appearance of the character at index n. Each of the following eight integers defines the contents of one pixel row, starting at the top of the character. Each character fits in an 8x8 pixel grid. Missing lines are considered as empty. Example: SYMBOL 255,255,129,129,129,129,129,129,255 PRINT CHR$(255) Defines character 255 to look like an empty square and prints it.

 ### **SYMBOL** AFTER n
@@ -412,10 +412,10 @@
 ### **TABDOT** (&amp;lt;x&amp;gt;,&amp;lt;real&amp;gt;,&amp;lt;decimal figures&amp;gt;)
 in conjunction with PRINT the TABDOT command sets the decimal point of the value to x position of the cursor to the given position Example: PRINT "Hi";TABDOT(10,123.45,2);"World"; Hi    123.45 THIS COMMAND DOES NOT EXIST IN THE ORINAL LOCOMOTIVE BASIC!

-### **TAG** [#st]
+### **TAG** \[#st\]
 Allows text to print at graphics cursor position. (#st does not work, yet). see TAGOFF

-### **TAGOFF** [#st]
+### **TAGOFF** \[#st\]
 Directs text to stream st printing it at previous text cursor position. (#st does not work, yet)

 ### **TAN** (&amp;lt;numeric expression&amp;gt;)
@@ -430,7 +430,7 @@
 ### **TIME** 
    FUNCTION: Reports the elapsed time since the computer was last switched-on or reset, (excluding periods when reading or writing to disc).     Each second of real time is equal to the returned value = TIME/300.

-### **TIME$** ([format])
+### **TIME$** (\[format\])
 gives the actual date/time either in hh:mm:ss format or in the given format

 ### **TRIM$** &amp;lt;String&amp;gt;
@@ -463,13 +463,13 @@
 ### **WHILE** &amp;lt;expression&amp;gt; WEND
 repeats this loop until the expression is false

-### **WIDTH** [#&amp;lt;stream expression&amp;gt;,]&amp;lt;integer expression&amp;gt;
+### **WIDTH** \[#&amp;lt;stream expression&amp;gt;,\]&amp;lt;integer expression&amp;gt;
 The WIDTH command defines the maximum number of characters per output line for a specific stream. Once the specified width is reached, Locomotive BASIC automatically inserts a carriage return (line break). This prevents long lines from being truncated or wrapping incorrectly on the printer or screen. It is most commonly used with the printer (stream #8), but can also be applied to the screen (stream #0) or any other open stream.

-### **WINDOW** [#&amp;lt;stream expression&amp;gt;,]&amp;lt;L&amp;gt;,&amp;lt;R&amp;gt;,&amp;lt;T&amp;gt;,&amp;lt;B&amp;gt;
+### **WINDOW** \[#&amp;lt;stream expression&amp;gt;,\]&amp;lt;L&amp;gt;,&amp;lt;R&amp;gt;,&amp;lt;T&amp;gt;,&amp;lt;B&amp;gt;
 It is possible to define in BASIC eight (8) independent windows for text output. Overlapping is possible.#STREAM: eight window are possible. No. zero (0) is the main window where error or status messages were put out by default. each position is included inside the windowL = left column / R = right column (dependent of the mode 0 = 20 / 1 = 40 / 2 = 80) T = top row / B = bottom row (always from 1 to 25) Example: MODE 1 WINDOW#1,1,40,1,6 ...defines the first top quarter of the screen for window No. 1 ===&amp;gt; if R or B has value of 999, this means the maximum size of the console screen! &amp;lt;===

-### **WRITE** [#&amp;lt;channel number&amp;gt;][&amp;lt;list of:&amp;lt;article to print&amp;gt;][;][USING&amp;lt;format model&amp;gt;][&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;][;|&amp;lt;Space&amp;gt;]
+### **WRITE** \[#&amp;lt;channel number&amp;gt;\]\[&amp;lt;list of:&amp;lt;article to print&amp;gt;\]\[;\]\[USING&amp;lt;format model&amp;gt;\]\[&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;\]\[;|&amp;lt;Space&amp;gt;\]
 The same as PRINT, but strings are printed in "" 10 a$="Hello" 20 WRITE 100,a$ RUN 100          "Hello"

 ### **XPOS** 
@@ -481,10 +481,10 @@
 ### **ZONE** i
 Changes the width of the print zone. Default is 13.     Example: 10 MODE 2 20 PRINT"normal zone (13)" 30 PRINT 1,2,3,4 RUN normal zone(13) 1           2            3            4 Ready 20 PRINT"now with different zone(5)" 30 ZONE 5 40 PRINT 1,2,3,4 RUN now with different zone(5) 1     2     3     4 Ready

-### **|BITMAP** [l,r,t,b[,bmp]]
+### **|BITMAP** \[l,r,t,b\[,bmp\]\]
 creates a bitmap in base64-format to insert into an img-html-tag (&amp;lt;img src="data:image/png;base64,Base64String alt="Embedded Image"/&amp;gt;) from the screen. You can use a rect of the screen. If bmp=-1 then the bitmap is not encoded as base64 to realize a bitmap download

-### **|DIR** [,&amp;lt;search pattern&amp;gt;]
+### **|DIR** \[,&amp;lt;search pattern&amp;gt;\]
 Same as CAT

 ### **|DISC** 
@@ -511,19 +511,19 @@
 ### **|LOADENVIRONMENT** 
 loads the previosly saved BASIC environment.

-### **|MYSQL** CONNECT|QUERY|CLOSE[&amp;lt;variable|string&amp;gt;][,&amp;lt;array&amp;gt;]
+### **|MYSQL** CONNECT|QUERY|CLOSE\[&amp;lt;variable|string&amp;gt;\]\[,&amp;lt;array&amp;gt;\]
 plase refer |SQLITE for details. |MYSQL works exactly identically, but to connect to have to use it in this way: |MYSQL CONNECT "localhost;meinuser;meinpass;meinedb"

 ### **|SAVEENVIRONMENT** 
 Saves the complete BASIC Environment (program, variables) to default.basicsh.json

-### **|SETCOOKIE** ,&amp;lt;name&amp;gt;,&amp;lt;value&amp;gt;[,&amp;lt;expires in minutes&amp;gt;]
+### **|SETCOOKIE** ,&amp;lt;name&amp;gt;,&amp;lt;value&amp;gt;\[,&amp;lt;expires in minutes&amp;gt;\]
 In a Webserver environment this command sets a COOKIE variables and stores it in the buffer. |HTMLSTART makes it permanent. e.g.: |SETCOOKIE,"foo","content",60 THIS COMMAND MUST BE USED BEFORE |HTMLSTART!

-### **|PARAMCOUNT** [,&amp;lt;variable&amp;gt;]
+### **|PARAMCOUNT** \[,&amp;lt;variable&amp;gt;\]
 prints the number of parameters or puts it into &amp;lt;variable&amp;gt;

-### **|PARAMSTR** ,&amp;lt;number&amp;gt;[,&amp;lt;variable&amp;gt;]
+### **|PARAMSTR** ,&amp;lt;number&amp;gt;\[,&amp;lt;variable&amp;gt;\]
 prints the given parameter to screen or puts it into the &amp;lt;variable&amp;gt;

 ### **|PRINTSIXEL** 
@@ -547,13 +547,13 @@
 ### **|SHELLCOMMANDS** 
 Lists all possible POSIX Shell commands

-### **|SQLITE** CONNECT|QUERY|CLOSE[&amp;lt;variable|string&amp;gt;][,&amp;lt;array&amp;gt;]
+### **|SQLITE** CONNECT|QUERY|CLOSE\[&amp;lt;variable|string&amp;gt;\]\[,&amp;lt;array&amp;gt;\]
 Use of a SQlite database |Create or open an database:  |SQLITE CONNECT &amp;lt;database name&amp;gt; Executes an query:  |SQLITE QUERY "create table test(name:varchar(255))" or to put a result into an array a$:  |SQLTE QUERY "select * from test",a$ Close the database: |SQLITE CLOSE  Example: 10 |SQLITE CONNECT "zl.db" 20 |SQLITE QUERY "create table test(name varchar(80))" 30 |SQLITE QUERY "insert into test (name) values (""Klaus""),(""Xaver""),(""Anton""),(""Dietmar"")" 40 |SQLITE QUERY "select * from test order by name",a$ 50 FOR i=0 TO SIZEOF(a$)-1 60 PRINT a$(i) 70 NEXT 90 |SQLITE CLOSE

 ### **|TAPE** 
 Files are written to a wav file in Amstrad CPC Tape format

-### **|TEXTMODE** [,&amp;lt;mode&amp;gt;]
+### **|TEXTMODE** \[,&amp;lt;mode&amp;gt;\]
 Switches back to text only mode. If mode parameter is given, the Text mode is set to this (See MODE) and the Text or Graphic mode will not change.

 ### **|WAVEFORM** ,WaveForm
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dietmar Schmidt</dc:creator><pubDate>Fri, 05 Jun 2026 21:27:15 -0000</pubDate><guid>https://sourceforge.neteb973074959d6f6226e1b0867b48b87371f9b956</guid></item><item><title>Befehlsliste modified by Dietmar Schmidt</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,573 +1,573 @@
-# **ABS** (&amp;lt;numeric expression=""&amp;gt;)
+### **ABS** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Returns the ABSolute value of the given numeric expression (n). This means that negative numbers are returned as positive. Associated keywords: SGN Example: PRINT ABS(-67.98) 67.98

-# **AFTER** &lt;time delay=""&gt;[,&amp;lt;timer number=""&amp;gt;] GOSUB &amp;lt;line number=""&amp;gt;
-Waits for &lt;time delay=""&gt;/50 seconds and then jumps NON-RECURRING to the subroutine at &amp;lt;line number=""&amp;gt; (see also "EVERY i[,t] GOSUB line").
-
-# **ALIAS** &amp;lt;alias&amp;gt;=&lt;command/&gt;|PRINT
+### **AFTER** &amp;lt;time delay&amp;gt;[,&amp;lt;timer number&amp;gt;] GOSUB &amp;lt;line number&amp;gt;
+Waits for &amp;lt;time delay&amp;gt;/50 seconds and then jumps NON-RECURRING to the subroutine at &amp;lt;line number&amp;gt; (see also "EVERY i[,t] GOSUB line").
+
+### **ALIAS** &amp;lt;alias&amp;gt;=&amp;lt;command&amp;gt;|PRINT
 defines an alias as a shortcut of any command. The command is the coplete rest of the line. Aliases are stored in ~/.basicsh_aliases and permanent To unalias, just define an empty command. ALIAS PRINT shows all aliases.

-# **ASC** (&amp;lt;string expression=""&amp;gt;)
-FUNCTION: Returns the numeric value of the first character in the &amp;lt;string expression=""&amp;gt; (s). Associated keywords: CHR$ Example: PRINT ASC("x") 120 Hint:in other languages this is the ord() function
-
-# **ATN** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Calculates the Real value for the Arc-TaNgent of &amp;lt;numeric expression=""&amp;gt;, (n) to a real number ranging from -PI/2 to +PI/2 of the value specified.
-
-# **AUTO** [&amp;lt;start line=""&amp;gt;[,&amp;lt;line step=""&amp;gt;]]
+### **ASC** (&amp;lt;string expression&amp;gt;)
+FUNCTION: Returns the numeric value of the first character in the &amp;lt;string expression&amp;gt; (s). Associated keywords: CHR$ Example: PRINT ASC("x") 120 Hint:in other languages this is the ord() function
+
+### **ATN** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Calculates the Real value for the Arc-TaNgent of &amp;lt;numeric expression&amp;gt;, (n) to a real number ranging from -PI/2 to +PI/2 of the value specified.
+
+### **AUTO** [&amp;lt;start line&amp;gt;[,&amp;lt;line step&amp;gt;]]
 Creates automatically numbers for programming code

-# **BIN$** (&amp;lt;unsigned integer="" expression=""&amp;gt;[,&amp;lt;integer expression=""&amp;gt;])
-FUNCTION: Produces a string of BINary digits respresenting the value of the &amp;lt;unsigned integer="" expression=""&amp;gt;, using the number of binary digits instruced by the second &amp;lt;integer expression=""&amp;gt; (in the range of 0 to 16).  If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will produced in as many digits as are required. The &amp;lt;unsigned integer="" expression=""&amp;gt; to be converted into binary form must yield a value in the range -32768 to 65535. Associated keywords: DEC$, HEX$, STR$ Example: PRINT BIN$(66,8) 01000000
-
-# **BORDER** i1[,i2]
+### **BIN$** (&amp;lt;unsigned integer expression&amp;gt;[,&amp;lt;integer expression&amp;gt;])
+FUNCTION: Produces a string of BINary digits respresenting the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of binary digits instruced by the second &amp;lt;integer expression&amp;gt; (in the range of 0 to 16).  If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will produced in as many digits as are required. The &amp;lt;unsigned integer expression&amp;gt; to be converted into binary form must yield a value in the range -32768 to 65535. Associated keywords: DEC$, HEX$, STR$ Example: PRINT BIN$(66,8) 01000000
+
+### **BORDER** i1[,i2]
 Sets the Border color to i1. If i2 is given, the border is flashing. Instead color index number (0..28) you can use RGB colors (#123456)

-# **BYE** [i]
+### **BYE** [i]
 exits the BASIC interpreter. With i=0 no message appears

-# **CALL** &lt;address&gt;[,&amp;lt;list of:="" parameter=""&amp;gt;]
+### **CALL** &amp;lt;address expression&amp;gt;[,&amp;lt;list of: parameter&amp;gt;]
 Allows a machine code routine to be called by BASIC. CALL 0:REM resets the computer completely CALL &amp;amp;BB18:REM wait until any key is pressed CALL &amp;amp;BD19:REM same as FRAME

-# **CAT** 
+### **CAT** 
 Displays the names of the files on the tape or disc.

-# **CD** &lt;dir&gt;
+### **CD** &amp;lt;dir&amp;gt;
 Change Directory (not in originally Locomotive BASIC)

-# **CINT** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Returns the value of the &amp;lt;numeric expression=""&amp;gt; (n), Converting it to a rounded INTeger in the range -32768 to 32767 (or more in this interpreter). Associated keywords: CREAL, FIX, INT, ROUND, UNT Example: 10 n=-2.6 20 PRINT CINT(n) run -3
-
-# **CIRCLE** &amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;lt;radius&amp;gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color=""&amp;gt;]]
+### **CINT** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Returns the value of the &amp;lt;numeric expression&amp;gt; (n), Converting it to a rounded INTeger in the range -32768 to 32767 (or more in this interpreter). Associated keywords: CREAL, FIX, INT, ROUND, UNT Example: 10 n=-2.6 20 PRINT CINT(n) run -3
+
+### **CIRCLE** &amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;lt;radius&amp;gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color&amp;gt;]]
 Draws a circle on the screen

-# **CHAIN** &amp;lt;file name=""&amp;gt;[,&amp;lt;line number="" expression=""&amp;gt;]
-Enables the specified program to be loaded and RUN automatically. If the optional parameter &amp;lt;line number="" expression=""&amp;gt; is specified, the program execution will commence from that line.
-
-# **CHAIN MERGE** &amp;lt;file name=""&amp;gt;[,&amp;lt;line number="" expression=""&amp;gt; | [,[&amp;lt;line number="" expression=""&amp;gt;],DELETE &amp;lt;line number="" range=""&amp;gt;]]
-Loads the specified program from tape or disc, merges it into the program in memory, and starts execution of the merged program. The parameter DELETE &amp;lt;line number="" range=""&amp;gt; is used to delete part of the original program before running it, if required.
-
-# **CLEAR** [INPUT]
+### **CHAIN** &amp;lt;file name&amp;gt;[,&amp;lt;line number expression&amp;gt;]
+Enables the specified program to be loaded and RUN automatically. If the optional parameter &amp;lt;line number expression&amp;gt; is specified, the program execution will commence from that line.
+
+### **CHAIN MERGE** &amp;lt;file name&amp;gt;[,&amp;lt;line number expression&amp;gt; | [,[&amp;lt;line number expression&amp;gt;],DELETE &amp;lt;line number range&amp;gt;]]
+Loads the specified program from tape or disc, merges it into the program in memory, and starts execution of the merged program. The parameter DELETE &amp;lt;line number range&amp;gt; is used to delete part of the original program before running it, if required.
+
+### **CLEAR** [INPUT]
 CLEAR Clears all variables from memory, leaving the program in memory unchanged. All open files are abandoned. The command clear inside a subroutine (GOSUB... RETURN) will also clear the "stack pointer" address of the gosub heap. That means that a RETURN won't work and a GOTO has to be used instead. CLEAR INPUT clears the key buffer.

-# **CLG** [&amp;lt;masked ink=""&amp;gt;]
-Clears the graphics screen to colour specified by &amp;lt;masked ink=""&amp;gt;. If parameter &amp;lt;masked ink=""&amp;gt; is not specified then the graphics screen is cleared to the colour specified by the GRAPHICS PAPER statement.
-
-# **CLOSEIN** 
+### **CLG** [&amp;lt;masked ink&amp;gt;]
+Clears the graphics screen to colour specified by &amp;lt;masked ink&amp;gt;. If parameter &amp;lt;masked ink&amp;gt; is not specified then the graphics screen is cleared to the colour specified by the GRAPHICS PAPER statement.
+
+### **CLOSEIN** 
 Closes any input file

-# **CLOSEOUT** 
+### **CLOSEOUT** 
 Closes any output file

-# **CLS** [#&amp;lt;stream expression=""&amp;gt;]
-Clears the window specified by &amp;lt;stream expression=""&amp;gt;. If &amp;lt;stream expression=""&amp;gt; is omitted it defaults to #0 (usually the whole screen). The text cursor of the stream is moved to the upper left corner.
-
-# **CONT** 
+### **CLS** [#&amp;lt;stream expression&amp;gt;]
+Clears the window specified by &amp;lt;stream expression&amp;gt;. If &amp;lt;stream expression&amp;gt; is omitted it defaults to #0 (usually the whole screen). The text cursor of the stream is moved to the upper left corner.
+
+### **CONT** 
 CONTinues program execution interrupted either by [ESC] [ESC] or as a result of STOP within a program. A program cannot be continued after being modified.

-# **COPYCHR$** (#stream)
+### **COPYCHR$** (#stream)
 FUNCTION: COPies a CHaRacter from the current position in the stream (which MUST be specified). If the character read is not recognized, a null string is returned. This works only in graphic mode!

-# **COS** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Calculates the Real value for the Cosinus of &amp;lt;numeric expression=""&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.
-
-# **CREAL** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Returns the value of the &amp;lt;numeric expression=""&amp;gt; (n), Converting it to REAL.
-
-# **CURSOR** &amp;lt;num&amp;gt;
+### **COS** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Calculates the Real value for the Cosinus of &amp;lt;numeric expression&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.
+
+### **CREAL** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Returns the value of the &amp;lt;numeric expression&amp;gt; (n), Converting it to REAL.
+
+### **CURSOR** &amp;lt;num&amp;gt;
 enables (1) or disables (0) the cursor.

-# **DATA** x1[,x2,x3...]
+### **DATA** x1[,x2,x3...]
 Defines a data section to be used by READ calls. Data values can be of any type (integer, real or string) as long as the corresponding READ calls use a variable of the right type. Example: 10 DATA "Hello, world!", 42 20 READ message$:PRINT message$ 30 READ answer:PRINT "The answer is:";answer See also: READ, RESTORE

-# **DEC$** &amp;lt;numeric expression=""&amp;gt;,&amp;lt;format template=""&amp;gt;
-FUNCTIION: Returns a DECimal string representation of the &amp;lt;numeric expression=""&amp;gt; (n), using the specified &amp;lt;format template=""&amp;gt; to control the print format of the resulting string. The format template may contain ONLY the characters:     + - $ £ * # , . ^ The use of these 'format field specifiers' is described under the keyword PRINT USING. Example: PRINT DEC$(10^7,"££########,.##") £10,000,000.00
-
-# **DEF** 
+### **DEC$** &amp;lt;numeric expression&amp;gt;,&amp;lt;format template&amp;gt;
+FUNCTIION: Returns a DECimal string representation of the &amp;lt;numeric expression&amp;gt; (n), using the specified &amp;lt;format template&amp;gt; to control the print format of the resulting string. The format template may contain ONLY the characters:     + - $ £ * # , . ^ The use of these 'format field specifiers' is described under the keyword PRINT USING. Example: PRINT DEC$(10^7,"££########,.##") £10,000,000.00
+
+### **DEF** 
 DEF means "define" and comes along with defining a function in case of DEF FN or defining variables in case of DEFREAL, DEFINT or DEFSTR. DEF FN must come before using the statement FN. DEF with a variable declaration should come before using a variable. (see also FN)

-# **DEFINT** &amp;lt;letter range=""&amp;gt;
+### **DEFINT** &amp;lt;letter range&amp;gt;
 Forces all variables(s) starting with the specified letter(s) to be integer variables. Singular letters could be defined or a range by a minus symbol between two letters. Examples: 20 DEFINT a-z: sets all variables starting with an A until Z as integer. or 10 DEFINT F,S ..... (or 10 DEFINT A-Z) 20 FIRST=111.11:SECOND=22.2 30 PRINT FIRST,SECOND:' prints out 111      22

-# **DEFREAL** &amp;lt;letter range=""&amp;gt;
+### **DEFREAL** &amp;lt;letter range&amp;gt;
 Sets the default for variable(s) with the specified first letter(s) to a floating point figure.

-# **DEFSTR** &amp;lt;letter range=""&amp;gt;
+### **DEFSTR** &amp;lt;letter range&amp;gt;
 Sets the default for variable(s) with the specified first letter(s) to string(s) variables.

-# **DEG** 
+### **DEG** 
 Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: RAD

-# **DELETE** [first line][-[last line]]
+### **DELETE** [first line][-[last line]]
 Deletes the current program completely (without arguments) or only the given line or line range. Even DELETE - is legal, it has the same effect as DELETE The lines specified do not have to exist, all lines matching the range will be deleted and having no matches does not cause an error.

-# **DI** 
+### **DI** 
 Disables interrupts until re-enabled by EI command or by RETURN at end of an interrupts service routine.

-# **DIM** a[%|!|$](d1[,d2[,...]])
+### **DIM** a[%|!|$](d1[,d2[,...]])
 Creates array a with single or multiple dimensions. You may optionally specify integer (%), real (!) or string ($) type otherwise it defaults to the current type set for the first letter of the array name. d1 is size of first dimension-1, d2 is size of second dimension-1 and so on. DIM x(10) will create an array with 11 elements, x(0) is the first element, x(10) is the eleventh and last. You can specify as many dimensions as will fit on one 255 character line, which is a maximum of 125. Trying to create an array that already exists will generate an Array already dimensioned error. If an array is not specified by DIM before being accessed, each dimension value defaults to 10. The maximum dimensions that can be created this way is three. NEW: In this interpreter you can resize arrays without destroying the content.

-# **EDIT** &amp;lt;line&amp;gt;
+### **EDIT** &amp;lt;line&amp;gt;
 Display 1 program line for editing. The following keys can be used in editing mode, or during typing in BASIC: CTRL+CURSOR LEFT - go to start of line CTRL+CURSOR RIGHT - go to end of line

-# **DRAW** x,y[,[i1][,i2]]
+### **DRAW** x,y[,[i1][,i2]]
 Draws a line from the current cursor position to position x,y. i1 specifies colour, i2 is the drawing style. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour

-# **DRAWR** xr,yr[,[i1][,i2]]
+### **DRAWR** xr,yr[,[i1][,i2]]
 Draws a line from current graphics cursor position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as DRAW.

-# **EI** 
+### **EI** 
 Enable interrupts which have been disabled by DI

-# **END** 
+### **END** 
 Indicates end of program

-# **ENT** &amp;lt;tone envelope="" number=""&amp;gt;[,&amp;lt;tone env.="" section=""&amp;gt;][,&amp;lt;tone env.="" section=""&amp;gt;][,&amp;lt;tone env.="" section=""&amp;gt;][,&amp;lt;tone env.="" section=""&amp;gt;][,&amp;lt;tone env.="" section=""&amp;gt;]
-The ENT command define the TONE shape of a sound which means manipulating the frequency in a certain range. The command could looks like: ENT NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255) 
-
-# **ENV** &amp;lt;volume envelope="" number=""&amp;gt;[,&amp;lt;volume env.="" section=""&amp;gt;][,&amp;lt;volume env.="" section=""&amp;gt;][,&amp;lt;volume env.="" section=""&amp;gt;][,&amp;lt;volume env.="" section=""&amp;gt;][,&amp;lt;volume env.="" section=""&amp;gt;]
-The ENV command define the VOLUME shape of a sound which means manipulating the loudness in a certain range. The command could looks like: ENV NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255)
-
-# **EOF** 
+### **ENT** &amp;lt;tone envelope number&amp;gt;[,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;][,&amp;lt;tone env. section&amp;gt;]
+The ENT command define the TONE shape of a sound which means manipulating the frequency in a certain range. The command could looks like: ENT NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255) 
+
+### **ENV** &amp;lt;volume envelope number&amp;gt;[,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;][,&amp;lt;volume env. section&amp;gt;]
+The ENV command define the VOLUME shape of a sound which means manipulating the loudness in a certain range. The command could looks like: ENV NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255)
+
+### **EOF** 
 FUNCTION: Checks to see if end of specified file has been reached during input. Returns 0 (false) until the end of file, then -1 (true). Associated keywords: OPENIN, CLOSEIN This example reads a file from disc and print it out on screen. Like the "TYPE" command in CP/M 10 OPENIN "text.txt" 20 WHILE NOT EOF 30 LINE INPUT#9,a$ 40 PRINT a$ 50 WEND 60 CLOSEIN

-# **ERASE** v1[% | ! | $][,v2[% | ! | $][,...]]
+### **ERASE** v1[% | ! | $][,v2[% | ! | $][,...]]
 Erases the specified array(s) or variables and frees the memory used.

-# **ERL** 
+### **ERL** 
 Returns the line number of the last error encountered.

-# **ERR** 
+### **ERR** 
 Reports the number of the last ERRor encountered.

-# **ERROR** i
+### **ERROR** i
 Take Error action with a given error number. 

-# **EURO$** 
+### **EURO$** 
 In Graphic-Mode: chr$(&amp;amp;C3)+chr$(&amp;amp;80). In Text-Mode: chr$($E2)+chr$($82)+chr$($AC) (UTF8-Euro). This is the Euro Sign (new in this interpreter)

-# **EVERY** i[,t] GOSUB ln
-BASIC branches to the subroutine at line ln EVERY (reccuring) i/50 seconds. (see also "AFTER i[,t] GOSUB line") There are 4 delay timers from 0 to 9 (in CPC onlc 0 to 3) which can be specified with &amp;lt;timer number=""&amp;gt;. If omitted &amp;lt;timer number=""&amp;gt; defaults to 0. In the case of parallel task has 3 the highest and 0 the lowest priority. With DI or EI you can disable or enable the timing interrupt. With REMAIN &amp;lt;timer number=""&amp;gt; you can also disable an AFTER or EVERY construct and stores the "remaining" time (&amp;gt; REMAIN) Interrupts run as long as the main loop / program runs, even the main programm is paused &amp;gt; press ESC only once not twice for a break. It is important to know or realise that low-priority-interrupts which occurs simultanously to higher-priority-interrupts are not lost. Their task remains or handled again after finishing the higher-prio interrupt.10 REM &amp;gt; interrupts 20 EVERY 50,0 GOSUB 100: REM &amp;gt; lowest priority 30 EVERY 100,1 GOSUB 200 40 EVERY 200,2 GOSUB 300: 50 AFTER 1000,3 GOSUB 400: REM &amp;gt; highest priority 60 WHILE flag=0 70 a=a+1:print a 80 WEND 90 END 100 REM #0 110 PEN 2:PRINT "timer 0":PEN 1 120 RETURN 200 REM #1 210 PEN 2:PRINT "timer 1":PEN 1 220 RETURN 300 REM #2 310 PEN 2:PRINT "timer 2":PEN 1 320 RETURN 400 REM #3 410 flag=1:PEN 2:PRINT "no more interrupts..." 420 RETURN Hint: Timing with interrupts is important, especially if more than one interrupts run. If the interval of a subroutine driven by an interrupt is too long than the processor can never get back to deal the main program again.
-
-# **EXP** (&amp;lt;float expression=""&amp;gt;)
-FUNCTION: Calculates "e" to the power given in the &amp;lt;numeric expression=""&amp;gt; (i), where "e" is approximately 2,7182818-the number whose natural logarithm is 1. Associated keywords: LOG Example: PRINT EXP(6.876) 968.743625
-
-# **FILL** i
+### **EVERY** i[,t] GOSUB ln
+BASIC branches to the subroutine at line ln EVERY (reccuring) i/50 seconds. (see also "AFTER i[,t] GOSUB line") There are 4 delay timers from 0 to 9 (in CPC onlc 0 to 3) which can be specified with &amp;lt;timer number&amp;gt;. If omitted &amp;lt;timer number&amp;gt; defaults to 0. In the case of parallel task has 3 the highest and 0 the lowest priority. With DI or EI you can disable or enable the timing interrupt. With REMAIN &amp;lt;timer number&amp;gt; you can also disable an AFTER or EVERY construct and stores the "remaining" time (&amp;gt; REMAIN) Interrupts run as long as the main loop / program runs, even the main programm is paused &amp;gt; press ESC only once not twice for a break. It is important to know or realise that low-priority-interrupts which occurs simultanously to higher-priority-interrupts are not lost. Their task remains or handled again after finishing the higher-prio interrupt.10 REM &amp;gt; interrupts 20 EVERY 50,0 GOSUB 100: REM &amp;gt; lowest priority 30 EVERY 100,1 GOSUB 200 40 EVERY 200,2 GOSUB 300: 50 AFTER 1000,3 GOSUB 400: REM &amp;gt; highest priority 60 WHILE flag=0 70 a=a+1:print a 80 WEND 90 END 100 REM #0 110 PEN 2:PRINT "timer 0":PEN 1 120 RETURN 200 REM #1 210 PEN 2:PRINT "timer 1":PEN 1 220 RETURN 300 REM #2 310 PEN 2:PRINT "timer 2":PEN 1 320 RETURN 400 REM #3 410 flag=1:PEN 2:PRINT "no more interrupts..." 420 RETURN Hint: Timing with interrupts is important, especially if more than one interrupts run. If the interval of a subroutine driven by an interrupt is too long than the processor can never get back to deal the main program again.
+
+### **EXP** (&amp;lt;float expression&amp;gt;)
+FUNCTION: Calculates "e" to the power given in the &amp;lt;numeric expression&amp;gt; (i), where "e" is approximately 2,7182818-the number whose natural logarithm is 1. Associated keywords: LOG Example: PRINT EXP(6.876) 968.743625
+
+### **FILL** i
 Fills an area of a graphics screen i colour i (0-15). Default value of i is the current graphics pen colour.

-# **FIX** (&amp;lt;numeric expression=""&amp;gt;)
+### **FIX** (&amp;lt;numeric expression&amp;gt;)
 FUNCTION: Unlike CINT, FIX merely removes the part of the numeric expression, to the right of the decimal point, and leaves an integer result, rounding towards zero. Associated keywords: CINT, INT, ROUND Example: PRINT FIX(9.99999) 9

-# **FN** 
-BASIC allows the program to define and use simple value returning functions. DEF FuNction is the definition part of this mechanism and creates program-specific function which works within the program in the same way as a function such a COS operates as a built-in function of BASIC. It may be invoked throughout the program. Variable types must be consistent and the DEF FN command should be written in part of the program outside the execution loop. Syntax : DEF FN&amp;lt;name&amp;gt;[(&amp;lt;formal parameters=""&amp;gt;)]=&amp;lt;general expression=""&amp;gt; Example: "with the definition of..." 10 gn=9.80665 20 DEF FNgrv=s0+v0*t+0.5*gn*t^2 30 s0=0:v0=0:t=5 40 PRINT "...after";t;"seconds your dropped stone falls";FNgrv;"metres" "the results are..." :...after 5 seconds your dropped stone falls 122.58315 metres
-
-# **FOR** TO STEP NEXT
+### **FN** 
+BASIC allows the program to define and use simple value returning functions. DEF FuNction is the definition part of this mechanism and creates program-specific function which works within the program in the same way as a function such a COS operates as a built-in function of BASIC. It may be invoked throughout the program. Variable types must be consistent and the DEF FN command should be written in part of the program outside the execution loop. Syntax : DEF FN&amp;lt;name&amp;gt;[(&amp;lt;formal parameters&amp;gt;)]=&amp;lt;general expression&amp;gt; Example: "with the definition of..." 10 gn=9.80665 20 DEF FNgrv=s0+v0*t+0.5*gn*t^2 30 s0=0:v0=0:t=5 40 PRINT "...after";t;"seconds your dropped stone falls";FNgrv;"metres" "the results are..." :...after 5 seconds your dropped stone falls 122.58315 metres
+
+### **FOR** TO STEP NEXT
  Creating a counting loop (control strucutre) with a starting condition. Inside the counting loop one or more commands will be executed.     The loop consists of of following specifications:     1. FOR     2. a control variable     3. =     4. starting value     5. TO     6. target value     7. STEP [optional]     8. increment / step size     ... instructions between     9. NEXT 10. control variable [optional] You have to use the command STEP if you wish to count backwards. It's good to name the control variable after NEXT for readability and better program style.     After each loop the computer checks internaly if the target value has been reached (like an IF ... THEN ... ELSE instruction).  If the target value is reached NEXT closes the loop and calculates another step, so the control variable will be changed last time.     The default STEP value - if not specified - is one (1).      Example: 10 FOR I=1 TO 10 20 PRINT I; 30 NEXT I 40 PRINT I RUN 1   2   3   4   5   6   7   8   9   10   11 READY

-# **FRACTION$** (&amp;lt;number&amp;gt;)
+### **FRACTION$** (&amp;lt;number&amp;gt;)
 prints the fraction of an number PRINT FRRACTON$(0.33333333333) 1/3

-# **FRAME** 
+### **FRAME** 
 Smooths character and graphics movement and reduces flicker (waits for a VSYNC signal every 20 ms).

-# **FRE** (&amp;lt;numeric expression=""&amp;gt;/&amp;lt;string expression=""&amp;gt;)
+### **FRE** (&amp;lt;numeric expression&amp;gt;/&amp;lt;string expression&amp;gt;)
 FUNCTION: Establishes how much FREe memory remains unused by BASIC.

-# **GOSUB** i
+### **GOSUB** i
 Jumps to subroutine which is given as argument.     Example:10 PRINT "Calling subroutine" 20 GOSUB 100 30 PRINT "Back from subroutine" 40 END 100 REM Begin of the subroutine 110 PRINT "Subroutine started" 120 RETURN

-# **GOTO** i
+### **GOTO** i
 Jumps to the line number which is given as argument. Combine the GOTO command with an IF...THEN...ELSE instruction for creating a condition-controlled loop. With this interpreter you can use a variable instead a number, too.

-# **GRAPHICS** PEN|PAPER &amp;lt;color&amp;gt;
+### **GRAPHICS** PEN|PAPER &amp;lt;color&amp;gt;
 ...works only in combination with the command PEN or PAPER to set the plotting/drawing pen or background colour. If the TAG command is used to set text at the graphics cursor GRAPHICS PEN or GRAPHICS PAPER instead of the regular PEN or PAPERis necessary to colour the text.

-# **HELP** [&lt;command/&gt;|"search string"]
-displays the help page of all commands of only one &lt;command/&gt; or searches for a expression.
-
-# **IF** THEN ELSE
-Asks for a choice with the IF...THEN...ELSE statement.     IF compares the entry condition in a logical way     THEN contains instruction if the comparison is true     ELSE contains instruction if it's false.Example: 10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE GOTO 10     In case of nested choices there's a possibility to that with an IF...THEN instruction but not very recommended:10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE IF f&amp;lt;10 THEN PRINT "too small" ELSE PRINT "too big"   30 GOTO 10Other nested structures like IF...THEN...ELSE...ELSE won't work first because the Locomotive Basic only looks after the first ELSE instruction found and can't execute more single commands as a block  for a certain condition in comparision to e.g. "PASCAL" &amp;gt; begin...end-block, "C" &amp;gt; {...}-block. After a THEN or ELSE you don't need to type GOTO. The following two examples are the same: IF -1 THEN GOTO 30 ELSE GOTO 40 IF -1 THEN 30 ELSE 40
-
-# **HEX$** (&amp;lt;unsigned integer="" expression=""&amp;gt;[,&amp;lt;field width=""&amp;gt;])
-FUNCTION: Produces a $tring of HEXadecimal digits representing the value of the &amp;lt;unsigned integer="" expression=""&amp;gt;, using the number of hexadecimal digits. If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will be produced in as many digits as are required. Accociated keywords: BIN$, DEC$, STR$, UNT Example: PRINT HEX$(255,4) 00FF
-
-# **INK** i1[,i2]
+### **HELP** [&amp;lt;command&amp;gt;|"search string"]
+displays the help page of all commands of only one &amp;lt;command&amp;gt; or searches for a expression.
+
+### **IF** THEN ELSE
+Asks for a choice with the IF...THEN...ELSE statement.     IF compares the entry condition in a logical way     THEN contains instruction if the comparison is true     ELSE contains instruction if it's false.Example: 10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE GOTO 10     In case of nested choices there's a possibility to that with an IF...THEN instruction but not very recommended:10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE IF f&amp;lt;10 THEN PRINT "too small" ELSE PRINT "too big"   30 GOTO 10Other nested structures like IF...THEN...ELSE...ELSE won't work first because the Locomotive Basic only looks after the first ELSE instruction found and can't execute more single commands as a block  for a certain condition in comparision to e.g. "PASCAL" &amp;gt; begin...end-block, "C" &amp;gt; {...}-block. After a THEN or ELSE you don't need to type GOTO. The following two examples are the same: IF -1 THEN GOTO 30 ELSE GOTO 40 IF -1 THEN 30 ELSE 40
+
+### **HEX$** (&amp;lt;unsigned integer expression&amp;gt;[,&amp;lt;field width&amp;gt;])
+FUNCTION: Produces a $tring of HEXadecimal digits representing the value of the &amp;lt;unsigned integer expression&amp;gt;, using the number of hexadecimal digits. If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will be produced in as many digits as are required. Accociated keywords: BIN$, DEC$, STR$, UNT Example: PRINT HEX$(255,4) 00FF
+
+### **INK** i1[,i2]
 Sets the color with given number to i1. If i2 is given, the color is flashing. Instead color index number (0..28) you can use RGB colors (#123456)

-# **INKEY** (&amp;lt;integer expression=""&amp;gt;)
-FUNCTION: INterrogates the KEYboard to report which keys are being pressed. The keyboard is scanned every 0.02 (1/50) second.     The function is useful for spotting whether a certain key is down or up, by detecting the returned value of -1 (which occurs regardless of [SHIFT] and [CONTROL] key status).     The example below detects when [SHIFT] and V (key number 55) are pressed together, then ends the program. Refer the manual for the key numbers.     Associated keywords: CLEAR INPUT, INKEY$, JOY     Example: 10 IF INKEY(55)&amp;lt;&amp;gt;32 THEN 10 20 PRINT "You have pressed [SHIFT] and V" 30 CLEAR INPUT run     The state of [SHIFT] and [CONTROL] in conjunction with the key specified in the &amp;lt;integer expression=""&amp;gt; is identified as follows: ============================================================================== |Value returned          |[SHIFT]        |[CTRL]       |Specified key        | ============================================================================== |-1                      |ignored        |ignored      |up                   | |0                       |up             |up           |down                 | |32                      |down           |up           |down                 | |128                     |up             |down         |down                 | |160                     |down           |down         |down                 | ============================================================================== Hint: instead of the CPC key code you can use a char or string, to see the corresponding key or a stream (e.g. #16 for P or "P") for a PC Linux scan code
-
-# **INKEY$** 
+### **INKEY** (&amp;lt;integer expression&amp;gt;)
+FUNCTION: INterrogates the KEYboard to report which keys are being pressed. The keyboard is scanned every 0.02 (1/50) second.     The function is useful for spotting whether a certain key is down or up, by detecting the returned value of -1 (which occurs regardless of [SHIFT] and [CONTROL] key status).     The example below detects when [SHIFT] and V (key number 55) are pressed together, then ends the program. Refer the manual for the key numbers.     Associated keywords: CLEAR INPUT, INKEY$, JOY     Example: 10 IF INKEY(55)&amp;lt;&amp;gt;32 THEN 10 20 PRINT "You have pressed [SHIFT] and V" 30 CLEAR INPUT run     The state of [SHIFT] and [CONTROL] in conjunction with the key specified in the &amp;lt;integer expression&amp;gt; is identified as follows: ============================================================================== |Value returned          |[SHIFT]        |[CTRL]       |Specified key        | ============================================================================== |-1                      |ignored        |ignored      |up                   | |0                       |up             |up           |down                 | |32                      |down           |up           |down                 | |128                     |up             |down         |down                 | |160                     |down           |down         |down                 | ============================================================================== Hint: instead of the CPC key code you can use a char or string, to see the corresponding key or a stream (e.g. #16 for P or "P") for a PC Linux scan code
+
+### **INKEY$** 
 FUNCTION: Interrogates the KEYboard, returning the current $string reflecting any key that is pressed. It provides operator interaction without hitting [ENTER] after every answer. If there is a key pressed, then the function responds. If no key is pressed, INKEY$ returns an empty string.

-# **INP** (&amp;lt;port number=""&amp;gt;)
-FUNCTION: Returns the INPut value from the I/O address specified in the &amp;lt;port number=""&amp;gt;. Associated keywords: OUT, WAIT
-
-# **INPUT** [#stream,]["&amp;lt;string&amp;gt;"[;|,]&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;]...]
+### **INP** (&amp;lt;port number&amp;gt;)
+FUNCTION: Returns the INPut value from the I/O address specified in the &amp;lt;port number&amp;gt;. Associated keywords: OUT, WAIT
+
+### **INPUT** [#stream,]["&amp;lt;String&amp;gt;"[;|,]&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;]...]
 Reads a value from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to LINE INPUT

-# **INSTR** ([&amp;lt;startposition&amp;gt;,]&amp;lt;searched string=""&amp;gt;,&amp;lt;searched for="" string=""&amp;gt;)
-FUNCTION: Searches the first &amp;lt;searched string=""&amp;gt; expression to find the first occurance of the &amp;lt;searched for="" string="" expression&amp;lt;,="" and="" reports="" the="" position="" of="" its="" occurance="" within="" &amp;lt;searched=""&amp;gt;. If the &amp;lt;searched for="" string=""&amp;gt; does not occur within the &amp;lt;searched string=""&amp;gt;, then 0 is reported. The position at which to start searching the &amp;lt;searched string=""&amp;gt; is optionally specifiable using the &amp;lt;start position=""&amp;gt; parameter which must yield an integer number in the range 1 to 255. Associated keywords: none 1. Example: a$="ABCD":PRINT INSTR(a$,"C") 3 Ready 2. Example: a$="Hello":IF INSTR(a$,"i")&amp;lt;&amp;gt;0 THEN PRINT "no" else a$ no Ready 3. Example: 10 CLS 20 alphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" 30 INPUT "Enter a letter";a$ 40 b$=UPPER$(a$) 50 PRINT b$;" is number"; 60 PRINT INSTR(alphabet$,b$); 70 PRINT "in the alphabet.":PRINT 80 GOTO 40 run
-
-# **INT** (&amp;lt;value&amp;gt;)
+### **INSTR** ([&amp;lt;startposition&amp;gt;,]&amp;lt;searched string&amp;gt;,&amp;lt;searched for string&amp;gt;)
+FUNCTION: Searches the first &amp;lt;searched string&amp;gt; expression to find the first occurance of the &amp;lt;searched for string expression&amp;lt;, and reports the position of its occurance within the &amp;lt;searched string&amp;gt;. If the &amp;lt;searched for string&amp;gt; does not occur within the &amp;lt;searched string&amp;gt;, then 0 is reported. The position at which to start searching the &amp;lt;searched string&amp;gt; is optionally specifiable using the &amp;lt;start position&amp;gt; parameter which must yield an integer number in the range 1 to 255. Associated keywords: none 1. Example: a$="ABCD":PRINT INSTR(a$,"C") 3 Ready 2. Example: a$="Hello":IF INSTR(a$,"i")&amp;lt;&amp;gt;0 THEN PRINT "no" else a$ no Ready 3. Example: 10 CLS 20 alphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" 30 INPUT "Enter a letter";a$ 40 b$=UPPER$(a$) 50 PRINT b$;" is number"; 60 PRINT INSTR(alphabet$,b$); 70 PRINT "in the alphabet.":PRINT 80 GOTO 40 run
+
+### **INT** (&amp;lt;value&amp;gt;)
 Get the integer part of a number. This is to round down a number

-# **LABEL** &amp;lt;name&amp;gt;
-at the begining of any line you can label this line with a name to jump to it with GOTO or GOSUB and so on. This is nor a standard Locomotive BASIC command 10 LABEL start 20 PRINT i:i=i+1 30 IF i&amp;lt;4 THEN GOTO start
-
-# **LEFT$** (&amp;lt;string expression=""&amp;gt;, &amp;lt;required length=""&amp;gt;)
-FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;required length=""&amp;gt; parameter (&amp;lt;integer expression=""&amp;gt;), after extracting them from the LEFT of the &amp;lt;string expression=""&amp;gt;. If the &amp;lt;string expression=""&amp;gt; is shorter than the &amp;lt;required length=""&amp;gt;, the whole &amp;lt;string expression=""&amp;gt; is returned.
-
-# **LEN** (&amp;lt;string expression=""&amp;gt;)
-FUNCTION: Returns the total number of characters (i.e. the LENgth) of the &amp;lt;string expression=""&amp;gt;. See SIZEOF
-
-# **LET** 
+### **LABEL** &amp;lt;name&amp;gt;
+at the begining of any line you can label this line with a name to jump to it with GOTO or GOSUB and so on. This is nor a standard Locomotive BASIC command 10 LABEL start 20 PRINT i:i=i+1 30 IF i&amp;lt;4 THEN GOTO start
+
+### **LEFT$** (&amp;lt;string expression&amp;gt;, &amp;lt;required length&amp;gt;)
+FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;required length&amp;gt; parameter (&amp;lt;integer expression&amp;gt;), after extracting them from the LEFT of the &amp;lt;string expression&amp;gt;. If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;required length&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.
+
+### **LEN** (&amp;lt;string expression&amp;gt;)
+FUNCTION: Returns the total number of characters (i.e. the LENgth) of the &amp;lt;string expression&amp;gt;. See SIZEOF
+
+### **LET** 
 Was used to define variables. You don't need to use the LET command because it is just a command which was added for compatibility reasons.

-# **LINE INPUT** [#stream,]["&amp;lt;string&amp;gt;"[;|,]&amp;lt;variable$&amp;gt;
+### **LINE INPUT** [#stream,]["&amp;lt;String&amp;gt;"[;|,]&amp;lt;variable$&amp;gt;
 Reads a line as a whole string from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to INPUT

-# **LIST** [&amp;lt;line number=""&amp;gt;][-[&amp;lt;line number=""&amp;gt;]], [#&amp;lt;stream expression=""&amp;gt;]
+### **LIST** [&amp;lt;line number&amp;gt;][-[&amp;lt;line number&amp;gt;]], [#&amp;lt;stream expression&amp;gt;]
 A command for listing the Basic program code.  Possibility for manipulating display is using line numbers with a minus symbol.  Example: LIST 100- List every line after line number 100. LIST -100  List every line until line number 100 has reached. LIST 100-200     List every line between line number 100 and 200 included With the help of separate window definitions it is possible to print out long listings, better differentiate parts / slices of it into different window predefined Example: LIST 1000-1100,#1 LIST 3000-3100,#2  ...prints out two parts of one program out into two windows (if they are defined well)

-# **LOAD** &amp;lt;file name=""&amp;gt;
+### **LOAD** &amp;lt;file name&amp;gt;
 With this directive you may load any file in memory Basic files (extension .bas) are loaded in Basic memory, you cannot choose loading address

-# **LOCATE** [#&amp;lt;stream expression=""&amp;gt;][,] x,y
+### **LOCATE** [#&amp;lt;stream expression&amp;gt;][,] x,y
 Moves the text cursor to the x,y location. x starts at 1 on the left and goes up to 20 (in mode 0), 40 (in mode 1) or 80 (in mode 2). y starts at 1 at the top and ends at 25 at the bottom.

-# **LOG** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Calculates the natural LOGarithm (base of e) of &amp;lt;numeric expression=""&amp;gt; which mustbe greater than zero.
-
-# **LOG10** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Calculates the logarithm (base of 10) of &amp;lt;numeric expression=""&amp;gt; which mustbe greater than zero.
-
-# **LOWER$** (&amp;lt;string expression=""&amp;gt;)
-FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression=""&amp;gt; but in which all alphabetic characters in the range A to Z are converted to lower case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: UPPER$
-
-# **MASK** [i1][,i2]
+### **LOG** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Calculates the natural LOGarithm (base of e) of &amp;lt;numeric expression&amp;gt; which mustbe greater than zero.
+
+### **LOG10** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Calculates the logarithm (base of 10) of &amp;lt;numeric expression&amp;gt; which mustbe greater than zero.
+
+### **LOWER$** (&amp;lt;string expression&amp;gt;)
+FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to lower case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: UPPER$
+
+### **MASK** [i1][,i2]
 Sets bits in each adjacent group of 8 pixel on (1) or off (0) according to binary value of i1 (0-255). i2 determines whether the first point of the line is to plotted (1) or not (0). Example: 10 CLG 2:MASK 1:MOVE 0,0:DRAW 500,400 20 MASK 15:MOVE 0,0:DRAW 500,400

-# **MAX** (&amp;lt;list of:="" numeric="" expression=""&amp;gt;)
-FUNCTION: Returns the MAXimum value from the &amp;lt;list of:="" numeric="" expressions=""&amp;gt;
-
-# **MEMORY** &amp;lt;memory address=""&amp;gt;
+### **MAX** (&amp;lt;list of: numeric expression&amp;gt;)
+FUNCTION: Returns the MAXimum value from the &amp;lt;list of: numeric expressions&amp;gt;
+
+### **MEMORY** &amp;lt;memory address&amp;gt;
 You don't need to use the command because it is just a command which was added for compatibility reasons.

-# **MID$** (&amp;lt;string&amp;gt;,&amp;lt;start position=""&amp;gt;[,&amp;lt;length of="" substring=""&amp;gt;[,0|-1]])
-With the MID$ command there are two applications possible: 1. MID$ creates a new substring out of the give &amp;lt;string&amp;gt; and starts at the defined position &amp;lt;start position=""&amp;gt; and print the number of given characters by &amp;lt;length of="" substring=""&amp;gt;. If no length is defined every character from &amp;lt;start position=""&amp;gt; will be printed out. If a higher value of &amp;lt;start position=""&amp;gt; or &amp;lt;length of="" substring=""&amp;gt; than the real length of the initial string is defined a blank string will be printed. The range of &amp;lt;start position=""&amp;gt; or &amp;lt;length of="" substring=""&amp;gt; is from 0 up to 255 characters.  2. With MID$ you're able to manipulates given strings by inserting a new string. Take care of the two different applications and using in BASIC. The optional last parameter does not exist in original Locomotive Basic. if this parameter is -1 (true) the part of the first string will be replaced with the replacement string, inimportant how long it is.  Example for the 1. application: 10 a$="Hello" 20 PRINT MID$(a$,2,2) run el Ready  Example for the 2. application 10 a$="Hello" 20 MID$(a$,2,3)="ipp" 30 PRINT a$ run Hippo Ready
-
-# **MIN** (&amp;lt;list of:="" numeric="" expression=""&amp;gt;)
-FUNCTION: Returns the MINimum value from the &amp;lt;list of:="" numeric="" expressions=""&amp;gt;
-
-# **MODE** m[,x,y]
+### **MID$** (&amp;lt;string&amp;gt;,&amp;lt;start position&amp;gt;[,&amp;lt;length of substring&amp;gt;[,0|-1]])
+With the MID$ command there are two applications possible: 1. MID$ creates a new substring out of the give &amp;lt;string&amp;gt; and starts at the defined position &amp;lt;start position&amp;gt; and print the number of given characters by &amp;lt;length of substring&amp;gt;. If no length is defined every character from &amp;lt;start position&amp;gt; will be printed out. If a higher value of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; than the real length of the initial string is defined a blank string will be printed. The range of &amp;lt;start position&amp;gt; or &amp;lt;length of substring&amp;gt; is from 0 up to 255 characters.  2. With MID$ you're able to manipulates given strings by inserting a new string. Take care of the two different applications and using in BASIC. The optional last parameter does not exist in original Locomotive Basic. if this parameter is -1 (true) the part of the first string will be replaced with the replacement string, inimportant how long it is.  Example for the 1. application: 10 a$="Hello" 20 PRINT MID$(a$,2,2) run el Ready  Example for the 2. application 10 a$="Hello" 20 MID$(a$,2,3)="ipp" 30 PRINT a$ run Hippo Ready
+
+### **MIN** (&amp;lt;list of: numeric expression&amp;gt;)
+FUNCTION: Returns the MINimum value from the &amp;lt;list of: numeric expressions&amp;gt;
+
+### **MODE** m[,x,y]
 Changes the screen mode: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 640×400 in 4 colours. (only text mode in the GUI, graphic mode is always 640x400) When x,y is given, the resolution is set to x,y - so you can use a larger or smaller window than in original CPC.

-# **MOVE** x,y[,[i1][,i2]]
+### **MOVE** x,y[,[i1][,i2]]
 Moves the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour

-# **MOVER** xr,yr[,[i1][,i2]]
+### **MOVER** xr,yr[,[i1][,i2]]
 moves the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.

-# **NEW** 
+### **NEW** 
 Clears BASIC RAM which means program and variables. Keeps symbol defintion (if defined) and screen mode without clearing.

-# **ON** ...
+### **ON** ...
     ON BREAK CONT Prevents the interruption of program execution by the ESC key.      ON BREAK GOSUB ln Passes control to subroutine at line ln when ESC ESC pressed.      ON BREAK STOP Restores normal function of ESC key during program execution.      ON ERROR GOTO ln Passes the control to line ln if an error is detected in the program.      ON ERROR GOTO 0 Turns of the error trap, and restores normal error processing.      ON variable GOTO ln x1, x2, x3, x4, ... In case of passing more choices ON variable GOTO ln x1, x2, x3, x4, ... points to a table with the jumping target. Example: 10 PRINT "1. LOAD - 2. SAVE - 3. EXIT" 20 INPUT choice 30 ON choice GOTO 1000, 2000, 3000 40 CLS: GOTO 10 1000 PRINT "1. LOAD":END 2000 PRINT "2. SAVE":END 3000 END In case that the variable choice won't fullfil the condition (in a range between line 0 and 65535) the next instruction will be executed (here: Line 40). If "choice" is smaller than 0 an error will occur.      ON variable GOSUB ln x1, x2, x3, x4, ... In case of passing more choices targeting to SUBROUTINES ON variable GOSUB ln x1, x2, x3, x4, ... points to a jumping table. If the number is too large, the program continues normally.

-# **OPENIN** &amp;lt;filename&amp;gt;
+### **OPENIN** &amp;lt;filename&amp;gt;
 Opens the specified data file for reading. It has to be an ASCII file. (The command CLOSEIN closes reading data file.) Read from the file using INPUT #9

-# **OPENOUT** &amp;lt;filename&amp;gt;
+### **OPENOUT** &amp;lt;filename&amp;gt;
 Opens the specified data file for writing. It writes an ASCII file. (To close writing use the command closeout.)

-# **ORIGIN** x,y[,l,r,t,b]
+### **ORIGIN** x,y[,l,r,t,b]
 The command defines the origin (world reference point) for the graphics coordinate system. Normally the reference origin is in the left, bottom corner of the default screen and has 0,0. So the most left coordinate value could be by default 639 and the most top value 399. Independent from the actual modus (2, 1 or 0) the range for the x coordinate are always 640 points and for the y coordinate 400 points. In theory you are able to address 256,000 pixel but only 128,000 are visible due to the maximal resolution of the hardware. x,y are the the new coordinates for the 'world reference'. l,r,t,b are optional and set the borders for the new graphical window (works in the same way like the WINDOW command for a text window). l,r,t,b means left, right, tob and bottom coordinates. If a new graphical window (borders) is defined every point or drawn line won't be plotted (clipped internally). Example (the line drawn will be cutted): ORIGIN 320,200,250,450,100,300 DRAW 0,200

-# **OUT** &amp;lt;port number=""&amp;gt;,&amp;lt;value&amp;gt;
-Sets the value to the I/O address specified in the &amp;lt;port number=""&amp;gt;. Associated keywords: INP, WAIT
-
-# **PAPER** [#&amp;lt;stream expression=""&amp;gt;][,]
+### **OUT** &amp;lt;port number&amp;gt;,&amp;lt;value&amp;gt;
+Sets the value to the I/O address specified in the &amp;lt;port number&amp;gt;. Associated keywords: INP, WAIT
+
+### **PAPER** [#&amp;lt;stream expression&amp;gt;][,]
 sets the background color

-# **PEN** [#&amp;lt;stream expression=""&amp;gt;][,]
+### **PEN** [#&amp;lt;stream expression&amp;gt;][,]
 sets the text color

-# **PLOT** x,y[,[i1][,i2]]
+### **PLOT** x,y[,[i1][,i2]]
 Plots a point at the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour

-# **PLOTR** xr,yr[,[i1][,i2]]
+### **PLOTR** xr,yr[,[i1][,i2]]
 Plots a point at the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.

-# **POS** (#&amp;lt;stream expression=""&amp;gt;)
-FUNCTION: Reports the current horizontal POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression=""&amp;gt; MUST be specified, and does NOT default to #0. POS(#8) reports the current horizontal carriage position for the printer, where 1 is the extreme left hand edge. POS(#9) reports the logical position in the disc file stream, i.e. the number of printing characters sent to the stream since the last carriage return.
-
-# **PRINT** [#&amp;lt;channel number=""&amp;gt;][&amp;lt;list of:&amp;lt;article="" to="" print=""&amp;gt;][;][USING&amp;lt;format model=""&amp;gt;][&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;][;|&amp;lt;space&amp;gt;]
-prints content to the screen. If it ends with an ;, there will be no new line at the end. Within the command a ; or &amp;lt;space&amp;gt; lets print the next operand, with a comma (,) the cursor will be set to the next tab position (defined with ZONE) stream#8 is the printer stream#9 is the disc.  SPC(&amp;lt;count&amp;gt;) prints count spaces TAB(&amp;lt;position&amp;gt;) sets the cursor to the correct x-position. See USING command. Do not forget the separator (e.g. space or semikolon) after a string. PRINT "TEST"SPC(2) without separator does not work!
-
-# **?** 
+### **POS** (#&amp;lt;stream expression&amp;gt;)
+FUNCTION: Reports the current horizontal POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression&amp;gt; MUST be specified, and does NOT default to #0. POS(#8) reports the current horizontal carriage position for the printer, where 1 is the extreme left hand edge. POS(#9) reports the logical position in the disc file stream, i.e. the number of printing characters sent to the stream since the last carriage return.
+
+### **PRINT** [#&amp;lt;channel number&amp;gt;][&amp;lt;list of:&amp;lt;article to print&amp;gt;][;][USING&amp;lt;format model&amp;gt;][&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;][;|&amp;lt;Space&amp;gt;]
+prints content to the screen. If it ends with an ;, there will be no new line at the end. Within the command a ; or &amp;lt;space&amp;gt; lets print the next operand, with a comma (,) the cursor will be set to the next tab position (defined with ZONE) stream#8 is the printer stream#9 is the disc.  SPC(&amp;lt;count&amp;gt;) prints count spaces TAB(&amp;lt;position&amp;gt;) sets the cursor to the correct x-position. See USING command. Do not forget the separator (e.g. space or semikolon) after a string. PRINT "TEST"SPC(2) without separator does not work!
+
+### **?** 
 same as PRINT

-# **RAD** 
+### **RAD** 
 Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: DEG

-# **RANDOMIZE** [TIME]
+### **RANDOMIZE** [TIME]
 Resets the pseudo-random generator. The optional parameter TIME does nothing and is implemented because of compatbility issues.

-# **READ** &amp;lt;variable&amp;gt;
+### **READ** &amp;lt;variable&amp;gt;
 Gets the next data item (from DATA commands), stores it in the given variable and moves to the next item. The variable must be of the correct type. See also: DATA, RESTORE

-# **RECTANGLE** &amp;lt;left&amp;gt;,&amp;lt;right&amp;gt;,&amp;lt;top&amp;gt;,&amp;lt;bottom&amp;gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color=""&amp;gt;]]
+### **RECTANGLE** &amp;lt;left&amp;gt;,&amp;lt;right&amp;gt;,&amp;lt;top&amp;gt;,&amp;lt;bottom&amp;gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color&amp;gt;]]
 Draws a rectangle on the screen

-# **REM** [&amp;lt;text&amp;gt;]
+### **REM** [&amp;lt;text&amp;gt;]
 Remark without any operation. The rest of the line is handled by this command.

-# **'** (semicolon)
+### **'** (semicolon)
 same as REM

-# **RELEASE** &amp;lt;channel&amp;gt;
+### **RELEASE** &amp;lt;channel&amp;gt;
 Releases a sound which was hold on (by a SOUND command) before. It uses the same bit matrix like the SOUND command for the first parameter (&amp;amp;x00000001) releases chanel A (&amp;amp;x00000010) releases chanel B (&amp;amp;x00000011) releases chanel A and B (&amp;amp;x00000100) releases chanel C (&amp;amp;x00000101) releases chanel A and C (&amp;amp;x00000110) releases chanel B and C (&amp;amp;x00000111) releases chanel A, B and C Example: 10 SOUND 65,1000,100 20 PRINT"PRESS R TO LET IT SOUND" 30 IF INKEY(50)=-1 THEN 30 40 RELEASE 1

-# **RENUM** [‹newLine›[,‹first oldLine›[-&amp;lt;last oldline=""&amp;gt;][,‹step›]]]
+### **RENUM** [‹newLine›[,‹first oldLine›[-&amp;lt;last oldline&amp;gt;][,‹step›]]]
 Renumbers the lines of the current program or range. By default, the whole program is renumbered starting at line 10 with multiples of ten. Any parameter that is left out defaults to 10. It is important to note that jumps (GOTO, GOSUB and the like) are automatically converted to the new line numbers. The whole set of parameters can be used to renumber only the last part of a program.

-# **REPLACE$** (&amp;lt;search-string&amp;gt;,&amp;lt;replace-string&amp;gt;,&amp;lt;string&amp;gt;)
-FUNCTION: replaces all occourence of &amp;lt;search-string&amp;gt; with &amp;lt;replace-string&amp;gt; in the given &amp;lt;string&amp;gt;. This function does not exist in original BASIC.
-
-# **RESTORE** &amp;lt;line&amp;gt;
+### **REPLACE$** (&amp;lt;search-string&amp;gt;,&amp;lt;replace-string&amp;gt;,&amp;lt;string&amp;gt;)
+FUNCTION: replaces all occourence of &amp;lt;search-string&amp;gt; with &amp;lt;replace-string&amp;gt; in the given &amp;lt;string&amp;gt;. This function does not exist in original BASIC.
+
+### **RESTORE** &amp;lt;line&amp;gt;
 Resets the data pointer used by READ. When used without parameters, resets the pointer to the first data in the program. Otherwise, resets the pointer to the given line number.

-# **RESUME** [line] or NEXT
+### **RESUME** [line] or NEXT
 Command causes the program to resume after an error code and if it is interrupted by an ON ERROR GOTO jump So it can either resume (if there is no line number stated) at the same line after error code (and if there are more statements in one line) or at the line number stated (optional) or with the NEXT parameter (optional) ... at the line followed by the error line

-# **RETURN** 
+### **RETURN** 
 Terminates a subroutine and returns control to the line following the GOSUB call (see GOSUB)

-# **RIGHT$** (&amp;lt;string expression=""&amp;gt;,&amp;lt;integer expression=""&amp;gt;)
-FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;integer expression=""&amp;gt; (=required length) parameter, after extracting them from the RIGHT of the &amp;lt;string expression=""&amp;gt;. If the &amp;lt;string expression=""&amp;gt; is shorter than the &amp;lt;integer expression=""&amp;gt;, the whole &amp;lt;string expression=""&amp;gt; is returned.
-
-# **RND** [(&amp;lt;numeric expression=""&amp;gt;)]

-    FUNCTION: Returns the next RaNDom number in sequence if the &amp;lt;numeric expression=""&amp;gt; has a positive value or is not specified.     If the &amp;lt;numeric expression=""&amp;gt; yields a value of zero, RND returns a copy of the last random number generated. Associated keywords: RANDOMIZE     1. Example: PRINT RND(0)\”0.536703827 Ready PRINT RND(1) 0.271940658\”Ready PRINT RND(0) 0.271940658 Ready     2. Example:     Example for generating an integer random number between 1 and 1000 10 A=INT((RND(1)*1000)+1) 20 PRINT A 30 GOTO 10     3. Example:     For generating a random number between a lower and higher border 10 INPUT "Low border",low 20 INPUT "High border",high 30 A=INT(RND(1)*(high-low))+low 40 PRINT A     4. Example: 10 RANDOMIZE\”20 FOR x=1 TO -1 STEP -1 30 PRINT "rnd parameter=";x 40 FOR n=1 TO 6 50 PRINT RND(x) 60 NEXT n,x\”run
-
-# **ROUND** (&amp;lt;numeric expression=""&amp;gt;[,&amp;lt;integer expression=""&amp;gt;])
-FUNCTION: Rounds &amp;lt;numeric expression=""&amp;gt; to a number of decimal places or to the power of ten specified by &amp;lt;integer expression=""&amp;gt;.  If &amp;lt;integer expression=""&amp;gt; less than zero, the &amp;lt;numeric expression=""&amp;gt; is rounded to give an absolute integer with &amp;lt;integer expression=""&amp;gt; number of zeros before the decimal point. Associated keywords: ABS, CINT, FIX, INT 1. Example: PRINT ROUND(1562.357,2),ROUND(1562.375,-2) 1562.36     1600 2. Example: 10 FOR n=4 TO -4 STEP -1 20 PRINT ROUND (1234.5678,n) 30 PRINT "with integer expression";n 40 NEXT run
-
-# **RUN** [&amp;lt;line&amp;gt; or &amp;lt;filename&amp;gt;]
+### **RIGHT$** (&amp;lt;string expression&amp;gt;,&amp;lt;integer expression&amp;gt;)
+FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;integer expression&amp;gt; (=required length) parameter, after extracting them from the RIGHT of the &amp;lt;string expression&amp;gt;. If the &amp;lt;string expression&amp;gt; is shorter than the &amp;lt;integer expression&amp;gt;, the whole &amp;lt;string expression&amp;gt; is returned.
+
+### **RND** [(&amp;lt;numeric expression&amp;gt;)]
+    FUNCTION: Returns the next RaNDom number in sequence if the &amp;lt;numeric expression&amp;gt; has a positive value or is not specified.     If the &amp;lt;numeric expression&amp;gt; yields a value of zero, RND returns a copy of the last random number generated. Associated keywords: RANDOMIZE     1. Example: PRINT RND(0)\”0.536703827 Ready PRINT RND(1) 0.271940658\”Ready PRINT RND(0) 0.271940658 Ready     2. Example:     Example for generating an integer random number between 1 and 1000 10 A=INT((RND(1)*1000)+1) 20 PRINT A 30 GOTO 10     3. Example:     For generating a random number between a lower and higher border 10 INPUT "Low border",low 20 INPUT "High border",high 30 A=INT(RND(1)*(high-low))+low 40 PRINT A     4. Example: 10 RANDOMIZE\”20 FOR x=1 TO -1 STEP -1 30 PRINT "rnd parameter=";x 40 FOR n=1 TO 6 50 PRINT RND(x) 60 NEXT n,x\”run
+
+### **ROUND** (&amp;lt;numeric expression&amp;gt;[,&amp;lt;integer expression&amp;gt;])
+FUNCTION: Rounds &amp;lt;numeric expression&amp;gt; to a number of decimal places or to the power of ten specified by &amp;lt;integer expression&amp;gt;.  If &amp;lt;integer expression&amp;gt; less than zero, the &amp;lt;numeric expression&amp;gt; is rounded to give an absolute integer with &amp;lt;integer expression&amp;gt; number of zeros before the decimal point. Associated keywords: ABS, CINT, FIX, INT 1. Example: PRINT ROUND(1562.357,2),ROUND(1562.375,-2) 1562.36     1600 2. Example: 10 FOR n=4 TO -4 STEP -1 20 PRINT ROUND (1234.5678,n) 30 PRINT "with integer expression";n 40 NEXT run
+
+### **RUN** [&amp;lt;line&amp;gt; or &amp;lt;filename&amp;gt;]
     Runs the current program, optionally starting at a given line. If no line number is given, starts at the first line. If a string is used after RUN command a programm will be loaded and executed from storage medium (e.g. Tape, Disc). With that command protected BASIC programs can be executed.Example: RUN"disc"

-# **SAVE** SAVE "filename"
+### **SAVE** SAVE "filename"
 Command saves the current BASIC program / content from RAM onto a storage medium (e.g. Tape, Disc)

-# **SIN** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Calculates the Real value for the Sine of &amp;lt;numeric expression=""&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.
-
-# **SIZEOF** (&amp;lt;array&amp;gt;)
+### **SIN** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Calculates the Real value for the Sine of &amp;lt;numeric expression&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.
+
+### **SIZEOF** (&amp;lt;array&amp;gt;)
 Gets the size (number of rows) of an array 10 DIM a$(15),b(4,4) 20 PRINT SIZEOF(a$),SIZEOF(b) RUN 16      25

-# **SGN** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Determines the SiGN of the &amp;lt;numeric expression=""&amp;gt;. Returns -1 if &amp;lt;numeric expression=""&amp;gt; is less than 0, returns 0 if &amp;lt;numeric expression=""&amp;gt; = 0, and returns 1 if &amp;lt;numeric expression=""&amp;gt; is greater than zero.
-
-# **SOUND** &amp;lt;c&amp;gt;,&lt;p&gt;[,&amp;lt;d&amp;gt;[,&amp;lt;v&amp;gt;[,&amp;lt;env&amp;gt;[,&amp;lt;ent&amp;gt;]]]]
+### **SGN** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Determines the SiGN of the &amp;lt;numeric expression&amp;gt;. Returns -1 if &amp;lt;numeric expression&amp;gt; is less than 0, returns 0 if &amp;lt;numeric expression&amp;gt; = 0, and returns 1 if &amp;lt;numeric expression&amp;gt; is greater than zero.
+
+### **SOUND** &amp;lt;C&amp;gt;,&amp;lt;P&amp;gt;[,&amp;lt;D&amp;gt;[,&amp;lt;V&amp;gt;[,&amp;lt;Env&amp;gt;[,&amp;lt;Ent&amp;gt;]]]]
 SOUND does only work with running and connected CPCmonitor! the SOUND command has following shape: SOUND Channel,Period,Duration,Volume,Volume-Envelope,Tone-Envelope,Noise C: Selecting channel is done bitwise (combinations are possible of course): (Bit 0) &amp;amp;x00000001 = 1 = channel A (middle) (Bit 1) &amp;amp;x00000010 = 2 = channel B (left) (Bit 2) &amp;amp;x00000100 = 4 = channel C (right) more function about channel are (Bit 3) &amp;amp;x00001000 = 8 = Rendezvous with channel A (Bit 4) &amp;amp;x00010000 = 16 = Rendesvous with channel B (Bit 5) &amp;amp;x00100000 = 32 = Rendesvous with channel C (Bit 6) &amp;amp;x01000000 = 64 = Hold (Bit 7) &amp;amp;x10000000 = 128 = Flush P: the period number can be a figure between 0 and 4095 (2^12-1... 12 means that we have 12 tones (inclusive half-tones) in nine octaves on the CPC in sum and their distance between is the twelves square root of two), where 8 octaves are available. E.g. Octave 0 starts on middle C with number 478. To calculate the period you can use following formula: period=1,000,000/(16*frequency) or in short period=(62,500/frequency) (e.g. the note "A" with the frequency 440 Hz has the period 142 on the CPC) In This emulator you can use strings containing the tone name, e.g. t$="db5":SOUND 1,c,25:SOUND 1,d,25:SOUND 1,t$,25:SOUND 1,db5,25:SOUND 1,"db5",25:REM the last three are the same D: the duration of the note is measured in 1/100th of a second and can be any positive number in the range 1-32,767. 0 and negative number are in combination with ENT and ENV commands usefull. A negative number means repititions. V: the volume number range from 0-15 on a CPC664/6128 ENV: and ENT: For shaping the sound ENV (Volume) and ENT (Frequency) commands are available. The relation between SOUND and those commands comes with a figure between 1 to 15 for ENV (5th parameter) and 1 to 15 for ENT (6th parameter). N: the seventh parameter can be used for blending in noise between the range of 0-15 (BASIC 1.0) or 0-30 (BASIC 1.1). The higher the number the 'deeper' or 'dirty' is the noise.

-# **SPC** &amp;lt;n&amp;gt;
+### **SPC** &amp;lt;n&amp;gt;
 in conjunction with PRINT the SPC command prints out a certain number (n) of spaces. Example: PRINT "Hello";SPC(10);"World"; Hello          World

-# **SPEED INK** &amp;lt;n1,n2&amp;gt;
+### **SPEED INK** &amp;lt;n1,n2&amp;gt;
 SPEED INK command defines the frequency of colour changes if a colour change was defined. The duration is calculated by n1=... or n2 =duration/50 seconds

-# **SPEED KEY** &amp;lt;start,repeat&amp;gt;
+### **SPEED KEY** &amp;lt;start,repeat&amp;gt;
 SPEED KEY command defines the delay after which a key repeat (for keys that do repeat). The first parameter is the delay before the first repeat and the second parameter is the delay between further repeats. Delay is in 1/50th of seconds.

-# **SPEED WRITE** &amp;lt;n&amp;gt;
+### **SPEED WRITE** &amp;lt;n&amp;gt;
 SPEED WRITE command sets the speed in baud to write on tape (or the wav-file). 0=1000 Baud, 1=2000 Baud, 2=4000 Baud, 3=8192 Baud.

-# **SQR** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Returns the SQuare Root of the specified &amp;lt;numeric expression=""&amp;gt;.  Associated keywords: none Example: PRINT SQR(9) 3
-
-# **SPACE$** (&amp;lt;count&amp;gt;)
-Gets &amp;lt;count&amp;gt; spaces
-
-# **SYMBOL** n,i1[,i2[,i3[,i4[,i5[,i6[,i7[,i8]]]]]]]
+### **SQR** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Returns the SQuare Root of the specified &amp;lt;numeric expression&amp;gt;.  Associated keywords: none Example: PRINT SQR(9) 3
+
+### **SPACE$** (&amp;lt;count&amp;gt;)
+Gets &amp;lt;count&amp;gt; spaces
+
+### **SYMBOL** n,i1[,i2[,i3[,i4[,i5[,i6[,i7[,i8]]]]]]]
 Redefines the appearance of the character at index n. Each of the following eight integers defines the contents of one pixel row, starting at the top of the character. Each character fits in an 8x8 pixel grid. Missing lines are considered as empty. Example: SYMBOL 255,255,129,129,129,129,129,129,255 PRINT CHR$(255) Defines character 255 to look like an empty square and prints it.

-# **SYMBOL** AFTER n
+### **SYMBOL** AFTER n
 no operation, only for compatibility.

-# **STOP** 
+### **STOP** 
 Breaks program execution at line containing the STOP statement. The message BREAK in is output with the line number.

-# **STR$** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Converts the &amp;lt;numeric expression=""&amp;gt; to a decimal STRing representation. Useful for converting a number to a string in case of string manipulation. E.g. after converting a figure to a string then the most left character holds the sign: a minus in case the figure is negative and a space in case the figure is positiv. Associated keywords: BIN$, DEC$, HEX$, VAL Example: 10 FIGURE=-1599 20 FIGURE$=STR$(FIGURE) 30 PRINT FIGURE$ -1599
-
-# **STRING$** (&amp;lt;length&amp;gt;,&amp;lt;character specifier=""&amp;gt;)
-FUNCTION: Returns a string expression consisting of the &amp;lt;character specifier=""&amp;gt; repeated the number of time (in the range 0 to 255) specified in the &amp;lt;length&amp;gt;.     Associated keywords: SPACE$ 1. Example: PRINT STRING$(40,"+") ++++++++++++++++++++++++++++++++++++++++ 2. Example: PRINT STRING$(40,64) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@     NOTE: the &amp;lt;character specifier=""&amp;gt; 64 refers to the ASCII value of the character '@' and is also equivalent to PRINT STRING$(40,CHR$(64))
-
-# **SWAP** 
-WINDOW SWAP works in combination with the window command. Every error or status messages from the operating system will be displayed normaly on WINDOW#0 (=main window). WINDOW SWAP changes the main window to the desired target window. Example (if a window with number 4 was defined before...): WINDOW SWAP 0,4  SWAP &amp;lt;var1&amp;gt;,&amp;lt;var2&amp;gt; swaps the content of two variables (no standard BASIC)
-
-# **TAB** &amp;lt;n&amp;gt;
+### **STR$** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Converts the &amp;lt;numeric expression&amp;gt; to a decimal STRing representation. Useful for converting a number to a string in case of string manipulation. E.g. after converting a figure to a string then the most left character holds the sign: a minus in case the figure is negative and a space in case the figure is positiv. Associated keywords: BIN$, DEC$, HEX$, VAL Example: 10 FIGURE=-1599 20 FIGURE$=STR$(FIGURE) 30 PRINT FIGURE$ -1599
+
+### **STRING$** (&amp;lt;length&amp;gt;,&amp;lt;character specifier&amp;gt;)
+FUNCTION: Returns a string expression consisting of the &amp;lt;character specifier&amp;gt; repeated the number of time (in the range 0 to 255) specified in the &amp;lt;length&amp;gt;.     Associated keywords: SPACE$ 1. Example: PRINT STRING$(40,"+") ++++++++++++++++++++++++++++++++++++++++ 2. Example: PRINT STRING$(40,64) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@     NOTE: the &amp;lt;character specifier&amp;gt; 64 refers to the ASCII value of the character '@' and is also equivalent to PRINT STRING$(40,CHR$(64))
+
+### **SWAP** 
+WINDOW SWAP works in combination with the window command. Every error or status messages from the operating system will be displayed normaly on WINDOW#0 (=main window). WINDOW SWAP changes the main window to the desired target window. Example (if a window with number 4 was defined before...): WINDOW SWAP 0,4  SWAP &amp;lt;var1&amp;gt;,&amp;lt;var2&amp;gt; swaps the content of two variables (no standard BASIC)
+
+### **TAB** &amp;lt;n&amp;gt;
 in conjunction with PRINT the TAB command sets the x position of the cursor to the given position Example: PRINT "Hello";TAB(10);"World"; Hello    World

-# **TABDOT** (&amp;lt;x&amp;gt;,&amp;lt;real&amp;gt;,&amp;lt;decimal figures=""&amp;gt;)
+### **TABDOT** (&amp;lt;x&amp;gt;,&amp;lt;real&amp;gt;,&amp;lt;decimal figures&amp;gt;)
 in conjunction with PRINT the TABDOT command sets the decimal point of the value to x position of the cursor to the given position Example: PRINT "Hi";TABDOT(10,123.45,2);"World"; Hi    123.45 THIS COMMAND DOES NOT EXIST IN THE ORINAL LOCOMOTIVE BASIC!

-# **TAG** [#st]
+### **TAG** [#st]
 Allows text to print at graphics cursor position. (#st does not work, yet). see TAGOFF

-# **TAGOFF** [#st]
+### **TAGOFF** [#st]
 Directs text to stream st printing it at previous text cursor position. (#st does not work, yet)

-# **TAN** (&amp;lt;numeric expression=""&amp;gt;)
-FUNCTION: Calculates the TANgent of the &amp;lt;numeric expression=""&amp;gt;, which must be in the range -200,000 to +200,000.  NOTE: DEG and RAD can be used to force the result of the calculation to degrees or radians respectively.Associated keywords: ATN, COS, DEG, RAD, SIN Example: PRINT TAN(45) 1.61977519
-
-# **TEST** (&amp;lt;x co-ordinate=""&amp;gt;,&amp;lt;y co-ordinate=""&amp;gt;)
-FUNCTION: Moves the graphics cursor to the absolute position specified by the &amp;lt;x&amp;gt; and &amp;lt;y co-ordinate=""&amp;gt;s, and reports the value of the ink at the new location. Associated keywords: MOVE, MOVER, TESTR, XPOS, YPOS
-
-# **TESTR** (&amp;lt;x offset=""&amp;gt;,&amp;lt;y offset=""&amp;gt;)
-FUNCTION: Moves the graphics cursor by the amount specified in the &amp;lt;x&amp;gt; and &amp;lt;y offset=""&amp;gt;s relative to its current position, and reports the value of the ink at the new location.
-
-# **TIME** 
+### **TAN** (&amp;lt;numeric expression&amp;gt;)
+FUNCTION: Calculates the TANgent of the &amp;lt;numeric expression&amp;gt;, which must be in the range -200,000 to +200,000.  NOTE: DEG and RAD can be used to force the result of the calculation to degrees or radians respectively.Associated keywords: ATN, COS, DEG, RAD, SIN Example: PRINT TAN(45) 1.61977519
+
+### **TEST** (&amp;lt;x co-ordinate&amp;gt;,&amp;lt;y co-ordinate&amp;gt;)
+FUNCTION: Moves the graphics cursor to the absolute position specified by the &amp;lt;x&amp;gt; and &amp;lt;y co-ordinate&amp;gt;s, and reports the value of the ink at the new location. Associated keywords: MOVE, MOVER, TESTR, XPOS, YPOS
+
+### **TESTR** (&amp;lt;x offset&amp;gt;,&amp;lt;y offset&amp;gt;)
+FUNCTION: Moves the graphics cursor by the amount specified in the &amp;lt;x&amp;gt; and &amp;lt;y offset&amp;gt;s relative to its current position, and reports the value of the ink at the new location.
+
+### **TIME** 
    FUNCTION: Reports the elapsed time since the computer was last switched-on or reset, (excluding periods when reading or writing to disc).     Each second of real time is equal to the returned value = TIME/300.

-# **TIME$** ([format])
+### **TIME$** ([format])
 gives the actual date/time either in hh:mm:ss format or in the given format

-# **TRIM$** &amp;lt;string&amp;gt;
+### **TRIM$** &amp;lt;String&amp;gt;
 Not in original BASIC: removes spaces from the ends of a string

-# **TROFF** 
+### **TROFF** 
 Turns off the program flow trace (see TRON)

-# **UNT** (&amp;lt;/string&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/decimal&amp;gt;&amp;lt;/real&amp;gt;&amp;lt;/x&amp;gt;&amp;lt;/n&amp;gt;&amp;lt;/var2&amp;gt;&amp;lt;/var1&amp;gt;&amp;lt;/character&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/character&amp;gt;&amp;lt;/character&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/count&amp;gt;&amp;lt;/count&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/n&amp;gt;&amp;lt;/start,repeat&amp;gt;&amp;lt;/n1,n2&amp;gt;&amp;lt;/n&amp;gt;&amp;lt;/ent&amp;gt;&amp;lt;/env&amp;gt;&amp;lt;/v&amp;gt;&amp;lt;/d&amp;gt;&lt;/p&gt;&lt;address&gt;)
-FUNCTION: Return an integer in the range -32768 to +32767 which is the twos-complement equivalent of the unsigned value of the &lt;address&gt;. Example: PRINT UNT(&amp;amp;FF66) -154
-
-# **TRON** 
+### **UNT** (&amp;lt;address&amp;gt;)
+FUNCTION: Return an integer in the range -32768 to +32767 which is the twos-complement equivalent of the unsigned value of the &amp;lt;address expression&amp;gt;. Example: PRINT UNT(&amp;amp;FF66) -154
+
+### **TRON** 
 Turns on the program flow trace for debugging. Causes the line number of each statement executed to be displayed.

-# **UPPER$** (&amp;lt;string expression=""&amp;gt;)
-FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression=""&amp;gt; but in which all alphabetic characters in the range A to Z are converted to UPPER case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: LOWER$
-
-# **USING** 
-PRINT USING makes it possible to define the print format of an expression transmitted by the command PRINT. One defines for that the &amp;lt;format model=""&amp;gt; with which one wishes to appear the expression. One uses as &amp;lt;separator&amp;gt; either a comma, or a semicolon. The &amp;lt;format model=""&amp;gt; is a character string made up with the following « field indicators »: Numericals formats In a number: #  Each sign # indicate the site of a figure.     Example: ###### .   Indicate the site of the decimal point (equivalent with our comma).     Example:######.## ,   (Reserve a space). This sign, being able to appear only immediately before the decimal point, indicates that the figures located on the left of the decimal point will be laid out by groups of three (corresponding to the thousands) separate between them by a comma    Example:######,.## Framing of a number: ££   (Reserve two spaces). Indicate that the sign £ will appear immediately before the first digit or the decimal point, i.e. on one of the sites reserved for digits.        Example: ££######,.## **   (Reserve two spaces). Indicate that all the empty spaces located before the number will be filled by asterisks.       Example: **######,.## **£   (Reserve three spaces). Add the options ** and ££, i.e. the asterisks at the head and the sign £ preceding immediately the number.          Example: **£######,.## $$    (Reserve two spaces). Indicate that the sign $ will appear immediately on the left than the first digit or decimal point, i.e. on sites reserved to digits.        Example:$$######,.## **$  (Reserve three spaces). Add the options ** and $$, i.e. the asterisks at the head and the sign $ preceding immediately the number.        Example: **$######,.## +      Indicate that one wishes to see appearing the sign of the number. This sign will appear before the number if the + is located at the beginning of the &amp;lt;model of="" format=""&amp;gt; and after the number if it is located to the end.         Example: +####.#### -       The sign - can appear only TO THE END of the mask. It asks the presence of the sign - after any negative number or any negative exponent. In the absence of this specification, the sign - appears by defect before the negative number.         Example:####.####- ^^^^  Indicate that the number must appear with exponent. The signs ^^^^ are placed AFTER the last site of digits, but BEFORE any final sign + or -          Example: #.####^^^^+ The maximum length of the &amp;lt;model of="" format=""&amp;gt; of a number is 20 characters. The numbers are rounded with the number of signs indicated. If a format is too small to contain the expression:     PRINT USING "####";12345678 ... this one is not truncated, but appears in its entirety, preceded by the sign % indicating a «erroneous format». Format of an alphanumeric chain     10 CLS:a$="abcdefghijklmnopqrst"     20 PRINT"alphanumeric chain= ";a$     30 PRINT:PRINT"With  !  =  ";     40 PRINT USING "!";a$     50 PRINT:PRINT"With  \espaces\  =  ";     60 PRINT USING "\           \";a$     70 PRINT:PRINT"With  &amp;amp;  =  ";     80 PRINT USING "&amp;amp;";a$     90 GOTO 90     run !   indicate that only the first character of the chain must appear.     Example: ! \&amp;lt;espaces&amp;gt;\     Indicate that only the x first characters of the chain must appear, x being equal to the length of the format (bars included).     Example:\            \ &amp;amp;   Indicate that the chain must appear «just as it is».       Example: &amp;amp; The &amp;lt;model of="" format=""&amp;gt; of a chain cannot exceed 255 characters. Any &amp;lt;model of="" format=""&amp;gt; can be represented by an alphanumeric variable, as shows it the following example:     10 a$="FF######,.##"     20 b$="!"     30 PRINT USING a$;12345.6789;     40 PRINT USING b$;"cents"     run
-
-# **VAL** (&amp;lt;string expression=""&amp;gt;)
-FUNCTION: Returns the numeric VALue, (including any negative sign and decimal point) of the first character(s) in the specified &amp;lt;string expression=""&amp;gt;.
-
-# **VPOS** (#&amp;lt;stream expression=""&amp;gt;)
-FUNCTION: Reports the current vertical POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression=""&amp;gt; MUST be specified, and does NOT default to #0.
-
-# **WAIT** 
+### **UPPER$** (&amp;lt;string expression&amp;gt;)
+FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression&amp;gt; but in which all alphabetic characters in the range A to Z are converted to UPPER case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: LOWER$
+
+### **USING** 
+PRINT USING makes it possible to define the print format of an expression transmitted by the command PRINT. One defines for that the &amp;lt;format model&amp;gt; with which one wishes to appear the expression. One uses as &amp;lt;separator&amp;gt; either a comma, or a semicolon. The &amp;lt;format model&amp;gt; is a character string made up with the following « field indicators »: Numericals formats In a number: #  Each sign # indicate the site of a figure.     Example: ###### .   Indicate the site of the decimal point (equivalent with our comma).     Example:######.## ,   (Reserve a space). This sign, being able to appear only immediately before the decimal point, indicates that the figures located on the left of the decimal point will be laid out by groups of three (corresponding to the thousands) separate between them by a comma    Example:######,.## Framing of a number: ££   (Reserve two spaces). Indicate that the sign £ will appear immediately before the first digit or the decimal point, i.e. on one of the sites reserved for digits.        Example: ££######,.## **   (Reserve two spaces). Indicate that all the empty spaces located before the number will be filled by asterisks.       Example: **######,.## **£   (Reserve three spaces). Add the options ** and ££, i.e. the asterisks at the head and the sign £ preceding immediately the number.          Example: **£######,.## $$    (Reserve two spaces). Indicate that the sign $ will appear immediately on the left than the first digit or decimal point, i.e. on sites reserved to digits.        Example:$$######,.## **$  (Reserve three spaces). Add the options ** and $$, i.e. the asterisks at the head and the sign $ preceding immediately the number.        Example: **$######,.## +      Indicate that one wishes to see appearing the sign of the number. This sign will appear before the number if the + is located at the beginning of the &amp;lt;model of format&amp;gt; and after the number if it is located to the end.         Example: +####.#### -       The sign - can appear only TO THE END of the mask. It asks the presence of the sign - after any negative number or any negative exponent. In the absence of this specification, the sign - appears by defect before the negative number.         Example:####.####- ^^^^  Indicate that the number must appear with exponent. The signs ^^^^ are placed AFTER the last site of digits, but BEFORE any final sign + or -          Example: #.####^^^^+ The maximum length of the &amp;lt;model of format&amp;gt; of a number is 20 characters. The numbers are rounded with the number of signs indicated. If a format is too small to contain the expression:     PRINT USING "####";12345678 ... this one is not truncated, but appears in its entirety, preceded by the sign % indicating a «erroneous format». Format of an alphanumeric chain     10 CLS:a$="abcdefghijklmnopqrst"     20 PRINT"alphanumeric chain= ";a$     30 PRINT:PRINT"With  !  =  ";     40 PRINT USING "!";a$     50 PRINT:PRINT"With  \espaces\  =  ";     60 PRINT USING "\           \";a$     70 PRINT:PRINT"With  &amp;amp;  =  ";     80 PRINT USING "&amp;amp;";a$     90 GOTO 90     run !   indicate that only the first character of the chain must appear.     Example: ! \&amp;lt;espaces&amp;gt;\     Indicate that only the x first characters of the chain must appear, x being equal to the length of the format (bars included).     Example:\            \ &amp;amp;   Indicate that the chain must appear «just as it is».       Example: &amp;amp; The &amp;lt;model of format&amp;gt; of a chain cannot exceed 255 characters. Any &amp;lt;model of format &amp;gt; can be represented by an alphanumeric variable, as shows it the following example:     10 a$="FF######,.##"     20 b$="!"     30 PRINT USING a$;12345.6789;     40 PRINT USING b$;"cents"     run
+
+### **VAL** (&amp;lt;string expression&amp;gt;)
+FUNCTION: Returns the numeric VALue, (including any negative sign and decimal point) of the first character(s) in the specified &amp;lt;string expression&amp;gt;.
+
+### **VPOS** (#&amp;lt;stream expression&amp;gt;)
+FUNCTION: Reports the current vertical POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression&amp;gt; MUST be specified, and does NOT default to #0.
+
+### **WAIT** 
 Wait until any key is pressed. Originally: Waits until the I/O port at add returns a value (0-255). The value returned is XORed with i2 and the ANDed with i1. This is repeated until a non-zero result occurs.

-# **WHILE** &amp;lt;expression&amp;gt; WEND
+### **WHILE** &amp;lt;expression&amp;gt; WEND
 repeats this loop until the expression is false

-# **WIDTH** [#&amp;lt;stream expression=""&amp;gt;,]&amp;lt;integer expression=""&amp;gt;
+### **WIDTH** [#&amp;lt;stream expression&amp;gt;,]&amp;lt;integer expression&amp;gt;
 The WIDTH command defines the maximum number of characters per output line for a specific stream. Once the specified width is reached, Locomotive BASIC automatically inserts a carriage return (line break). This prevents long lines from being truncated or wrapping incorrectly on the printer or screen. It is most commonly used with the printer (stream #8), but can also be applied to the screen (stream #0) or any other open stream.

-# **WINDOW** [#&amp;lt;stream expression=""&amp;gt;,]&amp;lt;l&amp;gt;,&amp;lt;r&amp;gt;,&amp;lt;t&amp;gt;,&lt;b&gt;
-It is possible to define in BASIC eight (8) independent windows for text output. Overlapping is possible.#STREAM: eight window are possible. No. zero (0) is the main window where error or status messages were put out by default. each position is included inside the windowL = left column / R = right column (dependent of the mode 0 = 20 / 1 = 40 / 2 = 80) T = top row / B = bottom row (always from 1 to 25) Example: MODE 1 WINDOW#1,1,40,1,6 ...defines the first top quarter of the screen for window No. 1 ===&amp;gt; if R or B has value of 999, this means the maximum size of the console screen! &amp;lt;===
-
-# **WRITE** [#&amp;lt;channel number=""&amp;gt;][&amp;lt;list of:&amp;lt;article="" to="" print=""&amp;gt;][;][USING&amp;lt;format model=""&amp;gt;][&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;][;|&amp;lt;space&amp;gt;]
+### **WINDOW** [#&amp;lt;stream expression&amp;gt;,]&amp;lt;L&amp;gt;,&amp;lt;R&amp;gt;,&amp;lt;T&amp;gt;,&amp;lt;B&amp;gt;
+It is possible to define in BASIC eight (8) independent windows for text output. Overlapping is possible.#STREAM: eight window are possible. No. zero (0) is the main window where error or status messages were put out by default. each position is included inside the windowL = left column / R = right column (dependent of the mode 0 = 20 / 1 = 40 / 2 = 80) T = top row / B = bottom row (always from 1 to 25) Example: MODE 1 WINDOW#1,1,40,1,6 ...defines the first top quarter of the screen for window No. 1 ===&amp;gt; if R or B has value of 999, this means the maximum size of the console screen! &amp;lt;===
+
+### **WRITE** [#&amp;lt;channel number&amp;gt;][&amp;lt;list of:&amp;lt;article to print&amp;gt;][;][USING&amp;lt;format model&amp;gt;][&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;][;|&amp;lt;Space&amp;gt;]
 The same as PRINT, but strings are printed in "" 10 a$="Hello" 20 WRITE 100,a$ RUN 100          "Hello"

-# **XPOS** 
+### **XPOS** 
 FUNCTION: Reports the current horizontal (X)POSition of the graphics cursor.

-# **YPOS** 
+### **YPOS** 
 FUNCTION: Reports the current vertical (Y)POSition of the graphics cursor.

-# **ZONE** i
+### **ZONE** i
 Changes the width of the print zone. Default is 13.     Example: 10 MODE 2 20 PRINT"normal zone (13)" 30 PRINT 1,2,3,4 RUN normal zone(13) 1           2            3            4 Ready 20 PRINT"now with different zone(5)" 30 ZONE 5 40 PRINT 1,2,3,4 RUN now with different zone(5) 1     2     3     4 Ready

-# **|BITMAP** [l,r,t,b[,bmp]]
-creates a bitmap in base64-format to insert into an img-html-tag (&lt;img src="./data:image/png;base64,Base64String%20alt="/&gt;) from the screen. You can use a rect of the screen. If bmp=-1 then the bitmap is not encoded as base64 to realize a bitmap download
-
-# **|DIR** [,&amp;lt;search pattern=""&amp;gt;]
+### **|BITMAP** [l,r,t,b[,bmp]]
+creates a bitmap in base64-format to insert into an img-html-tag (&amp;lt;img src="data:image/png;base64,Base64String alt="Embedded Image"/&amp;gt;) from the screen. You can use a rect of the screen. If bmp=-1 then the bitmap is not encoded as base64 to realize a bitmap download
+
+### **|DIR** [,&amp;lt;search pattern&amp;gt;]
 Same as CAT

-# **|DISC** 
+### **|DISC** 
 Files are written to disc, not to tape.

-# **|MODE** ,m
+### **|MODE** ,m
 Changes the screen mode without clearing the screen: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 160×200 in 4 colours.

-# **|HTMLSTART** 
-In a Webserver environment prints the very first header before  and new cookie declarations.
-
-# **|COOKIE** 
+### **|HTMLSTART** 
+In a Webserver environment prints the very first header before &amp;lt;html&amp;gt; and new cookie declarations.
+
+### **|COOKIE** 
 In a Webserver environment this command reads all COOKIE variables and stores them in the corresponding string variables with the same name.  e.g. 10 |COOKIE 20 PRINT foo$ test Ready

-# **|GET** 
-In a Webserver environment this command reads all GET variables and stores them in the corresponding string variables with the same name. Hint: requesturi$ is set to the active url. e.g. &amp;lt;input name="foo" value="test"&amp;gt; ... 10 |GET 20 PRINT foo$ test Ready
-
-# **|GUI** 
+### **|GET** 
+In a Webserver environment this command reads all GET variables and stores them in the corresponding string variables with the same name. Hint: requesturi$ is set to the active url. e.g. &amp;lt;input name="foo" value="test" /&amp;gt; ... 10 |GET 20 PRINT foo$ test Ready
+
+### **|GUI** 
 execte CPCdisplay[.exe] to communicate with it. CPCdisplay shows all the graphics and plays sound, which the terminal cannot do. (Show |SIXELMODE)

-# **|JSON** NEW|LOAD|PARSE|GET|COUNT|TYPE|SET|ADD|ADDNUM|APPEND|ADDOBJECT|DELETE|SAVE|FREE
+### **|JSON** NEW|LOAD|PARSE|GET|COUNT|TYPE|SET|ADD|ADDNUM|APPEND|ADDOBJECT|DELETE|SAVE|FREE
 |JSON Command Reference  - NEW   Create new empty JSON {} - LOAD "file.json"   Load JSON from file - PARSE "jsonstring$"   Parse JSON string - GET "path", var   Read value into variable - COUNT "path", var%   Count array items or object keys - TYPE "path", var$   Get type (object/array/string/number/boolean/null) - SET "path", "value"   Change existing string - SETNUM "path", num   Change existing number - ADD "path", "value"   Add new string field - ADDNUM "path", num   Add new numeric field - APPEND "path", "value"   Append value to array - ADDOBJECT "path"   Add new empty object to array - DELETE "path"   Delete field or element - SAVE "file.json"   Save JSON to file - FREE   Release JSON from memory  Path examples: kunden[3].name kunden[0].hobbies[2] kunden[-1]

-# **|LOADENVIRONMENT** 
+### **|LOADENVIRONMENT** 
 loads the previosly saved BASIC environment.

-# **|MYSQL** CONNECT|QUERY|CLOSE[&amp;lt;variable|string&amp;gt;][,&amp;lt;array&amp;gt;]
+### **|MYSQL** CONNECT|QUERY|CLOSE[&amp;lt;variable|string&amp;gt;][,&amp;lt;array&amp;gt;]
 plase refer |SQLITE for details. |MYSQL works exactly identically, but to connect to have to use it in this way: |MYSQL CONNECT "localhost;meinuser;meinpass;meinedb"

-# **|SAVEENVIRONMENT** 
+### **|SAVEENVIRONMENT** 
 Saves the complete BASIC Environment (program, variables) to default.basicsh.json

-# **|SETCOOKIE** ,&amp;lt;name&amp;gt;,&amp;lt;value&amp;gt;[,&amp;lt;expires in="" minutes=""&amp;gt;]
+### **|SETCOOKIE** ,&amp;lt;name&amp;gt;,&amp;lt;value&amp;gt;[,&amp;lt;expires in minutes&amp;gt;]
 In a Webserver environment this command sets a COOKIE variables and stores it in the buffer. |HTMLSTART makes it permanent. e.g.: |SETCOOKIE,"foo","content",60 THIS COMMAND MUST BE USED BEFORE |HTMLSTART!

-# **|PARAMCOUNT** [,&amp;lt;variable&amp;gt;]
-prints the number of parameters or puts it into &amp;lt;variable&amp;gt;
-
-# **|PARAMSTR** ,&amp;lt;number&amp;gt;[,&amp;lt;variable&amp;gt;]
-prints the given parameter to screen or puts it into the &amp;lt;variable&amp;gt;
-
-# **|PRINTSIXEL** 
+### **|PARAMCOUNT** [,&amp;lt;variable&amp;gt;]
+prints the number of parameters or puts it into &amp;lt;variable&amp;gt;
+
+### **|PARAMSTR** ,&amp;lt;number&amp;gt;[,&amp;lt;variable&amp;gt;]
+prints the given parameter to screen or puts it into the &amp;lt;variable&amp;gt;
+
+### **|PRINTSIXEL** 
 prints the graphics screen (sixel-Format) to the console

-# **|PRINTSLOW** ,&amp;lt;ms&amp;gt;
+### **|PRINTSLOW** ,&amp;lt;ms&amp;gt;
 Slows down the output on the text screen in ms, to simulate the slow output of a original CPC

-# **|SIXELMODE** 
+### **|SIXELMODE** 
 Switches to the graphic mode in the console. In a UNIX environment sixel MUST be installed to show the sixel graphics! With kolsole (KDE) or 'xterm -ti vt340' it should work.

-# **|SHOWALLVARIABLES** 
+### **|SHOWALLVARIABLES** 
 prints a list of all variables

-# **|SHOWALLLOOPS** 
+### **|SHOWALLLOOPS** 
 Shows all FOR and WHILE Loops for debugging issues

-# **|SHOWKEYBOARD** 
+### **|SHOWKEYBOARD** 
 debugging issue: show detected keyboard

-# **|SHELLCOMMANDS** 
+### **|SHELLCOMMANDS** 
 Lists all possible POSIX Shell commands

-# **|SQLITE** CONNECT|QUERY|CLOSE[&amp;lt;variable|string&amp;gt;][,&amp;lt;array&amp;gt;]
-Use of a SQlite database |Create or open an database:  |SQLITE CONNECT &amp;lt;database name=""&amp;gt; Executes an query:  |SQLITE QUERY "create table test(name:varchar(255))" or to put a result into an array a$:  |SQLTE QUERY "select * from test",a$ Close the database: |SQLITE CLOSE  Example: 10 |SQLITE CONNECT "zl.db" 20 |SQLITE QUERY "create table test(name varchar(80))" 30 |SQLITE QUERY "insert into test (name) values (""Klaus""),(""Xaver""),(""Anton""),(""Dietmar"")" 40 |SQLITE QUERY "select * from test order by name",a$ 50 FOR i=0 TO SIZEOF(a$)-1 60 PRINT a$(i) 70 NEXT 90 |SQLITE CLOSE
-
-# **|TAPE** 
+### **|SQLITE** CONNECT|QUERY|CLOSE[&amp;lt;variable|string&amp;gt;][,&amp;lt;array&amp;gt;]
+Use of a SQlite database |Create or open an database:  |SQLITE CONNECT &amp;lt;database name&amp;gt; Executes an query:  |SQLITE QUERY "create table test(name:varchar(255))" or to put a result into an array a$:  |SQLTE QUERY "select * from test",a$ Close the database: |SQLITE CLOSE  Example: 10 |SQLITE CONNECT "zl.db" 20 |SQLITE QUERY "create table test(name varchar(80))" 30 |SQLITE QUERY "insert into test (name) values (""Klaus""),(""Xaver""),(""Anton""),(""Dietmar"")" 40 |SQLITE QUERY "select * from test order by name",a$ 50 FOR i=0 TO SIZEOF(a$)-1 60 PRINT a$(i) 70 NEXT 90 |SQLITE CLOSE
+
+### **|TAPE** 
 Files are written to a wav file in Amstrad CPC Tape format

-# **|TEXTMODE** [,&amp;lt;mode&amp;gt;]
+### **|TEXTMODE** [,&amp;lt;mode&amp;gt;]
 Switches back to text only mode. If mode parameter is given, the Text mode is set to this (See MODE) and the Text or Graphic mode will not change.

-# **|WAVEFORM** ,WaveForm
+### **|WAVEFORM** ,WaveForm
 Set the SOUND Waveform. 0=wfSine, 1=wfSawtooth, 2=wfSquare, 3=wfOragn. Standard is wfSquare. This parameter will not reset when basic resets.

-# **Shell** 
+### **Shell** 
 Any command that is not part of the BASIC language will be passed to the operating system for execution. If it fails, you get a "Syntax error".

-# **Zahlen (Schreibweise)** 
+### **Zahlen (Schreibweise)** 
 Dezimal: 123 Hexadezimal: &amp;amp;C9 Binär: &amp;amp;x10101001 Exponential: 3.2e4 = 32000 TRUE=-1, FALSE=0

-# **Zeichen** (Codierung im Grafikmodus)
+### **Zeichen** (Codierung im Grafikmodus)
 Der Normale ASCII-Zeichensatz des Schneider CPC wurde implementiert, jedoch im grafischen Textmodus werden die UTF8-Zeichen für die deutschen Umlaute äöüÄÖÜß korrekt umgesetzt. ein doppeltes "" im String wird dann als CHR$(34) umgedeutet, um die Eingabe zu vereinfachen. Mit der Taste "Einfg" (insert) wird im Grafikmodus das unter dem Cursor liegende Zeichen kopiert (COPY beim CPC)

-# **Rechnen** 
+### **Rechnen** 
 Wenn die Kommandozeile mit +,-,*,/,^,= anfängt, so wird das letzte numerische Ergebnis vorangesetzt und mann kann sich das PRINT sparen. Damit Kann die Shell leichter als Taschenrechner verwendet werden Der Operator = am Anfang bewirkt somit das gleiche wie PRINT, das Ergebnis wird aber nicht in dezimalschreibweise, sondern als Bruch ausgegeben.

&amp;lt;/mode&amp;gt;&amp;lt;/database&amp;gt;&amp;lt;/array&amp;gt;&amp;lt;/variable|string&amp;gt;&amp;lt;/ms&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/number&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/expires&amp;gt;&amp;lt;/value&amp;gt;&amp;lt;/name&amp;gt;&amp;lt;/array&amp;gt;&amp;lt;/variable|string&amp;gt;&amp;lt;/search&amp;gt;&amp;lt;/space&amp;gt;&amp;lt;/expression&amp;gt;&amp;lt;/separator&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/list&amp;gt;&amp;lt;/channel&amp;gt;&lt;/b&gt;&amp;lt;/t&amp;gt;&amp;lt;/r&amp;gt;&amp;lt;/l&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/expression&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/espaces&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/separator&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&lt;/address&gt;&lt;/address&gt;&amp;lt;/c&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/array&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/filename&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/replace-string&amp;gt;&amp;lt;/search-string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/replace-string&amp;gt;&amp;lt;/search-string&amp;gt;&amp;lt;/last&amp;gt;&amp;lt;/channel&amp;gt;&amp;lt;/text&amp;gt;&amp;lt;/fill&amp;gt;&amp;lt;/color&amp;gt;&amp;lt;/bottom&amp;gt;&amp;lt;/top&amp;gt;&amp;lt;/right&amp;gt;&amp;lt;/left&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/position&amp;gt;&amp;lt;/count&amp;gt;&amp;lt;/space&amp;gt;&amp;lt;/space&amp;gt;&amp;lt;/expression&amp;gt;&amp;lt;/separator&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/list&amp;gt;&amp;lt;/channel&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/port&amp;gt;&amp;lt;/value&amp;gt;&amp;lt;/port&amp;gt;&amp;lt;/filename&amp;gt;&amp;lt;/filename&amp;gt;&amp;lt;/list&amp;gt;&amp;lt;/list&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/memory&amp;gt;&amp;lt;/list&amp;gt;&amp;lt;/list&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/file&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/variable$&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/required&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/required&amp;gt;&amp;lt;/required&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/name&amp;gt;&amp;lt;/value&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/startposition&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/variable&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/port&amp;gt;&amp;lt;/port&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/unsigned&amp;gt;&amp;lt;/field&amp;gt;&amp;lt;/unsigned&amp;gt;&amp;lt;/color&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/number&amp;gt;&amp;lt;/general&amp;gt;&amp;lt;/formal&amp;gt;&amp;lt;/name&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/float&amp;gt;&amp;lt;/timer&amp;gt;&amp;lt;/timer&amp;gt;&amp;lt;/timer&amp;gt;&amp;lt;/volume&amp;gt;&amp;lt;/volume&amp;gt;&amp;lt;/volume&amp;gt;&amp;lt;/volume&amp;gt;&amp;lt;/volume&amp;gt;&amp;lt;/volume&amp;gt;&amp;lt;/tone&amp;gt;&amp;lt;/tone&amp;gt;&amp;lt;/tone&amp;gt;&amp;lt;/tone&amp;gt;&amp;lt;/tone&amp;gt;&amp;lt;/tone&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/letter&amp;gt;&amp;lt;/letter&amp;gt;&amp;lt;/letter&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/num&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&amp;lt;/masked&amp;gt;&amp;lt;/masked&amp;gt;&amp;lt;/masked&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/file&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/file&amp;gt;&amp;lt;/fill&amp;gt;&amp;lt;/color&amp;gt;&amp;lt;/radius&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&lt;/dir&gt;&amp;lt;/list&amp;gt;&lt;/address&gt;&amp;lt;/unsigned&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/unsigned&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/unsigned&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/alias&amp;gt;&amp;lt;/line&amp;gt;&lt;/time&gt;&amp;lt;/line&amp;gt;&amp;lt;/timer&amp;gt;&lt;/time&gt;&amp;lt;/numeric&amp;gt;&lt;/pre&gt;&lt;b&gt;
&lt;/b&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dietmar Schmidt</dc:creator><pubDate>Fri, 05 Jun 2026 21:23:16 -0000</pubDate><guid>https://sourceforge.netcaf8886550712315300967bb81b4fa91ed1f3a66</guid></item><item><title>Befehlsliste modified by Dietmar Schmidt</title><link>https://sourceforge.net/p/basicshell/wiki/Befehlsliste/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="h-abs-numeric-expressionnumeric"&gt;&lt;strong&gt;ABS&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the ABSolute value of the given numeric expression (n). This means that negative numbers are returned as positive. Associated keywords: SGN Example: PRINT ABS(-67.98) 67.98&lt;/p&gt;
&lt;h1 id="h-after-timer-numbertimer-gosub-line-numberline"&gt;&lt;strong&gt;AFTER&lt;/strong&gt; &lt;time delay=""&gt;&lt;span&gt;[,&amp;lt;timer number=""&amp;gt;]&amp;lt;/timer&amp;gt;&lt;/span&gt; GOSUB &amp;lt;line number=""&amp;gt;&amp;lt;/line&amp;gt;&lt;/time&gt;&lt;/h1&gt;
&lt;p&gt;Waits for &lt;time delay=""&gt;/50 seconds and then jumps NON-RECURRING to the subroutine at &amp;lt;line number=""&amp;gt; (see also "EVERY i&lt;span&gt;[,t]&lt;/span&gt; GOSUB line").&amp;lt;/line&amp;gt;&lt;/time&gt;&lt;/p&gt;
&lt;h1 id="h-alias-aliasprintalias"&gt;&lt;strong&gt;ALIAS&lt;/strong&gt; &amp;lt;alias&amp;gt;=&lt;command/&gt;|PRINT&amp;lt;/alias&amp;gt;&lt;/h1&gt;
&lt;p&gt;defines an alias as a shortcut of any command. The command is the coplete rest of the line. Aliases are stored in ~/.basicsh_aliases and permanent To unalias, just define an empty command. ALIAS PRINT shows all aliases.&lt;/p&gt;
&lt;h1 id="h-asc-string-expressionstring"&gt;&lt;strong&gt;ASC&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;)&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the numeric value of the first character in the &amp;lt;string expression=""&amp;gt; (s). Associated keywords: CHR$ Example: PRINT ASC("x") 120 Hint:in other languages this is the ord() function&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-atn-numeric-expressionnumeric"&gt;&lt;strong&gt;ATN&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates the Real value for the Arc-TaNgent of &amp;lt;numeric expression=""&amp;gt;, (n) to a real number ranging from -PI/2 to +PI/2 of the value specified.&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-auto-start-lineline-steplinestart"&gt;&lt;strong&gt;AUTO&lt;/strong&gt; &lt;span&gt;[&amp;lt;start line=""&amp;gt;[,&amp;lt;line step=""&amp;gt;]]&amp;lt;/line&amp;gt;&amp;lt;/start&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Creates automatically numbers for programming code&lt;/p&gt;
&lt;h1 id="h-bin-unsigned-integer-expressioninteger-expressionintegerunsigned"&gt;&lt;strong&gt;BIN$&lt;/strong&gt; (&amp;lt;unsigned integer="" expression=""&amp;gt;&lt;span&gt;[,&amp;lt;integer expression=""&amp;gt;]&amp;lt;/integer&amp;gt;&lt;/span&gt;)&amp;lt;/unsigned&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Produces a string of BINary digits respresenting the value of the &amp;lt;unsigned integer="" expression=""&amp;gt;, using the number of binary digits instruced by the second &amp;lt;integer expression=""&amp;gt; (in the range of 0 to 16).  If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will produced in as many digits as are required. The &amp;lt;unsigned integer="" expression=""&amp;gt; to be converted into binary form must yield a value in the range -32768 to 65535. Associated keywords: DEC$, HEX$, STR$ Example: PRINT BIN$(66,8) 01000000&amp;lt;/unsigned&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/unsigned&amp;gt;&lt;/p&gt;
&lt;h1 id="h-border-i1i2"&gt;&lt;strong&gt;BORDER&lt;/strong&gt; i1&lt;span&gt;[,i2]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Sets the Border color to i1. If i2 is given, the border is flashing. Instead color index number (0..28) you can use RGB colors (#123456)&lt;/p&gt;
&lt;h1 id="h-bye-i"&gt;&lt;strong&gt;BYE&lt;/strong&gt; &lt;span&gt;[i]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;exits the BASIC interpreter. With i=0 no message appears&lt;/p&gt;
&lt;h1 id="h-call-list-of-parameterlist"&gt;&lt;strong&gt;CALL&lt;/strong&gt; &lt;address&gt;&lt;span&gt;[,&amp;lt;list of:="" parameter=""&amp;gt;]&amp;lt;/list&amp;gt;&lt;/span&gt;&lt;/address&gt;&lt;/h1&gt;
&lt;p&gt;Allows a machine code routine to be called by BASIC. CALL 0:REM resets the computer completely CALL &amp;amp;BB18:REM wait until any key is pressed CALL &amp;amp;BD19:REM same as FRAME&lt;/p&gt;
&lt;h1 id="h-cat"&gt;&lt;strong&gt;CAT&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Displays the names of the files on the tape or disc.&lt;/p&gt;
&lt;h1 id="h-cd"&gt;&lt;strong&gt;CD&lt;/strong&gt; &lt;dir&gt;&lt;/dir&gt;&lt;/h1&gt;
&lt;p&gt;Change Directory (not in originally Locomotive BASIC)&lt;/p&gt;
&lt;h1 id="h-cint-numeric-expressionnumeric"&gt;&lt;strong&gt;CINT&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the value of the &amp;lt;numeric expression=""&amp;gt; (n), Converting it to a rounded INTeger in the range -32768 to 32767 (or more in this interpreter). Associated keywords: CREAL, FIX, INT, ROUND, UNT Example: 10 n=-2.6 20 PRINT CINT(n) run -3&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-circle-xyradiuscolorfill-colorfillcolorradiusyx"&gt;&lt;strong&gt;CIRCLE&lt;/strong&gt; &amp;lt;x&amp;gt;,&amp;lt;y&amp;gt;,&amp;lt;radius&amp;gt;&lt;span&gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color=""&amp;gt;]]&amp;lt;/fill&amp;gt;&amp;lt;/color&amp;gt;&lt;/span&gt;&amp;lt;/radius&amp;gt;&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&lt;/h1&gt;
&lt;p&gt;Draws a circle on the screen&lt;/p&gt;
&lt;h1 id="h-chain-file-nameline-number-expressionlinefile"&gt;&lt;strong&gt;CHAIN&lt;/strong&gt; &amp;lt;file name=""&amp;gt;&lt;span&gt;[,&amp;lt;line number="" expression=""&amp;gt;]&amp;lt;/line&amp;gt;&lt;/span&gt;&amp;lt;/file&amp;gt;&lt;/h1&gt;
&lt;p&gt;Enables the specified program to be loaded and RUN automatically. If the optional parameter &amp;lt;line number="" expression=""&amp;gt; is specified, the program execution will commence from that line.&amp;lt;/line&amp;gt;&lt;/p&gt;
&lt;h1 id="h-chain-merge-file-nameline-number-expression-line-number-expressiondelete-line-number-rangelinelinelinefile"&gt;&lt;strong&gt;CHAIN MERGE&lt;/strong&gt; &amp;lt;file name=""&amp;gt;&lt;span&gt;[,&amp;lt;line number="" expression=""&amp;gt; | [,[&amp;lt;line number="" expression=""&amp;gt;],DELETE &amp;lt;line number="" range=""&amp;gt;]]&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&amp;lt;/line&amp;gt;&lt;/span&gt;&amp;lt;/file&amp;gt;&lt;/h1&gt;
&lt;p&gt;Loads the specified program from tape or disc, merges it into the program in memory, and starts execution of the merged program. The parameter DELETE &amp;lt;line number="" range=""&amp;gt; is used to delete part of the original program before running it, if required.&amp;lt;/line&amp;gt;&lt;/p&gt;
&lt;h1 id="h-clear-input"&gt;&lt;strong&gt;CLEAR&lt;/strong&gt; &lt;span&gt;[INPUT]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;CLEAR Clears all variables from memory, leaving the program in memory unchanged. All open files are abandoned. The command clear inside a subroutine (GOSUB... RETURN) will also clear the "stack pointer" address of the gosub heap. That means that a RETURN won't work and a GOTO has to be used instead. CLEAR INPUT clears the key buffer.&lt;/p&gt;
&lt;h1 id="h-clg-masked-inkmasked"&gt;&lt;strong&gt;CLG&lt;/strong&gt; &lt;span&gt;[&amp;lt;masked ink=""&amp;gt;]&amp;lt;/masked&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Clears the graphics screen to colour specified by &amp;lt;masked ink=""&amp;gt;. If parameter &amp;lt;masked ink=""&amp;gt; is not specified then the graphics screen is cleared to the colour specified by the GRAPHICS PAPER statement.&amp;lt;/masked&amp;gt;&amp;lt;/masked&amp;gt;&lt;/p&gt;
&lt;h1 id="h-closein"&gt;&lt;strong&gt;CLOSEIN&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Closes any input file&lt;/p&gt;
&lt;h1 id="h-closeout"&gt;&lt;strong&gt;CLOSEOUT&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Closes any output file&lt;/p&gt;
&lt;h1 id="h-cls-stream-expressionstream"&gt;&lt;strong&gt;CLS&lt;/strong&gt; &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;]&amp;lt;/stream&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Clears the window specified by &amp;lt;stream expression=""&amp;gt;. If &amp;lt;stream expression=""&amp;gt; is omitted it defaults to #0 (usually the whole screen). The text cursor of the stream is moved to the upper left corner.&amp;lt;/stream&amp;gt;&amp;lt;/stream&amp;gt;&lt;/p&gt;
&lt;h1 id="h-cont"&gt;&lt;strong&gt;CONT&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;CONTinues program execution interrupted either by &lt;span&gt;[ESC]&lt;/span&gt; &lt;span&gt;[ESC]&lt;/span&gt; or as a result of STOP within a program. A program cannot be continued after being modified.&lt;/p&gt;
&lt;h1 id="h-copychr-stream"&gt;&lt;strong&gt;COPYCHR$&lt;/strong&gt; (#stream)&lt;/h1&gt;
&lt;p&gt;FUNCTION: COPies a CHaRacter from the current position in the stream (which MUST be specified). If the character read is not recognized, a null string is returned. This works only in graphic mode!&lt;/p&gt;
&lt;h1 id="h-cos-numeric-expressionnumeric"&gt;&lt;strong&gt;COS&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates the Real value for the Cosinus of &amp;lt;numeric expression=""&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-creal-numeric-expressionnumeric"&gt;&lt;strong&gt;CREAL&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the value of the &amp;lt;numeric expression=""&amp;gt; (n), Converting it to REAL.&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-cursor-numnum"&gt;&lt;strong&gt;CURSOR&lt;/strong&gt; &amp;lt;num&amp;gt;&amp;lt;/num&amp;gt;&lt;/h1&gt;
&lt;p&gt;enables (1) or disables (0) the cursor.&lt;/p&gt;
&lt;h1 id="h-data-x1x2x3"&gt;&lt;strong&gt;DATA&lt;/strong&gt; x1&lt;span&gt;[,x2,x3...]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Defines a data section to be used by READ calls. Data values can be of any type (integer, real or string) as long as the corresponding READ calls use a variable of the right type. Example: 10 DATA "Hello, world!", 42 20 READ message$:PRINT message$ 30 READ answer:PRINT "The answer is:";answer See also: READ, RESTORE&lt;/p&gt;
&lt;h1 id="h-dec-numeric-expressionformat-templateformatnumeric"&gt;&lt;strong&gt;DEC$&lt;/strong&gt; &amp;lt;numeric expression=""&amp;gt;,&amp;lt;format template=""&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTIION: Returns a DECimal string representation of the &amp;lt;numeric expression=""&amp;gt; (n), using the specified &amp;lt;format template=""&amp;gt; to control the print format of the resulting string. The format template may contain ONLY the characters:     + - $ £ * # , . ^ The use of these 'format field specifiers' is described under the keyword PRINT USING. Example: PRINT DEC$(10^7,"££########,.##") £10,000,000.00&amp;lt;/format&amp;gt;&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-def"&gt;&lt;strong&gt;DEF&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;DEF means "define" and comes along with defining a function in case of DEF FN or defining variables in case of DEFREAL, DEFINT or DEFSTR. DEF FN must come before using the statement FN. DEF with a variable declaration should come before using a variable. (see also FN)&lt;/p&gt;
&lt;h1 id="h-defint-letter-rangeletter"&gt;&lt;strong&gt;DEFINT&lt;/strong&gt; &amp;lt;letter range=""&amp;gt;&amp;lt;/letter&amp;gt;&lt;/h1&gt;
&lt;p&gt;Forces all variables(s) starting with the specified letter(s) to be integer variables. Singular letters could be defined or a range by a minus symbol between two letters. Examples: 20 DEFINT a-z: sets all variables starting with an A until Z as integer. or 10 DEFINT F,S ..... (or 10 DEFINT A-Z) 20 FIRST=111.11:SECOND=22.2 30 PRINT FIRST,SECOND:' prints out 111      22&lt;/p&gt;
&lt;h1 id="h-defreal-letter-rangeletter"&gt;&lt;strong&gt;DEFREAL&lt;/strong&gt; &amp;lt;letter range=""&amp;gt;&amp;lt;/letter&amp;gt;&lt;/h1&gt;
&lt;p&gt;Sets the default for variable(s) with the specified first letter(s) to a floating point figure.&lt;/p&gt;
&lt;h1 id="h-defstr-letter-rangeletter"&gt;&lt;strong&gt;DEFSTR&lt;/strong&gt; &amp;lt;letter range=""&amp;gt;&amp;lt;/letter&amp;gt;&lt;/h1&gt;
&lt;p&gt;Sets the default for variable(s) with the specified first letter(s) to string(s) variables.&lt;/p&gt;
&lt;h1 id="h-deg"&gt;&lt;strong&gt;DEG&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: RAD&lt;/p&gt;
&lt;h1 id="h-delete-first-line-last-line"&gt;&lt;strong&gt;DELETE&lt;/strong&gt; &lt;span&gt;[first line]&lt;/span&gt;&lt;span&gt;[-[last line]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Deletes the current program completely (without arguments) or only the given line or line range. Even DELETE - is legal, it has the same effect as DELETE The lines specified do not have to exist, all lines matching the range will be deleted and having no matches does not cause an error.&lt;/p&gt;
&lt;h1 id="h-di"&gt;&lt;strong&gt;DI&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Disables interrupts until re-enabled by EI command or by RETURN at end of an interrupts service routine.&lt;/p&gt;
&lt;h1 id="h-dim-a"&gt;&lt;strong&gt;DIM&lt;/strong&gt; a&lt;a href="./d1[,d2[,...]]"&gt;%|!|$&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Creates array a with single or multiple dimensions. You may optionally specify integer (%), real (!) or string ($) type otherwise it defaults to the current type set for the first letter of the array name. d1 is size of first dimension-1, d2 is size of second dimension-1 and so on. DIM x(10) will create an array with 11 elements, x(0) is the first element, x(10) is the eleventh and last. You can specify as many dimensions as will fit on one 255 character line, which is a maximum of 125. Trying to create an array that already exists will generate an Array already dimensioned error. If an array is not specified by DIM before being accessed, each dimension value defaults to 10. The maximum dimensions that can be created this way is three. NEW: In this interpreter you can resize arrays without destroying the content.&lt;/p&gt;
&lt;h1 id="h-edit-lineline"&gt;&lt;strong&gt;EDIT&lt;/strong&gt; &amp;lt;line&amp;gt;&amp;lt;/line&amp;gt;&lt;/h1&gt;
&lt;p&gt;Display 1 program line for editing. The following keys can be used in editing mode, or during typing in BASIC: CTRL+CURSOR LEFT - go to start of line CTRL+CURSOR RIGHT - go to end of line&lt;/p&gt;
&lt;h1 id="h-draw-xyi1i2"&gt;&lt;strong&gt;DRAW&lt;/strong&gt; x,y&lt;span&gt;[,[i1][,i2]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Draws a line from the current cursor position to position x,y. i1 specifies colour, i2 is the drawing style. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour&lt;/p&gt;
&lt;h1 id="h-drawr-xryri1i2"&gt;&lt;strong&gt;DRAWR&lt;/strong&gt; xr,yr&lt;span&gt;[,[i1][,i2]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Draws a line from current graphics cursor position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as DRAW.&lt;/p&gt;
&lt;h1 id="h-ei"&gt;&lt;strong&gt;EI&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Enable interrupts which have been disabled by DI&lt;/p&gt;
&lt;h1 id="h-end"&gt;&lt;strong&gt;END&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Indicates end of program&lt;/p&gt;
&lt;h1 id="h-ent-tone-envelope-numbertone-env-sectiontonetone-env-sectiontonetone-env-sectiontonetone-env-sectiontonetone-env-sectiontonetone"&gt;&lt;strong&gt;ENT&lt;/strong&gt; &amp;lt;tone envelope="" number=""&amp;gt;&lt;span&gt;[,&amp;lt;tone env.="" section=""&amp;gt;]&amp;lt;/tone&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;tone env.="" section=""&amp;gt;]&amp;lt;/tone&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;tone env.="" section=""&amp;gt;]&amp;lt;/tone&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;tone env.="" section=""&amp;gt;]&amp;lt;/tone&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;tone env.="" section=""&amp;gt;]&amp;lt;/tone&amp;gt;&lt;/span&gt;&amp;lt;/tone&amp;gt;&lt;/h1&gt;
&lt;p&gt;The ENT command define the TONE shape of a sound which means manipulating the frequency in a certain range. The command could looks like: ENT NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255) &lt;/p&gt;
&lt;h1 id="h-env-volume-envelope-numbervolume-env-sectionvolumevolume-env-sectionvolumevolume-env-sectionvolumevolume-env-sectionvolumevolume-env-sectionvolumevolume"&gt;&lt;strong&gt;ENV&lt;/strong&gt; &amp;lt;volume envelope="" number=""&amp;gt;&lt;span&gt;[,&amp;lt;volume env.="" section=""&amp;gt;]&amp;lt;/volume&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;volume env.="" section=""&amp;gt;]&amp;lt;/volume&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;volume env.="" section=""&amp;gt;]&amp;lt;/volume&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;volume env.="" section=""&amp;gt;]&amp;lt;/volume&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;volume env.="" section=""&amp;gt;]&amp;lt;/volume&amp;gt;&lt;/span&gt;&amp;lt;/volume&amp;gt;&lt;/h1&gt;
&lt;p&gt;The ENV command define the VOLUME shape of a sound which means manipulating the loudness in a certain range. The command could looks like: ENV NUMBER,STEPS?,VERTICAL?,HORIZONTAL? It is possible to define 15 different envelope shapes. So NUMBER could be 1-15. Each ? stands for up to five sections (1-5), where each STEP&amp;lt;&amp;gt;VERTICAL&amp;lt;&amp;gt;HORIZONTAL with the same ? are belong together. STEP: means how many steps in each section (0-127) &amp;gt; one step is 1/100 of a second! VERTICAL: means how big is the step size from bottom to top (-128 to 127) HORIZONTAL: means how big is the step size from left to right (0-255)&lt;/p&gt;
&lt;h1 id="h-eof"&gt;&lt;strong&gt;EOF&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Checks to see if end of specified file has been reached during input. Returns 0 (false) until the end of file, then -1 (true). Associated keywords: OPENIN, CLOSEIN This example reads a file from disc and print it out on screen. Like the "TYPE" command in CP/M 10 OPENIN "text.txt" 20 WHILE NOT EOF 30 LINE INPUT#9,a$ 40 PRINT a$ 50 WEND 60 CLOSEIN&lt;/p&gt;
&lt;h1 id="h-erase-v1-v2"&gt;&lt;strong&gt;ERASE&lt;/strong&gt; v1&lt;span&gt;[% | ! | $]&lt;/span&gt;&lt;span&gt;[,v2[% | ! | $][,...]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Erases the specified array(s) or variables and frees the memory used.&lt;/p&gt;
&lt;h1 id="h-erl"&gt;&lt;strong&gt;ERL&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Returns the line number of the last error encountered.&lt;/p&gt;
&lt;h1 id="h-err"&gt;&lt;strong&gt;ERR&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Reports the number of the last ERRor encountered.&lt;/p&gt;
&lt;h1 id="h-error-i"&gt;&lt;strong&gt;ERROR&lt;/strong&gt; i&lt;/h1&gt;
&lt;p&gt;Take Error action with a given error number. &lt;/p&gt;
&lt;h1 id="h-euro"&gt;&lt;strong&gt;EURO$&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;In Graphic-Mode: chr$(&amp;amp;C3)+chr$(&amp;amp;80). In Text-Mode: chr$($E2)+chr$($82)+chr$($AC) (UTF8-Euro). This is the Euro Sign (new in this interpreter)&lt;/p&gt;
&lt;h1 id="h-every-it-gosub-ln"&gt;&lt;strong&gt;EVERY&lt;/strong&gt; i&lt;span&gt;[,t]&lt;/span&gt; GOSUB ln&lt;/h1&gt;
&lt;p&gt;BASIC branches to the subroutine at line ln EVERY (reccuring) i/50 seconds. (see also "AFTER i&lt;span&gt;[,t]&lt;/span&gt; GOSUB line") There are 4 delay timers from 0 to 9 (in CPC onlc 0 to 3) which can be specified with &amp;lt;timer number=""&amp;gt;. If omitted &amp;lt;timer number=""&amp;gt; defaults to 0. In the case of parallel task has 3 the highest and 0 the lowest priority. With DI or EI you can disable or enable the timing interrupt. With REMAIN &amp;lt;timer number=""&amp;gt; you can also disable an AFTER or EVERY construct and stores the "remaining" time (&amp;gt; REMAIN) Interrupts run as long as the main loop / program runs, even the main programm is paused &amp;gt; press ESC only once not twice for a break. It is important to know or realise that low-priority-interrupts which occurs simultanously to higher-priority-interrupts are not lost. Their task remains or handled again after finishing the higher-prio interrupt.10 REM &amp;gt; interrupts 20 EVERY 50,0 GOSUB 100: REM &amp;gt; lowest priority 30 EVERY 100,1 GOSUB 200 40 EVERY 200,2 GOSUB 300: 50 AFTER 1000,3 GOSUB 400: REM &amp;gt; highest priority 60 WHILE flag=0 70 a=a+1:print a 80 WEND 90 END 100 REM #0 110 PEN 2:PRINT "timer 0":PEN 1 120 RETURN 200 REM #1 210 PEN 2:PRINT "timer 1":PEN 1 220 RETURN 300 REM #2 310 PEN 2:PRINT "timer 2":PEN 1 320 RETURN 400 REM #3 410 flag=1:PEN 2:PRINT "no more interrupts..." 420 RETURN Hint: Timing with interrupts is important, especially if more than one interrupts run. If the interval of a subroutine driven by an interrupt is too long than the processor can never get back to deal the main program again.&amp;lt;/timer&amp;gt;&amp;lt;/timer&amp;gt;&amp;lt;/timer&amp;gt;&lt;/p&gt;
&lt;h1 id="h-exp-float-expressionfloat"&gt;&lt;strong&gt;EXP&lt;/strong&gt; (&amp;lt;float expression=""&amp;gt;)&amp;lt;/float&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates "e" to the power given in the &amp;lt;numeric expression=""&amp;gt; (i), where "e" is approximately 2,7182818-the number whose natural logarithm is 1. Associated keywords: LOG Example: PRINT EXP(6.876) 968.743625&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-fill-i"&gt;&lt;strong&gt;FILL&lt;/strong&gt; i&lt;/h1&gt;
&lt;p&gt;Fills an area of a graphics screen i colour i (0-15). Default value of i is the current graphics pen colour.&lt;/p&gt;
&lt;h1 id="h-fix-numeric-expressionnumeric"&gt;&lt;strong&gt;FIX&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Unlike CINT, FIX merely removes the part of the numeric expression, to the right of the decimal point, and leaves an integer result, rounding towards zero. Associated keywords: CINT, INT, ROUND Example: PRINT FIX(9.99999) 9&lt;/p&gt;
&lt;h1 id="h-fn"&gt;&lt;strong&gt;FN&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;BASIC allows the program to define and use simple value returning functions. DEF FuNction is the definition part of this mechanism and creates program-specific function which works within the program in the same way as a function such a COS operates as a built-in function of BASIC. It may be invoked throughout the program. Variable types must be consistent and the DEF FN command should be written in part of the program outside the execution loop. Syntax : DEF FN&amp;lt;name&amp;gt;&lt;span&gt;[(&amp;lt;formal parameters=""&amp;gt;)]&amp;lt;/formal&amp;gt;&lt;/span&gt;=&amp;lt;general expression=""&amp;gt; Example: "with the definition of..." 10 gn=9.80665 20 DEF FNgrv=s0+v0&lt;em&gt;t+0.5&lt;/em&gt;gn*t^2 30 s0=0:v0=0:t=5 40 PRINT "...after";t;"seconds your dropped stone falls";FNgrv;"metres" "the results are..." :...after 5 seconds your dropped stone falls 122.58315 metres&amp;lt;/general&amp;gt;&amp;lt;/name&amp;gt;&lt;/p&gt;
&lt;h1 id="h-for-to-step-next"&gt;&lt;strong&gt;FOR&lt;/strong&gt; TO STEP NEXT&lt;/h1&gt;
&lt;p&gt;Creating a counting loop (control strucutre) with a starting condition. Inside the counting loop one or more commands will be executed.     The loop consists of of following specifications:     1. FOR     2. a control variable     3. =     4. starting value     5. TO     6. target value     7. STEP &lt;span&gt;[optional]&lt;/span&gt;     8. increment / step size     ... instructions between     9. NEXT 10. control variable &lt;span&gt;[optional]&lt;/span&gt; You have to use the command STEP if you wish to count backwards. It's good to name the control variable after NEXT for readability and better program style.     After each loop the computer checks internaly if the target value has been reached (like an IF ... THEN ... ELSE instruction).  If the target value is reached NEXT closes the loop and calculates another step, so the control variable will be changed last time.     The default STEP value - if not specified - is one (1).      Example: 10 FOR I=1 TO 10 20 PRINT I; 30 NEXT I 40 PRINT I RUN 1   2   3   4   5   6   7   8   9   10   11 READY&lt;/p&gt;
&lt;h1 id="h-fraction-numbernumber"&gt;&lt;strong&gt;FRACTION$&lt;/strong&gt; (&amp;lt;number&amp;gt;)&amp;lt;/number&amp;gt;&lt;/h1&gt;
&lt;p&gt;prints the fraction of an number PRINT FRRACTON$(0.33333333333) 1/3&lt;/p&gt;
&lt;h1 id="h-frame"&gt;&lt;strong&gt;FRAME&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Smooths character and graphics movement and reduces flicker (waits for a VSYNC signal every 20 ms).&lt;/p&gt;
&lt;h1 id="h-fre-numeric-expressionstring-expressionstringnumeric"&gt;&lt;strong&gt;FRE&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;/&amp;lt;string expression=""&amp;gt;)&amp;lt;/string&amp;gt;&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Establishes how much FREe memory remains unused by BASIC.&lt;/p&gt;
&lt;h1 id="h-gosub-i"&gt;&lt;strong&gt;GOSUB&lt;/strong&gt; i&lt;/h1&gt;
&lt;p&gt;Jumps to subroutine which is given as argument.     Example:10 PRINT "Calling subroutine" 20 GOSUB 100 30 PRINT "Back from subroutine" 40 END 100 REM Begin of the subroutine 110 PRINT "Subroutine started" 120 RETURN&lt;/p&gt;
&lt;h1 id="h-goto-i"&gt;&lt;strong&gt;GOTO&lt;/strong&gt; i&lt;/h1&gt;
&lt;p&gt;Jumps to the line number which is given as argument. Combine the GOTO command with an IF...THEN...ELSE instruction for creating a condition-controlled loop. With this interpreter you can use a variable instead a number, too.&lt;/p&gt;
&lt;h1 id="h-graphics-penpaper-colorcolor"&gt;&lt;strong&gt;GRAPHICS&lt;/strong&gt; PEN|PAPER &amp;lt;color&amp;gt;&amp;lt;/color&amp;gt;&lt;/h1&gt;
&lt;p&gt;...works only in combination with the command PEN or PAPER to set the plotting/drawing pen or background colour. If the TAG command is used to set text at the graphics cursor GRAPHICS PEN or GRAPHICS PAPER instead of the regular PEN or PAPERis necessary to colour the text.&lt;/p&gt;
&lt;h1 id="h-help-search-string"&gt;&lt;strong&gt;HELP&lt;/strong&gt; &lt;span&gt;[&lt;command/&gt;|"search string"]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;displays the help page of all commands of only one &lt;command/&gt; or searches for a expression.&lt;/p&gt;
&lt;h1 id="h-if-then-else"&gt;&lt;strong&gt;IF&lt;/strong&gt; THEN ELSE&lt;/h1&gt;
&lt;p&gt;Asks for a choice with the IF...THEN...ELSE statement.     IF compares the entry condition in a logical way     THEN contains instruction if the comparison is true     ELSE contains instruction if it's false.Example: 10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE GOTO 10     In case of nested choices there's a possibility to that with an IF...THEN instruction but not very recommended:10 INPUT "guess a figure:",f 20 IF f=10 THEN PRINT "right": END: ELSE IF f&amp;lt;10 THEN PRINT "too small" ELSE PRINT "too big"   30 GOTO 10Other nested structures like IF...THEN...ELSE...ELSE won't work first because the Locomotive Basic only looks after the first ELSE instruction found and can't execute more single commands as a block  for a certain condition in comparision to e.g. "PASCAL" &amp;gt; begin...end-block, "C" &amp;gt; {...}-block. After a THEN or ELSE you don't need to type GOTO. The following two examples are the same: IF -1 THEN GOTO 30 ELSE GOTO 40 IF -1 THEN 30 ELSE 40&lt;/p&gt;
&lt;h1 id="h-hex-unsigned-integer-expressionfield-widthfieldunsigned"&gt;&lt;strong&gt;HEX$&lt;/strong&gt; (&amp;lt;unsigned integer="" expression=""&amp;gt;&lt;span&gt;[,&amp;lt;field width=""&amp;gt;]&amp;lt;/field&amp;gt;&lt;/span&gt;)&amp;lt;/unsigned&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Produces a $tring of HEXadecimal digits representing the value of the &amp;lt;unsigned integer="" expression=""&amp;gt;, using the number of hexadecimal digits. If the number of digits instructed is too great, the resulting expression will be filled with leading zeros; if the number of digits instructed is too small, the resulting expression will be produced in as many digits as are required. Accociated keywords: BIN$, DEC$, STR$, UNT Example: PRINT HEX$(255,4) 00FF&amp;lt;/unsigned&amp;gt;&lt;/p&gt;
&lt;h1 id="h-ink-i1i2"&gt;&lt;strong&gt;INK&lt;/strong&gt; i1&lt;span&gt;[,i2]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Sets the color with given number to i1. If i2 is given, the color is flashing. Instead color index number (0..28) you can use RGB colors (#123456)&lt;/p&gt;
&lt;h1 id="h-inkey-integer-expressioninteger"&gt;&lt;strong&gt;INKEY&lt;/strong&gt; (&amp;lt;integer expression=""&amp;gt;)&amp;lt;/integer&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: INterrogates the KEYboard to report which keys are being pressed. The keyboard is scanned every 0.02 (1/50) second.     The function is useful for spotting whether a certain key is down or up, by detecting the returned value of -1 (which occurs regardless of &lt;span&gt;[SHIFT]&lt;/span&gt; and &lt;span&gt;[CONTROL]&lt;/span&gt; key status).     The example below detects when &lt;span&gt;[SHIFT]&lt;/span&gt; and V (key number 55) are pressed together, then ends the program. Refer the manual for the key numbers.     Associated keywords: CLEAR INPUT, INKEY$, JOY     Example: 10 IF INKEY(55)&amp;lt;&amp;gt;32 THEN 10 20 PRINT "You have pressed &lt;span&gt;[SHIFT]&lt;/span&gt; and V" 30 CLEAR INPUT run     The state of &lt;span&gt;[SHIFT]&lt;/span&gt; and &lt;span&gt;[CONTROL]&lt;/span&gt; in conjunction with the key specified in the &amp;lt;integer expression=""&amp;gt; is identified as follows: ============================================================================== |Value returned          |&lt;span&gt;[SHIFT]&lt;/span&gt;        |&lt;span&gt;[CTRL]&lt;/span&gt;       |Specified key        | ============================================================================== |-1                      |ignored        |ignored      |up                   | |0                       |up             |up           |down                 | |32                      |down           |up           |down                 | |128                     |up             |down         |down                 | |160                     |down           |down         |down                 | ============================================================================== Hint: instead of the CPC key code you can use a char or string, to see the corresponding key or a stream (e.g. #16 for P or "P") for a PC Linux scan code&amp;lt;/integer&amp;gt;&lt;/p&gt;
&lt;h1 id="h-inkey"&gt;&lt;strong&gt;INKEY$&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Interrogates the KEYboard, returning the current $string reflecting any key that is pressed. It provides operator interaction without hitting &lt;span&gt;[ENTER]&lt;/span&gt; after every answer. If there is a key pressed, then the function responds. If no key is pressed, INKEY$ returns an empty string.&lt;/p&gt;
&lt;h1 id="h-inp-port-numberport"&gt;&lt;strong&gt;INP&lt;/strong&gt; (&amp;lt;port number=""&amp;gt;)&amp;lt;/port&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the INPut value from the I/O address specified in the &amp;lt;port number=""&amp;gt;. Associated keywords: OUT, WAIT&amp;lt;/port&amp;gt;&lt;/p&gt;
&lt;h1 id="h-input-streamstringvariablevariablevariablevariablevariablevariablestring"&gt;&lt;strong&gt;INPUT&lt;/strong&gt; &lt;span&gt;[#stream,]&lt;/span&gt;["&amp;lt;string&amp;gt;"&lt;span&gt;[;|,]&lt;/span&gt;&amp;lt;variable&amp;gt;&lt;span&gt;[,&amp;lt;variable&amp;gt;[,&amp;lt;variable&amp;gt;]...]&amp;lt;/variable&amp;gt;&amp;lt;/variable&amp;gt;&lt;/span&gt;&amp;lt;/variable&amp;gt;&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;Reads a value from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to LINE INPUT&lt;/p&gt;
&lt;h1 id="h-instr-startpositionstartpositionsearched-stringsearched-for-stringsearchedsearched"&gt;&lt;strong&gt;INSTR&lt;/strong&gt; (&lt;span&gt;[&amp;lt;startposition&amp;gt;,]&amp;lt;/startposition&amp;gt;&lt;/span&gt;&amp;lt;searched string=""&amp;gt;,&amp;lt;searched for="" string=""&amp;gt;)&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Searches the first &amp;lt;searched string=""&amp;gt; expression to find the first occurance of the &amp;lt;searched for string expression&amp;lt;, and reports the position of its occurance within the &amp;lt;searched string=""&amp;gt;. If the &amp;lt;searched for="" string=""&amp;gt; does not occur within the &amp;lt;searched string=""&amp;gt;, then 0 is reported. The position at which to start searching the &amp;lt;searched string=""&amp;gt; is optionally specifiable using the &amp;lt;start position=""&amp;gt; parameter which must yield an integer number in the range 1 to 255. Associated keywords: none 1. Example: a$="ABCD":PRINT INSTR(a$,"C") 3 Ready 2. Example: a$="Hello":IF INSTR(a$,"i")&amp;lt;&amp;gt;0 THEN PRINT "no" else a$ no Ready 3. Example: 10 CLS 20 alphabet$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" 30 INPUT "Enter a letter";a$ 40 b$=UPPER$(a$) 50 PRINT b$;" is number"; 60 PRINT INSTR(alphabet$,b$); 70 PRINT "in the alphabet.":PRINT 80 GOTO 40 run&amp;lt;/start&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&amp;lt;/searched&amp;gt;&lt;/p&gt;
&lt;h1 id="h-int-valuevalue"&gt;&lt;strong&gt;INT&lt;/strong&gt; (&amp;lt;value&amp;gt;)&amp;lt;/value&amp;gt;&lt;/h1&gt;
&lt;p&gt;Get the integer part of a number. This is to round down a number&lt;/p&gt;
&lt;h1 id="h-label-namename"&gt;&lt;strong&gt;LABEL&lt;/strong&gt; &amp;lt;name&amp;gt;&amp;lt;/name&amp;gt;&lt;/h1&gt;
&lt;p&gt;at the begining of any line you can label this line with a name to jump to it with GOTO or GOSUB and so on. This is nor a standard Locomotive BASIC command 10 LABEL start 20 PRINT i:i=i+1 30 IF i&amp;lt;4 THEN GOTO start&lt;/p&gt;
&lt;h1 id="h-left-string-expression-required-lengthrequiredstring"&gt;&lt;strong&gt;LEFT$&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;, &amp;lt;required length=""&amp;gt;)&amp;lt;/required&amp;gt;&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;required length=""&amp;gt; parameter (&amp;lt;integer expression=""&amp;gt;), after extracting them from the LEFT of the &amp;lt;string expression=""&amp;gt;. If the &amp;lt;string expression=""&amp;gt; is shorter than the &amp;lt;required length=""&amp;gt;, the whole &amp;lt;string expression=""&amp;gt; is returned.&amp;lt;/string&amp;gt;&amp;lt;/required&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/required&amp;gt;&lt;/p&gt;
&lt;h1 id="h-len-string-expressionstring"&gt;&lt;strong&gt;LEN&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;)&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the total number of characters (i.e. the LENgth) of the &amp;lt;string expression=""&amp;gt;. See SIZEOF&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-let"&gt;&lt;strong&gt;LET&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Was used to define variables. You don't need to use the LET command because it is just a command which was added for compatibility reasons.&lt;/p&gt;
&lt;h1 id="h-line-input-streamstringvariablevariablestring"&gt;&lt;strong&gt;LINE INPUT&lt;/strong&gt; &lt;span&gt;[#stream,]&lt;/span&gt;["&amp;lt;string&amp;gt;"&lt;span&gt;[;|,]&lt;/span&gt;&amp;lt;variable$&amp;gt;&amp;lt;/variable$&amp;gt;&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;Reads a line as a whole string from window or file. If a String is given, this string is printed before. After the string you can either put an ; or , between the string and the variable. If you use a ; then a questionmark is printed after the string similar to INPUT&lt;/p&gt;
&lt;h1 id="h-list-line-numberline-line-numberline-stream-expressionstream"&gt;&lt;strong&gt;LIST&lt;/strong&gt; &lt;span&gt;[&amp;lt;line number=""&amp;gt;]&amp;lt;/line&amp;gt;&lt;/span&gt;&lt;span&gt;[-[&amp;lt;line number=""&amp;gt;]]&amp;lt;/line&amp;gt;&lt;/span&gt;, &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;]&amp;lt;/stream&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;A command for listing the Basic program code.  Possibility for manipulating display is using line numbers with a minus symbol.  Example: LIST 100- List every line after line number 100. LIST -100  List every line until line number 100 has reached. LIST 100-200     List every line between line number 100 and 200 included With the help of separate window definitions it is possible to print out long listings, better differentiate parts / slices of it into different window predefined Example: LIST 1000-1100,#1 LIST 3000-3100,#2  ...prints out two parts of one program out into two windows (if they are defined well)&lt;/p&gt;
&lt;h1 id="h-load-file-namefile"&gt;&lt;strong&gt;LOAD&lt;/strong&gt; &amp;lt;file name=""&amp;gt;&amp;lt;/file&amp;gt;&lt;/h1&gt;
&lt;p&gt;With this directive you may load any file in memory Basic files (extension .bas) are loaded in Basic memory, you cannot choose loading address&lt;/p&gt;
&lt;h1 id="h-locate-stream-expressionstream-xy"&gt;&lt;strong&gt;LOCATE&lt;/strong&gt; &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;]&amp;lt;/stream&amp;gt;&lt;/span&gt;&lt;span&gt;[,]&lt;/span&gt; x,y&lt;/h1&gt;
&lt;p&gt;Moves the text cursor to the x,y location. x starts at 1 on the left and goes up to 20 (in mode 0), 40 (in mode 1) or 80 (in mode 2). y starts at 1 at the top and ends at 25 at the bottom.&lt;/p&gt;
&lt;h1 id="h-log-numeric-expressionnumeric"&gt;&lt;strong&gt;LOG&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates the natural LOGarithm (base of e) of &amp;lt;numeric expression=""&amp;gt; which mustbe greater than zero.&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-log10-numeric-expressionnumeric"&gt;&lt;strong&gt;LOG10&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates the logarithm (base of 10) of &amp;lt;numeric expression=""&amp;gt; which mustbe greater than zero.&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-lower-string-expressionstring"&gt;&lt;strong&gt;LOWER$&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;)&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression=""&amp;gt; but in which all alphabetic characters in the range A to Z are converted to lower case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: UPPER$&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-mask-i1i2"&gt;&lt;strong&gt;MASK&lt;/strong&gt; &lt;span&gt;[i1]&lt;/span&gt;&lt;span&gt;[,i2]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Sets bits in each adjacent group of 8 pixel on (1) or off (0) according to binary value of i1 (0-255). i2 determines whether the first point of the line is to plotted (1) or not (0). Example: 10 CLG 2:MASK 1:MOVE 0,0:DRAW 500,400 20 MASK 15:MOVE 0,0:DRAW 500,400&lt;/p&gt;
&lt;h1 id="h-max-list-of-numeric-expressionlist"&gt;&lt;strong&gt;MAX&lt;/strong&gt; (&amp;lt;list of:="" numeric="" expression=""&amp;gt;)&amp;lt;/list&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the MAXimum value from the &amp;lt;list of:="" numeric="" expressions=""&amp;gt;&amp;lt;/list&amp;gt;&lt;/p&gt;
&lt;h1 id="h-memory-memory-addressmemory"&gt;&lt;strong&gt;MEMORY&lt;/strong&gt; &amp;lt;memory address=""&amp;gt;&amp;lt;/memory&amp;gt;&lt;/h1&gt;
&lt;p&gt;You don't need to use the command because it is just a command which was added for compatibility reasons.&lt;/p&gt;
&lt;h1 id="h-mid-stringstart-positionlength-of-substring0-1lengthstartstring"&gt;&lt;strong&gt;MID$&lt;/strong&gt; (&amp;lt;string&amp;gt;,&amp;lt;start position=""&amp;gt;&lt;span&gt;[,&amp;lt;length of="" substring=""&amp;gt;[,0|-1]]&amp;lt;/length&amp;gt;&lt;/span&gt;)&amp;lt;/start&amp;gt;&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;With the MID$ command there are two applications possible: 1. MID$ creates a new substring out of the give &amp;lt;string&amp;gt; and starts at the defined position &amp;lt;start position=""&amp;gt; and print the number of given characters by &amp;lt;length of="" substring=""&amp;gt;. If no length is defined every character from &amp;lt;start position=""&amp;gt; will be printed out. If a higher value of &amp;lt;start position=""&amp;gt; or &amp;lt;length of="" substring=""&amp;gt; than the real length of the initial string is defined a blank string will be printed. The range of &amp;lt;start position=""&amp;gt; or &amp;lt;length of="" substring=""&amp;gt; is from 0 up to 255 characters.  2. With MID$ you're able to manipulates given strings by inserting a new string. Take care of the two different applications and using in BASIC. The optional last parameter does not exist in original Locomotive Basic. if this parameter is -1 (true) the part of the first string will be replaced with the replacement string, inimportant how long it is.  Example for the 1. application: 10 a$="Hello" 20 PRINT MID$(a$,2,2) run el Ready  Example for the 2. application 10 a$="Hello" 20 MID$(a$,2,3)="ipp" 30 PRINT a$ run Hippo Ready&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/start&amp;gt;&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-min-list-of-numeric-expressionlist"&gt;&lt;strong&gt;MIN&lt;/strong&gt; (&amp;lt;list of:="" numeric="" expression=""&amp;gt;)&amp;lt;/list&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the MINimum value from the &amp;lt;list of:="" numeric="" expressions=""&amp;gt;&amp;lt;/list&amp;gt;&lt;/p&gt;
&lt;h1 id="h-mode-mxy"&gt;&lt;strong&gt;MODE&lt;/strong&gt; m&lt;span&gt;[,x,y]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Changes the screen mode: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 640×400 in 4 colours. (only text mode in the GUI, graphic mode is always 640x400) When x,y is given, the resolution is set to x,y - so you can use a larger or smaller window than in original CPC.&lt;/p&gt;
&lt;h1 id="h-move-xyi1i2"&gt;&lt;strong&gt;MOVE&lt;/strong&gt; x,y&lt;span&gt;[,[i1][,i2]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Moves the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour&lt;/p&gt;
&lt;h1 id="h-mover-xryri1i2"&gt;&lt;strong&gt;MOVER&lt;/strong&gt; xr,yr&lt;span&gt;[,[i1][,i2]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;moves the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.&lt;/p&gt;
&lt;h1 id="h-new"&gt;&lt;strong&gt;NEW&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Clears BASIC RAM which means program and variables. Keeps symbol defintion (if defined) and screen mode without clearing.&lt;/p&gt;
&lt;h1 id="h-on"&gt;&lt;strong&gt;ON&lt;/strong&gt; ...&lt;/h1&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BREAK&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CONT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Prevents&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;interruption&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;program&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;execution&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ESC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BREAK&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOSUB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ln&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Passes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;subroutine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;at&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ln&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;when&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ESC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ESC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;pressed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BREAK&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;STOP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Restores&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;normal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ESC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;during&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;program&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;execution&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ERROR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ln&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Passes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ln&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;an&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;detected&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;program&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ERROR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Turns&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;trap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;restores&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;normal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;processing&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ln&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;In&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;case&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;passing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;more&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ln&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;points&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;jumping&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Example&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1. LOAD - 2. SAVE - 3. EXIT"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;INPUT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CLS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1. LOAD"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;END&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2. SAVE"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;END&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;END&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;In&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;case&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;won&lt;/span&gt;&lt;span class="s1"&gt;'t fullfil the condition (in a range between line 0 and 65535) the next instruction will be executed (here: Line 40). If "choice" is smaller than 0 an error will occur.      ON variable GOSUB ln x1, x2, x3, x4, ... In case of passing more choices targeting to SUBROUTINES ON variable GOSUB ln x1, x2, x3, x4, ... points to a jumping table. If the number is too large, the program continues normally.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1 id="h-openin-filenamefilename"&gt;&lt;strong&gt;OPENIN&lt;/strong&gt; &amp;lt;filename&amp;gt;&amp;lt;/filename&amp;gt;&lt;/h1&gt;
&lt;p&gt;Opens the specified data file for reading. It has to be an ASCII file. (The command CLOSEIN closes reading data file.) Read from the file using INPUT #9&lt;/p&gt;
&lt;h1 id="h-openout-filenamefilename"&gt;&lt;strong&gt;OPENOUT&lt;/strong&gt; &amp;lt;filename&amp;gt;&amp;lt;/filename&amp;gt;&lt;/h1&gt;
&lt;p&gt;Opens the specified data file for writing. It writes an ASCII file. (To close writing use the command closeout.)&lt;/p&gt;
&lt;h1 id="h-origin-xylrtb"&gt;&lt;strong&gt;ORIGIN&lt;/strong&gt; x,y&lt;span&gt;[,l,r,t,b]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;The command defines the origin (world reference point) for the graphics coordinate system. Normally the reference origin is in the left, bottom corner of the default screen and has 0,0. So the most left coordinate value could be by default 639 and the most top value 399. Independent from the actual modus (2, 1 or 0) the range for the x coordinate are always 640 points and for the y coordinate 400 points. In theory you are able to address 256,000 pixel but only 128,000 are visible due to the maximal resolution of the hardware. x,y are the the new coordinates for the 'world reference'. l,r,t,b are optional and set the borders for the new graphical window (works in the same way like the WINDOW command for a text window). l,r,t,b means left, right, tob and bottom coordinates. If a new graphical window (borders) is defined every point or drawn line won't be plotted (clipped internally). Example (the line drawn will be cutted): ORIGIN 320,200,250,450,100,300 DRAW 0,200&lt;/p&gt;
&lt;h1 id="h-out-port-numbervaluevalueport"&gt;&lt;strong&gt;OUT&lt;/strong&gt; &amp;lt;port number=""&amp;gt;,&amp;lt;value&amp;gt;&amp;lt;/value&amp;gt;&amp;lt;/port&amp;gt;&lt;/h1&gt;
&lt;p&gt;Sets the value to the I/O address specified in the &amp;lt;port number=""&amp;gt;. Associated keywords: INP, WAIT&amp;lt;/port&amp;gt;&lt;/p&gt;
&lt;h1 id="h-paper-stream-expressionstream"&gt;&lt;strong&gt;PAPER&lt;/strong&gt; &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;]&amp;lt;/stream&amp;gt;&lt;/span&gt;&lt;span&gt;[,]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;sets the background color&lt;/p&gt;
&lt;h1 id="h-pen-stream-expressionstream"&gt;&lt;strong&gt;PEN&lt;/strong&gt; &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;]&amp;lt;/stream&amp;gt;&lt;/span&gt;&lt;span&gt;[,]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;sets the text color&lt;/p&gt;
&lt;h1 id="h-plot-xyi1i2"&gt;&lt;strong&gt;PLOT&lt;/strong&gt; x,y&lt;span&gt;[,[i1][,i2]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Plots a point at the graphic cursor to position x,y. The parameter i1 may be used to change the pen (drawing) colour. The parameter i2 specifies the logical colour, as in DRAW. 4 drawing styles: i2 = 0 normal colour i2 = 1 XOR colour i2 = 2 AND colour i2 = 3 OR colour&lt;/p&gt;
&lt;h1 id="h-plotr-xryri1i2"&gt;&lt;strong&gt;PLOTR&lt;/strong&gt; xr,yr&lt;span&gt;[,[i1][,i2]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Plots a point at the graphic cursor (relative) from current position to current cursor x position + xr, current cursor y position + yr. i1 and i2 as in MOVE.&lt;/p&gt;
&lt;h1 id="h-pos-stream-expressionstream"&gt;&lt;strong&gt;POS&lt;/strong&gt; (#&amp;lt;stream expression=""&amp;gt;)&amp;lt;/stream&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Reports the current horizontal POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression=""&amp;gt; MUST be specified, and does NOT default to #0. POS(#8) reports the current horizontal carriage position for the printer, where 1 is the extreme left hand edge. POS(#9) reports the logical position in the disc file stream, i.e. the number of printing characters sent to the stream since the last carriage return.&amp;lt;/stream&amp;gt;&lt;/p&gt;
&lt;h1 id="h-print-channel-numberchannellist-ofusingformat-modelformatseparator-expressionexpressionseparatorspacespace"&gt;&lt;strong&gt;PRINT&lt;/strong&gt; &lt;span&gt;[#&amp;lt;channel number=""&amp;gt;]&amp;lt;/channel&amp;gt;&lt;/span&gt;&lt;span&gt;[&amp;lt;list of:&lt;article to=""&gt;]&lt;span&gt;[;]&lt;/span&gt;&lt;span&gt;[USING&amp;lt;format model=""&amp;gt;]&amp;lt;/format&amp;gt;&lt;/span&gt;&lt;span&gt;[&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;]&amp;lt;/expression&amp;gt;&amp;lt;/separator&amp;gt;&lt;/span&gt;&lt;span&gt;[;|&amp;lt;space&amp;gt;]&amp;lt;/space&amp;gt;&lt;/span&gt;&lt;/article&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;prints content to the screen. If it ends with an ;, there will be no new line at the end. Within the command a ; or &amp;lt;space&amp;gt; lets print the next operand, with a comma (,) the cursor will be set to the next tab position (defined with ZONE) stream#8 is the printer stream#9 is the disc.  SPC(&amp;lt;count&amp;gt;) prints count spaces TAB(&amp;lt;position&amp;gt;) sets the cursor to the correct x-position. See USING command. Do not forget the separator (e.g. space or semikolon) after a string. PRINT "TEST"SPC(2) without separator does not work!&amp;lt;/position&amp;gt;&amp;lt;/count&amp;gt;&amp;lt;/space&amp;gt;&lt;/p&gt;
&lt;h1 id="h-"&gt;&lt;strong&gt;?&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;same as PRINT&lt;/p&gt;
&lt;h1 id="h-rad"&gt;&lt;strong&gt;RAD&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Switch to radians mode for trigonometric functions (SIN, COS...).\ See also: DEG&lt;/p&gt;
&lt;h1 id="h-randomize-time"&gt;&lt;strong&gt;RANDOMIZE&lt;/strong&gt; &lt;span&gt;[TIME]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Resets the pseudo-random generator. The optional parameter TIME does nothing and is implemented because of compatbility issues.&lt;/p&gt;
&lt;h1 id="h-read-variablevariable"&gt;&lt;strong&gt;READ&lt;/strong&gt; &amp;lt;variable&amp;gt;&amp;lt;/variable&amp;gt;&lt;/h1&gt;
&lt;p&gt;Gets the next data item (from DATA commands), stores it in the given variable and moves to the next item. The variable must be of the correct type. See also: DATA, RESTORE&lt;/p&gt;
&lt;h1 id="h-rectangle-leftrighttopbottomcolorfill-colorfillcolorbottomtoprightleft"&gt;&lt;strong&gt;RECTANGLE&lt;/strong&gt; &amp;lt;left&amp;gt;,&amp;lt;right&amp;gt;,&amp;lt;top&amp;gt;,&amp;lt;bottom&amp;gt;&lt;span&gt;[,&amp;lt;color&amp;gt;[,&amp;lt;fill color=""&amp;gt;]]&amp;lt;/fill&amp;gt;&amp;lt;/color&amp;gt;&lt;/span&gt;&amp;lt;/bottom&amp;gt;&amp;lt;/top&amp;gt;&amp;lt;/right&amp;gt;&amp;lt;/left&amp;gt;&lt;/h1&gt;
&lt;p&gt;Draws a rectangle on the screen&lt;/p&gt;
&lt;h1 id="h-rem-texttext"&gt;&lt;strong&gt;REM&lt;/strong&gt; &lt;span&gt;[&amp;lt;text&amp;gt;]&amp;lt;/text&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Remark without any operation. The rest of the line is handled by this command.&lt;/p&gt;
&lt;h1 id="h-semicolon"&gt;&lt;strong&gt;'&lt;/strong&gt; (semicolon)&lt;/h1&gt;
&lt;p&gt;same as REM&lt;/p&gt;
&lt;h1 id="h-release-channelchannel"&gt;&lt;strong&gt;RELEASE&lt;/strong&gt; &amp;lt;channel&amp;gt;&amp;lt;/channel&amp;gt;&lt;/h1&gt;
&lt;p&gt;Releases a sound which was hold on (by a SOUND command) before. It uses the same bit matrix like the SOUND command for the first parameter (&amp;amp;x00000001) releases chanel A (&amp;amp;x00000010) releases chanel B (&amp;amp;x00000011) releases chanel A and B (&amp;amp;x00000100) releases chanel C (&amp;amp;x00000101) releases chanel A and C (&amp;amp;x00000110) releases chanel B and C (&amp;amp;x00000111) releases chanel A, B and C Example: 10 SOUND 65,1000,100 20 PRINT"PRESS R TO LET IT SOUND" 30 IF INKEY(50)=-1 THEN 30 40 RELEASE 1&lt;/p&gt;
&lt;h1 id="h-renum-newlinefirst-oldline-last-oldlinesteplast"&gt;&lt;strong&gt;RENUM&lt;/strong&gt; &lt;span&gt;[‹newLine›[,‹first oldLine›[-&amp;lt;last oldline=""&amp;gt;][,‹step›]]]&amp;lt;/last&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Renumbers the lines of the current program or range. By default, the whole program is renumbered starting at line 10 with multiples of ten. Any parameter that is left out defaults to 10. It is important to note that jumps (GOTO, GOSUB and the like) are automatically converted to the new line numbers. The whole set of parameters can be used to renumber only the last part of a program.&lt;/p&gt;
&lt;h1 id="h-replace-search-stringreplace-stringstringstringreplace-stringsearch-string"&gt;&lt;strong&gt;REPLACE$&lt;/strong&gt; (&amp;lt;search-string&amp;gt;,&amp;lt;replace-string&amp;gt;,&amp;lt;string&amp;gt;)&amp;lt;/string&amp;gt;&amp;lt;/replace-string&amp;gt;&amp;lt;/search-string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: replaces all occourence of &amp;lt;search-string&amp;gt; with &amp;lt;replace-string&amp;gt; in the given &amp;lt;string&amp;gt;. This function does not exist in original BASIC.&amp;lt;/string&amp;gt;&amp;lt;/replace-string&amp;gt;&amp;lt;/search-string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-restore-lineline"&gt;&lt;strong&gt;RESTORE&lt;/strong&gt; &amp;lt;line&amp;gt;&amp;lt;/line&amp;gt;&lt;/h1&gt;
&lt;p&gt;Resets the data pointer used by READ. When used without parameters, resets the pointer to the first data in the program. Otherwise, resets the pointer to the given line number.&lt;/p&gt;
&lt;h1 id="h-resume-line-or-next"&gt;&lt;strong&gt;RESUME&lt;/strong&gt; &lt;span&gt;[line]&lt;/span&gt; or NEXT&lt;/h1&gt;
&lt;p&gt;Command causes the program to resume after an error code and if it is interrupted by an ON ERROR GOTO jump So it can either resume (if there is no line number stated) at the same line after error code (and if there are more statements in one line) or at the line number stated (optional) or with the NEXT parameter (optional) ... at the line followed by the error line&lt;/p&gt;
&lt;h1 id="h-return"&gt;&lt;strong&gt;RETURN&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Terminates a subroutine and returns control to the line following the GOSUB call (see GOSUB)&lt;/p&gt;
&lt;h1 id="h-right-string-expressioninteger-expressionintegerstring"&gt;&lt;strong&gt;RIGHT$&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;,&amp;lt;integer expression=""&amp;gt;)&amp;lt;/integer&amp;gt;&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the &amp;lt;integer expression=""&amp;gt; (=required length) parameter, after extracting them from the RIGHT of the &amp;lt;string expression=""&amp;gt;. If the &amp;lt;string expression=""&amp;gt; is shorter than the &amp;lt;integer expression=""&amp;gt;, the whole &amp;lt;string expression=""&amp;gt; is returned.&amp;lt;/string&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/string&amp;gt;&amp;lt;/integer&amp;gt;&lt;/p&gt;
&lt;h1 id="h-rnd-numeric-expressionnumeric"&gt;&lt;strong&gt;RND&lt;/strong&gt; &lt;span&gt;[(&amp;lt;numeric expression=""&amp;gt;)]&amp;lt;/numeric&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;FUNCTION&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Returns&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;next&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RaNDom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sequence&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;numeric&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;expression&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;has&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;positive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;value&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;specified&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;If&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;numeric&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;expression&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;yields&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;value&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;zero&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;returns&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;copy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;last&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;random&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;generated&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Associated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;keywords&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RANDOMIZE&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Example&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="err"&gt;\”&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;536703827&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ready&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;271940658&lt;/span&gt;&lt;span class="err"&gt;\”&lt;/span&gt;&lt;span class="nt"&gt;Ready&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;271940658&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Ready&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Example&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;Example&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;generating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;an&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;integer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;random&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;between&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;A&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;((&lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)*&lt;/span&gt;&lt;span class="nt"&gt;1000&lt;/span&gt;&lt;span class="o"&gt;)+&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;GOTO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Example&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;For&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;generating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;random&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;number&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;between&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;lower&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;higher&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;border&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;INPUT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Low border"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;low&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;INPUT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"High border"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;high&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;A&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;INT&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)*(&lt;/span&gt;&lt;span class="nt"&gt;high-low&lt;/span&gt;&lt;span class="o"&gt;))+&lt;/span&gt;&lt;span class="nt"&gt;low&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;40&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;A&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;4&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;Example&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RANDOMIZE&lt;/span&gt;&lt;span class="err"&gt;\”&lt;/span&gt;&lt;span class="nt"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;FOR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;STEP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"rnd parameter="&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="nt"&gt;x&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;40&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;FOR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;n&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;6&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;50&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;PRINT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;RND&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;x&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;60&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;NEXT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;n&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;x&lt;/span&gt;&lt;span class="err"&gt;\”&lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1 id="h-round-numeric-expressioninteger-expressionintegernumeric"&gt;&lt;strong&gt;ROUND&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;&lt;span&gt;[,&amp;lt;integer expression=""&amp;gt;]&amp;lt;/integer&amp;gt;&lt;/span&gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Rounds &amp;lt;numeric expression=""&amp;gt; to a number of decimal places or to the power of ten specified by &amp;lt;integer expression=""&amp;gt;.  If &amp;lt;integer expression=""&amp;gt; less than zero, the &amp;lt;numeric expression=""&amp;gt; is rounded to give an absolute integer with &amp;lt;integer expression=""&amp;gt; number of zeros before the decimal point. Associated keywords: ABS, CINT, FIX, INT 1. Example: PRINT ROUND(1562.357,2),ROUND(1562.375,-2) 1562.36     1600 2. Example: 10 FOR n=4 TO -4 STEP -1 20 PRINT ROUND (1234.5678,n) 30 PRINT "with integer expression";n 40 NEXT run&amp;lt;/integer&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/integer&amp;gt;&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-run-line-or-filenamefilenameline"&gt;&lt;strong&gt;RUN&lt;/strong&gt; &lt;span&gt;[&amp;lt;line&amp;gt; or &amp;lt;filename&amp;gt;]&amp;lt;/filename&amp;gt;&amp;lt;/line&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Runs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;program&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;optionally&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;starting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;at&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;given&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;no&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;given&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;starts&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;at&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;If&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;used&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;after&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RUN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;will&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;loaded&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;executed&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;storage&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;medium&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Tape&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Disc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;With&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;protected&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BASIC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;can&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;executed&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Example&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RUN&lt;/span&gt;&lt;span class="s2"&gt;"disc"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1 id="h-save-save-filename"&gt;&lt;strong&gt;SAVE&lt;/strong&gt; SAVE "filename"&lt;/h1&gt;
&lt;p&gt;Command saves the current BASIC program / content from RAM onto a storage medium (e.g. Tape, Disc)&lt;/p&gt;
&lt;h1 id="h-sin-numeric-expressionnumeric"&gt;&lt;strong&gt;SIN&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates the Real value for the Sine of &amp;lt;numeric expression=""&amp;gt;, defaulting to the Radian (RAD) measure mode unless otherwise declared by a DEG command.&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-sizeof-arrayarray"&gt;&lt;strong&gt;SIZEOF&lt;/strong&gt; (&amp;lt;array&amp;gt;)&amp;lt;/array&amp;gt;&lt;/h1&gt;
&lt;p&gt;Gets the size (number of rows) of an array 10 DIM a$(15),b(4,4) 20 PRINT SIZEOF(a$),SIZEOF(b) RUN 16      25&lt;/p&gt;
&lt;h1 id="h-sgn-numeric-expressionnumeric"&gt;&lt;strong&gt;SGN&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Determines the SiGN of the &amp;lt;numeric expression=""&amp;gt;. Returns -1 if &amp;lt;numeric expression=""&amp;gt; is less than 0, returns 0 if &amp;lt;numeric expression=""&amp;gt; = 0, and returns 1 if &amp;lt;numeric expression=""&amp;gt; is greater than zero.&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-sound-cdvenvententenvvdc"&gt;&lt;strong&gt;SOUND&lt;/strong&gt; &amp;lt;c&amp;gt;,&lt;p&gt;&lt;span&gt;[,&amp;lt;d&amp;gt;[,&amp;lt;v&amp;gt;[,&amp;lt;env&amp;gt;[,&amp;lt;ent&amp;gt;]]]]&amp;lt;/ent&amp;gt;&amp;lt;/env&amp;gt;&amp;lt;/v&amp;gt;&amp;lt;/d&amp;gt;&lt;/span&gt;&lt;/p&gt;&amp;lt;/c&amp;gt;&lt;/h1&gt;
&lt;p&gt;SOUND does only work with running and connected CPCmonitor! the SOUND command has following shape: SOUND Channel,Period,Duration,Volume,Volume-Envelope,Tone-Envelope,Noise C: Selecting channel is done bitwise (combinations are possible of course): (Bit 0) &amp;amp;x00000001 = 1 = channel A (middle) (Bit 1) &amp;amp;x00000010 = 2 = channel B (left) (Bit 2) &amp;amp;x00000100 = 4 = channel C (right) more function about channel are (Bit 3) &amp;amp;x00001000 = 8 = Rendezvous with channel A (Bit 4) &amp;amp;x00010000 = 16 = Rendesvous with channel B (Bit 5) &amp;amp;x00100000 = 32 = Rendesvous with channel C (Bit 6) &amp;amp;x01000000 = 64 = Hold (Bit 7) &amp;amp;x10000000 = 128 = Flush P: the period number can be a figure between 0 and 4095 (2^12-1... 12 means that we have 12 tones (inclusive half-tones) in nine octaves on the CPC in sum and their distance between is the twelves square root of two), where 8 octaves are available. E.g. Octave 0 starts on middle C with number 478. To calculate the period you can use following formula: period=1,000,000/(16*frequency) or in short period=(62,500/frequency) (e.g. the note "A" with the frequency 440 Hz has the period 142 on the CPC) In This emulator you can use strings containing the tone name, e.g. t$="db5":SOUND 1,c,25:SOUND 1,d,25:SOUND 1,t$,25:SOUND 1,db5,25:SOUND 1,"db5",25:REM the last three are the same D: the duration of the note is measured in 1/100th of a second and can be any positive number in the range 1-32,767. 0 and negative number are in combination with ENT and ENV commands usefull. A negative number means repititions. V: the volume number range from 0-15 on a CPC664/6128 ENV: and ENT: For shaping the sound ENV (Volume) and ENT (Frequency) commands are available. The relation between SOUND and those commands comes with a figure between 1 to 15 for ENV (5th parameter) and 1 to 15 for ENT (6th parameter). N: the seventh parameter can be used for blending in noise between the range of 0-15 (BASIC 1.0) or 0-30 (BASIC 1.1). The higher the number the 'deeper' or 'dirty' is the noise.&lt;/p&gt;
&lt;h1 id="h-spc-nn"&gt;&lt;strong&gt;SPC&lt;/strong&gt; &amp;lt;n&amp;gt;&amp;lt;/n&amp;gt;&lt;/h1&gt;
&lt;p&gt;in conjunction with PRINT the SPC command prints out a certain number (n) of spaces. Example: PRINT "Hello";SPC(10);"World"; Hello          World&lt;/p&gt;
&lt;h1 id="h-speed-ink-n1n2n1n2"&gt;&lt;strong&gt;SPEED INK&lt;/strong&gt; &amp;lt;n1,n2&amp;gt;&amp;lt;/n1,n2&amp;gt;&lt;/h1&gt;
&lt;p&gt;SPEED INK command defines the frequency of colour changes if a colour change was defined. The duration is calculated by n1=... or n2 =duration/50 seconds&lt;/p&gt;
&lt;h1 id="h-speed-key-startrepeatstartrepeat"&gt;&lt;strong&gt;SPEED KEY&lt;/strong&gt; &amp;lt;start,repeat&amp;gt;&amp;lt;/start,repeat&amp;gt;&lt;/h1&gt;
&lt;p&gt;SPEED KEY command defines the delay after which a key repeat (for keys that do repeat). The first parameter is the delay before the first repeat and the second parameter is the delay between further repeats. Delay is in 1/50th of seconds.&lt;/p&gt;
&lt;h1 id="h-speed-write-nn"&gt;&lt;strong&gt;SPEED WRITE&lt;/strong&gt; &amp;lt;n&amp;gt;&amp;lt;/n&amp;gt;&lt;/h1&gt;
&lt;p&gt;SPEED WRITE command sets the speed in baud to write on tape (or the wav-file). 0=1000 Baud, 1=2000 Baud, 2=4000 Baud, 3=8192 Baud.&lt;/p&gt;
&lt;h1 id="h-sqr-numeric-expressionnumeric"&gt;&lt;strong&gt;SQR&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the SQuare Root of the specified &amp;lt;numeric expression=""&amp;gt;.  Associated keywords: none Example: PRINT SQR(9) 3&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-space-countcount"&gt;&lt;strong&gt;SPACE$&lt;/strong&gt; (&amp;lt;count&amp;gt;)&amp;lt;/count&amp;gt;&lt;/h1&gt;
&lt;p&gt;Gets &amp;lt;count&amp;gt; spaces&amp;lt;/count&amp;gt;&lt;/p&gt;
&lt;h1 id="h-symbol-ni1i2i3i4i5i6i7i8"&gt;&lt;strong&gt;SYMBOL&lt;/strong&gt; n,i1&lt;span&gt;[,i2[,i3[,i4[,i5[,i6[,i7[,i8]]]]]]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Redefines the appearance of the character at index n. Each of the following eight integers defines the contents of one pixel row, starting at the top of the character. Each character fits in an 8x8 pixel grid. Missing lines are considered as empty. Example: SYMBOL 255,255,129,129,129,129,129,129,255 PRINT CHR$(255) Defines character 255 to look like an empty square and prints it.&lt;/p&gt;
&lt;h1 id="h-symbol-after-n"&gt;&lt;strong&gt;SYMBOL&lt;/strong&gt; AFTER n&lt;/h1&gt;
&lt;p&gt;no operation, only for compatibility.&lt;/p&gt;
&lt;h1 id="h-stop"&gt;&lt;strong&gt;STOP&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Breaks program execution at line containing the STOP statement. The message BREAK in is output with the line number.&lt;/p&gt;
&lt;h1 id="h-str-numeric-expressionnumeric"&gt;&lt;strong&gt;STR$&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Converts the &amp;lt;numeric expression=""&amp;gt; to a decimal STRing representation. Useful for converting a number to a string in case of string manipulation. E.g. after converting a figure to a string then the most left character holds the sign: a minus in case the figure is negative and a space in case the figure is positiv. Associated keywords: BIN$, DEC$, HEX$, VAL Example: 10 FIGURE=-1599 20 FIGURE$=STR$(FIGURE) 30 PRINT FIGURE$ -1599&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-string-lengthcharacter-specifiercharacterlength"&gt;&lt;strong&gt;STRING$&lt;/strong&gt; (&amp;lt;length&amp;gt;,&amp;lt;character specifier=""&amp;gt;)&amp;lt;/character&amp;gt;&amp;lt;/length&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns a string expression consisting of the &amp;lt;character specifier=""&amp;gt; repeated the number of time (in the range 0 to 255) specified in the &amp;lt;length&amp;gt;.     Associated keywords: SPACE$ 1. Example: PRINT STRING$(40,"+") ++++++++++++++++++++++++++++++++++++++++ 2. Example: PRINT STRING$(40,64) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@     NOTE: the &amp;lt;character specifier=""&amp;gt; 64 refers to the ASCII value of the character '@' and is also equivalent to PRINT STRING$(40,CHR$(64))&amp;lt;/character&amp;gt;&amp;lt;/length&amp;gt;&amp;lt;/character&amp;gt;&lt;/p&gt;
&lt;h1 id="h-swap"&gt;&lt;strong&gt;SWAP&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;WINDOW SWAP works in combination with the window command. Every error or status messages from the operating system will be displayed normaly on WINDOW#0 (=main window). WINDOW SWAP changes the main window to the desired target window. Example (if a window with number 4 was defined before...): WINDOW SWAP 0,4  SWAP &amp;lt;var1&amp;gt;,&amp;lt;var2&amp;gt; swaps the content of two variables (no standard BASIC)&amp;lt;/var2&amp;gt;&amp;lt;/var1&amp;gt;&lt;/p&gt;
&lt;h1 id="h-tab-nn"&gt;&lt;strong&gt;TAB&lt;/strong&gt; &amp;lt;n&amp;gt;&amp;lt;/n&amp;gt;&lt;/h1&gt;
&lt;p&gt;in conjunction with PRINT the TAB command sets the x position of the cursor to the given position Example: PRINT "Hello";TAB(10);"World"; Hello    World&lt;/p&gt;
&lt;h1 id="h-tabdot-xrealdecimal-figuresdecimalrealx"&gt;&lt;strong&gt;TABDOT&lt;/strong&gt; (&amp;lt;x&amp;gt;,&amp;lt;real&amp;gt;,&amp;lt;decimal figures=""&amp;gt;)&amp;lt;/decimal&amp;gt;&amp;lt;/real&amp;gt;&amp;lt;/x&amp;gt;&lt;/h1&gt;
&lt;p&gt;in conjunction with PRINT the TABDOT command sets the decimal point of the value to x position of the cursor to the given position Example: PRINT "Hi";TABDOT(10,123.45,2);"World"; Hi    123.45 THIS COMMAND DOES NOT EXIST IN THE ORINAL LOCOMOTIVE BASIC!&lt;/p&gt;
&lt;h1 id="h-tag-st"&gt;&lt;strong&gt;TAG&lt;/strong&gt; &lt;span&gt;[#st]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Allows text to print at graphics cursor position. (#st does not work, yet). see TAGOFF&lt;/p&gt;
&lt;h1 id="h-tagoff-st"&gt;&lt;strong&gt;TAGOFF&lt;/strong&gt; &lt;span&gt;[#st]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Directs text to stream st printing it at previous text cursor position. (#st does not work, yet)&lt;/p&gt;
&lt;h1 id="h-tan-numeric-expressionnumeric"&gt;&lt;strong&gt;TAN&lt;/strong&gt; (&amp;lt;numeric expression=""&amp;gt;)&amp;lt;/numeric&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Calculates the TANgent of the &amp;lt;numeric expression=""&amp;gt;, which must be in the range -200,000 to +200,000.  NOTE: DEG and RAD can be used to force the result of the calculation to degrees or radians respectively.Associated keywords: ATN, COS, DEG, RAD, SIN Example: PRINT TAN(45) 1.61977519&amp;lt;/numeric&amp;gt;&lt;/p&gt;
&lt;h1 id="h-test-x-co-ordinatey-co-ordinateyx"&gt;&lt;strong&gt;TEST&lt;/strong&gt; (&amp;lt;x co-ordinate=""&amp;gt;,&amp;lt;y co-ordinate=""&amp;gt;)&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Moves the graphics cursor to the absolute position specified by the &amp;lt;x&amp;gt; and &amp;lt;y co-ordinate=""&amp;gt;s, and reports the value of the ink at the new location. Associated keywords: MOVE, MOVER, TESTR, XPOS, YPOS&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&lt;/p&gt;
&lt;h1 id="h-testr-x-offsety-offsetyx"&gt;&lt;strong&gt;TESTR&lt;/strong&gt; (&amp;lt;x offset=""&amp;gt;,&amp;lt;y offset=""&amp;gt;)&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Moves the graphics cursor by the amount specified in the &amp;lt;x&amp;gt; and &amp;lt;y offset=""&amp;gt;s relative to its current position, and reports the value of the ink at the new location.&amp;lt;/y&amp;gt;&amp;lt;/x&amp;gt;&lt;/p&gt;
&lt;h1 id="h-time"&gt;&lt;strong&gt;TIME&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Reports the elapsed time since the computer was last switched-on or reset, (excluding periods when reading or writing to disc).     Each second of real time is equal to the returned value = TIME/300.&lt;/p&gt;
&lt;h1 id="h-time-format"&gt;&lt;strong&gt;TIME$&lt;/strong&gt; (&lt;span&gt;[format]&lt;/span&gt;)&lt;/h1&gt;
&lt;p&gt;gives the actual date/time either in hh:mm:ss format or in the given format&lt;/p&gt;
&lt;h1 id="h-trim-stringstring"&gt;&lt;strong&gt;TRIM$&lt;/strong&gt; &amp;lt;string&amp;gt;&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;Not in original BASIC: removes spaces from the ends of a string&lt;/p&gt;
&lt;h1 id="h-troff"&gt;&lt;strong&gt;TROFF&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Turns off the program flow trace (see TRON)&lt;/p&gt;
&lt;h1 id="h-unt"&gt;&lt;strong&gt;UNT&lt;/strong&gt; (&lt;address&gt;)&lt;/address&gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Return an integer in the range -32768 to +32767 which is the twos-complement equivalent of the unsigned value of the &lt;/p&gt;&lt;address&gt;. Example: PRINT UNT(&amp;amp;FF66) -154&lt;p&gt;&lt;/p&gt;
&lt;h1 id="h-tron"&gt;&lt;strong&gt;TRON&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Turns on the program flow trace for debugging. Causes the line number of each statement executed to be displayed.&lt;/p&gt;
&lt;h1 id="h-upper-string-expressionstring"&gt;&lt;strong&gt;UPPER$&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;)&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns a new string expression which is a copy of the specified &amp;lt;string expression=""&amp;gt; but in which all alphabetic characters in the range A to Z are converted to UPPER case. Useful for processing input where the answers may come in mixed upper/lower case. Associated keywords: LOWER$&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-using"&gt;&lt;strong&gt;USING&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;PRINT USING makes it possible to define the print format of an expression transmitted by the command PRINT. One defines for that the &amp;lt;format model=""&amp;gt; with which one wishes to appear the expression. One uses as &amp;lt;separator&amp;gt; either a comma, or a semicolon. The &amp;lt;format model=""&amp;gt; is a character string made up with the following « field indicators »: Numericals formats In a number: #  Each sign # indicate the site of a figure.     Example: ###### .   Indicate the site of the decimal point (equivalent with our comma).     Example:######.## ,   (Reserve a space). This sign, being able to appear only immediately before the decimal point, indicates that the figures located on the left of the decimal point will be laid out by groups of three (corresponding to the thousands) separate between them by a comma    Example:######,.## Framing of a number: ££   (Reserve two spaces). Indicate that the sign £ will appear immediately before the first digit or the decimal point, i.e. on one of the sites reserved for digits.        Example: ££######,.## **   (Reserve two spaces). Indicate that all the empty spaces located before the number will be filled by asterisks.       Example: &lt;strong&gt;######,.## &lt;/strong&gt;£   (Reserve three spaces). Add the options ** and ££, i.e. the asterisks at the head and the sign £ preceding immediately the number.          Example: &lt;strong&gt;£######,.## $$    (Reserve two spaces). Indicate that the sign $ will appear immediately on the left than the first digit or decimal point, i.e. on sites reserved to digits.        Example:$$######,.## &lt;/strong&gt;$  (Reserve three spaces). Add the options ** and $$, i.e. the asterisks at the head and the sign $ preceding immediately the number.        Example: **$######,.## +      Indicate that one wishes to see appearing the sign of the number. This sign will appear before the number if the + is located at the beginning of the &amp;lt;model of="" format=""&amp;gt; and after the number if it is located to the end.         Example: +####.#### -       The sign - can appear only TO THE END of the mask. It asks the presence of the sign - after any negative number or any negative exponent. In the absence of this specification, the sign - appears by defect before the negative number.         Example:####.####- ^^^^  Indicate that the number must appear with exponent. The signs ^^^^ are placed AFTER the last site of digits, but BEFORE any final sign + or -          Example: #.####^^^^+ The maximum length of the &amp;lt;model of="" format=""&amp;gt; of a number is 20 characters. The numbers are rounded with the number of signs indicated. If a format is too small to contain the expression:     PRINT USING "####";12345678 ... this one is not truncated, but appears in its entirety, preceded by the sign % indicating a «erroneous format». Format of an alphanumeric chain     10 CLS:a$="abcdefghijklmnopqrst"     20 PRINT"alphanumeric chain= ";a$     30 PRINT:PRINT"With  !  =  ";     40 PRINT USING "!";a$     50 PRINT:PRINT"With  \espaces\  =  ";     60 PRINT USING "\           \";a$     70 PRINT:PRINT"With  &amp;amp;  =  ";     80 PRINT USING "&amp;amp;";a$     90 GOTO 90     run !   indicate that only the first character of the chain must appear.     Example: ! \&amp;lt;espaces&amp;gt;\     Indicate that only the x first characters of the chain must appear, x being equal to the length of the format (bars included).     Example:\            \ &amp;amp;   Indicate that the chain must appear «just as it is».       Example: &amp;amp; The &amp;lt;model of="" format=""&amp;gt; of a chain cannot exceed 255 characters. Any &amp;lt;model of="" format=""&amp;gt; can be represented by an alphanumeric variable, as shows it the following example:     10 a$="FF######,.##"     20 b$="!"     30 PRINT USING a$;12345.6789;     40 PRINT USING b$;"cents"     run&amp;lt;/model&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/espaces&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/model&amp;gt;&amp;lt;/format&amp;gt;&amp;lt;/separator&amp;gt;&amp;lt;/format&amp;gt;&lt;/p&gt;
&lt;h1 id="h-val-string-expressionstring"&gt;&lt;strong&gt;VAL&lt;/strong&gt; (&amp;lt;string expression=""&amp;gt;)&amp;lt;/string&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Returns the numeric VALue, (including any negative sign and decimal point) of the first character(s) in the specified &amp;lt;string expression=""&amp;gt;.&amp;lt;/string&amp;gt;&lt;/p&gt;
&lt;h1 id="h-vpos-stream-expressionstream"&gt;&lt;strong&gt;VPOS&lt;/strong&gt; (#&amp;lt;stream expression=""&amp;gt;)&amp;lt;/stream&amp;gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Reports the current vertical POSition of the text cursor relative to the left edge of the text window. The &amp;lt;stream expression=""&amp;gt; MUST be specified, and does NOT default to #0.&amp;lt;/stream&amp;gt;&lt;/p&gt;
&lt;h1 id="h-wait"&gt;&lt;strong&gt;WAIT&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Wait until any key is pressed. Originally: Waits until the I/O port at add returns a value (0-255). The value returned is XORed with i2 and the ANDed with i1. This is repeated until a non-zero result occurs.&lt;/p&gt;
&lt;h1 id="h-while-expression-wendexpression"&gt;&lt;strong&gt;WHILE&lt;/strong&gt; &amp;lt;expression&amp;gt; WEND&amp;lt;/expression&amp;gt;&lt;/h1&gt;
&lt;p&gt;repeats this loop until the expression is false&lt;/p&gt;
&lt;h1 id="h-width-stream-expressionstreaminteger-expressioninteger"&gt;&lt;strong&gt;WIDTH&lt;/strong&gt; &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;,]&amp;lt;/stream&amp;gt;&lt;/span&gt;&amp;lt;integer expression=""&amp;gt;&amp;lt;/integer&amp;gt;&lt;/h1&gt;
&lt;p&gt;The WIDTH command defines the maximum number of characters per output line for a specific stream. Once the specified width is reached, Locomotive BASIC automatically inserts a carriage return (line break). This prevents long lines from being truncated or wrapping incorrectly on the printer or screen. It is most commonly used with the printer (stream #8), but can also be applied to the screen (stream #0) or any other open stream.&lt;/p&gt;
&lt;h1 id="h-window-stream-expressionstreamlrttrl"&gt;&lt;strong&gt;WINDOW&lt;/strong&gt; &lt;span&gt;[#&amp;lt;stream expression=""&amp;gt;,]&amp;lt;/stream&amp;gt;&lt;/span&gt;&amp;lt;l&amp;gt;,&amp;lt;r&amp;gt;,&amp;lt;t&amp;gt;,&lt;b&gt;&lt;/b&gt;&amp;lt;/t&amp;gt;&amp;lt;/r&amp;gt;&amp;lt;/l&amp;gt;&lt;/h1&gt;&lt;b&gt;
&lt;p&gt;It is possible to define in BASIC eight (8) independent windows for text output. Overlapping is possible.#STREAM: eight window are possible. No. zero (0) is the main window where error or status messages were put out by default. each position is included inside the windowL = left column / R = right column (dependent of the mode 0 = 20 / 1 = 40 / 2 = 80) T = top row / B = bottom row (always from 1 to 25) Example: MODE 1 WINDOW#1,1,40,1,6 ...defines the first top quarter of the screen for window No. 1 ===&amp;gt; if R or B has value of 999, this means the maximum size of the console screen! &amp;lt;===&lt;/p&gt;
&lt;h1 id="h-write-channel-numberchannellist-ofusingformat-modelformatseparator-expressionexpressionseparatorspacespace"&gt;&lt;strong&gt;WRITE&lt;/strong&gt; &lt;span&gt;[#&amp;lt;channel number=""&amp;gt;]&amp;lt;/channel&amp;gt;&lt;/span&gt;&lt;span&gt;[&amp;lt;list of:&lt;article to=""&gt;]&lt;span&gt;[;]&lt;/span&gt;&lt;span&gt;[USING&amp;lt;format model=""&amp;gt;]&amp;lt;/format&amp;gt;&lt;/span&gt;&lt;span&gt;[&amp;lt;separator&amp;gt; &amp;lt;expression&amp;gt;]&amp;lt;/expression&amp;gt;&amp;lt;/separator&amp;gt;&lt;/span&gt;&lt;span&gt;[;|&amp;lt;space&amp;gt;]&amp;lt;/space&amp;gt;&lt;/span&gt;&lt;/article&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;The same as PRINT, but strings are printed in "" 10 a$="Hello" 20 WRITE 100,a$ RUN 100          "Hello"&lt;/p&gt;
&lt;h1 id="h-xpos"&gt;&lt;strong&gt;XPOS&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Reports the current horizontal (X)POSition of the graphics cursor.&lt;/p&gt;
&lt;h1 id="h-ypos"&gt;&lt;strong&gt;YPOS&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;FUNCTION: Reports the current vertical (Y)POSition of the graphics cursor.&lt;/p&gt;
&lt;h1 id="h-zone-i"&gt;&lt;strong&gt;ZONE&lt;/strong&gt; i&lt;/h1&gt;
&lt;p&gt;Changes the width of the print zone. Default is 13.     Example: 10 MODE 2 20 PRINT"normal zone (13)" 30 PRINT 1,2,3,4 RUN normal zone(13) 1           2            3            4 Ready 20 PRINT"now with different zone(5)" 30 ZONE 5 40 PRINT 1,2,3,4 RUN now with different zone(5) 1     2     3     4 Ready&lt;/p&gt;
&lt;h1 id="h-bitmap-lrtbbmp"&gt;&lt;strong&gt;|BITMAP&lt;/strong&gt; &lt;span&gt;[l,r,t,b[,bmp]]&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;creates a bitmap in base64-format to insert into an img-html-tag (&lt;img src="./data:image/png;base64,Base64String%20alt="/&gt;) from the screen. You can use a rect of the screen. If bmp=-1 then the bitmap is not encoded as base64 to realize a bitmap download&lt;/p&gt;
&lt;h1 id="h-dir-search-patternsearch"&gt;&lt;strong&gt;|DIR&lt;/strong&gt; &lt;span&gt;[,&amp;lt;search pattern=""&amp;gt;]&amp;lt;/search&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Same as CAT&lt;/p&gt;
&lt;h1 id="h-disc"&gt;&lt;strong&gt;|DISC&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Files are written to disc, not to tape.&lt;/p&gt;
&lt;h1 id="h-mode-m"&gt;&lt;strong&gt;|MODE&lt;/strong&gt; ,m&lt;/h1&gt;
&lt;p&gt;Changes the screen mode without clearing the screen: MODE 0 is 160×200 in 16 colours, MODE 1 is 320×200 4 colours, MODE 2 is 640×200 2 colours and MODE 3 is 160×200 in 4 colours.&lt;/p&gt;
&lt;h1 id="h-htmlstart"&gt;&lt;strong&gt;|HTMLSTART&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;In a Webserver environment prints the very first header before  and new cookie declarations.&lt;/p&gt;
&lt;h1 id="h-cookie"&gt;&lt;strong&gt;|COOKIE&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;In a Webserver environment this command reads all COOKIE variables and stores them in the corresponding string variables with the same name.  e.g. 10 |COOKIE 20 PRINT foo$ test Ready&lt;/p&gt;
&lt;h1 id="h-get"&gt;&lt;strong&gt;|GET&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;In a Webserver environment this command reads all GET variables and stores them in the corresponding string variables with the same name. Hint: requesturi$ is set to the active url. e.g. &amp;lt;input name="foo" value="test"&amp;gt; ... 10 |GET 20 PRINT foo$ test Ready&lt;/p&gt;
&lt;h1 id="h-gui"&gt;&lt;strong&gt;|GUI&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;execte CPCdisplay&lt;span&gt;[.exe]&lt;/span&gt; to communicate with it. CPCdisplay shows all the graphics and plays sound, which the terminal cannot do. (Show |SIXELMODE)&lt;/p&gt;
&lt;h1 id="h-json-newloadparsegetcounttypesetaddaddnumappendaddobjectdeletesavefree"&gt;&lt;strong&gt;|JSON&lt;/strong&gt; NEW|LOAD|PARSE|GET|COUNT|TYPE|SET|ADD|ADDNUM|APPEND|ADDOBJECT|DELETE|SAVE|FREE&lt;/h1&gt;
&lt;p&gt;|JSON Command Reference  - NEW   Create new empty JSON {} - LOAD "file.json"   Load JSON from file - PARSE "jsonstring$"   Parse JSON string - GET "path", var   Read value into variable - COUNT "path", var%   Count array items or object keys - TYPE "path", var$   Get type (object/array/string/number/boolean/null) - SET "path", "value"   Change existing string - SETNUM "path", num   Change existing number - ADD "path", "value"   Add new string field - ADDNUM "path", num   Add new numeric field - APPEND "path", "value"   Append value to array - ADDOBJECT "path"   Add new empty object to array - DELETE "path"   Delete field or element - SAVE "file.json"   Save JSON to file - FREE   Release JSON from memory  Path examples: kunden&lt;span&gt;[3]&lt;/span&gt;.name kunden&lt;span&gt;[0]&lt;/span&gt;.hobbies&lt;span&gt;[2]&lt;/span&gt; kunden&lt;span&gt;[-1]&lt;/span&gt;&lt;/p&gt;
&lt;h1 id="h-loadenvironment"&gt;&lt;strong&gt;|LOADENVIRONMENT&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;loads the previosly saved BASIC environment.&lt;/p&gt;
&lt;h1 id="h-mysql-connectqueryclosevariablestringvariablestringarrayarray"&gt;&lt;strong&gt;|MYSQL&lt;/strong&gt; CONNECT|QUERY|CLOSE&lt;span&gt;[&amp;lt;variable|string&amp;gt;]&amp;lt;/variable|string&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;array&amp;gt;]&amp;lt;/array&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;plase refer |SQLITE for details. |MYSQL works exactly identically, but to connect to have to use it in this way: |MYSQL CONNECT "localhost;meinuser;meinpass;meinedb"&lt;/p&gt;
&lt;h1 id="h-saveenvironment"&gt;&lt;strong&gt;|SAVEENVIRONMENT&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Saves the complete BASIC Environment (program, variables) to default.basicsh.json&lt;/p&gt;
&lt;h1 id="h-setcookie-namevalueexpires-in-minutesexpiresvaluename"&gt;&lt;strong&gt;|SETCOOKIE&lt;/strong&gt; ,&amp;lt;name&amp;gt;,&amp;lt;value&amp;gt;&lt;span&gt;[,&amp;lt;expires in="" minutes=""&amp;gt;]&amp;lt;/expires&amp;gt;&lt;/span&gt;&amp;lt;/value&amp;gt;&amp;lt;/name&amp;gt;&lt;/h1&gt;
&lt;p&gt;In a Webserver environment this command sets a COOKIE variables and stores it in the buffer. |HTMLSTART makes it permanent. e.g.: |SETCOOKIE,"foo","content",60 THIS COMMAND MUST BE USED BEFORE |HTMLSTART!&lt;/p&gt;
&lt;h1 id="h-paramcount-variablevariable"&gt;&lt;strong&gt;|PARAMCOUNT&lt;/strong&gt; &lt;span&gt;[,&amp;lt;variable&amp;gt;]&amp;lt;/variable&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;prints the number of parameters or puts it into &amp;lt;variable&amp;gt;&amp;lt;/variable&amp;gt;&lt;/p&gt;
&lt;h1 id="h-paramstr-numbervariablevariablenumber"&gt;&lt;strong&gt;|PARAMSTR&lt;/strong&gt; ,&amp;lt;number&amp;gt;&lt;span&gt;[,&amp;lt;variable&amp;gt;]&amp;lt;/variable&amp;gt;&lt;/span&gt;&amp;lt;/number&amp;gt;&lt;/h1&gt;
&lt;p&gt;prints the given parameter to screen or puts it into the &amp;lt;variable&amp;gt;&amp;lt;/variable&amp;gt;&lt;/p&gt;
&lt;h1 id="h-printsixel"&gt;&lt;strong&gt;|PRINTSIXEL&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;prints the graphics screen (sixel-Format) to the console&lt;/p&gt;
&lt;h1 id="h-printslow-msms"&gt;&lt;strong&gt;|PRINTSLOW&lt;/strong&gt; ,&amp;lt;ms&amp;gt;&amp;lt;/ms&amp;gt;&lt;/h1&gt;
&lt;p&gt;Slows down the output on the text screen in ms, to simulate the slow output of a original CPC&lt;/p&gt;
&lt;h1 id="h-sixelmode"&gt;&lt;strong&gt;|SIXELMODE&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Switches to the graphic mode in the console. In a UNIX environment sixel MUST be installed to show the sixel graphics! With kolsole (KDE) or 'xterm -ti vt340' it should work.&lt;/p&gt;
&lt;h1 id="h-showallvariables"&gt;&lt;strong&gt;|SHOWALLVARIABLES&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;prints a list of all variables&lt;/p&gt;
&lt;h1 id="h-showallloops"&gt;&lt;strong&gt;|SHOWALLLOOPS&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Shows all FOR and WHILE Loops for debugging issues&lt;/p&gt;
&lt;h1 id="h-showkeyboard"&gt;&lt;strong&gt;|SHOWKEYBOARD&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;debugging issue: show detected keyboard&lt;/p&gt;
&lt;h1 id="h-shellcommands"&gt;&lt;strong&gt;|SHELLCOMMANDS&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Lists all possible POSIX Shell commands&lt;/p&gt;
&lt;h1 id="h-sqlite-connectqueryclosevariablestringvariablestringarrayarray"&gt;&lt;strong&gt;|SQLITE&lt;/strong&gt; CONNECT|QUERY|CLOSE&lt;span&gt;[&amp;lt;variable|string&amp;gt;]&amp;lt;/variable|string&amp;gt;&lt;/span&gt;&lt;span&gt;[,&amp;lt;array&amp;gt;]&amp;lt;/array&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Use of a SQlite database |Create or open an database:  |SQLITE CONNECT &amp;lt;database name=""&amp;gt; Executes an query:  |SQLITE QUERY "create table test(name:varchar(255))" or to put a result into an array a$:  |SQLTE QUERY "select * from test",a$ Close the database: |SQLITE CLOSE  Example: 10 |SQLITE CONNECT "zl.db" 20 |SQLITE QUERY "create table test(name varchar(80))" 30 |SQLITE QUERY "insert into test (name) values (""Klaus""),(""Xaver""),(""Anton""),(""Dietmar"")" 40 |SQLITE QUERY "select * from test order by name",a$ 50 FOR i=0 TO SIZEOF(a$)-1 60 PRINT a$(i) 70 NEXT 90 |SQLITE CLOSE&amp;lt;/database&amp;gt;&lt;/p&gt;
&lt;h1 id="h-tape"&gt;&lt;strong&gt;|TAPE&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Files are written to a wav file in Amstrad CPC Tape format&lt;/p&gt;
&lt;h1 id="h-textmode-modemode"&gt;&lt;strong&gt;|TEXTMODE&lt;/strong&gt; &lt;span&gt;[,&amp;lt;mode&amp;gt;]&amp;lt;/mode&amp;gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;Switches back to text only mode. If mode parameter is given, the Text mode is set to this (See MODE) and the Text or Graphic mode will not change.&lt;/p&gt;
&lt;h1 id="h-waveform-waveform"&gt;&lt;strong&gt;|WAVEFORM&lt;/strong&gt; ,WaveForm&lt;/h1&gt;
&lt;p&gt;Set the SOUND Waveform. 0=wfSine, 1=wfSawtooth, 2=wfSquare, 3=wfOragn. Standard is wfSquare. This parameter will not reset when basic resets.&lt;/p&gt;
&lt;h1 id="h-shell"&gt;&lt;strong&gt;Shell&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Any command that is not part of the BASIC language will be passed to the operating system for execution. If it fails, you get a "Syntax error".&lt;/p&gt;
&lt;h1 id="h-zahlen-schreibweise"&gt;&lt;strong&gt;Zahlen (Schreibweise)&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;Dezimal: 123 Hexadezimal: &amp;amp;C9 Binär: &amp;amp;x10101001 Exponential: 3.2e4 = 32000 TRUE=-1, FALSE=0&lt;/p&gt;
&lt;h1 id="h-zeichen-codierung-im-grafikmodus"&gt;&lt;strong&gt;Zeichen&lt;/strong&gt; (Codierung im Grafikmodus)&lt;/h1&gt;
&lt;p&gt;Der Normale ASCII-Zeichensatz des Schneider CPC wurde implementiert, jedoch im grafischen Textmodus werden die UTF8-Zeichen für die deutschen Umlaute äöüÄÖÜß korrekt umgesetzt. ein doppeltes "" im String wird dann als CHR$(34) umgedeutet, um die Eingabe zu vereinfachen. Mit der Taste "Einfg" (insert) wird im Grafikmodus das unter dem Cursor liegende Zeichen kopiert (COPY beim CPC)&lt;/p&gt;
&lt;h1 id="h-rechnen"&gt;&lt;strong&gt;Rechnen&lt;/strong&gt;&lt;/h1&gt;
&lt;/b&gt;&lt;p&gt;&lt;b&gt;Wenn die Kommandozeile mit +,-,*,/,^,= anfängt, so wird das letzte numerische Ergebnis vorangesetzt und mann kann sich das PRINT sparen. Damit Kann die Shell leichter als Taschenrechner verwendet werden Der Operator = am Anfang bewirkt somit das gleiche wie PRINT, das Ergebnis wird aber nicht in dezimalschreibweise, sondern als Bruch ausgegeben.&lt;/b&gt;&lt;/p&gt;&lt;/address&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dietmar Schmidt</dc:creator><pubDate>Fri, 05 Jun 2026 21:16:16 -0000</pubDate><guid>https://sourceforge.net3fdf6d28cef614e24e277ba41cfafb667256d64f</guid></item></channel></rss>