Changes

Jump to: navigation, search

Locomotive BASIC

141 bytes removed, 19:57, 19 September 2012
/* Command list */
=== Commands and operators ===
==== <code>AFTER </code>‹time delay›[<code>,</code>‹timer number›]<code> GOSUB ‹line number› </code>‹line number› ====: Waits for ‹time delay›/50 seconds and then jumps NON-RECURRING to the subroutine at ‹line number› (see also <code>"EVERY i[,t] GOSUB line"</code>).
==== <code>AUTO </code>[‹line number›][<code>,‹increment›] </code>‹increment›] ====
: Automatically generates line numbers starting at ‹line number› with ‹increment› after each entered line number. Use '''[ESC]''' to leave AUTO mode. Default values for ‹line number› and ‹increment› are 10.
: Example:
<pre>AUTO 100,5 :REM generates line numbers 100, 105, 110...</pre>
: <code>AUTO 100,5 :REM generates line numbers 100, 105, 110...</code> ==== <code>BORDER </code>‹colour›[<code>,‹colour›] </code>‹colour›] ====
: Changes the colour of the border. If the second argument is supplied the border flashes between the two colours.
==== <code>CALL </code>‹address expression›[<code>,</code>‹list of: parameter›] </code>====
: Allows a machine code routine to be called by BASIC. Variables, string values and constants can be passed to the routine. Values of any supported type can be passed back by supplying a variable with <code>@</code> in front of it. This passes the address of the variable to the routine although it doesn't implicitly know the data type.
: Example:
 : <codepre>CALL 0 :REM resets the computer completely</codepre>
==== <code>CAT</code> ====
: Displays the names of the files on the tape or disc. Tape files are displayed in the order they are encountered. Disc files are sorted alphabetically by ACSII code. Only files matching the current user are displayed. Files marked as system are not displayed.
: Examples:
<pre>CAT :REM lists all disc files in alpha-numeric (ASCII) order</pre>
: <code>CAT :REM lists all disc files in alpha-numeric (ASCII) order</code>: <codepre>|TAPE :CAT :REM lists names of all tape files in their storage order</codepre>
==== <code>CHAIN </code>‹file name›[<code>,‹line number expression›] </code>‹line number expression›] ====
:Enables the specified program to be loaded and RUN automatically. If the optional parameter ‹line number expression› is specified, the program execution will commence from that line.
==== <code>CHAIN MERGE </code>‹file name›[<code>,</code>‹line number expression› | [<code>,</code>[‹line number expression›]<code>,DELETE</code> ‹line number range›]] </code>====
:Loads the specified program from tape or disc, merges it into the program in memory, and starts execution of the merged program. The parameter <code>DELETE</code> ‹line number range› is used to delete part of the original program before running it, if required.
==== <code>CLEAR</code> ====
: Clears all variables from memory, leaving the program in memory unchanged. All open files are abandoned.
: The command clear inside a subroutine (<code>GOSUB</code>... <code>RETURN</code>) 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.
==== <code>CLG </code>[‹masked ink›] </code>====: Clears the graphics screen to colour specified by <code>‹masked ink›</code>. If parameter <code>‹masked ink› </code> is not specified then the graphics screen is cleared to the colour specified by the GRAPHICS PAPER statement.
==== <code>CLOSEIN</code> ====
: Closes any output file (tape or disc).
==== <code>CLS</code> [<code>#‹stream expression›]</code>‹stream expression›]====
: Clears the window specified by ‹stream expression›. If ‹stream expression› is omitted it defaults to #0 (usually the whole screen). The text cursor of the stream is moved to the upper left corner.
: 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.
==== <code>CURSOR ‹expression› </code>‹expression› ====: <code>‹expression› </code> must be either 0 or 1.
==== <code>DATA x1[,x2,x3...]</code> ====
</pre>
==== <code>LINE INPUT [#‹stream expression›][,]</code>‹variable›[<code>,‹variable›] </code>‹variable›] ====
: [...]
==== <code>LIST </code>[‹line number›][<code>-</code>[‹line number›]], [#‹stream expression›]</code>====
: A command for listing the Basic program code.
: Possibility for manipulating display is using line numbers with a minus symbol.
: ...prints out two parts of one program out into two windows (if they are defined well)
==== <code>LOAD ‹file name›[<code>,‹address›] </code>‹address›] ====
: [...]
: Introduces a comment.
==== <code>RENUM </code>[‹newLine›][<code>,</code>‹oldLine› | <code>,</code>[‹oldLine›]<code>,‹step›] </code>‹step›] ====
: Renumbers the lines of the current program.
20
edits