Difference between revisions of "MC-Basic:LOAD"
m |
|||
Line 10: | Line 10: | ||
|DESCRIPTION= | |DESCRIPTION= | ||
− | This command loads a programs and libraries from the | + | This command loads a programs and libraries from the flash memory into RAM, from where it may be executed. During 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. | + | The StackSize optional parameter sets the size of local (Dim) variables’ stack. Its 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 free memory available. |
{{Note|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.}} | {{Note|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.}} | ||
Line 23: | Line 23: | ||
|RANGE= | |RANGE= | ||
− | <''filename''>: The file must exist | + | <''filename''>: The file must exist in the flash memory.<br> |
''<priority level>'': 1 to 16 | ''<priority level>'': 1 to 16 | ||
Revision as of 11:01, 30 September 2014
This command loads a programs and libraries from the flash memory into RAM, from where it may be executed. During 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. Its 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 free memory available.
NOTE | |
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 in the flash memory.
<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