MC-Basic:LOAD

From SoftMC-Wiki
Revision as of 16:00, 13 December 2010 by Arwiebe (talk | contribs) (Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= Load ''<filename>'' {Priority = ''<priority level>''} {StackSize = ''<stacksize multiplier>''} |AVAILABILITY= All versions |DESCRIPTION= This…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This command loads a programs and libraries from the Flash Disk into RAM, from where it may be exceuted. In the process, the program or library is checked for syntax errors. Syntax errors are written to the TRN.ERR file, which may be retrieved to see which errors occurred. Only programs without syntax errors may be executed. Programs are executed using the STARTTASK command. The Priority sets the <priority level> at which the task is run within the system. The highest priority is 1, which causes the task to be run after all realtime tasks have run. The lowest priority is 16. Tasks with the same priority level run using a round-robin procedure, which gives equal time to each task. A low priority task cannot interrupt a high priority task.

The StackSize optional parameter sets the size of local (Dim) variables’ stack. It’s value is a actually a floating point multiplier of an internal basic stack size.  This basic stack size is the lowest size allowed for local data stack (when size multiplier is 1), whereas the highest value depends on the amount of freememory available.

The command line operates at priority level 2. If a task is started at priority level 1, the command line is not operable until the task ends or until it releases the CPU.

Syntax

Load <filename> {Priority = <priority level>} {StackSize = <stacksize multiplier>}

Availability

All versions

Type

<filename>: File specification, including file name and extension.
<priority level>: Long

<stacksize multiplier>: Double

Range

<filename>: The file must exist on the Flash Disk.
<priority level>: 1 to 16

<stacksize multiplier>:1 to MaxDouble

Default

<priority level>: 16

<stacksize multiplier>:1

Scope

Task or Terminal      for programs and IMPORTED ( local ) libraries

Configuration            for global libraries

Limitations

The only limitation is free memory space. The largest block of free memory may be queried using the SYSTEM.MAXMEMBLOCK query.

Examples

Load MAKECUT.PRG

Load LIBRARY1.LIB

See Also