Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Forth (programming language)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Operating system, files, and multitasking === Most Forth systems run under a host operating system such as [[Microsoft Windows]], [[Linux]] or a version of [[Unix]] and use the host operating system's file system for source and data files; the ANSI Forth Standard describes the words used for I/O. All modern Forth systems use normal text files for source, even if they are embedded. An embedded system with a resident compiler gets its source via a serial line. Classic Forth systems traditionally use neither [[operating system]] nor [[file system]]. Instead of storing code in files, source code is stored in disk blocks written to physical disk addresses. The word <code>BLOCK</code> is employed to translate the number of a 1K-sized block of disk space into the address of a buffer containing the data, which is managed automatically by the Forth system. Block use has become rare since the mid-1990s. In a hosted system those blocks too are allocated in a normal file in any case. [[Computer multitasking|Multitasking]], most commonly [[Computer multitasking#Cooperative multitasking/time-sharing|cooperative]] [[round-robin scheduling]], is normally available (although multitasking words and support are not covered by the ANSI Forth Standard). The word <code>PAUSE</code> is used to save the current task's execution context, to locate the next task, and restore its execution context. Each task has its own stacks, private copies of some control variables and a scratch area. Swapping tasks is simple and efficient; as a result, Forth multitaskers are available even on very simple [[microcontroller]]s, such as the [[Intel MCS-51|Intel 8051]], [[Atmel AVR]], and [[TI MSP430]].<ref name="nxtDb">{{cite web | last = Rodriguez | first = Brad | url = https://www.bradrodriguez.com/papers/8051task.pdf | title = Multitasking 8051 CamelForth | access-date = 2023-04-29}}</ref> Other non-standard facilities include a mechanism for issuing [[system call|call]]s to the host OS or [[windowing system]]s, and many provide extensions that employ the scheduling provided by the operating system. Typically they have a larger and different set of words from the stand-alone Forth's <code>PAUSE</code> word for task creation, suspension, destruction and modification of priority.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Forth (programming language)
(section)
Add topic