Changes

Jump to: navigation, search

Locomotive BASIC

422 bytes added, 09:33, 13 August 2012
/* 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 3 which can be specified with ‹timer number›. If omitted ‹timer number› 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 <timer number> you can also disable an AFTER or EVERY construct and stores the "remaining" time (> REMAIN)
: 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. Work out timing by measuring the subroutine or by trial and error.
: There are system internal interrupts (highest level) which cannot be influenced by BASIC interrupts (e.g. keyboard scan <> BREAK key.
: On the next level of sytem internal interrupts can be influenced by BASIC interrupts. E.g. the sound queue which will be created by "ON SQ <chanel> GOSUB <line>". Those sound interrupts have a independent time tricker but their priority is parallel to the second priority of BASIC.
==== <code>FILL i</code> ====
205
edits